Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Tokenization gives merchants the ability to securely save payment information. By tokenizing a customer's payment method, merchants can schedule future card-on-file charges and create recurring payment plans.

Info

Tokens save the payment method while fully protecting the cardholder’s sensitive data, simplifying your PCI compliance requirements. Payrix Tokens do not expire. 

Note: While Payrix Tokens do not expire, OmniTokens do have an expiration date, shown on the Transaction Details page.

Payrix provides the following resources for implementing tokenization and card-on-file/recurring payments:

...

This page includes the following information about Payrix’s tokenization and recurring payments solutions:

...

...

How to Tokenize a Customer’s Payment Method

...

Info

Technically, the customer’s address is not required when creating a token. However, we strongly recommend including it to prevent future payments from being blocked/declined due to AVS mismatch.

Please visit our API Reference for optional fields & additional information.

Location

Syntax

URL

Code Block
[POST]https://api.payrix.com/tokens

HEADER

Code Block
Content-Type:application/json
APIKEY:{{private_api_key}}

BODY

Code Block
{
	"customer":{
		"first":"John",
		"last":"Smith",
		"email":"john@example.com",
		"address1":"123 Main Street",
		"city":"New York",
		"state":"NY",
		"zip":"12345",
	},
	"payment":{
		"number":"4242424242424242",
		"cvv":"123"
	},
	"expiration":"0120"
}

Creating a Token SimultaneouslyAs You Submit a Transaction in the API

...

Info

Please note, the syntax for creating a token simultaneously as you submit a transaction differs slightly for card payments and eCheck payments (as shown in the sample code below).

Location

Syntax

URL

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

HEADER

Code Block
Content-Type:application/json
APIKEY:{{private_api_key}}

BODY (for card payments)

Code Block
{
    "merchant": "t1_mer_59efbf4e69b27a4760b885d",
    "type": "1",
    "origin": "2",
    "token": {
        "payment": {
            "number": "4242424242424242",
            "cvv": "123",
            "expiration": "1020"
        },
        "customer": {
          "first": "John",
          "last": "Smith",
          "email":"john@example.com",
          "address1":"123 Main Street",
          "city":"New York",
          "state":"NY",
          "zip":"12345",
          }
    },
    "total": "10000"
}

BODY (for eCheck payments)

Code Block
{
	"merchant": "t1_mer_59efbf4e69b27a4760b885d",
	"type": "7",
	"origin": "2",
	"token": {
		"payment": {
			"method": "8",
			"number": "123456789",
			"routing": "123456789"
		},
		"customer": {
			"first": "First",
			"last": "Last",
			"email":"john@example.com",
			"address1":"123 Main Street",
			"city":"New York",
			"state":"NY",
			"zip":"12345",
		}
	},
	"total": "10000"
}

...

Recurring Payments

One of the key features of tokenizing a payment method is the ability for Merchants to use it to schedule recurring payments. This solution gives a Merchant the ability to charge their customer’s tokenized payment method in their desired amount and at their desired frequency. For example, Merchants can utilize recurring payments to charge their customers a monthly fee or for billing on a subscription-based business model.

...

Info

The API syntax for CoF card payments and CoF eCheck payments differs slightly as shown below:

Location

Syntax

URL

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

HEADER

Code Block
Content-Type:application/json
APIKEY:{{private_api_key}}

BODY (for card payments)

Code Block
{
    "merchant": "t1_mer_59efbf4e69b27a4760b885d",
    "type": "1",
    "origin": "2",
    "token": "b73443457d0202be0489fed2b5687f81",
    "total": "10000"
}

BODY (for eCheck payments)

Code Block
{
	"merchant": "t1_mer_59efbf4e69b27a4760b885d",
	"type": "7",
	"origin": "2",
	"token": "944afd0919c5561724f511d4846e40b9",
	"total": "10000"
}

...

Related Articles

Child pages (Children Display)