Get response
Get response from 3rd party payment provider.
URL
/cnbs/v1/tokenization/response
Method(s)
GET | POST
Overview
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
Sample Implementation
Parameters
Required
- Action (action)
- 02 = Get Response from 3rd party payment provider.
- Access Token (accesstoken)
- CC = Credit Card
- EC = Electronic Check
Example POST
JSON Payload:
{ "action": "02", "access_token": "d833910a-6667-46a9-852a-b5bc5e8a100c" }
cURL
curl -X POST "https://<<your.server.here>>/cnbs/v1/tokenization/response?sap-client=800&sap-language=EN&apiid=CNBSMV01P" -H "accept: application/json" -H "content-type: application/json" -H "cnbssysid: gPuM1VyY1dxlTE2MEs2yajJUkX3/4+2Pw1alRw4BOtI=" -d "{ \"action\": \"02\", \"access_token\": \"d833910a-6667-46a9-852a-b5bc5e8a100c\"}"
Example GET
cURL
curl -X GET "https://<<your.server.here>>/cnbs/v1/tokenization/response?sap-client=800&sap-language=EN&apiid=CNBSMV01R&action=02&access_token=bfe239ef-14c5-4473-bd6b-428f27034c5d" -H "accept: application/json" -H "content-type: application/json" -H "cnbssysid: gPuM1VyY1dxlTE2MEs2yajJUkX3/4+2Pw1alRw4BOtI=" -H "authorization: Basic Q05CU0FQSUlDRjpjbmJzNHlvdTE="
Response
- Payment Card (paymentcard)
- Card Institution (payment_card_type)
- Card Holder Name (payment_card_name)
- Payment Card Token (payment_card_token)
- Valid-From (valid_from)
- Valid-To (valid_to)
- Account Type (electronic_check_account_type)
- Electronic Check Account Types:
- C … Consumer Checking Account (U.S. and Canada)
- S … Consumer Savings Account (U.S. only)
- X … Corporate Checking Account (U.S. only)
- Routing Number (electronic_check_rdfi_number)
- Receiving Depository Financial Institution Number.
- 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.
Example Response
JSON:
{ "paymentcard": { "payment_card_type": "VISA", "payment_card_name": "John Doe", "payment_card_token": "-E803-1111-1000000000000H", "valid_from": "06-01-2017", "valid_to": "05-31-2027" }, "status": { "message_type": "S", "message_identification": "/CNBS/X_API", "message_number": 10, "message_line_string": "Request successfully processed" } }