Payment Transactions

Payment Transactions

Payment Transactions

Transaction API

The Transaction Request function is used to submit a wide variety of transaction requests, depending on the use case. Variations in any of the fields can create different requests for types of transactions such as Sale or Refund and Credit or debit card for payment methods supported by our Gateway.

Transaction Endpoint: {{GatewayAPIURL}}/Transaction

Response Field Description

 KEY FIELD STATUS  TYPE VALUE   DESCRIPTION
amount Mandatory numeric Format 0 or 0.00 Transaction Amount
method Mandatory string CC- credit card
ACH- automated clearing house
EBT: electronic benefit transfer
DB: debit card
Mode of payment
type Mandatory numeric 1- Authorization Only
2- Authorize and Capture
3- Prior Authorization Capture
4- Capture Only
5- Void
7- Credit
9- Verification
11- Balance Inquiry
13-Retrieve Transaction
Transaction Type is used to specify the type of transaction 
nonce Conditional string timestamp, upto 50 Unique number tied to every new transaction to be a reference for transactions received by the gateway. Not required in case of prior auth, void or refund transactions.
test Optional string 1- Test0- Live Onepay gateway’s mode of transaction processing.
Default is 0-Live
reference_transaction_id Conditional string   Reference transaction ID is used to initiate post authorization transactions. It is required for Void, Refund, Prior Auth Capture transactions
client_ip Optional string upto 45 characters IP address of the end point application to be tagged along with the transaction. Ex: User’s IP in an eCommerce transaction
device_code Conditional string 2 -IDTECH
38- MAGTEK
40- PAX41- MIURA
Code associated with the device is required if encrypted card data is presented
market_code Conditional string R-Retail -Card Present,
E-Ecommerce – Card Not Present,
M-MOTO – Card Not Present
Type of terminal selected for performing transaction. If nothing is provided, the default terminal is selected.
pos_id Optional string   This field identifies the specific device or point of entry where the transaction originated.
notes Optional string 255 characters Transaction Notes
action_code Optional string 2-Signature Update
3 -Transaction Receipt Request
Depending on the action which is included in the request action code is selected
invoice_number Optional string Variable Length Invoice Number of the transaction
invoice_description Optional string Variable Length Product Description of the invoice
purchase_order_number Optional string Variable Length PO Number for the transaction

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 Credit 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
action_code Optional numeric If action code- 1, make the card as the default card used for transactions Based on the action code, the default card is selected
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
auth_code Conditional string Upto 8 characters Preauthorized authorization/approval code/Voucher number for Capture only transactions
voucher_number Conditional string Upto 10 characters Voucher number is required field for EBT Capture only transactions
entry_mode Optional string 05 – Integrated Circuit Read
07- Contactless Integrated Circuit Read
80- EMV fallback to Magnetic Strip entry
91 – 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

emv

emv_data Conditional string   ARQC Value from the EMV device for contactless or emv
card_sequence_number Optional string upto 3 characterseg 000 The Card Sequence Number is a number used to differentiate cards that have the same primary account number(PAN)
xcode_response_code Optional string   This field represents the Authorizing Agent ID Code as received from MasterCard
service_code Optional string upto 4 characterseg 0201 The Service Code is a three digit value contained in the Track Data
application_expiration_date Optional string   This is the date after which the application expires. Its value comes from Tag 5F24 captured from the chip data in the field EMV Group. EMV Data
card_authentication_results_code Optional string   This field contains the Visa-defined code to indicate Card Authentication results.
processing_indicator Optional string   This field indicates the transaction processing type as returned by MasterCard
processing_information Optional string   This field contains additional information about the issuer returned by MasterCard during the cryptogram validation
final_amount_indicator Optional string   This field indicates if the Completion, BatchSettleDetail, or Settlement transaction amount could potentially differ from the approved amount in an EMV Credit Authorization transaction

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. (Mandatory for ACH transactions)
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 used for transactions Based on the action code, the default account is selected
token Optional alphanumeric Variable Length Account Token generated by the gateway

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
email 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

shipping_information

first_name Optional string Upto 50 Characters First name associated with customer’s shipping address
last_name Optional string Upto 50 Characters Last name associated with customer’s shipping address
company Optional string Upto 50 Characters The company of the customer
address Optional string Upto 50 Characters The shipping address of the customer
city Optional string Upto 50 Characters The city details in the shipping address of the customer
state Optional string Upto 50 Characters The State details in the shipping address of the customer
zip Optional string 5 digits or 9 digits The postal or zip code of the cardholder
country Optional string Upto 50 characters The country details in the shipping address of the customer

custom_fields

ID Optional string up to 2 Characters1 to 20 Based on the selection on Custom User defined fields and id
value Optional string up to 255 Characters Based on the selection on Custom User defined fields and values

Response Field Description

