Customer Management
Customer API
This API is used to store customer payment and address data for subsequent use.
Customer Endpoint: {{GatewayAPIURL}}/Customer
Request Field Description
KEY | FIELD STATUS | TYPE | VALUE | DESCRIPTION |
client_ip | Optional | string | upto 45 characters | IP of the end point application to be tagged along with the transaction. Ex: User’s IP in an eCommerce transaction. |
customer | ||||
first_name | Conditional | string | Upto 50 Characters | First name associated with customer’s billing address. |
last_name | Conditional | string | Upto 50 Characters | Last name associated with customer’s billing address. |
street_1 | Optional | string | Upto 50 Characters | The street address of the customer. |
street_2 | Optional | string | Upto 50 Characters | The street address of the customer. |
city | Optional | string | Upto 50 Characters | If customer has city address information, it is saved on to Onepay’s system |
state | Optional | string | Upto 50 Characters | If customer has state address information, it is saved on to Onepay’s system |
zip | Optional | string | 5 digits or 9 digits | The postal or zip code of the cardholder. |
country | Optional | string | Upto 50 Characters | If customer has country address information, it is saved on to Onepay’s system |
phone_number | Optional | numeric | 10 digits | If customer has phone number contact information, it is saved on to Onepay’s system |
company | Optional | string | Upto 50 characters | If customer has company contact information, it is saved on to Onepay’s system |
customer_id | Mandatory | alphanumeric | “AUTO” for auto generated id’s starts from 100000ORUser Generated e.g. CID001 | The customer ID is either system generated or user specific. |
Optional | alphanumeric | Format- abc@xyz.com | Customer email address for any email receipt. | |
email_receipt | Optional | boolean | 1- Yes0- No | Indicator to send email receipt to customer based on any action. |
notes | Optional | string | 255 characters | Transaction Notes |
action_code | Optional | numeric | 1 – Add customer – If record exists update customer(default in virtual terminal)
2 – Add customer – if exists do not update 3 – Add customer – if exists throw error 4- Delete customer token | Based on the action code, customer related updates can be performed. If nothing sent or invalid value no update or add will occur |
card | ||||
number | Conditional | numeric | 13 to 19 Digits | Customer’s Card Number |
code | Optional | numeric | 3 to 4 Digits | Credit Card Code 3 digits for Visa, MasterCard, Discover 4 digits for Amex |
expiration_date | Conditional | numeric | MMYY | Card Expiration Date |
track_data | Conditional | string | Variable Length | Track 1 data Track 2 dataEncrypted Card Data Combined Track Data |
token | Optional | alphanumeric | Variable Length | Account Token generated by the gateway |
pin_block | Optional | alphanumeric | Variable Length | Required if method is DB for sale transactions |
ksn | Conditional | alphanumeric | Variable Length | Required if pinblock is present. Required for Encrypted Card transaction if KSN is not a part of the encryption block |
action_code | Optional | numeric | If action code- 1, make the card as the default card for transactions | Based on the action code, the default card is selected |
auth_code | Conditional | string | Preauthorized authorization/approval code/Voucher number for Capture only transactions | |
entry_mode | Optional | string | 05 – Integrated Circuit Read07- Contactless Integrated Circuit Read80- EMV fallback to Magnetic Strip entry91 – Contactless Magnetic Stripe Read | Point-of-Service (POS) Entry Mode(Tag-9F39,Source-Terminal,Format-n 2,Length-1,P/C-primitive)Indicates the method by which the PAN was entered, according to the first two digits of the ISO 8583:1987 POS Entry Mode A two-character POS Entry Mode field indicates the method by which the PAN was entered, according to the first two digits of the ISO 8583:1987 POS Entry Mode |
check | ||||
aba_code | Mandatory | alphanumeric | 9 digits | Routing Number specific to a bank |
account_number | Mandatory | string | 8 – 15 digits | Bank account number associated with a customer |
account_type | Conditional | string | Checking- 0 Saving- 1 Business- 2 | Nature/type of bank accounts – Savings, Checking, Business |
bank_name | Optional | string | Variable Length | Name of the bank associated with the customer’s bank account |
check_number | Conditional | string | 6 digits | Check number used while making transactions. To be provided only while using Back Office Conversions or Account Receivable Checks |
sec_code | Conditional | string | CCD- 0 PPD- 1 WEB- 2 TEL- 3 BOC- 4 ARC- 5 | These are Sectional entry class codes. OnePay supports the following:CCD, PPD, WEB, TEL, BOC, ARC |
action_code | Optional | numeric | If action code- 1, make the account as the default account for transactions | Based on the action code, the default account is selected |
token | Optional | alphanumeric | Variable Length | Account Token generated by the gateway |
Response Field Description
KEY | TYPE | VALUE | DESCRIPTION | |
---|---|---|---|---|
result_code | string | 1 – Approved2- Declined3- Error | The overall status of the customer request. | |
result_text | string | upto 100 characters APPROVAL, DECLINED | The description of the customer request process. | |
result_sub_code | string | 000- Approval | Based on customer creation and data update in the onepay system, response code is sent. | |
transaction_datetime | string | Format- yyyyMMddTHHmmssZ | The date and time at which the customer save or update is made. | |
token | string | value generate by token generation process | token details from token table | |
account_type | string | MASTER CARD- MCVISA- VIAMEX- AXDISCOVER- DSJCB- JCDINERS- DC | Card brand of the account used for transaction | |
account_last_4 | string | Last 4 card digits | Displays the last 4 digits of the card used for transaction. | |
expiration_date | string | MMYY | The card’s expiration date | |
customer | ||||
first_name | string | Upto 50 Characters | First name associated with customer’s billing address. | |
last_name | string | Upto 50 Characters | Last name associated with customer’s billing address. | |
street_1 | string | Upto 50 Characters | The street address of the customer. | |
street_2 | string | Upto 50 Characters | The street address of the customer. | |
city | string | Upto 50 Characters | If customer has city address information, it is saved on to Onepay’s system | |
state | string | Upto 50 Characters | If customer has state address information, it is saved on to Onepay’s system | |
zip | string | 5 digits or 9 digits | The postal or zip code of the cardholder. | |
country | string | Upto 50 Characters | If customer has country address information, it is saved on to Onepay’s system | |
phone_number | numeric | 10 digits | If customer has phone number contact information, it is saved on to Onepay’s system | |
company | string | Upto 50 characters | If customer has company contact information, it is saved on to Onepay’s system | |
customer_id | alphanumeric | “AUTO” for auto generated id’s starts from 100000ORUser Generated e.g. CID001 | The customer ID is either system generated or user specific. | |
string | Format- abc@xyz.com | Customer email address for any email receipt. | ||
email_receipt | boolean | 1- yes0- no | Indicator to send email receipt to customer based on any action. | |
notes | string | 255 characters | Transaction Notes | |
action_code | numeric | 1 – Add customer – If record exists update customer (default in virtual terminal)
2 – Add customer – if exists do not update 3 – Add customer – if exists throw error. 4- Delete customer token | Based on the action code, customer related updates can be performed. If nothing sent or invalid value no update or add will occur |