Skip to content
Console
On this page

List checkout sessions

Lists open or potentially recoverable checkouts for one exact subject and scope.

Lists open or potentially recoverable checkouts for one exact subject and scope.

  • Path GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/checkout_sessions
  • Scope billing:read
  • Effect read — nothing is written.
  • Collection checkout_sessions
  • Query filter, page_size, page_token
  • Pagination the answer carries checkout_sessions and, when there is more, next_page_token

Request

FieldTypeWhat it is
parentstringThe environment whose sessions are listed. Required.
filterstringAn exact conjunction of subject_kind, subject_id, metadata_key, and metadata_value equality terms.
page_sizeint32The maximum number of matching sessions on this page.
page_tokenstringContinue from the previous page for the same environment, mode and filter.

Response

FieldTypeWhat it is
checkout_sessionsCheckoutSession[]The sessions in this page. Output only.
next_page_tokenstringThe continuation token, or empty at the end of the list. Output only.

CheckoutSession

FieldTypeWhat it is
namestringorgs/{org}/projects/{project}/envs/{env}/checkout_sessions/{checkout_session}.
uidstringchk_<cell><ulid>; never reused. Output only.
metaResourceMetaResource metadata.
subjectSubjectWho pays and is entitled. Required.
line_itemsLineItem[]What is bought: catalog prices by lookup key. One recurring price makes a subscription; one-time prices make an order. Required.
success_urlstringWhere the buyer lands after paying; {CHECKOUT_SESSION_ID} is replaced by the processor's session id. HTTPS only. Required.
cancel_urlstringWhere the buyer lands on cancel. HTTPS only.
currency_codestringThe currency to charge in, upper-case ISO 4217; default the processor's choice for the buyer among the prices' currencies.
localestringThe page language, for example en or zh-HK; default automatic.
metadatamap<string, string>Copied to the subscription or order, for example attribution (utm_source, ref). At most 20 keys.
allow_promotion_codesboolWhether the buyer may enter a promotion code.
buyer_country_codestringWhere the buyer is, upper-case ISO 3166-1 alpha-2, when the caller knows it (for example from the request's IP address). A country the environment's checkout policy denies is refused here, before any page is made, unless the policy lets a business buy. Not trusted for anything else: the billing address the buyer gives is checked again when the payment completes.
shipping_country_codesstring[]Countries whose shipping address the hosted page collects, upper-case ISO 3166-1 alpha-2. Empty means no shipping address is collected.
urlstringThe hosted page. Output only.
statestringopen, complete, or expired. Output only.
expire_timetimestampWhen the page stops accepting payment. Output only.
processor_session_idstringThe processor's session id. Output only.
denied_reasonstringWhy a completed checkout was refused and refunded instead of delivered: country_denied (the billing country is on the checkout policy's list) or country_unknown (no billing country to check). Empty otherwise. Output only.
billing_country_codestringThe billing country the completed checkout was checked against, upper-case ISO 3166-1 alpha-2; empty until completion. Output only.
billing_subdivision_codestringThe billing state or province, upper-case, kept only for the countries whose tax thresholds are per subdivision (US, CA); empty otherwise. Nothing else of the buyer's address is stored. Output only.
consent_collectionCheckoutConsentCollectionThe consent the hosted page collects before it takes payment, for example a required tick for a withdrawal waiver or the terms of sale.
consentCheckoutConsentThe consent the buyer gave, recorded once the processor reports it. Output only.
customer_emailstringThe buyer's email address, once the hosted checkout has collected it. Output only.
shipping_addressShippingAddressThe physical delivery address, when shipping_country_codes was set and the hosted checkout has collected it. Output only.
amount_totalint64The processor's current total in minor units, when it has reported one. Output only.
payment_statusstringunpaid, paid, no_payment_required, or revoked; empty before settlement. Output only.
livemodeboolThe processor's live/test mode, once the session has reported it. Output only.
processor_payment_idstringThe processor payment this checkout produced; empty before settlement. Output only.
payment_methodstringstripe (default) or bank_transfer. Bank transfers never contact Stripe.
bank_transferBankTransferInstructionsFrozen beneficiary, amount, reference and bank-issued FPS QR instructions. Output only.
amount_taxint64Tax collected on the checkout session in minor units, when reported. Output only.
amount_discountint64Discount applied to the checkout session in minor units, when reported. Output only.
processor_invoice_idstringProcessor invoice id created by this checkout (typically for subscriptions). Output only.
processor_subscription_idstringProcessor subscription id created by this checkout, when mode is subscription. Output only.
customer_subscriptionstringMirrored CustomerSubscription resource name, when mode is subscription. Output only.
guestboolWhether this checkout was created without an account. Remains true after claim. Output only.
claimedboolWhether its guest ownership has been bound to an account. False is explicit. Output only.
claimed_bystringThe end-user id that claimed this checkout; empty before claim. Output only.
claimed_attimestampWhen ownership was claimed. The wire name preserves the served claim API. Output only.
claim_methodstringPossession proof used for the claim: claim_secret or verified_email. Output only.
claim_secretstringBrowser possession proof, returned only by create and its authorized retry while active. Never returned by get, list, or claim; never stored in plaintext. Output only. Never returned again.
claim_secret_expires_attimestampWhen the browser possession proof expires. The existing wire name is retained. Output only.
transaction_idstringThe purchase's one transaction id once the checkout is paid: a subscription checkout's processor invoice, else the processor payment (else invoice, else session). It equals checkout_sessions:redeem transaction_id and money.checkout.settled order_id, so browser and server conversions deduplicate. Empty before the checkout is paid. Output only.
amount_subtotalint64Settled merchandise total after discounts, excluding tax and shipping, in minor units of currency_code. Present only with a verified breakdown. Output only.
amount_shippingint64Settled shipping charge excluding tax, in minor units of currency_code. Output only.
settled_itemsSettledCheckoutItem[]Settled processor lines, not the items requested at checkout creation. Output only.
tax_id_collectionCheckoutTaxIdCollectionWhether to offer tax ID collection. Omit to keep collection enabled. This does not change automatic tax or the billing-address policy.
disable_processor_recoveryboolOpt out of Stripe-hosted recovery when an application needs revocable checkout.

ResourceMeta

FieldTypeWhat it is
generationint64Increases by one on every change to spec. Output only.
etagstringStrong ETag (AIP-154): changes on any change to spec, status, or metadata. Send it back as If-Match or etag to make Update and Delete conditional; a mismatch fails with ABORTED / 409 ETAG_MISMATCH. Output only.
create_timetimestampWhen the Resource was created. Output only.
update_timetimestampWhen the Resource last changed. Output only.
delete_timetimestampSet while the Resource is being deleted. Output only.
labelsmap<string, string>Caller-writable, indexed labels (AIP-122 label rules).
annotationsmap<string, string>Caller-writable, unindexed annotations.
display_namestringCaller-writable human-readable name.
creatorstringThe principal that created the Resource. Output only.

Subject

FieldTypeWhat it is
end_userstringAn end user's id (Sylphx Auth, or the app's own OIDC issuer). One of the kind group.
customer_organizationstringA customer organization's id. One of the kind group.

LineItem

FieldTypeWhat it is
pricestringThe Money catalog price key. Required.
quantityint32How many; default 1. Seats for a per-seat or family price.

CheckoutConsentCollection

FieldTypeWhat it is
terms_requiredboolRequire a tick accepting terms_text before the buyer can pay. The merchant's Stripe account needs a terms of service URL in its public business details; without one the create fails with processor_terms_url_missing.
terms_textstringThe wording shown next to the tick; at most 1200 characters. Required with terms_required.
terms_versionstringWhich version of the wording this is, recorded with the consent as evidence; at most 64 characters. Required with terms_required.
promotionsboolOffer the buyer an opt-in to promotional email where the processor allows it.

CheckoutConsent

FieldTypeWhat it is
terms_acceptedboolWhether the buyer ticked the terms. Output only.
terms_textstringThe wording the buyer saw. Output only.
terms_versionstringThe version of that wording. Output only.
promotionsstringopt_in, opt_out, or empty when promotions were not asked. Output only.
record_timetimestampWhen Money first recorded the answer. Output only.

ShippingAddress

FieldTypeWhat it is
recipientstringRecipient name. Output only.
line1stringFirst address line. Output only.
line2stringOptional second address line. Output only.
citystringCity or town. Output only.
regionstringState, county or province. Output only.
postal_codestringPostcode. Output only.
region_codestringUpper-case ISO 3166-1 alpha-2 region code. Output only.

BankTransferInstructions

FieldTypeWhat it is
accountBankTransferAccountBeneficiary snapshot, unaffected by later configuration changes. Output only.
referencestringOpaque order reference, no more than 25 characters. Output only.
qr_payloadstringDynamic Common QR with exact amount and reference. Output only.
qr_svgstringQR image as standalone SVG. Output only.

SettledCheckoutItem

FieldTypeWhat it is
price_keystringStable catalog price key. Output only.
product_keystringStable catalog product key. Output only.
quantityint32Quantity settled by the processor. Output only.
unit_amount_minorint64Exact net per-unit amount in minor units, excluding tax and shipping. Absent if the line's net amount does not divide evenly by quantity. Output only.
amount_subtotal_minorint64Line total after discounts, excluding tax and shipping, in minor units. Output only.
processor_line_idstringThe processor's ID for this settled line, when captured. Output only.
grant_sourcestringExact source used for this line's entitlement grants, scoped to this checkout. A line with no entitlement features has no grant rows. Absent for subscriptions and historical lines without a proven binding. Output only.

CheckoutTaxIdCollection

FieldTypeWhat it is
enabledboolExplicit choice; false hides the tax ID prompt. Required.

BankTransferAccount

FieldTypeWhat it is
namestringResource name.
uidstringStable resource identity. Output only.
metaResourceMetaResource metadata. Output only.
account_holderstringVerified beneficiary name. Required.
bank_namestringReceiving bank name. Required.
bank_codestringReceiving bank routing or clearing code. Required.
account_numberstringReceiving account number, including branch digits. Required.
fps_idstringVerified FPS identifier displayed to the payer.
fps_qr_payloadstringOriginal bank-issued FPS Common QR payload; never an invented account template.
currency_codestringISO 4217 receiving account currency. Required.
enabledboolWhether new bank-transfer checkouts may be created.
region_codestringISO 3166-1 alpha-2 country of the receiving bank. Required.
qr_profilestringOptional EMV merchant-presented QR country profile: hk_fps.

Errors

Every error arrives in the body Errors describes.

Examples

curl "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/checkout_sessions" \
  -H "Authorization: Bearer $SYLPHX_API_KEY"