Skip to content

Payment Status

Query the current status of a payment.

  • Auth: x-public-key header required
  • For GET requests, use x-origin header instead of Origin in proxy environments

REST API

bash
curl https://gateway.dev.solonetwork.io/api/v1/payments/0xabc123... \
  -H "x-public-key: pk_xxxxx"

Response

Success (200 OK)

json
{
  "success": true,
  "data": {
    "paymentId": "0xabc123...",
    "orderId": "order-001",
    "status": "PAID",
    "chainId": 80002,
    "tokenAddress": "0xE4C687167705Abf55d709395f92e254bdF5825a2",
    "tokenSymbol": "SUT",
    "tokenDecimals": 18,
    "tokenPermitSupported": true,
    "gatewayAddress": "0x...",
    "forwarderAddress": "0x...",
    "amount": "10500000000000000000",
    "recipientAddress": "0xMerchantWallet...",
    "merchantId": "0x...",
    "deadline": "1706281200",
    "successUrl": "https://example.com/success",
    "failUrl": "https://example.com/fail",
    "expiresAt": "2024-01-26T12:35:00.000Z",
    "txHash": "0xdef789...",
    "payerAddress": "0x...",
    "createdAt": "2024-01-26T12:30:00Z",
    "currency": "USD",
    "fiatAmount": 10.5,
    "tokenPrice": 1.0
  }
}
  • txHash -- Payment transaction hash. Present once the payment is confirmed on-chain (status is PAID or later).
  • deadline -- Unix timestamp deadline for the payment transaction. The payment must be submitted before this time.

Key Response Fields

FieldTypeDescription
paymentIdstringUnique payment ID
orderIdstringMerchant order ID
statusstringPayment status (CREATED, PAID, EXPIRED, ...)
amountstringToken amount in wei — always in wei, regardless of whether currency was used
tokenAddressstringPayment token contract address
tokenSymbolstringToken symbol (e.g. USDT)
tokenDecimalsnumberToken decimal places (used to convert amount)
currencystring|nullFiat currency code — present only when the payment was created with currency
fiatAmountnumber|nullOriginal fiat amount (in currency units) — present only when the payment was created with currency
tokenPricenumber|nullLatest 1-hour average token price (TWAP) used for conversion (in currency units) — present only when the payment was created with currency
recipientAddressstringMerchant recipient address
txHashstring|nullPayment transaction hash (present once PAID)

Mind the units when verifying amounts

Even if the user submitted the payment request with currency and a fiat value (e.g. 25.5 USD), the response amount is always the converted token amount in wei. To verify against the fiat amount stored in your order database, compare currency + fiatAmount — not amount. See the payment verification section in the widget guide for the full checklist.

Status Flow

CREATED ──► PAID
CREATED ──► INVALID
CREATED ──► EXPIRED
CREATED ──► FAILED
PAID    ──► REFUND_SUBMITTED ──► REFUNDED (coming soon)

Status Descriptions

StatusDescriptionNext Action
CREATEDPayment created, awaiting on-chain transactionUser pays on-chain
PAIDPayment confirmed on-chain, funds sent to merchantNone (terminal)
REFUND_SUBMITTEDRefund request submitted (coming soon)Wait for REFUNDED
REFUNDEDRefund completed (coming soon)None (terminal)
INVALIDOn-chain payment validation failed (amount/token/recipient mismatch)Contact support
EXPIREDPayment expired (5 minutes exceeded)Create new payment
FAILEDTransaction failedCreate new payment

On-chain Sync

GET /payments/:id syncs blockchain and database status in real-time. For a successful payment, the status transitions directly from CREATED to PAID once the on-chain transaction is confirmed. No additional merchant action is required to release funds.

Next Steps

Non-custodial Web3 payment infrastructure for ERC-20 checkout, sponsored gas, and wallet-to-wallet settlement.