# 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.

Endpoint: POST /bookings/{bookingId}/payment
Version: 1.0.0
Security: OAuth2

## Path parameters:

  - `bookingId` (string, required)
    The ID of the booking to pay for.
    Example: "1725ff48-ab45-4bb5-9d02-88745177dedb"

## Request fields (application/json):

  - `amount` (number)
    Amount intended to be collected by this payment. A positive decimal figure describing the amount to be collected.

  - `currency` (string)
    Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
    Enum: "bam", "bgn", "chf", "eur", "gbp", "nok", "sek", "try"

  - `source` (object)
    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.

## Response 200 fields (application/json):

  - `id` (string)
    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` (string)
    Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
    Enum: "bam", "bgn", "chf", "eur", "gbp", "nok", "sek", "try"

  - `source` (object)
    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.

  - `status` (string)
    The status of the payment, one of pending, succeeded, or failed.
    Enum: "pending", "succeeded", "failed"

  - `links` (object)

  - `links.booking` (string)

## Response 400 fields (application/problem+json):

  - `type` (string)
    A URI reference that identifies the problem type
    Example: "https://example.com/probs/out-of-credit"

  - `title` (string)
    A short, human-readable summary of the problem type
    Example: "You do not have enough credit."

  - `detail` (string)
    A human-readable explanation specific to this occurrence of the problem
    Example: "Your current balance is 30, but that costs 50."

  - `instance` (string)
    A URI reference that identifies the specific occurrence of the problem
    Example: "/account/12345/msgs/abc"

  - `status` (integer)
    The HTTP status code
    Example: 400


