---
title: "checkout_payment_token_session_post"
method: POST
path: "/accounts/{aid}/payments/sessions/payment-token"
tags: ["session", "Sessions"]
---

# checkout_payment_token_session_post

`POST /accounts/{aid}/payments/sessions/payment-token`

This endpoint lets you create payment and recurrence tokens without reserving
or charging any amount.

The URL returned by this endpoint opens a web site where the customer
can enter their payment details, e.g. card information.

The payment details will be validated and a transaction with a
payment/recurrence token will be created on success containing the payment
token created from the customer payment details.

- [GET /v1/transactions/{id}?includes=card.payment_token](/api-reference/transactions/transactions_id_get)
- [GET /v1/transactions/{id}?includes=card.recurrence_token](/api-reference/transactions/transactions_id_get)

scopes:
- admin:checkout
- write:checkout

## Query parameters

- `include_session` boolean

## Headers

- `Dintero-System-Name` string
- `Dintero-System-Version` string
- `Dintero-System-Plugin-Name` string
- `Dintero-System-Plugin-Version` string

## Request body

- object
  - `session` object, required — The session to create the payment token from
    - `order` object, required
      - `currency` string, iso4217-code, required — The three-character ISO-4217 currency. https://en.wikipedia.org/wiki/ISO_4217
      - `merchant_reference` string, required — A reference by the merchant to identify the corresponding order for the Checkout Session
      - `merchant_reference_2` string — A reference by the merchant to identify the corresponding order for the Checkout Session
      - `store` Store
        - `id` string, required
        - `name` string — name of the store, aka trade name of the store
        - `business_name` string — Official name of the person or entity that owns the store.
        - `address` Address
          - `address_line` string, required
          - `address_line_2` string
          - `postal_code` string
          - `postal_place` string, required
          - `country` string, iso-3166-1, required — ISO 3166-1 country code
        - `chain` string
        - `email` string
        - `gln` string
        - `organization_number` string
        - `phone_number` string
        - `mcc` string, iso-18245 — A four-digit Merchant Category Code (MCC) for the store [ISO 18245:2003](https://www.iso.org/standard/33365.html)
        - `bax` string — Merchant number associated with the stores payment terminal
        - `terminal_id` string — Id to a specific point-of-sale (POS) terminal or workstation
        - `payout_destination_id` string — The payout destination id for the merchant of record, i.e. the seller responsible for the transaction. Required when `seitatech.in_person` payment is enabled.
    - `url` SessionUrls, required
      - `return_url` string, uri, required — URL to page where Checkout will redirect the customer to after the Checkout process has ended. If a transaction was completed successfully, a `transaction_id` will be appended to the URL as a `query` string parameter > A `transaction_id` will be appended to the URL if the > Checkout failed with `error=capture` > A transaction with status `ON_HOLD` must be handled as a payment > that is pending approval, where the transaction will later be updated > with a final payment staus `AUTHORIZED` or `FAILED`. > We recommend that `callback_url` is used to receive the callback when > the transaction changes status from `ON_HOLD` to `AUTHORIZED` or `FAILED`. > Alternative is to do an hourly/daily poll on the transaction to check > if the status has changed. *Example*:
    - `profile_id` string — configuration profile to use for branding
    - `customer` SessionCustomer
      - `customer_id` string — Customer id
      - `email` string — Customer email address
      - `phone_number` string — Customer phone number, ITU/E.123 format with international prefix (+PPNNNNNNNNN...)
    - `expires_at` string, date-time
    - `configuration` object
      - `theme` object — Customize the appearance of the checkout.
        - `backdrop` string — Color on backdrop shown in desktop mode Color, supported formats are - hex: `#ff0000` - rgb: `rgb(255,0,0)` - rgba: `rgba(255,0,0,0.5)`
        - `primary` string — Primary color used on pay button and other buttons. Color, supported formats are - hex: `#ff0000` - rgb: `rgb(255,0,0)` - rgba: `rgba(255,0,0,0.5)`
        - `cardRadius` string — Radius on card element in the checkout.
        - `buttonRadius` string — Radius on buttons in the checkout.
      - `channel` 'ecommerce' | 'in_app' — `channel` enables special behaviour for various scenarios. The majority of web integrations will not need to set this property. ### in_app The `in_app` channel is intended for payments done from mobile devices where `url.return_url` can be set to the application's appswitch URL. #### Session deeplink URL Creating a session with `channel=in_app` will return an appswitch deeplink URL if the enabled payment options in the session supports it Appswitch deeplink is currently only supported for sessions that has only Vipps enabled via Dintero PSP, Vipps or Swedbank (payex) or Mobilepay enable via Swedbank (payex) - configuration.vipps.enabled - configuration.payex.vipps.enabled - configuration.payex.mobilepay.enabled - configuration.dintero_psp.vipps.enabled > `in_app` is currently not supported when express is enabled > `in_app` with deeplink URL is not supported if `publish` is enabled
    - `metadata` object — A key-value JSON object to store any additional information. The dintero_* namespace for keys is reserved
  - `token_provider` union, required
    - unknown
    - unknown
    - unknown
    - unknown
    - unknown

## Response `200`

Referenced by this API but not published in the vendor's docs pages.

## Other responses

- `400` — Bad / Invalid request
- `401` — Access forbidden, invalid JWT token was used
- `403` — Forbidden
- `500` — Unexpected Error

---

[API](https://skmtc.net/dintero/apis/account-management-api.md) · [All operations](https://skmtc.net/dintero/apis/account-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dintero/account-management-api/revisions/9b83a4199008/schema)
