---
title: "Request a Payment Session"
method: POST
path: "/payment-sessions"
tags: ["Flow"]
---

# Request a Payment Session

`POST /payment-sessions`

## Request

- Base URL: `https://{prefix}.api.sandbox.checkout.com`
- URL: `https://{prefix}.api.sandbox.checkout.com/payment-sessions`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `string` scopes: `gateway:payment`, `payment-sessions`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/checkout/apis/checkout-com-api-reference/docs/payment-sessions/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a payment session.

The values you provide in the request will be used to determine the payment methods available to Flow. Some payment methods may require you to provide specific values for certain fields. Refer to our <a href="https://www.checkout.com/docs/payments/add-payment-methods">documentation</a> for more information.

You must supply the unmodified response body when you <a href="https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-website/get-started-with-flow#Initialize_and_mount_Flow_">initialize Flow</a>.

## Request body

- CreatePaymentSessionsRequest
  - `amount` integer, required: The payment amount. Provide a value of `0` to perform a card verification. The amount must be provided in the <a href="https://www.checkout.com/docs/payments/accept-payments/format-the-amount-value" target="blank">minor currency unit</a>.
  - `currency` string, required: The three-letter <a href="https://www.checkout.com/docs/resources/codes/currency-codes" target="blank">ISO currency code</a>.
  - `payment_type` 'Regular' | 'Recurring' | 'MOTO' | 'Installment' | 'Unscheduled': Must be specified for card-not-present (CNP) payments. For example, a recurring mail order / telephone order (MOTO) payment.
  - `authorization_type` 'Final' | 'Estimated': The authorization type.
  - `billing` PaymentSessionBilling, required: The billing details.
    - `address` Address, required
      - `address_line1` string: The first line of the address.
      - `address_line2` string: The second line of the address. <p/> For SEPA payments, this value has a maximum length of 10 characters.
      - `city` string: The address city.
      - `state` string: The state or province of the address country <a href="https://en.wikipedia.org/wiki/ISO_3166-2" target="_blank">ISO 3166-2 code</a> (for example: CA for California in the United States).
      - `zip` string: The address zip or postal code.
      - `country` string: The two-letter <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">ISO country code</a> of the address.
    - `phone` PaymentInterfacesPhoneNumber: A phone number
      - `country_code` string: The international <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">country calling code</a>.
      - `number` string: The phone number.
  - `billing_descriptor` PaymentSessionsBillingDescriptor: A description of the purchase, which is displayed on the customer's statement.
    - `name` string, required: A description for the payment, which will be displayed on the customer's card statement. Only applicable for card payments.
    - `city` string, required: The city from which the payment originated. Only applicable for card payments.
    - `reference` string: The reference to display on the customer's bank statement. Required for payouts to bank accounts.
  - `reference` string: A reference you can use to identify the payment. For example, an order number. - For Amex payments, this must be at most 30 characters. - For Benefit payments, the reference must be a unique alphanumeric value. - For iDEAL payments, the reference is required and must be an alphanumeric value with a 35-character limit.
  - `description` string: A description for the payment.
  - `customer` PaymentSessionCustomer: The customer's details. Required if `source.type` is `tamara`.
    - `email` string, email: The customer's email address. Required if `source.type` is `tamara`.
    - `name` string: The customer's name. Required if `source.type` is `tamara`.
    - `id` string: The unique identifier for an existing customer.
    - `phone` PaymentInterfacesPhoneNumber: A phone number
      - `country_code` string: The international <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">country calling code</a>.
      - `number` string: The phone number.
    - `tax_number` string: The customer's value-added tax (VAT) registration number.
    - `summary` PaymentInterfacesCustomerSummary: Summary of the customer's transaction history. <br> Used for risk assessment when `source.type` is `Tamara`
      - `registration_date` string, date: The date the customer registered.
      - `first_transaction_date` string, date: The date of the customer's first transaction.
      - `last_payment_date` string, date: The date of the customer's last payment.
      - `total_order_count` integer: The total number of orders made by the customer.
      - `last_payment_amount` number, float: The amount of the customer's last payment.
      - `is_premium_customer` boolean: Specifies whether the customer is a premium customer.
      - `is_returning_customer` boolean: Specifies whether the customer is a returning customer.
      - `lifetime_value` number, float: The customer's lifetime value. This is the total monetary amount that the customer has ordered, in their local currency, excluding the following: - canceled orders - rejected payments - refunded payments - Tamara payments The lifetime value is an indicator of how valuable the relationship with the customer is to your company.
  - `shipping` PaymentSessionShipping: The shipping details
    - `address` Address
      - `address_line1` string: The first line of the address.
      - `address_line2` string: The second line of the address. <p/> For SEPA payments, this value has a maximum length of 10 characters.
      - `city` string: The address city.
      - `state` string: The state or province of the address country <a href="https://en.wikipedia.org/wiki/ISO_3166-2" target="_blank">ISO 3166-2 code</a> (for example: CA for California in the United States).
      - `zip` string: The address zip or postal code.
      - `country` string: The two-letter <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">ISO country code</a> of the address.
    - `phone` PaymentInterfacesPhoneNumber: A phone number
      - `country_code` string: The international <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">country calling code</a>.
      - `number` string: The phone number.
  - `recipient` PaymentInterfacesRecipient: Information about the recipient of the payment's funds. Applies to <a href="https://www.checkout.com/docs/payments/manage-payments/perform-an-account-funding-transaction">Account Funding Transactions</a>, and VISA or Mastercard <a href="https://www.checkout.com/docs/business-operations/ensure-regulatory-compliance/requirements-for-financial-institutions">domestic UK transactions processed by financial institutions</a>.
    - `dob` string, date: The recipient's date of birth, in the format `YYYY-MM-DD`.
    - `account_number` string: An identifier related to the primary recipient's account. For example, an IBAN, an internal account number, a phone number, or the first six and last four digits of the PAN.
    - `address` Address
      - `address_line1` string: The first line of the address.
      - `address_line2` string: The second line of the address. <p/> For SEPA payments, this value has a maximum length of 10 characters.
      - `city` string: The address city.
      - `state` string: The state or province of the address country <a href="https://en.wikipedia.org/wiki/ISO_3166-2" target="_blank">ISO 3166-2 code</a> (for example: CA for California in the United States).
      - `zip` string: The address zip or postal code.
      - `country` string: The two-letter <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">ISO country code</a> of the address.
    - `first_name` string: The recipient's first name.
    - `last_name` string: The recipient's last name.
  - `processing` PaymentInterfacesProcessing: Use the processing object to influence or override the data sent during card processing
    - `aft` boolean: Indicates whether the payment is an [Account Funding Transaction](https://www.checkout.com/docs/payments/manage-payments/account-funding-transactions)
    - `discount_amount` number: The discount amount applied to the transaction by the merchant.
    - `shipping_amount` number: The total freight or shipping and handling charges for the transaction.
    - `tax_amount` number: The customer's value-added tax registration number.
    - `invoice_id` string: Invoice ID number.
    - `brand_name` string: The label that overrides the business name in the PayPal account on the PayPal pages.
    - `locale` string: The language and region of the customer in ISO 639-2 language code; value consists of language-country.
    - `partner_customer_risk_data` object: An array of key-and-value pairs with merchant-specific data for the transaction.
      - `key` string: The key for the pair.
      - `value` string: The value for the pair.
    - `custom_payment_method_ids` string[]: Promo codes - An array that can be used to define which of the configured payment options within a payment category (pay_later, pay_over_time, etc.) should be shown for this purchase.
    - `airline_data` object[]: Contains information about the airline ticket and flights booked by the customer.
      - `ticket` object: Contains information about the airline ticket.
        - `number` string: The ticket's unique identifier.
        - `issue_date` string, date: Date the airline ticket was issued.
        - `issuing_carrier_code` string: Carrier code of the ticket issuer.
        - `travel_package_indicator` string: C = Car rental reservation, A = Airline flight reservation, B = Both car rental and airline flight reservations included, N = Unknown.
        - `travel_agency_name` string: The name of the travel agency.
        - `travel_agency_code` string: The unique identifier from IATA or ARC for the travel agency that issues the ticket.
      - `passenger` union: Contains information about the passenger(s) on the flight. PayPal requires a single object.
        - PaymentInterfacesProcessingAirlinePassengerData[]: Array of passengers on the flight.
          - `first_name` string: The passenger's first name.
          - `last_name` string: The passenger's last name.
          - `date_of_birth` string, date: The passenger's date of birth.
          - `address` object: Contains information about the passenger's address.
            - `country` string: The two-letter ISO country code of the passenger's country residence.
        - PaymentInterfacesProcessingAirlinePassengerData: Contains information about a passenger on the flight.
          - `first_name` string: The passenger's first name.
          - `last_name` string: The passenger's last name.
          - `date_of_birth` string, date: The passenger's date of birth.
          - `address` object: Contains information about the passenger's address.
            - `country` string: The two-letter ISO country code of the passenger's country residence.
      - `flight_leg_details` object[]: Contains information about the flight leg(s) booked by the customer.
        - `flight_number` string: The flight identifier.
        - `carrier_code` string: The IATA 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details.
        - `class_of_travelling` string: A one-letter travel class identifier. The following are common: F = First class, J = Business class, Y = Economy class, W = Premium economy.
        - `departure_airport` string: The IATA three-letter airport code of the departure airport. This field is required if the airline data includes leg details.
        - `departure_date` string, date: The date of the scheduled take off.
        - `departure_time` string: The time of the scheduled take off.
        - `arrival_airport` string: The IATA 3-letter airport code of the destination airport. This field is required if the airline data includes leg details.
        - `stop_over_code` string: A one-letter code that indicates whether the passenger is entitled to make a stopover. Can be a space, O if the passenger is entitled to make a stopover, or X if they are not.
        - `fare_basis_code` string: The fare basis code, alphanumeric.
    - `accommodation_data` object[]: Contains information about the accommodation booked by the customer.
      - `name` string: For lodging, contains the lodging name that appears on the storefront/customer receipts. For cruise, contains the ship name booked for the cruise.
      - `booking_reference` string: A unique identifier for the booking.
      - `check_in_date` string, date: For lodging, contains the actual or scheduled date the guest checked-in. For cruise, contains the cruise departure date also known as sail date.
      - `check_out_date` string, date: For lodging, contains the actual or scheduled date the guest checked-out. For cruise, contains the cruise return date also known as sail end date.
      - `address` object: The address details of the accommodation.
        - `address_line1` string: The first line of the address.
        - `zip` string: The postal code for the address.
      - `state` string: The state or province of the address country (ISO 3166-2 code of up to two alphanumeric characters).
      - `country` string: The ISO country code of the address.
      - `city` string: The address city.
      - `number_of_rooms` integer: The total number of rooms booked for the accommodation.
      - `guests` object[]: Contains information about the guests staying at the accommodation.
        - `first_name` string: The first name of the guest.
        - `last_name` string: The last name of the guest.
        - `date_of_birth` string, date: The date of birth of the guest.
      - `room` object[]: Contains information about the rooms booked by the customer.
        - `rate` string: For lodging, contains the nightly rate for one room. For cruise, contains the total cost of the cruise.
        - `number_of_nights_at_room_rate` string: For lodging, contains the number of nights charged at the rate provided in the rate field. For cruise, contains the length of the cruise in days.
    - `order_id` string: The number provided by the cardholder. Purchase order or invoice number may be used.
    - `surcharge_amount` integer: Surcharge amount applied to the transaction in minor units by the merchant.
    - `duty_amount` number: The total charges for any import/export duty included in the transaction.
    - `shipping_tax_amount` number: The tax amount of the freight or shipping and handling charges for the transaction.
    - `affiliate_id` string: The unique identifier for Visa-registered ramp providers. Must only contain alphanumeric characters. If you're a Visa-registered ramp provider operating with affiliates, this field is required.
    - `affiliate_url` string: The affiliate URL. If you're a Visa-registered ramp provider operating with affiliates, this field is required.
    - `purchase_country` string: The purchase country of the customer. ISO 3166 alpha-2 purchase country.
    - `merchant_initiated_reason` 'Delayed_charge' | 'Resubmission' | 'No_show' | 'Reauthorization': Indicates the reason for a merchant-initiated payment request.
    - `campaign_id` integer: Unique number of the campaign this payment will be running in. Only required for Afterpay campaign invoices.
    - `original_order_amount` number: The payment for a merchant's order may be split, and the original order price indicates the transaction amount of the entire order.
    - `receipt_id` string: Merchant receipt ID.
    - `merchant_callback_url` string: A URL which you can use to notify the customer that the order has been created.
    - `line_of_business` string: <span style="font-size: 12px; font-weight: 500; color: rgb(0, 0, 0); background-color: rgb(255, 176, 97); border-radius: 4px; padding: 2px 6px" >Beta</span><p></p> The line of business that the payment is associated with.
    - `pan_preference` 'fpan' | 'dpan': Specifies the preferred type of Primary Account Number (PAN) for the payment: * DPAN: Uses the Checkout.com Network Token. * FPAN: Uses the full card number. **Note**: This only works when `source.type` is any of: - `cards` - `instruments` - `tokens`
    - `provision_network_token` boolean: Indicates whether to provision a network token for the payment.
    - `reconciliation_id` string: Transaction identifier used to track a payment request
    - `aggregator` PaymentInterfacesProcessingAggregator: Contains information about the payment aggregator.
      - `sub_merchant_id` string: ID that you assigned to the sub-entity.
      - `aggregator_id_visa` string: Visa identifier of the payment aggregator.
      - `aggregator_id_mc` string: Mastercard identifier of the payment aggregator.
  - `instruction` object: Details about the payment instruction.
    - `purpose` 'donations' | 'education' | 'emergency_need' | 'expatriation' | 'family_support' | 'financial_services' | 'gifts' | 'income' | 'insurance' | 'investment' | 'it_services' | 'leisure' | 'loan_payment' | 'medical_treatment' | 'other' | 'pension' | 'royalties' | 'savings' | 'travel_and_tourism': The purpose of the payment. This field might be required for AFT transactions depending on the card's `issuer_country`. To view a card's `issuer_country`, [retrieve the card's metadata](https://api-reference.checkout.com/#operation/requestCardMetadata!c=200&path=issuer_country&t=response). See the [AFT documentation page](https://www.checkout.com/docs/payments/manage-payments/perform-an-account-funding-transaction) for more details.
  - `processing_channel_id` string: The processing channel to use for the payment.
  - `items` object[]: The line items in the order.
    - `reference` string: The item reference or product stock keeping unit (SKU).
    - `commodity_code` string: A code identifying a commodity for value-added tax (VAT) purposes.
    - `unit_of_measure` string: The unit in which the item is measured, as a Unit of Measure (UoM) code.
    - `total_amount` integer: The total cost of the line item, in <a href="https://www.checkout.com/docs/payments/accept-payments/format-the-amount-value" target="blank">minor currency units</a>. The value should include any tax and discounts applied using the formula: `value = (quantity x unit_price) - discount_amount`.
    - `tax_amount` integer: The total amount of sales tax or value-added tax (VAT) on the total purchase amount. Tax should be included in the total purchase amount.
    - `discount_amount` integer: The discount applied to each invoice line item.
    - `url` string: Link to the line item's product page.
    - `image_url` string: Link to the line item's product image.
    - `name` string, required: The descriptive name of the line item.
    - `quantity` integer, required: The number of line items.
    - `unit_price` integer, required: The unit price of the item, in <a href="https://www.checkout.com/docs/payments/accept-payments/format-the-amount-value" target="blank">minor currency units</a>.
  - `amount_allocations` object[]: The sub-entities that the payment is being processed on behalf of.
    - `id` string, required: The sub-entity's ID.
    - `amount` integer, required: The split amount, in <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency units</a>. The sum of all split amounts must be equal to the payment amount. The split amount will be credited to your sub-entity's currency account.
    - `reference` string: A reference you can use to identify the split. For example, an order number.
    - `commission` object: The commission you'd like to collect from the split, calculated using the formula: `commission = (amount * commission.percentage) + commission.amount`. The commission cannot exceed the split amount. Commission will be credited to your currency account.
      - `amount` integer: An optional commission to collect, as a fixed amount in <a href="https://www.checkout.com/docs/resources/calculating-the-amount" target="blank">minor currency units</a>.
      - `percentage` number: An optional commission to collect, as a percentage value with up to eight decimal places.
  - `risk` object: Configures the risk assessment performed during payment processing.
    - `enabled` boolean, required: Specifies whether to perform a risk assessment.
  - `display_name` string: The merchant's display name.
  - `success_url` string, uri, required: Overrides the default success redirect URL configured on your account, for payment methods that require a redirect.
  - `failure_url` string, uri, required: Overrides the default failure redirect URL configured on your account, for payment methods that require a redirect.
  - `metadata` PaymentSessionMetadata: Allows you to store additional information about a transaction with custom fields and up to five user-defined fields, which can be used for reporting purposes. You can supply fields of type `string`, `number`, and `boolean` within the `metadata` object. Arrays and objects are not supported. You can provide up to 18 metadata fields per API call, but the value of each field must not exceed 255 characters in length. You can also reference [`metadata` properties](https://www.checkout.com/docs/business-operations/prevent-fraud/understand-fraud-detection#Metadata) in your custom rules for Fraud Detection. For example, `$coupon_code = '1234'`.
  - `locale` 'ar' | 'da-DK' | 'de-DE' | 'el' | 'en-GB' | 'es-ES' | 'fi-FI' | 'fil-PH' | 'fr-FR' | 'hi-IN' | 'id-ID' | 'it-IT' | 'ja-JP' | 'ko-KR' | 'ms-MY' | 'nb-NO' | 'nl-NL' | 'pt-PT' | 'sv-SE' | 'th-TH' | 'vi-VN' | 'zh-CN' | 'zh-HK' | 'zh-TW': Creates a translated version of the page in the specified language.
  - `3ds` union
    - union
      - object: 3DS authentication not enabled
        - `enabled` 'false', required: Whether to process this payment as a 3D Secure payment. Payments where `merchant_initiated` is `true` will be processed as <a href="https://www.checkout.com/docs/payments/authenticate-payments/3d-secure/request-3ri-authentication" target="_blank">3DS Requestor Initiated.</a>
        - `challenge_indicator` 'no_preference' | 'no_challenge_requested' | 'challenge_requested' | 'challenge_requested_mandate': Indicates the preference for whether or not a 3DS challenge should be performed. The customer’s bank has the final say on whether or not the customer receives the challenge.
        - `allow_upgrade` boolean: Indicates whether to process this payment as 3D Secure if the authorization was soft declined due to 3DS authentication required. For processing channels created before October 12, 2022, the value will default to `false`.
        - `exemption` 'low_value' | 'trusted_listing' | 'trusted_listing_prompt' | 'transaction_risk_assessment' | '3ds_outage' | 'sca_delegation' | 'out_of_sca_scope' | 'low_risk_program' | 'recurring_operation' | 'data_share' | 'other': Specifies an exemption reason so that the payment is not processed using 3D Secure authentication. Learn more about exemptions in our <a href="https://docs.checkout.com/four/payments/regulation-support/sca-compliance-guide#SCAcomplianceguide-PossibleSCAexemptionsexemptions" target="_blank">SCA compliance guide</a>
      - object: 3DS authentication enabled
        - `enabled` 'true', required: Whether to process this payment as a 3D Secure payment. Payments where `merchant_initiated` is `true` will be processed as <a href="https://www.checkout.com/docs/payments/authenticate-payments/3d-secure/request-3ri-authentication" target="_blank">3DS Requestor Initiated.</a>
        - `challenge_indicator` 'no_preference' | 'no_challenge_requested' | 'challenge_requested' | 'challenge_requested_mandate': Indicates the preference for whether or not a 3DS challenge should be performed. The customer’s bank has the final say on whether or not the customer receives the challenge.
        - `attempt_n3d` boolean: Applies only when `3ds.enabled` is set to `true`. Set to `true` to attempt the payment without 3DS when the issuer, card, or network doesn’t support 3DS.
        - `exemption` 'low_value' | 'trusted_listing' | 'trusted_listing_prompt' | 'transaction_risk_assessment' | 'data_share': Specifies an exemption reason so that the payment is not processed using 3D Secure authentication. Learn more about exemptions in our <a href="https://docs.checkout.com/four/payments/regulation-support/sca-compliance-guide#SCAcomplianceguide-PossibleSCAexemptionsexemptions" target="_blank">SCA compliance guide</a>
        - `account_info` PaymentSessions3DSAccountInfo: Additional information about the cardholder's account
          - `purchase_count` number: The number of purchases with this cardholder's account during the last six months
          - `account_age` 'no_account' | 'created_during_transaction' | 'less_than_thirty_days' | 'thirty_to_sixty_days' | 'more_than_sixty_days': The length of time that the payment account was enrolled in the cardholder's account
          - `add_card_attempts` number: The number of _Add Card_ attempts in the last 24 hours
          - `shipping_address_age` 'this_transaction' | 'less_than_thirty_days' | 'thirty_to_sixty_days' | 'more_than_sixty_days': Indicates when the shipping address for this transaction was first used
          - `account_name_matches_shipping_name` boolean: Indicates if the cardholder name on the account is identical to the shipping name used for this transaction
          - `suspicious_account_activity` boolean: Indicates whether suspicious activity on the cardholder account has been observed
          - `transactions_today` number: The number of transactions (successful and abandoned) for the cardholder account across all payment accounts in the previous 24 hours
          - `authentication_method` 'no_authentication' | 'own_credentials' | 'federated_id' | 'issuer_credentials' | 'third_party_authentication' | 'fido': Information about how the cardholder was authenticated before or during the transaction
          - `cardholder_account_age_indicator` 'no_account' | 'this_transaction' | 'less_than_thirty_days' | 'thirty_to_sixty_days' | 'more_than_sixty_days': The length of time the cardholder has held the account with the 3DS Requestor
          - `account_change` string, date-time: The UTC date and time the cardholder’s account with the 3DS Requestor was last changed, in ISO 8601 format. Changes that affect this value include: - updating the billing or shipping address - adding a new payment account - adding a new user
          - `account_change_indicator` 'this_transaction' | 'less_than_thirty_days' | 'thirty_to_sixty_days' | 'more_than_sixty_days': The amount of time since the cardholder’s account information with the 3DS Requestor was last changed. Changes that affect this value include: - updating the billing or shipping address - adding a new payment account - adding a new user
          - `account_date` string, date-time: The UTC date and time the cardholder opened the account with the 3DS Requestor, in ISO 8601 format.
          - `account_password_change` string, date-time: The UTC date and time the cardholder’s account with the 3DS Requestor was last reset or had a password change, in ISO 8601 format.
          - `account_password_change_indicator` 'no_change' | 'this_transaction' | 'less_than_thirty_days' | 'thirty_to_sixty_days' | 'more_than_sixty_days': The amount of time since the cardholder’s account with the 3DS Requestor was last reset or had a password change.
          - `transactions_per_year` integer: The number of transactions associated with the cardholder's account with the 3DS Requestor in the previous year. This value includes both successful and abandoned transactions, across all payment accounts. Set this value to `999` if the number of transactions is `1000` or greater.
          - `payment_account_age` string, date-time: The UTC date and time the payment account was enrolled in the cardholder’s account with the 3DS Requestor, in ISO 8601 format.
          - `shipping_address_usage` string, date-time: The UTC date and time the shipping address used for the transaction was first used with the 3DS Requestor, in ISO 8601 format.
          - `account_type` 'not_applicable' | 'credit' | 'debit': The type of account, in the case of a card product with multiple accounts.
          - `account_id` string: Additional information about the account optionally provided by the 3DS Requestor
    - object: Required information to process a payment that has been 3DS authenticated using a <a href="https://www.checkout.com/docs/risk-management/3d-secure/sessions#Non-hosted" target="_blank">Third Party provider</a>
      - `enabled` true, required: Whether to process this payment as a 3D Secure payment
      - `eci` string, required: The Electronic Commerce Indicator security level associated with the 3D Secure enrollment result. Required if using a third-party merchant plug-in (MPI)
      - `cryptogram` string, required: A Base64 encoded cryptographic identifier (CAVV) used by the card schemes to validate the cardholder authentication result (3D Secure). Required if using an external MPI
      - `xid` string, required: The 3D Secure transaction identifier. Required if using an external MPI with 3D Secure 2.X.X and a Mastercard card, or with 3D Secure 1.X.X for any supported card scheme
      - `version` string, required: Indicates the version of 3D Secure that was used for authentication. Defaults to 1.0.0 if not provided
      - `exemption` 'low_value' | 'secure_corporate_payment' | 'trusted_listing' | 'transaction_risk_assessment' | '3ds_outage' | 'sca_delegation' | 'out_of_sca_scope' | 'other' | 'low_risk_program' | 'recurring_operation': Specifies an exemption reason so that the payment is not processed using 3D Secure authentication. Learn more about exemptions in our <a href="https://docs.checkout.com/four/payments/regulation-support/sca-compliance-guide#SCAcomplianceguide-PossibleSCAexemptionsexemptions" target="_blank">SCA compliance guide</a>
  - `sender` PaymentInterfacesSender: The sender type. If set to `instrument`, the sender information (name and address) will be retrieved from the payment instrument.
  - `capture` boolean: Specifies whether to capture the payment, if applicable.
  - `capture_on` string, date-time: A timestamp specifying when to capture the payment, as an ISO 8601 code. If a value is provided, `capture` is automatically set to `true`.
  - `payment_plan` PaymentSessionPaymentPlanRecurring: The information to process a recurring payment request. To be used when the payment_type is Recurring.
    - `amount_variability` 'Fixed' | 'Variable': Specifies whether the amount is fixed or variable for each recurrence.
    - `days_between_payments` integer: Indicates the minimum number of days between payments.
    - `total_number_of_payments` integer: Indicates the agreed total number of payments.
    - `current_payment_number` integer: The number of the current installment payment.
    - `expiry` string: The date after which no further payments will be performed, in the format YYYYMMDD.
    - `name` string: The name of the payment plan. Required when `source.type` is `blik`. For Blik merchant-initiated requests using an external `partner_agreement_id`, this value is used as the Blik Alias Label.
    - `start_date` string: The date on which the first payment will be taken, in `YYYYMMDD` format. Required when `source.type` is `blik` and the recurring agreement is created without an initial payment (`amount` set to `0`).
    - `amount` integer: The amount to charge for each payment in the plan, in the [minor currency unit](https://www.checkout.com/docs/resources/calculating-the-amount). Required when `source.type` is `blik`, `payment_plan.amount_variability` is `Fixed`, and the recurring agreement is created without an initial payment (`amount` set to `0`).
  - `expires_on` string, date-time: A timestamp specifying when the `PaymentSession` should expire, as an ISO 8601 code. If no value is provided, expiry is set to 24 hours after the `PaymentSession` is created. You cannot set the session expiry to more than 60 days after the `PaymentSession` is created.
  - `enabled_payment_methods` PaymentInterfacesPaymentMethodEnum[]
  - `disabled_payment_methods` PaymentInterfacesPaymentMethodEnum[]
  - `payment_method_configuration` object: Configurations for payment method-specific settings.
    - `applepay` object: Configuration options specific to Apple Pay payments.
      - `store_payment_details` 'disabled' | 'enabled': Specifies whether you intend to store the cardholder's payment details. If you set this field to `enabled`, you must: - have obtained consent from the cardholder to store their payment details - provide a customer ID or email address in the request If the request's `payment_type` is set to one of the following values, you do not need to provide this field: - `Installment` - `Recurring` - `Unscheduled`
      - `account_holder` object: The account holder's details.
      - `total_type` 'pending' | 'final': The [type](https://developer.apple.com/documentation/applepayontheweb/applepaylineitemtype) of the Apple Pay payment [total line item](https://developer.apple.com/documentation/applepayontheweb/applepaypaymentrequest/total).
    - `card` object: Configuration options specific to card payments.
      - `store_payment_details` 'disabled' | 'enabled' | 'collect_consent': Specifies whether you intend to store the cardholder's payment details. If you set this field to `enabled` or `collect_consent`, you must: - Have obtained consent from the cardholder to store their payment details - Provide `customer.id` or `customer.email` in the request You do not need to provide this field if `payment_type` is set to one of the following values: - `Installment` - `Recurring` - `Unscheduled`
      - `account_holder` object: The account holder's details.
    - `googlepay` object: Configuration options specific to Google Pay payments.
      - `store_payment_details` 'disabled' | 'enabled': Specifies whether you intend to store the cardholder's payment details. If you set this field to `enabled`, you must: - have obtained consent from the cardholder to store their payment details - provide a customer ID or email address in the request If the request's `payment_type` is set to one of the following values, you do not need to provide this field: - `Installment` - `Recurring` - `Unscheduled`
      - `account_holder` object: The account holder's details.
      - `total_price_status` 'estimated' | 'final': The status of the Google Pay payment [total price](https://developers.google.com/pay/api/web/reference/request-objects#TransactionInfo).
    - `stored_card` object: Configuration options specific to stored card payments.
      - `customer_id` string: The unique identifier for an existing [customer](https://api-reference.checkout.com/#tag/Customers). Enables the stored card payment method if the customer has one or more payment instruments stored. This value takes precedence over `payment_method_configuration.stored_card.instrument_ids` when choosing the stored cards to present to the customer.
      - `instrument_ids` string[]: The unique identifiers for card instruments. Enables stored card payment method if any exists. The first valid payment instrument in the list is shown to the customer as the default option. <br/> Alternatively, you can specify a default payment instrument by providing its ID in the `payment_method_configuration.stored_card.default_instrument_id` field.
      - `default_instrument_id` string: The unique identifier for the payment instrument to present to the customer as the default option.
  - `customer_retry` object: Configuration for asynchronous retries.
    - `max_attempts` integer, required: The maximum number of authorization retry attempts, excluding the initial authorization.
  - `ip_address` string, ipv4

## Response `201`

A Payment Session.

- CreatePaymentSessionsResponse
  - `id` string, required: The Payment Sessions unique identifier
  - `payment_session_token` string, required: A unique token representing the payment session, which you must provide when you initialize [Flow](https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-on-your-website/get-started-with-flow#Step_2:_Initialize_and_mount_Flow_). Do not log or store this value.
  - `payment_session_secret` string, required: The secret used by Flow to authenticate payment session requests. Do not log or store this value.
  - `_links` object, required: The links related to the Payment Session.
    - `self` object, required: The URI of the Payment Session.
      - `href` string, required: The link URL

## Other responses

- `401`: Unauthorized (Empty Response).
- `422`: Invalid data was sent.
- `429`: Too many requests.
- `502`: Bad gateway.

---

[API](https://skmtc.dev/checkout/apis/checkout-com-api-reference.md) - [All operations](https://skmtc.dev/checkout/apis/checkout-com-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/checkout/apis/checkout-com-api-reference/revisions/0f1abdb1c3e9?raw)
