Paycose Docs
FlowEvents

Checkout session events

What data you get for checkout.session.completed and checkout.session.expired.

Fires when a hosted Checkout Session finishes — either the payer completes it, or it expires unused.

Prop

Type

{
  "id": "cs_01J9ABCDEF",
  "object": "checkout_session",
  "mode": "payment",
  "status": "complete",
  "currency": "THB",
  "amount": 150000,
  "customer_id": "cus_01J8XYZ",
  "invoice_id": "in_01J8XYZ",
  "subscription_id": "sub_01J8XYZ",
  "charge_id": "ch_01J8XYZ",
  "livemode": true
}

customer_id, invoice_id, subscription_id, and charge_id only appear once that resource exists on the session. On checkout.session.expired, status is "expired" and a failure_reason of "session_expired" is added.