Capture payment over the processor rail
const url = 'https://quikstik-core.fly.dev/captures/via-rail';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"obligation_ref":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","offering_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","offering_variant_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","demand_class":"example","effective_year":1,"effective_month":1,"effective_day":1,"credential_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","capture":"now","capacity_pool":"example","units":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://quikstik-core.fly.dev/captures/via-rail \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "obligation_ref": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "offering_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "offering_variant_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "demand_class": "example", "effective_year": 1, "effective_month": 1, "effective_day": 1, "credential_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "capture": "now", "capacity_pool": "example", "units": 1 }'Authoritative money capture for a booking obligation. Commits the requested seats against
the capacity pool before the rail is touched (reserve-then-pay — an oversell is rejected
409 with nothing charged), resolves net + tax + gross server-side from the governed
catalog and tax configuration (the client never supplies a price), then charges the
operator’s configured processor (Stripe or Finix) and records the result. Idempotent on the
session’s idempotency key. Fail-closed: if the operator has not connected a processor
(402) or capacity cannot hold the seats (409), nothing is charged.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The booking obligation this charge settles.
Demand lane (channel / OTA / membership) the price resolves in. The net is derived server-side from the governed catalog; the client cannot supply a price.
Operator processor credential (or, for “on_file”, the stored buyer instrument) to charge against.
“now” captures immediately; “on_file” charges off-session against a stored instrument.
Opaque capacity pool key (slot / departure leaf) the seats commit against.
Seats to commit before any charge. Zero is rejected 400 before the rail is touched.
Responses
Section titled “Responses”Captured — the charge settled and the result was recorded
object
Transactional-outbox record id for the recorded capture.
The processor’s reference for the charge (Stripe / Finix).
Total charged in integer minor units (net + tax), server-derived.
Tax-exclusive net in integer minor units, server-derived from the governed catalog.
Tax in integer minor units, server-derived from the tax configuration.
Example generated
{ "outbox_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "processor_ref": "example", "gross_minor": 1, "net_minor": 1, "tax_minor": 1}Malformed request (missing idempotency key, invalid effective date, unsupported capture kind, or zero seats)
object
Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).
Example
{ "reason": "sold_out"}Missing or invalid session bearer token
object
Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).
Example
{ "reason": "sold_out"}The operator has not connected a processor for this tenant (fail-closed, nothing charged)
object
Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).
Example
{ "reason": "sold_out"}The session’s effect authority does not cover this operation
object
Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).
Example
{ "reason": "sold_out"}The referenced stored buyer instrument was not found
object
Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).
Example
{ "reason": "sold_out"}The capacity pool cannot hold the requested seats (oversell guard; nothing charged)
object
Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).
Example
{ "reason": "sold_out"}The processor rail refused the charge
object
Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).
Example
{ "reason": "sold_out"}The operator’s stored credential could not be opened into a usable processor
object
Stable, machine-readable reason code (e.g. “sold_out”, “processor_not_configured”, “rail_refused”).
Example
{ "reason": "sold_out"}