Pay a sale
Records the cash handed over, or the standalone card terminal's answer, for a sale awaiting payment. A declined card is recorded and leaves the sale awaiting payment. **Required permission:** `ticketing.sale:write`
/ticketing/v1/sales/{id}/paymentRecords the cash handed over, or the standalone card terminal's answer, for a sale awaiting payment. A declined card is recorded and leaves the sale awaiting payment.
Required permission: ticketing.sale:write
Authorization
oauth2 In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
*/*
*/*
*/*
curl -X POST "https://example.com/ticketing/v1/sales/string/payment" \ -H "Content-Type: application/json" \ -d '{ "means": "CASH", "reference": "string" }'{ "amount": 0, "card_outcome": "string", "cash_tendered": 0, "change": 0, "means": "string", "payment_id": "string", "prints": [ { "qr_payload": "string", "ticket_id": "string", "verification_code": "string" } ], "recorded_at": "2019-08-24T14:15:22Z", "sale_id": "string", "sale_status": "string", "tickets": [ { "cancelled_at": "2019-08-24T14:15:22Z", "category": "string", "currency": "string", "departure_id": "string", "eligible_for_refund_or_rebooking": true, "fare": { "content_hash": "string", "inputs": { "carrier_id": "string", "category": "string", "days_ahead": 0, "departure_date": "2019-08-24", "departure_time": "string", "distance_metres": 0, "from_locality_id": "string", "from_station_id": "string", "line_id": "string", "service_type": "string", "to_locality_id": "string", "to_station_id": "string" }, "row_id": "string", "steps": [ { "amount": 0, "kind": "string", "row_id": "string" } ], "tariff_release_id": "string" }, "from_station_id": "string", "id": "string", "line_code": "string", "ordinal": 0, "price": 0, "qr": { "active": true, "key_version": "string", "payload": "string" }, "rebooked_from_ticket_id": "string", "sale_id": "string", "sold_at": "2019-08-24T14:15:22Z", "sold_by": "string", "status": "string", "to_station_id": "string" } ]}Prepare a card payment before charging the card
Checks the sale, its register and its departure's selling, and has the sale's seats kept for the payment under `reference`, before the terminal charges the card. Charge the card only once this answers `READY_TO_CHARGE`, then send the payment under the same reference: it settles the sale, or, declined, gives the seats back. Asked again, it answers the same. **Required permission:** `ticketing.sale:write`
Preview a sale's tickets
Returns, in Base64, the PDF the station bridge makes of the paid sale's ticket document for the printer of the caller's counter — the same layout a print sends, its QR a sample and its verification code masked — or of one ticket when `ticket` names it, with its page count and the template that drew it. Nothing is printed. **Required permission:** `ticketing.sale:read`