Uncategorized

VIEW Transaction Request

POSThttps://apisandbox.onepay.com/Transaction

All the transactions have a request format that OnePay has architectured. The request includes authentication header with gatewayID and associated API key, these parameters are provided by OnePay Management System.

Sample Code


     {
      “amount”:”206.81″,
      “method”:”CC”,
      “type”:”2″,
      “nonce”:”E1″,
      “test”:”0″,
      “reference_transaction_id”:””,
      “client_ip”:”172.26.15.177″,
      “device_code”:””,
      “market_code”:”E”,
      “referrer_url”:”onepay.com”,
      “notes”:”000047130010″,
      “card”:{
      “number”:”379605170000771″,
      “code”:”1234″,
      “expiration_date”:”0420″,
      “type”:”Amex”,
     “track_data”:””
      },
       “customer”:{
       “first_name”:”Certify”,
       “last_name”:”Global”,
       “street_1″:”1307 Broad Hollow Road”,
       “street_2″:””,
       “city”:”Melville”,
       “state”:”NY”,
       “zip”:”11747″,
       “country”:”US”,
       “phone_number”:”0123456789″,
       “company”:”FirstData”,
       “customer_id”:”12345″,
       “invoice_number”:”123456789″,
       “email”:”kasi.subramanian@Certifyglobal.com”,
       “email_receipt”:”YES”,
       “notes”:”Certifyglobal”
      },
“custom_fields”:[
                 {
                    “id”:”1″,
                    “value”:”Certifyglobal Test”
                 }
                ],
“additional_data”:[
                   {
                     “id”:”USER”,
                     “value”:”Sandbox user”
                      },
                   {
                     “id”:”SOURCE”,
                     “value”:”API documentation”
                     }
                   ]
                   }
    

AUTHENTICATION

KEY VALUE DESCRIPTION
x-authorization XYZABC:1AB2345C-12XY-12YZ-12EF-ABC12345TUVW
Content-Type application/json

BODY

KEY VALUE DESCRIPTION
amount decimal. (Mandatory) Transaction Amount payable by the customer that needs to be processed by the Merchant. This is the total amount and must include tax, shipping, tips, and any other charges. 0 to 999,999,999. Do not use currency symbols.
method char (Conditional) Method is used for specifying the method of input transaction. OnePay supports Credit Card, Automated Clearing House and Electronic Benefits Transfer, each of them have a code that needs to be mentioned in the Method field. CC: Credit Card ACH: Automated Clearing House EBT: Electronic Benefits Transfer
type numeric (1) (Mandatory) Type is used to specify the type of transaction. Each values from 1 through 9, is associated with specific kind of transaction that has to be processed. 1: Autorization Only, 2: Authorize and Capture, 3: Prior Authorization Capture, 4: Capture Only, 5: Void, 6: Partial Void, 7: Credit, 8: Force Credit, 9: Verification
nonce string (Mandatory) Nonce is just a sequential number tied to every transaction that represents the number of transactions the sender account has made on the network. It's a mechanism to ensure that the same transaction isn't submitted twice. This is usually assigned by the system or user defined,
test boolean (Optional) Default is set to 0. Test field is used to represent whether a tranasaction would be sent as test transaction or live transaction. If value is passed as 1, then Onepay's sandbox will be handling the processing.
reference_transaction_id bigint (Conditional) Reference transaction ID is used later to initiate subsequent transactions.
client_ip string (Optional) IP of the client can be mentioned in this field.
device_code char (Conditional) The type of device submitting the retail transaction.
market_code string (Conditional) The market type and industry code for the transaction. R-Retail, E-Ecommerce, M-Moto, COF-(ECOMM)Credential on File, MA-Moto+Additional Amount, MI-Moto+Installment, MR-Moto+Recurring, MD-Moto+Deferred,
MS-Moto+Single, MCOF-Moto+Credential on File, MCOFI-Moto+Credential on File+Installment, MCOFR-Moto+Credential on File+Recurring, MCOFD-Moto+Credential on File+Deferred, MCOFS-Moto+Credential on File+Single.
transaction: action_code string (Optional) Can be used for transaction related custom actions.
referrer_url string
Example: onepay.com
(Optional) Provide URL of the ecomm site or retail business site. (Paypage).
notes string Transactional notes can be provided here for additional information regarding the transactions.
check object
token bigint (Conditional) Used for providing tokenized information. If the token exists in the Vault, then all customer data can be used.
account_number Numeric (Conditional) Customer's Bank Account Number. If method is ACH, this field can be used..
account_type char(1) Customer's Bank Account Type. If method is ACH, this field can be used. S(saving), C(check).
bank_name string (Conditional) This fields needs Customer Bank Name to be provided. This is mandatory for ACH transactions.
number string (Mandatory) Customer's Bank Account Routing Number.
aba_code string Customer's Bank ABA Code.
sec_code string Provide Customer Bank Security Number.
action_code character Action code usable for check related actions and flags.
check object
token character (Optional) Tokenized card information is stored in this field. The token value can be sent instead of card number for cases where customer account is already present
number numeric (up to 16 digits) (Conditional) When Method is 'CC', Customer's Credit Card Number or Track Data or Token number needs to be sent in the request
code numeric (up to 4 digits) (Optional) Credit Card CCV Code.
expiration_date numeric (up to 4 digits) Credit Card Expiration Number
action_code character Action code is usable for card realted actions and flags. Rules can be defined and customized.
track_data string Applicable to card present transactions. Contains the track data of the card.
custom_fields object An array of id and values
id string: key name Multiple keys can be passed in the form of array
value string: key value The array key values can be utilized to process or store custom data
additional_data object
id string: key name Multiple keys can be passed in the form of array
value string: key value The array key values can be utilized to process or store additional data
add_amount string (Optional) When additional amount can be specified with decimals
add_amt_type integer: enum value (Optional) When Market Code is MA, the MOTO transactions can send additional amount details during authentication. For example, copay can be included in healthcare industries. Cashback = 0, //Cashback – Debit, EBTCash, or Credit – the amount of cash requested by the cardholder at the time of purchase Surchrg = 1, //Surcharge – identifies the transaction’s surcharge amount Hltcare = 2,//Healthcare (Visa/MC Only) – qualified medical expenses Transit = 3,//Transit (Visa Only) RX = 4, //RX (Visa/MC Only) – sub-total of prescription Vision = 5,//Vision (Visa Only) – sub-total of vision/optical charge Clinical = 6,// Clinical (Visa Only) – sub-total of clinical charge Copay = 7,//Copay (Visa/MC Only) – sub-total of co-payment charge Dental = 8,//Dental (Visa Only) – sub-total of dental charge FirstAuthAmt = 9,//First Authorized Amount – the amount that was originally authorized. PreAuthAmt = 10,//Pre-Authorized Amount (EBT) – the amount that was pre-authorized. TotalAuthAmt = 11,//Total Authorized Amount – the total transaction amount that was authorized including incremental authorizations and Partial Reversals. Tax = 12,//Tax Amount– optional sales tax amount included in a transaction. This value is not to be used in lieu of the Purchase Card Tax amount xml tag name “TaxAmt”. Fee = 13,//Fee Amount – (Debit, EBT, and ECA) Fuel = 14, //Fuel Amount Service = 15,// Automotive Service Center Charges eWICDiscount = 16 //eWIC Discount – discount or coupon

Leave a Reply

Your email address will not be published. Required fields are marked *