---
title: "Pay for a Booking"
method: POST
path: "/bookings/{bookingId}/payment"
tags: ["Payments"]
---

# Pay for a Booking

`POST /bookings/{bookingId}/payment`

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.

## Request body

- BookingPayment — A payment for a booking.
  - `id` string, 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.
  - `amount` number — 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](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
  - `source` union — The payment source to take the payment from. This can be a card or a bank account. Some of these properties will be hidden on read to protect PII leaking.
    - object — A card (debit or credit) to take payment from.
      - `object` 'card'
      - `name` string, required — Cardholder's full name as it appears on the card.
      - `number` string, required — The card number, as a string without any separators. On read all but the last four digits will be masked for security.
      - `cvc` string, required — Card security code, 3 or 4 digits usually found on the back of the card.
      - `exp_month` integer, required — Two-digit number representing the card's expiration month.
      - `exp_year` integer, required — Four-digit number representing the card's expiration year.
      - `address_line1` string
      - `address_line2` string
      - `address_city` string
      - `address_country` string, required
      - `address_post_code` string
    - object — A bank account to take payment from. Must be able to make payments in the currency specified in the payment.
      - `object` 'bank_account'
      - `name` string, required
      - `number` string, required — The account number for the bank account, in string form. Must be a current account.
      - `sort_code` string — The sort code for the bank account, in string form. Must be a six-digit number.
      - `account_type` 'individual' | 'company', required — The type of entity that holds the account. This can be either `individual` or `company`.
      - `bank_name` string, required — The name of the bank associated with the routing number.
      - `country` string, required — Two-letter country code (ISO 3166-1 alpha-2).
  - `status` 'pending' | 'succeeded' | 'failed' — The status of the payment, one of `pending`, `succeeded`, or `failed`.

## Response `200`

Payment successful

- object — A payment for a booking.
  - `id` string, 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.
  - `amount` number — 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](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
  - `source` union — The payment source to take the payment from. This can be a card or a bank account. Some of these properties will be hidden on read to protect PII leaking.
    - object — A card (debit or credit) to take payment from.
      - `object` 'card'
      - `name` string, required — Cardholder's full name as it appears on the card.
      - `number` string, required — The card number, as a string without any separators. On read all but the last four digits will be masked for security.
      - `cvc` string, required — Card security code, 3 or 4 digits usually found on the back of the card.
      - `exp_month` integer, required — Two-digit number representing the card's expiration month.
      - `exp_year` integer, required — Four-digit number representing the card's expiration year.
      - `address_line1` string
      - `address_line2` string
      - `address_city` string
      - `address_country` string, required
      - `address_post_code` string
    - object — A bank account to take payment from. Must be able to make payments in the currency specified in the payment.
      - `object` 'bank_account'
      - `name` string, required
      - `number` string, required — The account number for the bank account, in string form. Must be a current account.
      - `sort_code` string — The sort code for the bank account, in string form. Must be a six-digit number.
      - `account_type` 'individual' | 'company', required — The type of entity that holds the account. This can be either `individual` or `company`.
      - `bank_name` string, required — The name of the bank associated with the routing number.
      - `country` string, required — Two-letter country code (ISO 3166-1 alpha-2).
  - `status` 'pending' | 'succeeded' | 'failed' — The status of the payment, one of `pending`, `succeeded`, or `failed`.
  - `links` LinksBooking — The link to the booking resource.
    - `booking` string, uri

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `429` — Too Many Requests
- `500` — Internal Server Error

---

[API](https://skmtc.net/bump-sh-examples/apis/train-travel-api.md) · [All operations](https://skmtc.net/bump-sh-examples/apis/train-travel-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bump-sh-examples/train-travel-api/revisions/f98baa492089/schema)
