# Getting Started



This guide will walk you through the steps to start integrating with the Paytrie API.

## Integration Options

Paytrie offers two primary integration methods:

<Cards>
  <Card title="Embedded Widget" href="/docs/embedded-widget" icon="code">
    Embed the Paytrie widget directly in your application using an iframe. Perfect for quick integrations with minimal backend code. Pre-fill user data via URL parameters.
  </Card>

  <Card title="API Integration" href="/docs/getting-started#step-1-create-a-paytrie-account" icon="code-2">
    Build a custom integration using our REST API. Provides full control over the user experience and allows for deep integration with your existing systems.
  </Card>
</Cards>

### Which option should I choose?

* **Choose the Embedded Widget** if you want to:
  * Get up and running quickly with minimal development time
  * Offload KYC compliance and user management to Paytrie
  * Avoid building and maintaining payment UI
  * Pre-fill user information from your application

* **Choose API Integration** if you need:
  * Full control over the user interface and experience
  * Custom workflows and business logic
  * Direct integration with your backend systems
  * Advanced features like programmatic transaction management

<Callout type="info">
  Both integration methods can be combined. Many partners start with the embedded widget for quick time-to-market, then gradually migrate to API integration as their needs grow.
</Callout>

## Prerequisites

Before you begin, you'll need:

* A Paytrie account
* An API key (or vendor ID for embedded widget)

## Step 1: Create a Paytrie account

Register for a Paytrie account at [app.paytrie.com/SignupEmail](https://app.paytrie.com/SignupEmail).

## Step 2: Request API access

Contact [support@paytrie.com](mailto:support@paytrie.com) to request a developer API key. Include:

* Your registered email address
* A brief description of your integration use case
* Expected transaction volume

## Step 3: Authenticate your requests

All API requests require authentication via the `x-api-key` header:

```bash
curl -X GET "https://api.paytrie.com/endpoint" \
  -H "x-api-key: your-api-key-here"
```

## Step 4: Start building

Once you have your API key, you're ready to integrate.

### For Embedded Widget Integration

If you chose the embedded widget approach, head over to the [Embedded Widget Overview](/docs/embedded-widget) to learn how to embed the widget in your application, or jump directly to the [URL Builder](/docs/url-builder) to start generating custom widget URLs.

### For API Integration

Here's a typical API integration flow:

<Steps>
  <Step>
    ### Register users

    Use the [Customer Onboarding](/docs/customer-onboarding) endpoint to register users and collect KYC information.
  </Step>

  <Step>
    ### Authenticate users

    Implement the [Authentication](/docs/authentication) flow to get user tokens for transaction requests.
  </Step>

  <Step>
    ### Get price quotes

    Fetch real-time [Price Quotes](/docs/price-quotes) to display conversion rates to users.
  </Step>

  <Step>
    ### Create transactions

    Submit [Transactions](/docs/transactions) to process stablecoin purchases.
  </Step>

  <Step>
    ### Handle webhooks

    Set up [Webhooks](/docs/webhooks) to receive notifications about user verification and transaction status changes.
  </Step>
</Steps>

## Base URL

All API requests should be made to:

```
https://api.paytrie.com
```
