Pay the live balance with a card the guest presents
const url = 'https://quikstik-core.fly.dev/b/example/pay';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"provider":"example","instrument_token":"example"}'};
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/b/example/pay \ --header 'Content-Type: application/json' \ --data '{ "provider": "example", "instrument_token": "example" }'Token-based auth. Customer-present only — no auto-charge, no vault use. The body names the
processor and a freshly tokenized instrument and NEVER an amount: the charge is the
obligation’s live balance, re-read here (not the one rendered) and derived server-side by
the rail. Its idempotency key is bound to (link, balance): a double-submit replays the
same movement, and a balance that changed since the page was rendered is charged fresh at
the new amount, never the old. On success the capture is recorded through the standard
capture path (a real ledger posting, not an out-of-band charge), the obligation is settled,
the link is marked paid with the rail’s reference, and a receipt is sent.
A second submit on a paid link is 200 with already_paid: true and the original
reference; no second charge.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Opaque processor selector, as /p/{token}/pay.
Processor-tokenized payment instrument. Never a PAN.
Example generated
{ "provider": "example", "instrument_token": "example"}Responses
Section titled “Responses”Paid now (or already paid by an earlier submit).
object
Opaque rail-issued reference.
Null on a replay.
Example generated
{ "processor_ref": "example", "amount_minor": 1, "currency": "example", "already_paid": true}Card_declined, authentication_required, or processor_not_configured. Nothing charged.
object
Example
{ "reason": "card_declined"}Invalid_or_expired_token.
Link_expired, link_cancelled or link_paid. Nothing charged.
Unknown_provider. Nothing charged.
Balance_link_unavailable; safe to retry under the same link.