v42

latestOpenAPI 3.1.0CC-BY-NC-SA-4.0raw.githubusercontent.com2025-03-1271142.7 KB
Payments

Pay for a Booking

A payment is an attempt to pay for the booking, which will confirm the booking for the user and enable them to get their tickets.

post/bookings/{bookingId}/payment

Request body

idstring uuid

Unique identifier for the payment. This will be a unique identifier for the payment, and is used to reference the payment in other objects.

amountnumber

Amount intended to be collected by this payment. A positive decimal figure describing the amount to be collected.

currency'bam' | 'bgn' | 'chf' | 'eur' | 'gbp' | 'nok' | 'sek' | 'try'

Three-letter ISO currency code, in lowercase.

status'pending' | 'succeeded' | 'failed'

The status of the payment, one of pending, succeeded, or failed.

Example request

{
  "amount": 49.99,
  "source": {
    "name": "Francis Bourgeois",
    "number": "4242424242424242",
    "cvc": "123",
    "exp_month": 12,
    "exp_year": 2025
  }
}

Response

Payment successful

idstring uuid

Unique identifier for the payment. This will be a unique identifier for the payment, and is used to reference the payment in other objects.

amountnumber

Amount intended to be collected by this payment. A positive decimal figure describing the amount to be collected.

currency'bam' | 'bgn' | 'chf' | 'eur' | 'gbp' | 'nok' | 'sek' | 'try'

Three-letter ISO currency code, in lowercase.

status'pending' | 'succeeded' | 'failed'

The status of the payment, one of pending, succeeded, or failed.

Example response

{
  "amount": 49.99,
  "source": {
    "name": "Francis Bourgeois",
    "number": "4242424242424242",
    "cvc": "123",
    "exp_month": 12,
    "exp_year": 2025
  },
  "links": {
    "booking": "https://api.example.com/bookings/1725ff48-ab45-4bb5-9d02-88745177dedb"
  }
}