Client Session API

Retrieve a client session

This API call retrieves all the details associated with the client session corresponding to the client token that is provided in the request. The fields with empty values are excluded from the response.

get/client-session

Query parameters

clientTokenstring

Client token

Client token corresponding to the client session to retrieve

Headers

X-API-VERSIONstring required
Example:2.4

Specifies the version of the API to use. This must be set to 2.4.

Response

Successful Response

customerIdstring

A unique identifier for your customer.

orderIdstring

Your reference for the payment.

currencyCode'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SOS' | 'SRD' | 'SSP' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XFU' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL'

3-letter currency code in <a href='https://en.wikipedia.org/wiki/ISO_4217#Active_codes'>ISO 4217</a> format, e.g. <code>USD</code> for US dollars.

amountinteger

The amount you are going to charge the customer, in minor units. This amount is calculated from the line items, shipping and other amounts provided in the order. If a top-level amount is provided, it would override any calculated amount.

metadataobject

Additional data to be used throughout the payment lifecycle.

Example response

{
  "customerId": "customer-123",
  "orderId": "order-abc",
  "currencyCode": "GBP",
  "amount": 650,
  "metadata": {
    "productType": "Clothing"
  },
  "customer": {
    "emailAddress": "john@primer.io"
  },
  "order": {
    "lineItems": [
      {
        "itemId": "t-shirt-1",
        "description": "White T-Shirt",
        "amount": 500,
        "quantity": 1
      }
    ],
    "fees": [
      {
        "type": "SURCHARGE",
        "amount": 100
      }
    ],
    "shipping": {
      "amount": 50
    },
    "paymentMethod": {
      "vaultOnSuccess": false,
      "vaultOn3DS": false,
      "options": {
        "GOOGLE_PAY": {
          "surcharge": {
            "amount": 100
          }
        },
        "PAYMENT_CARD": {
          "networks": {
            "VISA": {
              "surcharge": {
                "amount": 10
              }
            },
            "MASTERCARD": {
              "surcharge": {
                "amount": 20
              }
            }
          }
        },
        "PAY_NL_IDEAL": {
          "surcharge": {
            "amount": 50
          }
        }
      }
    },
    "authorizationType": "ESTIMATED"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.