Skip to main content

Authentication

Every request to the Merchant API requires the following headers:
HeaderRequiredDescription
Content-TypeYesMust be application/json
Api-KeyYesPartner API key from the Merchant Dashboard
Merchant-IdYesMerchant identifier from the Merchant Dashboard
Keep your Api-Key secret. Never expose it in client-side code — all API calls should be made from your backend server.

Base URLs

EnvironmentURL
Productionhttps://api.pay.walletconnect.org
Staginghttps://staging.api.pay.walletconnect.org

Create Payment

Creates a new payment for the buyer to complete on the WalletConnect Pay checkout portal.
POST /v1/merchant/payment

Request Body

FieldTypeRequiredDescription
amountobjectYesThe payment amount
amount.unitstringYesCurrency in iso4217/{CODE} format (e.g., iso4217/USD)
amount.valuestringYesAmount in minor units as a string (e.g., "5000" for $50.00)
referenceIdstringYesYour internal order or reference identifier
checkoutobjectNoCheckout redirect configuration
checkout.successUrlstringNoHTTPS URL to redirect the buyer after a successful payment
checkout.errorUrlstringNoHTTPS URL to redirect the buyer after a failed payment
The amount.value is expressed in the currency’s minor units. For USD, "5000" equals $50.00 (5000 cents). For JPY (which has no minor unit), "5000" equals ¥5,000.
Both successUrl and errorUrl must be valid HTTPS URLs. If either is missing or invalid, the redirect feature is disabled entirely for that payment — the checkout portal will show generic terminal views instead.

Request Example

{
  "amount": {
    "unit": "iso4217/USD",
    "value": "5000"
  },
  "referenceId": "order_abc123",
  "checkout": {
    "successUrl": "https://yourstore.com/order/abc123/success",
    "errorUrl": "https://yourstore.com/order/abc123/failed"
  }
}

Response

FieldTypeDescription
paymentIdstringUnique payment identifier (e.g., pay_xxx)
gatewayUrlstringURL to the checkout portal for this payment — use this to redirect the buyer
statusstringInitial payment status (typically pending)
expiresAtintegerUnix timestamp (seconds) when the payment expires
isFinalbooleanWhether the payment is already in a terminal state
pollInMsintegerSuggested polling interval in milliseconds for status checks

Response Example

{
  "paymentId": "pay_abc123def456",
  "gatewayUrl": "https://pay.walletconnect.com/?pid=pay_abc123def456",
  "status": "pending",
  "expiresAt": 1709831400,
  "isFinal": false,
  "pollInMs": 1000
}

Code Examples

curl -X POST https://api.pay.walletconnect.org/v1/merchant/payment \
  -H "Content-Type: application/json" \
  -H "Api-Key: YOUR_API_KEY" \
  -H "Merchant-Id: YOUR_MERCHANT_ID" \
  -d '{
    "amount": {
      "unit": "iso4217/USD",
      "value": "5000"
    },
    "referenceId": "order_abc123",
    "checkout": {
      "successUrl": "https://yourstore.com/order/abc123/success",
      "errorUrl": "https://yourstore.com/order/abc123/failed"
    }
  }'

Error Responses

Status CodeDescription
400Invalid request — check required fields and format
401Invalid or missing API key
404Merchant not found for the given Merchant-Id
500Internal server error

Verify Payment Status

After the buyer completes (or abandons) the checkout, verify the payment status from your backend.
GET /v1/merchant/payment/{id}/status

Path Parameters

ParameterTypeDescription
idstringThe paymentId returned when creating the payment

Headers

HeaderRequiredDescription
Api-KeyYesPartner API key
Merchant-IdYesMerchant identifier

Response

FieldTypeDescription
statusstringPayment status (see below)
isFinalbooleanWhether the payment has reached a terminal state

Payment Statuses

StatusTerminalDescription
pendingNoPayment created, waiting for buyer action
processingNoTransaction submitted, awaiting on-chain confirmation
succeededYesPayment completed successfully
failedYesPayment failed or was rejected
expiredYesPayment window closed without completion

Code Example

curl https://api.pay.walletconnect.org/v1/merchant/payment/pay_abc123def456/status \
  -H "Api-Key: YOUR_API_KEY" \
  -H "Merchant-Id: YOUR_MERCHANT_ID"