SmartGare
API referenceEndpoints

Refund a ticket

Pays a ticket's full price out of the clerk's own open register, once the station cancelled its departure, for the ticket whose QR (`qr_payload`) — or printed number (`ticket_number`) with the verification code printed beside it (`verification_code`) — the traveller presents at the station it boards at. Only a ticket paid in cash is refunded: a card payment cannot be reversed yet. A ticket that cost nothing is refunded with no movement. Sent again with the same reference, answers with the refund already made. **Required permission:** `ticketing.sale:write`

POST/ticketing/v1/tickets/{id}/refund

Pays a ticket's full price out of the clerk's own open register, once the station cancelled its departure, for the ticket whose QR (qr_payload) — or printed number (ticket_number) with the verification code printed beside it (verification_code) — the traveller presents at the station it boards at. Only a ticket paid in cash is refunded: a card payment cannot be reversed yet. A ticket that cost nothing is refunded with no movement. Sent again with the same reference, answers with the refund already made.

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*RefundTicketRequest

Response Body

*/*

*/*

curl -X POST "https://example.com/ticketing/v1/tickets/string/refund" \  -H "Content-Type: application/json" \  -d '{    "reference": "string"  }'
{  "amount": 0,  "currency": "string",  "movement_id": "string",  "refunded_at": "2019-08-24T14:15:22Z",  "refunded_by": "string",  "ticket_id": "string",  "ticket_status": "string"}