Step 2: Create a payment

Now that you have a remitter, you can create an inbound payment request. This generates a payment record but doesn't yet lock in the exchange rate — that happens when you accept the payment in the next step.

Make the request

Replace {accountId}, {apiKey}, {budgetId}, and {remitterId} with your own values. The remitterId is the id returned when you created the remitter in the previous step.

SandboxProduction
Copy
Copied
curl -i -X POST \
  'https://api-sandbox.equalsmoney.com/stablecoins/payments?accountId={accountId}' \
  -H 'Authorization: ApiKey {apiKey}' \
  -H 'Content-Type: application/json' \
  -d '{
    "budgetId": "{budgetId}",
    "remitterId": "{remitterId}",
    "amount": 100,
    "displayName": "Invoice #12345",
    "sourceCurrencyCode": "USDC",
    "destinationCurrencyCode": "USD",
    "returnUrl": "https://www.example.com/payment-complete",
    "expiryMinutes": 60
  }'
Copy
Copied
curl -i -X POST \
  'https://api.equalsmoney.com/stablecoins/payments?accountId={accountId}' \
  -H 'Authorization: ApiKey {apiKey}' \
  -H 'Content-Type: application/json' \
  -d '{
    "budgetId": "{budgetId}",
    "remitterId": "{remitterId}",
    "amount": 100,
    "displayName": "Invoice #12345",
    "sourceCurrencyCode": "USDC",
    "destinationCurrencyCode": "USD",
    "returnUrl": "https://www.example.com/payment-complete",
    "expiryMinutes": 60
  }'
info

The minimum payment amount is 10 USDC. The expiryMinutes field controls how long the payment remains valid before it expires. The returnUrl is optional — it's the URL your customer will be redirected to if they click the Back button on the payment page.

Expected response

If your request is successful, you'll receive a 201 response. The payment is created with a PENDING status and includes a blockchain payment link. Save the payment id — you'll need it in the next step.

Copy
Copied
{
  "id": "e9293471-5eb3-4dbc-916c-dbaf9e2deefd",
  "accountId": "F50091",
  "budgetId": "775596ae-2624-40af-a9dc-9756110a4a03",
  "status": "PENDING",
  "remitterId": "a1111111-2222-3333-4444-555555555555",
  "amount": 100,
  "displayName": "Invoice #12345",
  "sourceCurrencyCode": "USDC",
  "destinationCurrencyCode": "USD",
  "returnUrl": "https://www.example.com/payment-complete",
  "link": {
    "url": "https://pay.sandbox.example.com/channel?uuid=9d1f67f2-a647-404b-9b02-247c77be81d0",
    "chains": [
      {
        "protocol": "ETH",
        "address": "0x0000000000000000000000000000000000000000"
      }
    ]
  },
  "expiresAt": "2025-01-30T10:00:00.000Z",
  "createdBy": "John Smith",
  "createdAt": "2025-01-30T09:00:00Z",
  "updatedAt": "2025-01-30T09:00:00Z"
}

The link.url is the payment page URL that you'll share with your customer. The link.chains array lists the supported blockchain networks and wallet addresses for this payment.

Next