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

# Create Your First Payment

> Create a quote, attach an invoice, and submit a payment

A payment depends on an existing customer, an existing beneficiary, a payment invoice document, and a live quote. The organization must also be enabled for partner payment initiation.

You need:

| Flow                                      | Permission        |
| ----------------------------------------- | ----------------- |
| Crypto token and network discovery        | `CRYPTO_READ`     |
| Invoice document upload                   | `DOCUMENTS_WRITE` |
| Quote and payment creation                | `PAYMENTS_WRITE`  |
| Payment read-back, activity, and receipts | `PAYMENTS_READ`   |

<Steps>
  <Step title="Choose a token and network">
    Use payment methods to choose an enabled token and network pair. `GET /api/v1/crypto/networks` is useful for network metadata, but `payment-methods` is the source for available token/network combinations.

    ```bash theme={null}
    TOKEN="<signed-request-jwt>"

    curl https://rest-api.nuvera.global/api/v1/crypto/payment-methods \
      -H "x-api-key: $NUVERA_API_KEY" \
      -H "Authorization: Bearer $TOKEN"
    ```
  </Step>

  <Step title="Upload the invoice document">
    Upload at least one invoice with `category=INVOICE`, `entityType=PAYMENT`, and `entityId=pending`. See [Upload
    Documents](/get-started/partner-api/upload-documents) for the multipart request.
  </Step>

  <Step title="Create a payment quote">
    Include the configured `paymentSystemId` for the payout rail and the target `customerId`. Partner REST does not expose a payment-system lookup endpoint; use the payment system ID provided during setup or by Nuvera support.

    ```json theme={null}
    {
      "fundingType": "CRYPTO",
      "amount": "125.00",
      "currencyCode": "USD",
      "paymentToken": "<enabled-token>",
      "paymentNetwork": "<enabled-network>",
      "paymentSystemId": "<payment-system-id>",
      "customerId": "<customer-id>"
    }
    ```

    ```bash theme={null}
    BODY='{"fundingType":"CRYPTO","amount":"125.00","currencyCode":"USD","paymentToken":"<enabled-token>","paymentNetwork":"<enabled-network>","paymentSystemId":"<payment-system-id>","customerId":"<customer-id>"}'
    TOKEN="<signed-request-jwt>"

    curl https://rest-api.nuvera.global/api/v1/payment/quote \
      -H "x-api-key: $NUVERA_API_KEY" \
      -H "Authorization: Bearer $TOKEN" \
      -H "content-type: application/json" \
      --data "$BODY"
    ```
  </Step>

  <Step title="Create the payment">
    Use the quote ID and invoice document ID from the previous steps. The quote amount, currency, customer binding, and payout rail must match the payment request and beneficiary payout rail.

    ```json theme={null}
    {
      "customerId": "<customer-id>",
      "beneficiaryId": "<beneficiary-id>",
      "amount": "125.00",
      "currencyCode": "USD",
      "purposeOfPayment": "Invoice payment",
      "documentIds": ["<invoice-document-id>"],
      "paymentQuoteId": "<payment-quote-id>"
    }
    ```

    ```bash theme={null}
    BODY='{"customerId":"<customer-id>","beneficiaryId":"<beneficiary-id>","amount":"125.00","currencyCode":"USD","purposeOfPayment":"Invoice payment","documentIds":["<invoice-document-id>"],"paymentQuoteId":"<payment-quote-id>"}'
    TOKEN="<signed-request-jwt>"

    curl https://rest-api.nuvera.global/api/v1/payment \
      -H "x-api-key: $NUVERA_API_KEY" \
      -H "Authorization: Bearer $TOKEN" \
      -H "content-type: application/json" \
      --data "$BODY"
    ```
  </Step>
</Steps>

## Optional payment metadata

These fields are optional and can help reconcile payments with your internal system.

| Field               | Required? | Use                                                  |
| ------------------- | --------- | ---------------------------------------------------- |
| `internalReference` | Optional  | Your internal payment reference.                     |
| `invoiceNumber`     | Optional  | Invoice number associated with the uploaded invoice. |
| `memo`              | Optional  | Short note for the payment record.                   |

## Quote and payment lifecycle

Quotes are short-lived. Read `expiresAt` from the quote response and create the payment before that time. If a quote expires or is used, request a new quote.

Payment creation submits the payment into Nuvera's review flow. Use list, detail, and activity endpoints to track it. `GET /api/v1/payment/{id}/receipt` is available only after the payment is completed.

For complete quote and payment schemas, open the [API Reference](/api-reference/introduction).
