Skip to main content
Version: v0.9

Get Payment Details

GET
/payments/:paymentId

Retrieves detailed information about a specific payment by its ID. This endpoint automatically checks for updates from the payment processor for pending or processing payments before responding.

Path Parameters

ParameterTypeDescription
paymentId requiredstringThe unique identifier of the payment to retrieve

Example Request

GET /payments/550e8400-e29b-41d4-a716-446655440000
X-API-Key: your_api_key_here

Response Parameters

ParameterTypeDescription
payment_idstringUnique identifier for the payment
statusstringCurrent status of the payment (pending, processing, completed, failed, expired)
amount_usdnumberThe payment amount in USD
amount_cryptonumberThe payment amount in cryptocurrency
blockchainstringThe blockchain network used for the payment
tokenstringThe cryptocurrency token used for payment
addressstringThe cryptocurrency address for the payment
tx_hashstringThe blockchain transaction hash (if payment is processing or completed)
created_atstringISO 8601 timestamp of when the payment was created
updated_atstringISO 8601 timestamp of when the payment was last updated
expiry_timestringISO 8601 timestamp of when the payment request expires
custom_idstringYour custom identifier for the payment (if provided)
customer_emailstringEmail address of the customer (if provided)
callback_urlstringURL for callback notifications (if provided)
callback_sentbooleanIndicates whether a callback notification has been sent
notesstringAdditional notes about the payment (if provided)

Example Response

{
"payment_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "completed",
"amount_usd": 100.00,
"amount_crypto": 0.05,
"blockchain": "ETH",
"token": "USDT",
"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"tx_hash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"created_at": "2025-04-16T13:30:25.123Z",
"updated_at": "2025-04-16T14:45:30.456Z",
"expiry_time": "2025-04-16T14:30:25.123Z",
"custom_id": "ORDER-12345",
"customer_email": "customer@example.com",
"callback_url": "https://your-site.com/payment/callback",
"callback_sent": true,
"notes": null
}

Status Values

StatusDescription
pendingPayment has been created but no transaction has been detected yet
processingA transaction has been detected but not yet fully confirmed on the blockchain
completedPayment has been fully confirmed and processed
failedPayment failed or was canceled
expiredPayment request expired before completion

Error Codes

Status CodeError CodeDescription
401authentication_failedAuthentication failed. Check your API key or JWT token
403insufficient_permissionsYour API key does not have permission to view this payment
404payment_not_foundPayment with the specified ID was not found
429rate_limit_exceededYou have exceeded the rate limit for this endpoint
500payment_provider_errorAn error occurred when checking the payment status with the payment processor

Notes

  • When checking a payment with status pending or processing, this endpoint will automatically check for updates from the payment processor before responding.
  • The tx_hash field is only populated once a transaction has been identified on the blockchain.
  • For completed payments, you can view the blockchain transaction details directly using a blockchain explorer by following the tx_hash.
  • Payments typically remain in the system for at least 30 days after completion or expiration.