API Reference
Retrieve a payment
Retrieves the full details of a payment by its unique identifier.
The response shape depends on the current status. Use this endpoint when you need the full payment object — address, amounts, timer, or transaction signatures. For status-only polling use GET /v1/payments/{paymentID}/status.
Response by status
created—amount,currency, andtimerare present.paymentDetailsis absent: the customer has not yet selected a payment method.pending—paymentDetailsis populated with the blockchainaddress, exactcoinAmount, and coin/chain metadata. The customer must send exactlycoinAmounttoaddresson the TON blockchain.completed—paymentDetailsincludestransactionSignatures— on-chain hashes confirming the transfer.timer.paidAtis set.expired— TTL elapsed. Reachable from bothcreated(no method was ever selected) andpending(transfer was not sent in time).paymentDetailsis present only if the payment had reachedpendingbefore expiring.cancelled— Canceled by the merchant viaPOST /v1/payments/{id}/cancel. Reachable from bothcreatedandpending.paymentDetailsis present only if the payment had reachedpendingbefore cancellation.
Key response fields
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Unique payment identifier. |
status | string | Current lifecycle status. |
amount | string | Denomination amount set at creation. |
currency | string | Denomination currency set at creation (fiat code or coin ticker). |
checkoutURL | string (URL) | HexPay-hosted checkout page. Redirect the customer here to complete payment. |
paymentDetails.address | string | TON address the customer sends funds to. Present from pending onward. |
paymentDetails.coinAmount | string | Exact crypto amount the customer must transfer. |
paymentDetails.transactionSignatures | array | On-chain transaction hashes. Present only when completed. |
timer.createdAt | string (RFC 3339) | Payment creation timestamp. |
timer.expiresAt | string (RFC 3339) | Timestamp when the payment expires. |
timer.paidAt | string (RFC 3339) | Timestamp of confirmed payment. Present only when completed. |
AuthorizationBearer <token>
JWT token signed with the EdDSA algorithm. Obtain the token from the HexPay
merchant dashboard and pass it via the Authorization: Bearer <token> header.
In: header
Path Parameters
paymentIDstring
Unique identifier of the payment (UUID).
Format
uuidResponse Body
curl -X GET "https://api.hexpay.io/v1/payments/019327c6-2058-7901-b234-56789abcdeff"Payment created; customer has not yet selected a payment method.
{
"id": "019327c6-2058-7901-b234-56789abcdeff",
"status": "created",
"order_id": "order-2026-00123",
"amount": "100.00",
"currency": "USD",
"checkoutURL": "https://payment.hexpay.io/019327c6-2058-7901-b234-56789abcdeff",
"timer": {
"createdAt": "2026-01-20T10:00:00Z",
"expiresAt": "2026-01-20T10:15:00Z"
}
}{
"error": {
"type": "invalid_request_error",
"message": "paymentID must be a valid UUID",
"code": "invalid_payment_id",
"param": "paymentID"
}
}{
"error": {
"type": "authentication_error",
"message": "Invalid or expired authentication token",
"code": "auth_invalid"
}
}{
"error": {
"type": "not_found_error",
"message": "No payment found with the specified ID",
"code": "payment_not_found"
}
}{
"error": {
"type": "api_error",
"message": "An unexpected error occurred. Please retry the request or contact support.",
"code": "internal_error"
}
}