---
title: "Generate a session_id"
method: POST
path: "/payment-sessions"
tags: ["Components"]
---

# Generate a session_id

`POST /payment-sessions`

When using our Components solution, you are required to submit a request that includes payment details to create a `session_id`. This `session_id` will hold transaction-specific information and will be used to complete the payment. At a minimum you are required to submit the `order_id`, `amount` & `currency`. We also recommend submitting your 3DS requirements at this stage.

## Headers

- `Company-Id` string, uuid
- `Mid` string, uuid

## Request body

- object
  - `transaction` object
    - `order_id` string, required — Unique reference assigned by you for the payment request. **This cannot be overwriten in confirmParams.**
    - `amount` number, float, required — The total amount you want to charge. **This cannot be overwriten in confirmParams.**
    - `currency` 'aed' | 'aud' | 'cad' | 'chf' | 'cny' | 'dkk' | 'eur' | 'gbp' | 'hkd' | 'jpy' | 'mxn' | 'sek' | 'usd' | 'zar', required — ISO 4217 currency code in lower case. **This cannot be overwriten in confirmParams.**
    - `moto` boolean — Set to true if processing a payment over the phone.
    - `capture` boolean — Set to false if you want to just authorise and request a funds transfer later. If capture is set to true, the `transaction_type` will be `sale`. **This cannot be overwriten in confirmParams.**
    - `custom_data` string — Base64 encoded string detailing custom data passed in the request. *Do not pass any card data in this parameter.*
    - `custom1` string — Send additional data relating to the customer or another internal reference.
    - `custom2` string — Send additional data relating to the customer or another internal reference.
  - `customer` CustomerRequest
    - `customer_id` string, uuid — Unique ID assigned by Acquired.com to the customer when it is created.
    - `reference` string — Unique reference assigned by you for the customer when it is created.
    - `first_name` string — The customer's first name.
    - `last_name` string — The customer's last name. **Required for MCC 6012 merchants.**
    - `dob` string, date — The customer's date of birth. **Required for MCC 6012 merchants.**
    - `custom_data` string — Base64 encoded string detailing custom data passed in the request.
    - `billing` object
      - `address` Address
        - `line_1` string — The first line of the customer's address. **Recommended when processing EMV 3DS transactions and for AVS checks.**
        - `line_2` string — The second line of the customer's address.
        - `city` string — The city of the customer's address.
        - `state` string — The 3 letter ISO 3166-2 3-character state code of the customer's address. This should only be sent when processing in the US.
        - `postcode` string — The postcode of the customer's address. **Recommended for MCC 6012 merchants. Required when processing EMV 3DS transactions and for AVS checks.**
        - `country_code` 'al' | 'al' | 'dz' | 'as' | 'ad' | 'ao' | 'ai' | 'aq' | 'ag' | 'ar' | 'am' | 'aw' | 'au' | 'at' | 'az' | 'bs' | 'bh' | 'bd' | 'bb' | 'by' | 'be' | 'bz' | 'bj' | 'bm' | 'bt' | 'bo' | 'ba' | 'bw' | 'br' | 'io' | 'bn' | 'bg' | 'bf' | 'bi' | 'cv' | 'kh' | 'cm' | 'ca' | 'ky' | 'cf' | 'td' | 'cl' | 'cn' | 'co' | 'km' | 'cg' | 'cd' | 'cr' | 'hr' | 'cu' | 'cy' | 'cz' | 'dk' | 'dj' | 'dm' | 'do' | 'ec' | 'eg' | 'sv' | 'gq' | 'er' | 'ee' | 'sz' | 'et' | 'fk' | 'fo' | 'fj' | 'fi' | 'fr' | 'gf' | 'pf' | 'ga' | 'gm' | 'ge' | 'de' | 'gh' | 'gi' | 'gr' | 'gl' | 'gd' | 'gu' | 'gt' | 'gg' | 'gn' | 'gw' | 'gy' | 'ht' | 'hn' | 'hk' | 'hu' | 'is' | 'in' | 'id' | 'ir' | 'iq' | 'ie' | 'im' | 'il' | 'it' | 'jm' | 'jp' | 'je' | 'jo' | 'kz' | 'ke' | 'ki' | 'kp' | 'kr' | 'kw' | 'kg' | 'la' | 'lv' | 'lb' | 'ls' | 'lr' | 'ly' | 'li' | 'lt' | 'lu' | 'mo' | 'mk' | 'mg' | 'mw' | 'my' | 'mv' | 'ml' | 'mt' | 'mh' | 'mq' | 'mr' | 'mu' | 'yt' | 'mx' | 'fm' | 'md' | 'mc' | 'mn' | 'me' | 'ms' | 'ma' | 'mz' | 'mm' | 'na' | 'nr' | 'np' | 'nl' | 'nc' | 'nz' | 'ni' | 'ne' | 'ng' | 'nu' | 'nf' | 'mp' | 'no' | 'om' | 'pk' | 'pw' | 'ps' | 'pa' | 'pg' | 'py' | 'pe' | 'ph' | 'pl' | 'pt' | 'pr' | 'qa' | 'ro' | 'ru' | 'rw' | 're' | 'bl' | 'sh' | 'kn' | 'lc' | 'mf' | 'pm' | 'vc' | 'ws' | 'sm' | 'st' | 'sa' | 'sn' | 'rs' | 'sc' | 'sl' | 'sg' | 'sx' | 'sk' | 'si' | 'sb' | 'so' | 'za' | 'gs' | 'ss' | 'es' | 'lk' | 'sd' | 'sr' | 'se' | 'ch' | 'sx' | 'sy' | 'tw' | 'tj' | 'tz' | 'th' | 'tg' | 'tk' | 'to' | 'tt' | 'tn' | 'tr' | 'tm' | 'tc' | 'tv' | 'ug' | 'ua' | 'ae' | 'gb' | 'us' | 'uy' | 'uz' | 'vu' | 've' | 'vn' | 'vg' | 'vi' | 'wf' | 'eh' | 'ye' | 'zm' | 'zw' — The ISO 3166 2-character code of the customer's address. **Recommended when processing EMV 3DS transactions.**
      - `email` string, email — The customer's email address. **Recommended for processing EMV 3DS transactions.**
      - `phone` Phone
        - `country_code` string — The international dialling code of the customer's phone number.
        - `number` string — The customer's phone number.
    - `shipping` object
      - `address_match` boolean — Set to true if the customer's billing and shipping address are the same to auto populate.
      - `address` Address
        - `line_1` string — The first line of the customer's address. **Recommended when processing EMV 3DS transactions and for AVS checks.**
        - `line_2` string — The second line of the customer's address.
        - `city` string — The city of the customer's address.
        - `state` string — The 3 letter ISO 3166-2 3-character state code of the customer's address. This should only be sent when processing in the US.
        - `postcode` string — The postcode of the customer's address. **Recommended for MCC 6012 merchants. Required when processing EMV 3DS transactions and for AVS checks.**
        - `country_code` 'al' | 'al' | 'dz' | 'as' | 'ad' | 'ao' | 'ai' | 'aq' | 'ag' | 'ar' | 'am' | 'aw' | 'au' | 'at' | 'az' | 'bs' | 'bh' | 'bd' | 'bb' | 'by' | 'be' | 'bz' | 'bj' | 'bm' | 'bt' | 'bo' | 'ba' | 'bw' | 'br' | 'io' | 'bn' | 'bg' | 'bf' | 'bi' | 'cv' | 'kh' | 'cm' | 'ca' | 'ky' | 'cf' | 'td' | 'cl' | 'cn' | 'co' | 'km' | 'cg' | 'cd' | 'cr' | 'hr' | 'cu' | 'cy' | 'cz' | 'dk' | 'dj' | 'dm' | 'do' | 'ec' | 'eg' | 'sv' | 'gq' | 'er' | 'ee' | 'sz' | 'et' | 'fk' | 'fo' | 'fj' | 'fi' | 'fr' | 'gf' | 'pf' | 'ga' | 'gm' | 'ge' | 'de' | 'gh' | 'gi' | 'gr' | 'gl' | 'gd' | 'gu' | 'gt' | 'gg' | 'gn' | 'gw' | 'gy' | 'ht' | 'hn' | 'hk' | 'hu' | 'is' | 'in' | 'id' | 'ir' | 'iq' | 'ie' | 'im' | 'il' | 'it' | 'jm' | 'jp' | 'je' | 'jo' | 'kz' | 'ke' | 'ki' | 'kp' | 'kr' | 'kw' | 'kg' | 'la' | 'lv' | 'lb' | 'ls' | 'lr' | 'ly' | 'li' | 'lt' | 'lu' | 'mo' | 'mk' | 'mg' | 'mw' | 'my' | 'mv' | 'ml' | 'mt' | 'mh' | 'mq' | 'mr' | 'mu' | 'yt' | 'mx' | 'fm' | 'md' | 'mc' | 'mn' | 'me' | 'ms' | 'ma' | 'mz' | 'mm' | 'na' | 'nr' | 'np' | 'nl' | 'nc' | 'nz' | 'ni' | 'ne' | 'ng' | 'nu' | 'nf' | 'mp' | 'no' | 'om' | 'pk' | 'pw' | 'ps' | 'pa' | 'pg' | 'py' | 'pe' | 'ph' | 'pl' | 'pt' | 'pr' | 'qa' | 'ro' | 'ru' | 'rw' | 're' | 'bl' | 'sh' | 'kn' | 'lc' | 'mf' | 'pm' | 'vc' | 'ws' | 'sm' | 'st' | 'sa' | 'sn' | 'rs' | 'sc' | 'sl' | 'sg' | 'sx' | 'sk' | 'si' | 'sb' | 'so' | 'za' | 'gs' | 'ss' | 'es' | 'lk' | 'sd' | 'sr' | 'se' | 'ch' | 'sx' | 'sy' | 'tw' | 'tj' | 'tz' | 'th' | 'tg' | 'tk' | 'to' | 'tt' | 'tn' | 'tr' | 'tm' | 'tc' | 'tv' | 'ug' | 'ua' | 'ae' | 'gb' | 'us' | 'uy' | 'uz' | 'vu' | 've' | 'vn' | 'vg' | 'vi' | 'wf' | 'eh' | 'ye' | 'zm' | 'zw' — The ISO 3166 2-character code of the customer's address. **Recommended when processing EMV 3DS transactions.**
      - `email` string, email — The customer's email address.
      - `phone` Phone
        - `country_code` string — The international dialling code of the customer's phone number.
        - `number` string — The customer's phone number.
  - `tds` ThreeDSecure
    - `is_active` boolean — Enables the use of EMV 3-D Secure to authenticate the cardholder.
    - `challenge_preference` 'challenge_mandated' | 'challenge_preferred' | 'no_challenge_requested' | 'no_preference' — Indicates your preference to the issuing bank on if the cardholder should be challenged or not.
    - `challenge_window_size` 'full_screen' | 'windowed_250x400' | 'windowed_390x400' | 'windowed_500x600' | 'windowed_600x400' — Indicates your preference to the issuing bank the size of the challenge window to be displayed.
    - `contact_url` string, uri — Link to the contact us / support page of your website.
    - `redirect_url` string, uri — Where the user should be redirected to once the authentication process has been completed.
    - `webhook_url` string, uri — Where we should send webhook notifications throughout the authorisation process. Pass the `webhook_url` inside the `tds` object only when `tds` is `true`. If `tds` is `false`, the `webhook_url` should be passed directly in the root object, outside of the `tds` object.
  - `webhook_url` string, uri — Where we should send webhook notifications throughout the authorisation process.
  - `save_card` boolean — Set to true if you want to display the save card checkbox **(use this only for the Payment and Form components).**
  - `is_recurring` boolean — Set to true if you want to save the card for future use for Apple Pay and Google Pay only **(use this only for the Payment component).**
  - `payment_methods` string[] — Used to specify which payment methods should be displayed on the Checkout. **(This can only be passed when using the Payment component).**
  - `company_domains` string[] — Can be optionally provided to restrict the session scope to a subset of domains registered to your company. All domains must be registered via the Hub's 'SDK' settings.

## Response `200`

OK

- object
  - `session_id` string, uuid — Unique ID assigned by Acquired.com which contains the payment information that will be loaded when initialising the Components checkout.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal Server error

---

[API](https://skmtc.dev/acquired/apis/acquired-api.md) · [All operations](https://skmtc.dev/acquired/apis/acquired-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/acquired/acquired-api/revisions/7ae178a046f2/schema)
