API versions
The Paycose API is versioned by date. Each secret key and webhook endpoint is pinned to a version; today there is one, 2026-11-01.
The Paycose API is versioned by date. Each secret key and each webhook endpoint
is pinned to a version, and new ones are pinned to the latest, so a new version
never changes what your integration receives until you move it. Today there is
one version, 2026-11-01: every request made with a secret key is answered in
it, and every webhook endpoint receives its events in it.
The Paycose-Version header
You don't need to send a version. To make a request explicit, send
Paycose-Version: 2026-11-01. Every response names the version that answered
in the same header:
curl -i "$WALLET/customers?limit=1" \
-H "Authorization: Bearer ${SECRET_KEY}" \
-H "X-Country: TH" \
-H "Paycose-Version: 2026-11-01"HTTP/1.1 200 OK
Content-Type: application/json
Paycose-Version: 2026-11-012026-11-01 is the only value the header accepts. Any other value is refused
with 400 before the request runs, with the error code
validation.api_version.invalid and param Paycose-Version. See
Errors.
What the version sets
2026-11-01 follows Stripe's conventions:
- Errors are nested under
error, with atypeand a stringcode. See Errors. - Lists are cursor-paginated and answer
object,data,has_moreandurl. See Pagination. - Deletes answer
id,objectanddeleted: true. - Deleted objects read back the same way. Retrieving an object you
deleted, such as a customer, product, price, coupon or webhook endpoint,
answers
200with{"id": "cus_…", "object": "customer", "deleted": true}rather than404. An id that never existed is still404. - Unknown fields are rejected. Under
2026-11-01, a JSON body field the endpoint does not take, top-level or nested, answers400validation.failedwithparamnaming where it sits, such asline_items[0].quantiy. Keys insidemetadataare yours and are never checked. See Errors. - Timestamps in responses are Unix seconds, such as
1793491200. An object'screatedandupdatedsay when it was created and last changed. Request bodies take timestamps as RFC 3339 strings, such as"due_date": "2026-11-08T00:00:00Z". - Currencies are lowercase in responses, such as
"thb". Request bodies may send either case. expand[]refuses a field the endpoint cannot expand. See Expand.metadatacomes back exactly as you wrote it.
New versions
When a new version ships, it will be announced on this page with what it
changes. Try it on single requests by sending its date in Paycose-Version,
then move the key or webhook endpoint to it from the Dashboard (Upgrade on
the key or endpoint), or move an endpoint with api_version on
PATCH /webhook_endpoints/{id}.