Check a checkout session
get_checkout_statusReports where a payment session made by create_checkout_link stands: whether the human has opened checkout, paid, and whether the shipping label exists yet, with the tracking number once it does. Reads SMKlog's own order records only: no carrier call, no quote allowance, nothing changes. Poll it after handing the human the link, minutes apart rather than seconds, because nothing moves until the human acts.
Statuses, in order: awaiting_checkout (link made, no checkout started), checkout_started (a checkout exists, not paid), paid (paid, label not created yet: the checkout page buys it right after payment, otherwise an operator picks it up), label_ready (label bought, tracking_number present), delivered, refunded. Once label_ready, feed tracking_number to track_parcel for scan events.
Parameter rules:
session_id is the session_id returned by create_checkout_link, shaped as_ plus a UUID. Nothing else identifies a session: no order id, no email, no quote_id.
A session lives 30 days from creation. An unknown, malformed or expired id answers session_not_found rather than a status.
The answer never carries names, addresses or emails. Treat the session_id like a tracking number: whoever holds it can read the tracking number.
A manual-review request made from the handoff page is not a checkout and leaves the status at awaiting_checkout.
Allowance: 60 checks an hour per client.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | The session_id from create_checkout_link. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| next | No | What, if anything, the agent should do now | |
| amount | No | The amount the session was anchored to, USD | |
| status | Yes | Stage, in that order | |
| service | No | The service the session was anchored to | |
| checkout | No | The checkout the human started, null while awaiting_checkout | |
| currency | No | ISO currency, USD | |
| created_at | No | When create_checkout_link made the session, ISO 8601 | |
| expires_at | No | When the session stops answering, ISO 8601 | |
| session_id | Yes | The session asked about | |
| quote_reused | No | Whether the session reused a quote_id |