Skip to content

Checkout ​

Endpoints that resolve where the end customer should go to complete a payment. None require an api_key — they're opened by the buyer's browser, which shouldn't (and doesn't) hold your merchant's credentials.

GET /v1/checkout/{id} ​

Redirects the customer to the payment page hosted by Paytami. This is the same value already returned as checkout_url in the POST /v1/payments response — you normally don't build this URL by hand, just redirect to the one the API gave you.

Authentication: none. The 24-character hex public id is itself the credential for this one-off operation.

GET https://app.paytami.com/api/v1/checkout/pay_8f2c1a9d4e6b7c0a1d2e3f40

Responses:

CodeWhen
302 FoundThe payment accepts a charge; redirects (Location) to the payment page.
404 unknown_paymentThe id doesn't exist.
409 payment_not_payableThe payment already resolved (paid, canceled, expired) and no longer accepts another attempt.

See the full flow in the hosted checkout guide.

GET /v1/payments/{id}/checkout_session ​

A JSON version of the same data exposed by the redirect above — built for embedded checkout, where an iframe needs the payment URL without relying on following a 302.

Authentication: none, same trust model as GET /v1/checkout/{id}.

bash
curl https://app.paytami.com/api/v1/payments/pay_8f2c1a9d4e6b7c0a1d2e3f40/checkout_session

Response — payable ​

json
{
  "payment_id": "pay_8f2c1a9d4e6b7c0a1d2e3f40",
  "payable": true,
  "checkout_url": "https://checkout.example.com/session/xyz123"
}

Response — already resolved ​

json
{
  "payment_id": "pay_8f2c1a9d4e6b7c0a1d2e3f40",
  "payable": false,
  "reason": "already_paid"
}

reason is one of: already_paid, failed, canceled, expired.

HTTP codeWhen
200 OKWhenever the payment exists, whether payable or not — the body distinguishes the case via payable.
404 unknown_paymentThe id doesn't exist.

WARNING

The checkout_url in this response is for internal use by Paytami's own embed mechanism (link.paytami.com) only — don't display or process it directly in your integration, and don't confuse it with a Payment's checkout_url, which is a stable Paytami identifier. This endpoint also isn't a general-purpose alternative to GET /v1/payments/{id} — to check a charge's actual status with your api_key, always use GET /v1/payments/{id}.

Official Paytami Documentation