Retrieve a payment
Returns one payment: what was charged, what has been refunded, Utopia's fee, what you keep (`net_amount`), who paid, and the checkout session or subscription it belongs to. Read it before fulfilling an order — the parameters appended to your `return_url` are only a hint — and after a `payment.succeeded` event when you would rather trust the API than the delivery. `fee_amount` and `net_amount` are `null` while a payment is processing and if it failed. A refund, made with `POST /payments/{id}/refunds` or from the dashboard, shows up here in `status` and `refunded_amount`.
Returns one payment: what was charged, what has been refunded, Utopia's fee, what you keep (net_amount), who paid, and the checkout session or subscription it belongs to. Read it before fulfilling an order — the parameters appended to your return_url are only a hint — and after a payment.succeeded event when you would rather trust the API than the delivery. fee_amount and net_amount are null while a payment is processing and if it failed. A refund, made with POST /payments/{id}/refunds or from the dashboard, shows up here in status and refunded_amount.
Authorization
secretKey Your secret key: sk_live_… or sk_test_….
In: header
Path Parameters
The payment's id, which starts with pay_.
^pay_[0-9a-f]{32}$Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/payments/pay_3f2b8c1e9a4d4e7b8c2a1d5e6f7a8b9c"{ "object": "payment", "payment_id": "pay_7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d", "status": "succeeded", "total_amount": 34900, "refunded_amount": 0, "fee_amount": 3012, "net_amount": 31888, "currency": "AED", "description": "Pro course", "customer": { "customer_id": "cus_2c4e6a8b0d1f4a3c5e7b9d1f3a5c7e9b", "name": "Nour Al Abbas", "email": "nour.alabbas@example.com", "phone_number": "+971501234567" }, "checkout_session_id": "cks_9b1e44a0c3d24f6e8a7b5c2d1e0f9a8b", "subscription_id": null, "billing_reason": "payment", "metadata": { "order_id": "1001" }, "livemode": true, "created_at": "2026-09-14T09:58:12.000Z", "paid_at": "2026-09-14T10:00:00.000Z"}Retrieve a checkout session GET
Returns one checkout session: its current status, the cart as it was priced, and the `payment_id` or `subscription_id` it produced once the customer paid. Read it when a customer comes back to your `return_url`, or to recover a checkout link that is still open. `checkout_url` is filled in only while the session is `open`, and a session past its 24 hours reads as `expired`. Only sessions created by the key's merchant and mode are visible.
List payments GET
Lists payments, newest first, including every subscription renewal. Filter by `status`, by the customer who paid, or by the checkout session a payment came from. One page carries `items`, `has_more` and `next_cursor`; pass `next_cursor` back as `cursor` for the next page. A page is read from a fixed point in the list, so payments arriving while you walk it do not shift the pages still ahead of you. Only payments belonging to the key's merchant and mode are listed.