SmartGare
API referenceEndpoints

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`

POST/ticketing/v1/sales/{id}/card-payment-preparations

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

AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*PrepareCardPaymentRequest

Response Body

*/*

*/*

*/*

curl -X POST "https://example.com/ticketing/v1/sales/string/card-payment-preparations" \  -H "Content-Type: application/json" \  -d '{    "reference": "string"  }'
{  "payment_id": "string",  "sale_id": "string",  "status": "string"}