Customer Management

Customer Management

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

        KEYFIELD STATUS TYPEVALUE  DESCRIPTION
client_ipOptionalstringupto 45 charactersIP of the end point application to be tagged along with the transaction. Ex: User’s IP in an eCommerce transaction.

customer

first_nameConditionalstringUpto 50 CharactersFirst name associated with customer’s billing address.
last_nameConditionalstringUpto 50 CharactersLast name associated with customer’s billing address.
street_1OptionalstringUpto 50 CharactersThe street address of the customer.
street_2OptionalstringUpto 50 CharactersThe street address of the customer.
cityOptionalstringUpto 50 CharactersIf customer has city address information, it is saved on to Onepay’s system
stateOptionalstringUpto 50 CharactersIf customer has state address information, it is saved on to Onepay’s system
zipOptionalstring5 digits or 9 digitsThe postal or zip code of the cardholder.
countryOptionalstringUpto 50 CharactersIf customer has country address information, it is saved on to Onepay’s system
phone_numberOptionalnumeric10 digitsIf customer has phone number contact information, it is saved on to Onepay’s system
companyOptionalstringUpto 50 charactersIf customer has company contact information, it is saved on to Onepay’s system
customer_idMandatoryalphanumeric“AUTO” for auto generated id’s
starts from 100000ORUser Generated e.g. CID001
The customer ID is either system generated or user specific.
emailOptionalalphanumericFormat- abc@xyz.comCustomer email address for any email receipt.
email_receiptOptionalboolean1- Yes0- NoIndicator to send email receipt to customer based on any action.
notesOptionalstring255 charactersTransaction Notes
action_codeOptionalnumeric1 – Add customer – If record exists update customer(default in virtual terminal)2 – Add customer – if exists do not update3 – Add customer – if exists throw error4- Delete customer tokenBased on the action code, customer related updates can be performed.
If nothing sent or invalid value no update or add will occur

card

numberConditionalnumeric13 to 19 DigitsCustomer’s Card Number
codeOptionalnumeric3 to 4 DigitsCredit Card Code
3 digits for Visa, MasterCard, Discover
4 digits for Amex
expiration_dateConditionalnumericMMYYCard Expiration Date
track_dataConditionalstringVariable LengthTrack 1 data Track 2 dataEncrypted Card Data Combined Track Data
tokenOptionalalphanumericVariable LengthAccount Token generated by the gateway
pin_blockOptionalalphanumericVariable LengthRequired if method is DB for sale transactions
ksnConditionalalphanumericVariable LengthRequired if pinblock is present.
Required for Encrypted Card transaction if KSN is not a part of the encryption block
action_codeOptionalnumericIf action code- 1, make the card as the default card for transactionsBased on the action code, the default card is selected
auth_codeConditionalstring Preauthorized authorization/approval code/Voucher number for Capture only transactions
entry_modeOptionalstring05 – Integrated Circuit Read07- Contactless Integrated Circuit Read80- EMV fallback to Magnetic Strip entry91 – Contactless Magnetic Stripe ReadPoint-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_codeMandatoryalphanumeric9 digitsRouting Number specific to a bank
account_numberMandatorystring8 – 15 digitsBank account number associated with a customer
account_typeConditionalstringChecking- 0
Saving- 1
Business- 2
Nature/type of bank accounts – Savings, Checking, Business
bank_nameOptionalstringVariable LengthName of the bank associated with the customer’s bank account
check_numberConditionalstring6 digitsCheck number used while making transactions.
To be provided only while using Back Office Conversions or Account Receivable Checks
sec_codeConditionalstringCCD- 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_codeOptionalnumericIf action code- 1, make the account as the default account for transactionsBased on the action code, the default account is selected
tokenOptionalalphanumericVariable LengthAccount Token generated by the gateway

Response Field Description

KEYTYPEVALUEDESCRIPTION
result_codestring1 – Approved2- Declined3- ErrorThe overall status of the customer request.
result_textstringupto 100 characters APPROVAL, DECLINEDThe description of the customer request process.
result_sub_codestring000- ApprovalBased on customer creation and data update in the onepay system, response code is sent.
transaction_datetimestringFormat- yyyyMMddTHHmmssZThe date and time at which the customer save or update is made.
tokenstringvalue generate by token generation processtoken details from token table
account_typestringMASTER CARD- MCVISA- VIAMEX- AXDISCOVER- DSJCB- JCDINERS- DCCard brand of the account used for transaction
account_last_4stringLast 4 card digitsDisplays the last 4 digits of the card used for transaction.
expiration_datestringMMYYThe card’s expiration date

customer

first_namestringUpto 50 CharactersFirst name associated with customer’s billing address.
last_namestringUpto 50 CharactersLast name associated with customer’s billing address.
street_1stringUpto 50 CharactersThe street address of the customer.
street_2stringUpto 50 CharactersThe street address of the customer.
citystringUpto 50 CharactersIf customer has city address information, it is saved on to Onepay’s system
statestringUpto 50 CharactersIf customer has state address information, it is saved on to Onepay’s system
zipstring5 digits or 9 digitsThe postal or zip code of the cardholder.
countrystringUpto 50 CharactersIf customer has country address information, it is saved on to Onepay’s system
phone_numbernumeric10 digitsIf customer has phone number contact information, it is saved on to Onepay’s system
companystringUpto 50 charactersIf customer has company contact information, it is saved on to Onepay’s system
customer_idalphanumeric“AUTO” for auto generated id’s
starts from 100000ORUser Generated e.g. CID001
The customer ID is either system generated or user specific.
emailstringFormat- abc@xyz.comCustomer email address for any email receipt.
email_receiptboolean1- yes0- noIndicator to send email receipt to customer based on any action.
notesstring255 charactersTransaction Notes
action_codenumeric1 – Add customer – If record exists update customer (default in virtual terminal)2 – Add customer – if exists do not update3 – Add customer – if exists throw error. 4- Delete customer tokenBased on the action code, customer related updates can be performed.
If nothing sent or invalid value no update or add will occur