> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paycrest.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Create your first Paycrest payment order in minutes.

This guide walks through creating a payment order using the Sender API, the recommended path for all new integrations. You'll have a working offramp in under 10 minutes. You do **not** need to call the public rates API first—`POST /v2/sender/orders` resolves an acceptable rate unless you pass a locked **`rate`** on create (see the [Sender API integration guide](/implementation-guides/sender-api-integration)).

## Prerequisites

* A **Paycrest Sender account** (sign up at [app.paycrest.io](https://app.paycrest.io))
* **KYB verification** completed (typically 1–3 business days)
* Your **API Key** from the dashboard

***

## Optional: Prefetch a quote for the UI

If you want to **show** an exchange rate in checkout before create, call the public **`GET /v2/rates/{network}/{from}/{amount}/{to}`** endpoint (no API key). For when to pass **`rate`** on create and full examples, see [Optional: prefetch quotes and account names](/implementation-guides/sender-api-integration#optional-prefetch-quotes-and-account-names). Endpoint reference: [Get Token Rate (v2)](/api-reference/general/get-token-rate).

***

## Step 1: Create a Payment Order

Use `POST /v2/sender/orders`. Set `source.type` and `destination.type` to choose the direction.

<Tabs>
  <Tab title="Offramp — stablecoin → fiat">
    ```bash theme={null}
    curl -X POST "https://api.paycrest.io/v2/sender/orders" \
      -H "API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "amount": "100",
        "source": {
          "type": "crypto",
          "currency": "USDT",
          "network": "base",
          "refundAddress": "0xYourWalletAddress"
        },
        "destination": {
          "type": "fiat",
          "currency": "NGN",
          "recipient": {
            "institution": "GTBINGLA",
            "accountIdentifier": "1234567890",
            "accountName": "John Doe",
            "memo": "Payment"
          }
        },
        "reference": "my-order-001"
      }'
    ```
  </Tab>

  <Tab title="Onramp — fiat → stablecoin">
    ```bash theme={null}
    curl -X POST "https://api.paycrest.io/v2/sender/orders" \
      -H "API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "amount": "50000",
        "amountIn": "fiat",
        "source": {
          "type": "fiat",
          "currency": "NGN",
          "refundAccount": {
            "institution": "GTBINGLA",
            "accountIdentifier": "1234567890",
            "accountName": "John Doe"
          }
        },
        "destination": {
          "type": "crypto",
          "currency": "USDT",
          "recipient": {
            "address": "0xRecipientWalletAddress",
            "network": "base"
          }
        },
        "reference": "my-order-002"
      }'
    ```
  </Tab>

  <Tab title="JavaScript">
    ```javascript theme={null}
    const res = await fetch("https://api.paycrest.io/v2/sender/orders", {
      method: "POST",
      headers: {
        "API-Key": "YOUR_API_KEY",
        "Content-Type": "application/json"
      },
      body: JSON.stringify({
        amount: "100",
        source: {
          type: "crypto",
          currency: "USDT",
          network: "base",
          refundAddress: "0xYourWalletAddress"
        },
        destination: {
          type: "fiat",
          currency: "NGN",
          recipient: {
            institution: "GTBINGLA",
            accountIdentifier: "1234567890",
            accountName: "John Doe",
            memo: "Payment"
          }
        },
        reference: "my-order-001"
      })
    });
    const { data: order } = await res.json();
    console.log(order.id, order.providerAccount);
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import requests

    res = requests.post(
        "https://api.paycrest.io/v2/sender/orders",
        headers={"API-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
        json={
            "amount": "100",
            "source": {
                "type": "crypto",
                "currency": "USDT",
                "network": "base",
                "refundAddress": "0xYourWalletAddress"
            },
            "destination": {
                "type": "fiat",
                "currency": "NGN",
                "recipient": {
                    "institution": "GTBINGLA",
                    "accountIdentifier": "1234567890",
                    "accountName": "John Doe",
                    "memo": "Payment"
                }
            },
            "reference": "my-order-001"
        }
    )
    order = res.json()["data"]
    print(order["id"], order["providerAccount"])
    ```
  </Tab>

  <Tab title="Go">
    ```go theme={null}
    package main

    import (
        "bytes"
        "encoding/json"
        "fmt"
        "io"
        "net/http"
    )

    func main() {
        payload := map[string]interface{}{
            "amount": "100",
            "source": map[string]interface{}{
                "type":          "crypto",
                "currency":      "USDT",
                "network":       "base",
                "refundAddress": "0xYourWalletAddress",
            },
            "destination": map[string]interface{}{
                "type":     "fiat",
                "currency": "NGN",
                "recipient": map[string]interface{}{
                    "institution":       "GTBINGLA",
                    "accountIdentifier": "1234567890",
                    "accountName":       "John Doe",
                    "memo":              "Payment",
                },
            },
            "reference": "my-order-001",
        }
        body, _ := json.Marshal(payload)
        req, _ := http.NewRequest("POST", "https://api.paycrest.io/v2/sender/orders", bytes.NewBuffer(body))
        req.Header.Set("API-Key", "YOUR_API_KEY")
        req.Header.Set("Content-Type", "application/json")
        resp, _ := http.DefaultClient.Do(req)
        defer resp.Body.Close()
        out, _ := io.ReadAll(resp.Body)
        fmt.Println(string(out))
    }
    ```
  </Tab>
</Tabs>

***

## Step 2: Complete the Payment

The response includes a `providerAccount` that tells you (or your user) where to send funds.

<CardGroup cols={2}>
  <Card title="Offramp" icon="arrow-right">
    Send tokens to `providerAccount.receiveAddress` before `validUntil`.
    The total to send is `amount + senderFee + transactionFee` (all returned in the response).
  </Card>

  <Card title="Onramp" icon="arrow-left">
    Show `providerAccount` details to the user.
    They transfer exactly `amountToTransfer` in `currency` to `accountIdentifier` before `validUntil`.
  </Card>
</CardGroup>

***

## Step 3: Track Order Status

Poll `GET /v2/sender/orders/:id` or listen for webhooks configured in your dashboard.

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.paycrest.io/v2/sender/orders/ORDER_ID" \
      -H "API-Key: YOUR_API_KEY"
    ```
  </Tab>

  <Tab title="JavaScript">
    ```javascript theme={null}
    const { data: order } = await fetch(
      `https://api.paycrest.io/v2/sender/orders/${orderId}`,
      { headers: { "API-Key": "YOUR_API_KEY" } }
    ).then(r => r.json());

    console.log(order.status); // e.g. "settled"
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    res = requests.get(
        f"https://api.paycrest.io/v2/sender/orders/{order_id}",
        headers={"API-Key": "YOUR_API_KEY"}
    )
    print(res.json()["data"]["status"])
    ```
  </Tab>

  <Tab title="Go">
    ```go theme={null}
    req, _ := http.NewRequest("GET", "https://api.paycrest.io/v2/sender/orders/"+orderID, nil)
    req.Header.Set("API-Key", "YOUR_API_KEY")
    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()
    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
    ```
  </Tab>
</Tabs>

<CardGroup cols={2}>
  <Card title="Order Statuses" icon="list">
    <ul>
      <li><strong>initiated</strong> — order created, awaiting deposit</li>
      <li><strong>deposited</strong> — deposit confirmed (offramp)</li>
      <li><strong>pending</strong> — assigned to provider</li>
      <li><strong>fulfilling</strong> — fiat/crypto disbursement in progress</li>
      <li><strong>validated</strong> — payout confirmed by provider</li>
      <li><strong>settling</strong> — onchain release in progress</li>
      <li><strong>settled</strong> — order complete</li>
      <li><strong>expired</strong> — no deposit received before deadline</li>
      <li><strong>refunding</strong> — refund in progress</li>
      <li><strong>refunded</strong> — deposit returned to sender</li>
    </ul>
  </Card>

  <Card title="Timing" icon="clock">
    <ul>
      <li><strong>Typical completion</strong>: under 30 seconds for the majority of orders</li>
      <li><strong>expired</strong>: receive address or virtual account never funded</li>
      <li><strong>refunded</strong>: deposit received but order couldn't complete</li>
      <li><strong>Minimum order</strong>: \$0.50 on any supported chain</li>
    </ul>
  </Card>
</CardGroup>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Full Integration Guide" href="/implementation-guides/sender-api-integration" icon="book">
    Webhooks, signature verification, token transfers, v1 legacy API, and more
  </Card>

  <Card title="API Reference" href="/api-reference/sender/initiate-payment-order-v2" icon="code">
    Interactive endpoint docs with full request/response schemas
  </Card>

  <Card title="Supported Stablecoins" href="/resources/supported-stablecoins" icon="coins">
    Tokens, networks, contract addresses, and decimals
  </Card>

  <Card title="Supported Currencies" href="/resources/supported-currencies" icon="globe">
    Active fiat corridors and delivery channels
  </Card>
</CardGroup>
