Step 3: Accept the payment

Accepting a payment locks in the USDC-to-USD exchange rate for one hour. During this time, your customer can complete the blockchain transfer at the agreed rate.

After accepting the payment, share the link.url from the response with your customer so they can send the USDC.

Make the request

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

SandboxProduction
Copy
Copied
curl -i -X POST \
  'https://api-sandbox.equalsmoney.com/stablecoins/payments/{paymentId}/accept?accountId={accountId}' \
  -H 'Authorization: ApiKey {apiKey}' \
  -H 'Content-Type: application/json' \
  -d '{}'
Copy
Copied
curl -i -X POST \
  'https://api.equalsmoney.com/stablecoins/payments/{paymentId}/accept?accountId={accountId}' \
  -H 'Authorization: ApiKey {apiKey}' \
  -H 'Content-Type: application/json' \
  -d '{}'
info

The request body is an empty object {}. The exchange rate is determined automatically at the time of acceptance.

Expected response

If your request is successful, you'll receive a 200 response. The payment remains in PENDING status until the remitter's USDC transfer is detected on the blockchain.

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"
}

Share link.url with your customer. They can use this URL to complete the blockchain payment, or they can send USDC directly to one of the blockchain addresses listed in link.chains.

Next