Get access token for XI intercept.

/cnbs/v1/tokenization/access_token
GET | POST

High level summary of required operations:

  • The first call is needed to get a valid access token along with the tokenization endpoint URI via an AJAX call to the CNBS API.
    • The action here is “01”
    • The endpoint is /tokenization/access_token
  • After successful access token retrieval the actual 3rd party tokenization API needs to be called via AJAX.
    • The payload for token retrieval will have to include the credit card details in a specific packet format.
    • In the success handler of the token retrieval AJAX call another call to the CNBS API is made to get the actual response from the 3rd party tokenization service.
      • The action here is “02”
      • The endpoint is /tokenization/response

Required

  • Action (action)
    • 01 = Get Access Token
  • Payment Method (payment_method)
    • CC = Credit Card
    • EC = Electronic Check

Example POST

JSON Payload:

{
  "action": "01",
  "payment_method": "CC"
}

cURL

curl -X POST "https://<<your.server.here>>/cnbs/v1/tokenization/access_token?sap-client=800&sap-language=EN&apiid=CNBSMV01P" -H  "accept: application/json" -H  "content-type: application/json" -H  "cnbssysid: gPuM1VyY1dxlTE2MEs2yajJUkX3/4+2Pw1alRw4BOtI=" -d "{  \"action\": \"01\",  \"payment_method\": \"CC\"}"

cURL

curl -X GET "https://<<your.server.here>>/cnbs/v1/tokenization/access_token?sap-client=800&sap-language=EN&apiid=CNBSMV01R&action=01&payment_method=CC" -H  "accept: application/json" -H  "content-type: application/json" -H  "cnbssysid: gPuM1VyY1dxlTE2MEs2yajJUkX3/4+2Pw1alRw4BOtI=" -H  "authorization: Basic Q05CU0FQSUlDRjpjbmJzNHlvdTE="
  • Merchant GUID (merchant_guid)
    • Unique Merchant GUID of this acess token.
  • Access Token (access_token)
    • Access token to get the reponse payload from the 3rd party payment provicer
  • Tokenization URI (paymetric_xi_url)
    • 3rd party payment provider tokenization endpoint.
  • Status (status)
    • Message Type (message_type)
      • SAP Message Type.
        • Errors:
          • E = Error
          • A = Abort
          • X = Exception
        • Others:
          • S = Success
          • W = Warning
          • I = Information
    • Message Identifier (message_identification)
      • SAP Message ID.
    • Message Number (message_number)
      • SAP Message Number.
    • Message Line (message_line_string)
      • SAP Message Text.

JSON:

{
  "merchant_guid": "711c8483-d37f-4d82-bb9d-0273a560a96d",
  "access_token": "2e62de4a-15d8-4e06-bf13-00a6cd2c9fc9",
  "paymetric_xi_url": "https://qaapp02.xisecurenet.com/DIeComm",
  "status": {
    "message_type": "S",
    "message_identification": "/CNBS/X_API",
    "message_number": 10,
    "message_line_string": "Request successfully processed"
  }
}
  • public/docs/webarapi/v110/getaccesstoken.txt
  • Last modified: 2019/03/28 11:46
  • by Christian Koessl