KEYTYPEVALUEDESCRIPTION
result_codestring1 – Approved2- Declined3- ErrorThe overall status of the transaction
result_sub_codestring000- ApprovalResponse sub code
result_textstringupto 100 characters APPROVAL, DECLINEDDescription of the outcome of the transaction from First Data
transaction_idstringupto 6 digitsGateway assigned transaction ID for the request
transaction_uidstringupto 50 charactersGuid value associated to the transaction
transaction_datetimestringFormat- yyyyMMddTHHmmssZDate and Time of the transaction response
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
amountstringFormat 0 or 0.00Transaction amount requested in original authorization
approved_amountstringFormat 0 or 0.00Amount approved. Based on processor’s approval
methodstringCC-  Credit cardACH- Automated Clearing HouseEBT- Electronic Benefit TransferDB- Debit CardThe method used to perform the transaction is provided here
auth_codestringOK****When a sale transaction is processed, a unique code is generated by the Processor to identify the transaction
avs_result_codestringAVS Result CodeThe result of checking the cardholder’s postal code and any additional address information provided against the Issuer’s system of record
account_code_resultstringCVV Result CodeM-Match – Values matchN-NoMtch – Values do not matchP-NotPrc – Not processedS-NotPrv – Value not providedU-NotPrt – Issuer not participatingX-Unknwn – Unknown
typestring1- AuthOnly
2- AuthCapture
3- Prior_Auth_Capture
4- Capture_Only
5- Void
7- Credit
9- Verification
11- BalanceInquiry
13-Retrieve Transaction
Type of transaction performed is returned in this field
expiration_datestringMMYYThe card’s expiration date
tokenstringalphanumeric value generated by token generation processtoken details from token table
emvstring  Based on emv used after EMV processing. we may get
Authorization Response Cryptogram (ARPC) transaction processing data
emv_tag_datastring emv receipt data
entry_modestringemv- pos_entrymodedata processed through device05 – Integrated Circuit Read07 – Contactless Integrated Circuit Read80 – EMV fallback to Magnetic Strip entry91 – Contactless Magnetic Stripe Read
noncestringAny valid value(Timestamp)The nonce value is sent back in the response, the significance is to indicate that the transaction is unique
testnumeric1- Test0- Live (Default)Onepay gateway’s mode of transaction processing

customer_response

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_idalphanumericCan be AUTO Generated e.g. 100000ORUser Generated e.g. CID001The customer ID is either system generated or user specific
invoice_numberstringUpto 10 charactersThe customer related transactions’ invoice number
emailalphanumericFormat- abc@xyz.comCustomer email address for any email receipt
email_receiptboolean1- yes 0- noIndicator to send email receipt to customer based on any action
notesstringTransaction NotesCustomer specific notes can be provided here for additional information regarding the transactions
action_codenumeric1 – 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
Based on the action code, customer related updates can be performed

card_info

card_classAlphanumeric
B-Business
C-Consumer
P-Purchase
T-Corporate
Categorizes the BIN as a Business card, Corporate T&E card, Purchase card or Consumer card. Assists the POS device with prompting decisions – to collect addenda or not. Visa, MasterCard and Discover only
product_idAlphanumeric These values indicate card product sub categories (Purchase Card, Business Card, etc.) for Visa, MasterCard, and Discover. Values are subject to change at any time
prepaid_indicatorAlphanumeric  P – Prepaid Card
Default: Space filled
detailcard_indicatorAlphanumeric C-(Credit) Credit Hybrid (meaning it has PIN capability also).
E-(Debit) Debit – PIN Only with EBT.
H-(Debit) (Debit) Debit Hybrid (PIN and Signature).
J-(Debit) USA Commercial Debit – Signature Only – Not PIN Capable.
K-(Debit) USA Commercial Debit – PIN Capable.
L-(Debit) NON USA Consumer Debit – Not PIN Capable.
M-(Debit) NON USA Commercial Debit – Not PIN Capable.
N-(Debit) NON USA Consumer Debit – PIN Capable
O-(Debit) NON USA Commercial Debit – PIN Capable
P-(Debit) Debit – PIN Only without EBT.
R-(Credit) Private Label (MasterCard)
S-(Debit) Signature only (not PIN capable).
X-(Credit) True credit (– Not PIN Capable/ NoSignature capability)
Determines the card type (credit, debit, prepaid) usage (pin, signature etc.) and PIN/Signature capability.
Left justified, Space filled
debitnetwork_indicatoraplhanumericSample – 05D07E25P30P00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00Debit Network/PINless Indicator is a 3 byte value. First 2 bytes indicates the debit network followed by the 1 byte PINless Indicator. There can be up to 20 Debit Net`w works/PINless Indicators
Example: 03E56P 00 00 00
03 (Pulse) E (PINless POS) 56 (STAR EAST FISERV)
P (Pinned POS)