Hex Pay Docs
API Reference

List payments

Returns a paginated list of payments for your store, ordered by creation date (most recent first).


Pagination

Uses cursor-based pagination.

  • limit — number of results per page. Accepts 1–100, defaults to 10.
  • cursor — opaque token from the previous response's cursor field. Pass it to fetch the next page.
  • When cursor is absent in the response, you are on the last page.

Do not construct or modify cursor values — treat them as opaque strings.


Filtering by status

Use the status query parameter to narrow results. Pass a comma-separated list of statuses:

GET /v1/payments?status=pending,completed

Returns payments matching any of the provided values. Omit the parameter to return payments in all statuses. Up to 10 status values per request.

Valid values: created, pending, completed, expired, cancelled.

GET
/v1/payments
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

Query Parameters

limit?integer

Maximum number of payment objects to return per page. Accepts values between 1 and 100. Defaults to 10.

Default10
Range1 <= value <= 100
cursor?string

Pagination cursor. Pass the value of cursor from the previous response to retrieve the next page of results.

status?array<PaymentStatus>

Filter payments by status. Accepts a comma-separated list of statuses. Returns payments matching any of the provided values. Omit to return payments in all statuses.

Response Body

curl -X GET "https://api.hexpay.io/v1/payments?limit=20&cursor=eyJpZCI6IjAxOTMyN2M2LTIwNTgtNzkwMS1iMjM0LTU2Nzg5YWJjZGVmZiJ9&status=pending%2Ccompleted"

{
  "payments": [
    {
      "id": "019327c6-2058-7901-b234-56789abcdeff",
      "status": "completed",
      "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"
      }
    },
    {
      "id": "019327c6-1234-7901-b234-56789abcde00",
      "status": "pending",
      "order_id": "order-2026-00124",
      "amount": "50.00",
      "currency": "EUR",
      "checkoutURL": "https://payment.hexpay.io/019327c6-1234-7901-b234-56789abcde00",
      "timer": {
        "createdAt": "2026-01-20T09:30:00Z",
        "expiresAt": "2026-01-20T09:45:00Z"
      }
    }
  ],
  "cursor": "eyJpZCI6IjAxOTMyN2M2LTEyMzQtNzkwMS1iMjM0LTU2Nzg5YWJjZGUwMCJ9"
}

{
  "error": {
    "type": "invalid_request_error",
    "message": "limit must be between 1 and 100",
    "code": "invalid_limit",
    "param": "limit"
  }
}

{
  "error": {
    "type": "authentication_error",
    "message": "Invalid or expired authentication token",
    "code": "auth_invalid"
  }
}

{
  "error": {
    "type": "api_error",
    "message": "An unexpected error occurred. Please retry the request or contact support.",
    "code": "internal_error"
  }
}