Click to Pay

Initializes a new Unified Click-to-Pay session

post/click-to-pay/session

Request

  • Base URL
    https://sandbox.comcarde.com/v1
  • URL
    https://sandbox.comcarde.com/v1/click-to-pay/session
  • Auth
    HTTP bearer

Request body

originsstring[]

A list of web origins that the Click-to-Pay SDK will be run on.

amountinteger

Amount in a currency to be used for the transaction. In the lowest denomination of the currency of the payment. This means that 1234 in GBP represents £12.34.

currencyCodestring

Currency code of the payment (ISO 4217)

Example request

{
  "origins": [
    "https://sandbox.comcarde.com",
    "https://secure.comcarde.com"
  ],
  "amount": 1234,
  "currencyCode": "GBP"
}

Response

A session was successfully created

codestring

Response Code signifying the outcome of the request.

messagestring

A description of the outcome of the request.

idstring

The ID of this request. If you can include these when querying the outcome of individual requests, we can track down the root cause faster.

sessionstring

The session JWT from Unified Click-to-Pay

Example response

{
  "code": "1000",
  "id": "463ac35c9f6413ad48485a3953bb6124",
  "session": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwidGhpcyBpc250IGEiOiJyZWFsIHNlc3Npb24gand0IiwianVzdCBuZWVkIGEgbG90IG9mIjoicGFkZGVkIGRhdGEgdG8iLCJtYWtlIHRoaXMgc2VlbSB0aGF0IjoidGhpcyBoYXMgbW9yZSBjb250ZW50IiwidGhhbiBpdCI6InJlYWxseSBkb2VzIiwiaWF0IjoxNTE2MjM5MDIyfQ._WRSVKgwbKJophtHlig_AIOBPYT0i0BwsMUbN394GbE"
}

Changes

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