COPYandPAY allows you to securely collect card, bank account or customer data from the shopper and initiate provisioning
of an external token with the third party vendor.
To better understand external tokens for eCommerce and inStore, please read
Tokenization Guide.
The merchant collects card data from the shopper via widget and initiates external tokenization. No payment request/flow is involved.
An external token is synchronously created by the third party vendor and returned to the merchant so it can be stored.
The external token can then be used in subsequent payments.
Perform a server-to-server POST request to prepare the checkout with the required customer data, including createToken=EXTERNAL
but excluding paymentType. The response to a successful request is an id required in the second step to create the registration form.
Sample request:
2. Create the tokenization form
Create the registration form by adding the following lines of HTML/JavaScript to your page:
The merchant collects card data from the shopper via widget and initiates external tokenization during zero value
account verification or initial purchase. An external token is synchronously created by the third party vendor and returned to the merchant
once the payment is complete. The external token can then be used in subsequent payments.
There are two ways to store the raw card details during a payment checkout:
Merchant-determined tokenization (see below).
Add createToken=EXTERNAL in the checkout request.
Shopper-determined
tokenization. Add a checkbox to the COPYandPAY form to let the customer decide whether
or not to store the raw card details. Same createToken=EXTERNAL is expected in the checkout request.
Find out if the payment and external token were successful.
Transactions:
1. Prepare the checkout
Perform a server-to-server POST request to prepare the checkout with the required payment and customer data, including the order type,
amount and currency. The response to a successful request is an id required in the second step to create the payment form.
Sample request:
2. Create the payment form
Create the payment form by adding the following lines of HTML/JavaScript to your page:
Once the payment request is processed, the customer is redirected to your shopperResultUrl along with a GET parameter resourcePath.
resourcePath=/v1/checkouts/{checkoutId}/payment
Sample request:
One-click checkout
The merchant can speed up of the checkout process by re-using the external tokens created when the shopper
entered first time the card data required for the tokenization. The shopper returns on the
merchant’s website. An unscheduled one-click purchase with one of the saved external tokens is performed towards the external third party vendor.
Perform a server-to-server POST request to prepare the checkout with the required payment data, including the external tokens.
The stored card on files should be sent in the tokenAccounts[n].number parameter along with customizations for the widget
like logo or label, where n is a sequence number from zero, incrementing for each of the customer's external tokens.
The response to a successful request is an id required in the second step to create the one-click payment form.
Sample request:
2. Create the payment form
Create the payment form by adding the following lines of HTML/JavaScript to your page: