Create a checkout session
Creates a TeePay hosted checkout page for your account. Redirect the customer to checkout_url. A payment profile is optional: when given, or when your account has a default profile, its branding, return URL and webhook URL are used. Repeating the same Idempotency-Key and body returns the same session with the header Idempotent-Replayed: true. Requires checkout:create. 30 creations per account per minute.
BearerAuthAuthorizationBearer <token>Secret API key: tp_test_. or tp_live_.. Server-side only.
Idempotency-Key*string^[A-Za-z0-9_-]+$8 <= length <= 120application/json- body
title*string1 <= length <= 100description?stringlength <= 200amount_minor*stringInteger minor units, e.g. "500000" is TZS 5,000.00.
^[1-9][0-9]{0,12}$currency*string^[A-Z]{3}$expires_in?integer3600 <= value <= 60480086400payment_profile_id?stringuuidreference?stringYour order ID, echoed back.
^[A-Za-z0-9_.:-]{1,64}$metadata?properties <= 10Checkout session
application/json- response
id*stringuuidobject*unknownstatus*unknownpaid only after TeePay verified and ledger-posted the payment; never from a browser redirect.
"open""processing""paid""expired""unavailable"title*stringdescription*stringcurrency*string^[A-Z]{3}$amount_minor*string^[1-9][0-9]{0,12}$checkout_url*|TeePay hosted checkout to send or redirect the customer to.
uripayment_profile_id*string|nullreference*string|nullmetadata*payment*|nullenvironment*unknown"live""sandbox"created_at*stringexpires_at*string|nullcurl -X POST 'https://api.teepay.me/v1/checkout-sessions' \ -H 'Idempotency-Key: order-1001' \ -H 'Content-Type: application/json' \ -d '{ "title": "Order 1001", "description": "2 x Coffee bag", "amount_minor": "500000", "currency": "TZS", "expires_in": 86400, "reference": "order-1001", "metadata": { "cart": "c-77" }}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "object": "checkout_session", "status": "open", "title": "string", "description": "string", "currency": "string", "amount_minor": "string", "checkout_url": "http://example.com", "payment_profile_id": "string", "reference": "string", "metadata": { "property1": "string", "property2": "string" }, "payment": { "reference": "string" }, "environment": "live", "created_at": "string", "expires_at": "string"}List collections GET
Your account's collections, newest first, filterable by status and currency. Requires collection:read.
Get a checkout session GET
One checkout session. status becomes paid only after TeePay verified and ledger-posted the payment, and payment.reference is then set. Requires checkout:read.