---
title: "Process credit card payment for a booking"
method: POST
path: "/bookings/{bookingId}/pay-by-creditcard"
tags: ["Payments"]
---

# Process credit card payment for a booking

`POST /bookings/{bookingId}/pay-by-creditcard`

## Request

- Base URL: `https://payment-api.transferz.com`
- URL: `https://payment-api.transferz.com/bookings/{bookingId}/pay-by-creditcard`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Processes a credit card payment for the specified booking ID through the Adyen payment gateway.

This endpoint orchestrates a multi-step payment flow:
1. Validates authentication and request structure
2. Retrieves booking information from Transferz APIs
3. Initiates payment in the Transferz system
4. Prepares payment details with currency conversion
5. Processes payment through Adyen
6. Returns standardized success/error response

Supports 3D Secure authentication when browser information is provided.

## Path parameters

- `bookingId` string, required

## Request body

- PaymentRequest
  - `browserInfo` BrowserInfo: Browser information required for 3D Secure authentication. When provided with valid values, 3D Secure authentication will be attempted.
    - `javaEnabled` boolean: Whether Java is enabled in the browser
    - `userAgent` string, required: User agent string of the browser
    - `acceptHeader` string: Accept header from the browser
    - `language` string: Language setting of the browser
    - `screenWidth` integer, required: Screen width in pixels
    - `screenHeight` integer, required: Screen height in pixels
    - `timeZoneOffset` integer: Timezone offset in minutes from UTC
    - `colorDepth` integer: Color depth of the screen in bits
  - `origin` string: Origin URL of the request (required for 3D Secure)
  - `cardNumber` string, required: Credit card number (PAN)
  - `cardHolderName` string, required: Name of the card holder
  - `expiryMonth` integer, required: Card expiry month (1-12)
  - `expiryYear` integer, required: Card expiry year (must be in the future)
  - `cvc` string, required: Card verification code (CVV/CVC)
  - `returnUrl` string, required: URL to redirect the shopper after 3D Secure authentication
  - `shopperEmail` string, email, required: Email address of the shopper
  - `shopperIp` string, required: IP address of the shopper

## Response `200`

Payment processed successfully

- union
  - PaymentSuccessResponse
    - `result` 'AUTHORISED' | 'REFUSED' | 'PENDING', required: Payment result code from Adyen
  - PaymentRedirectResponse
    - `result` 'REDIRECTSHOPPER', required: Payment result code indicating redirect is required
    - `redirect` object, required
      - `url` string, required: URL to redirect the shopper to for 3D Secure authentication
      - `sessionId` string, required: Session identifier (MD value) for the 3D Secure flow
      - `requestData` string, required: Request data (PaReq value) for the 3D Secure flow

## Other responses

- `400`: Bad Request - Invalid request data
- `401`: Unauthorized - Missing or invalid authentication
- `403`: Forbidden - Valid credentials but insufficient permissions
- `500`: Internal Server Error

---

[API](https://skmtc.dev/transferz/apis/transferz-payment-api.md) - [All operations](https://skmtc.dev/transferz/apis/transferz-payment-api/llms.txt) - [OpenAPI document](https://skmtc.dev/transferz/apis/transferz-payment-api/revisions/5e21e23c39fd?raw)
