Collect.js: The Payment Token

Collect.js: The Payment Token

This is a new variable added to the Direct Post API that should be used in conjunction with this tool. This is what Collect.js will return to your website and it takes the place of the sensitive card or bank account information. It will look something like this:


3455zJms-7qA2K2-VdVrSu-Rv7WpvPuG7s8
                

This variable can be used in place of the existing ccnumber, ccexp, and cvv variables we have today. For ACH transactions (details below) it can be used in place of checkname, checkaba, and checkaccount.

The payment token can only be used once, and will expire after 24 hours if it is not used at all.

The payment token will also work when adding customers to the Customer Vault or recurring subscriptions. Just use “payment_token” where you were using the credit card and ACH account information before.

For example, if you would previously send this string:


type=sale&amount=3.00&ccnumber=4111111111111111&ccexp=1020&cvv=123
                

Or:


type=sale&amount=3.00&checkname=Jane Doe&checkaba=123123123&checkaccount=123123123
                

You could now send this:


type=sale&amount=3.00&payment_token=3455zJms-7qA2K2-VdVrSu-Rv7WpvPuG7s8