PayFields - Creating a new Payment Token

$0 Auth and Tokenization

  1. For a $0 Auth, use '0' as the value in the transaction. Not just 0.

  1. Set to txnToken - see below

  2. Set to auth - see below

Sample $0 Authorization Response

 

Running a Transaction with a Token

To submit a transaction with a token via the API you will need to add the token (which can be found on the customer’s profile page) to your POST request to the /txns endpoint. If the customer’s address information was saved then it will be automatically included when a Merchant submits a transaction using their token

Sample card payment and eCheck payment using a saved token:

The API syntax for card-on-file card payments and eCheck payments differs slightly as shown below:

Location

Syntax

URL

[POST]https://api.payrix.com/txns

HEADER

Content-Type:application/json

APIKEY:{{referrer_api_key}}

BODY (for card payments)

{

    "merchant": "t1_mer_xxxxxxxx",

    "type": "1",

    "origin": "2",

    "token": "b734434xxxxxxxxxxxx2b5687f81",

    "total": "10000"

}



BODY (for eCheck payments)

{

"merchant": "t1_mer_xxxx",

"type": "7",

"origin": "2",

"token": "944afd091xxxxx511d4846e40b9",

"total": "10000"

}



Notes

  • Do not use it in combination with Customer, since Customer is a unique token/card holder.

  • When creating a tokenized card, this creates a unique Customer.