Click to Pay

Encrypt the provided cardholder details with a provided encryption key.

post/click-to-pay/encrypt

Request

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

Request body

sessionstring

Unified Click-to-Pay session JWT

Example request

{
  "card": {
    "nameOnCard": "John F Doe",
    "pan": "4444 3333 2222 1111",
    "expiryDate": "05-25",
    "cv2": "123"
  },
  "billingAddress": {
    "firstName": "John",
    "lastName": "Smith",
    "address1": "Flat 1",
    "address2": "Victoria House",
    "address3": "15 Apple Street",
    "town": "Edinburgh",
    "county": "Lothian",
    "postcode": "BH23 6AA",
    "country": "GB"
  },
  "session": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30"
}

Response

The card information was successfully encrypted.

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.

encryptedCardstring

A JWE containing the encrypted card details.

brandstring

The card brand whose key was used to encrypted the card details.

Example response

{
  "code": "1000",
  "id": "463ac35c9f6413ad48485a3953bb6124",
  "encryptedCard": "eyJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiUlNBLU9BRVAtMjU2In0.O01BFr_XxGzKEUb_Z9vQOW3DX2cQFxojrRy2JyM5_nqKnrpAa0rvcPI_ViT2PdPRogBwjHGRDM2uNLd1BberKQlaZYuqPGXnpzDQjosF0tQlgdtY3uEZUMT-9WPP8jCxxQg0AGIm4abkp1cgzAWBQzm1QYL8fwaz16MS48ExRz41dLhA0aEWE4e7TYzjrfaK8M4wIUlQCFIl-wS1N3U8W2XeUc9MLYGmHft_Rd9KJs1c-9KKdUQf6tEzJ92TGEC7TRZX4hGdtszIq3GGGBQaW8P9jPozqaDdrikF18D0btRHNf3_57sR_CPEGYX0O4mY775CLWqB4Y1adNn-fZ0xoA.ln7IYZDF9TdBIK6i.ZhQ3Q5TY827KFQw8DdRRzQVJVFdIE03B6AxMNZ1sQIjlUB4QUxg-UYqjPJESPUmFsODeshGWLa5t4tUri5j6uC4mFDbkbemPmNKIQiY5m8yc.5KKhrggMRm7ydVRQKJaT0g",
  "brand": "VISA"
}

Changes

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