Hex Pay Docs
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

  • createdamount, currency, and timer are present. paymentDetails is absent: the customer has not yet selected a payment method.
  • pendingpaymentDetails is populated with the blockchain address, exact coinAmount, and coin/chain metadata. The customer must send exactly coinAmount to address on the TON blockchain.
  • completedpaymentDetails includes transactionSignatures — on-chain hashes confirming the transfer. timer.paidAt is set.
  • expired — TTL elapsed. Reachable from both created (no method was ever selected) and pending (transfer was not sent in time). paymentDetails is present only if the payment had reached pending before expiring.
  • cancelled — Canceled by the merchant via POST /v1/payments/{id}/cancel. Reachable from both created and pending. paymentDetails is present only if the payment had reached pending before cancellation.

Key response fields

FieldTypeDescription
idstring (UUID)Unique payment identifier.
statusstringCurrent lifecycle status.
amountstringDenomination amount set at creation.
currencystringDenomination currency set at creation (fiat code or coin ticker).
checkoutURLstring (URL)HexPay-hosted checkout page. Redirect the customer here to complete payment.
paymentDetails.addressstringTON address the customer sends funds to. Present from pending onward.
paymentDetails.coinAmountstringExact crypto amount the customer must transfer.
paymentDetails.transactionSignaturesarrayOn-chain transaction hashes. Present only when completed.
timer.createdAtstring (RFC 3339)Payment creation timestamp.
timer.expiresAtstring (RFC 3339)Timestamp when the payment expires.
timer.paidAtstring (RFC 3339)Timestamp of confirmed payment. Present only when completed.
GET
/v1/payments/{paymentID}
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).

Formatuuid

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