Manage payment cards payer
Manage payment cards on a payer account.
URL
/cnbs/v1/customers/id/payer/payment_cards
Method(s)
POST
Parameters
Required
For all actions
- Payer Data (payer_data)
- Customer Number (customer_number)
- Action (action)
- 01 … Insert new payment card.
- 02 … Modify existing payment card.
- 03 … Delete existing payment card.
- 04 … Preauthorization call only
- Payment Card Table (payment_cards)
- Payment card: Card Type (payment_card_type)
- Payment card type used for this transaction.
- Payment Card Token (payment_card_token)
- Tokenized form of payment card.
For action 01, 02 and 04 in addition
To insert or modify a payment card record.
- Payment Card Table (payment_cards)
- Payment Card Name (payment_card_name)
- Name of the card holder.
- Payment card: Valid-To Date (valid_to)
- Expiry date of the payment card.
- Will be set internally for E-Check card type (EC).
- Payment card: Default Flag (default)
- Payment card default flag in backend customer master data.
For action 01 and E-Check
To Insert a new E-Check
- Payment Card Table (payment_cards)
- Electronic Check Account Type (electronic_check_account_type)
- C … Consumer Checking Account (U.S. and Canada)
- S … Consumer Savings Account (U.S. only)
- X … Corporate Checking Account (U.S. only)
- Electronic Check Routing Number (electronic_check_rdfi_number)
- Receiving Depository Financial Institution Number.
Optional
For action 01 and 04
To insert a new payment card
- Payer Data (payer_data)
- Company Code (company_code)
- If pre-authorization is turned on in the CNBS API customizing for the payment card, then the company code is required.
- Payment Card Table (payment_cards)
- Payment card: Card Validation Code (card_validation_code)
- The CVV or card validation code is also known as CSC (“Card Security Code”), as well as CVV2. They are all the same as a card validation code, except that they have been generated by a 2nd generation process.
- Address data (address_data)
- Name (name)
- Name 2 (name_2)
- City (city)
- District (district)
- Street (street)
- Postal Code City (postal_code_city)
- Region (region)
- Country (country)
For action 01 and 04
To insert a new 3D secure payment card, supply cardinal data.
- Payment Card Table (payment_cards)
- Payment card: Card Type (payment_card_type)
- Cardinal 3DS (cardinal)
- 3DS-Version (threedsversion)
- CAVV (cavv)
- eciflg (eciflg)
- xid (xid)
- dstransactionid (dstransactionid)
- paresstatus (paresstatus)
- Address data (address_data)
- Name (name)
- Name 2 (name_2)
- City (city)
- District (district)
- Street (street)
- Postal Code City (postal_code_city)
- Region (region)
- Country (country)
Log Events
- log (log)
- Event ID (id)
- login Name (login)
- ePay Version (epayv)
- User Agent Str. (usrag)
Example POST
JSON Payload:
{ "payer_data": { "customer_number": "3050", "company_code": "3000" }, "action": "01", "payment_cards": [ { "payment_card_type": "VISA", "payment_card_token": "-E803-2503-QYNS6D4NKWME7J", "payment_card_name": "John Doe", "valid_from": "11-17-2020", "valid_to": "01-31-2023", "electronic_check_account_type": "", "electronic_check_rdfi_number": "", "card_validation_code": "123", "cardinal": { "threedsversion": "2.2.0", "enrolled": "Y", "cavv": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTA=", "eciflg": "05", "xid": "", "dstransactionid": "f0ac4431-d5a7-4c77-b95c-d55edd5c0d0c", "paresstatus": "Y" } } ], "log": { "id": "ADD_PAYMENT_CARD", "login": "user@demo.com", "epayv": "v1.7.7", "usrag": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36" } }
cURL
curl -X POST "https://<<your.server.here>>/cnbs/v1/customers/id/payer/payment_cards?sap-client=800&sap-language=EN&apiid=CNBSMV01P" -H "accept: application/json" -H "content-type: application/json" -H "cnbssysid: gPuM1VyY1dxlTE2MEs2yajJUkX3/4+2Pw1alRw4BOtI=" -d "{ \"payer_data\": { \"customer_number\": \"3050\", \"company_code\": \"\" }, \"action\": \"02\", \"payment_cards\": [ { \"payment_card_type\": \"AMEX\", \"payment_card_token\": \"-E803-5144-CQ5FR2X61TWP41\", \"payment_card_name\": \"John Doe\", \"valid_from\": \"\", \"valid_to\": \"05-31-2027\", \"default\": \"X\", \"electronic_check_account_type\": \"\", \"electronic_check_rdfi_number\": \"\", \"card_validation_code\": \"\" } ]}"
Response
- 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:
{ "message_type": "S", "message_identification": "/CNBS/X_API", "message_number": 10, "message_line_string": "Request successfully processed" }