COPYandPAY Omni Tokens
Last updated:February 19, 2025
COPYandPAY allows you to securely collect card data from shopper and initiate provisioning of an omni token in the Token Vault.
To use network tokens issued by the card networks for your payments, please be informed that an enhanced integration will be made available.
Use cases
Tokenization during payment
The merchant collects card data from shopper via widget and initiates omni tokenization along an account verification (zero amount auth) or initial purchase. An omni token is synchronously provisioned and returned to the merchant once the payment is complete. The omni 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 createOmniToken=true 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.
How it works
Create the payment form
Display the payment form on your checkout page. Shopper submits the card and payment information.
Card is omni-tokenized and made available to merchant for subsequent payments.
Payment authorization is performed with real card data.
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:
- With the
checkout_id
received from first step<script src="https://eu-test.oppwa.com/v1/paymentWidgets.js?checkoutId={checkout_id}" integrity="{integrity}" crossorigin="anonymous"> </script>
- With the
shopperResultUrl
as the page on your site where the end consumer should be redirected after the payment is complete<form action="{shopperResultUrl}" class="paymentWidgets" data-brands="VISA MASTER AMEX"></form>
Sample form:

3. Get the payment status
Once the payment request is processed, the customer is redirected to your shopperResultUrl
along with a GET parameter resourcePath
.
resourcePath=/v1/checkouts/{checkout_id}/payment
Sample request:

Standalone tokenization
The merchant collects card data from shopper via widget and initiates omni tokenization. No payment request/flow involved. An omni token is synchronously provisioned and returned back to the merchant. The omni token can then be used in subsequent payments.
How it works
Prepare the checkout
Send the request parameters server-to-server to prepare the tokenization form.
Create the token form
Display the tokenization form on your checkout page. Shopper submits the card information to create omni token.
1. Prepare the checkout
Perform a server-to-server POST request to prepare the checkout with the required customer data, including createOmniToken=true
but excluding paymentType. The response to a successful request is an id
required in the second step to create the tokenization form.
Sample request:

2. Create the token form
Create the tokenization form by adding the following lines of HTML/JavaScript to your page:
- With the
checkout_id
received from first step<script src="https://eu-test.oppwa.com/v1/paymentWidgets.js?checkoutId={checkout_id}" integrity="{integrity}" crossorigin="anonymous"> </script>
- With the
shopperResultUrl
as the page on your site where the end consumer should be redirected after the tokenization is complete<form action="{shopperResultUrl}" class="paymentWidgets" data-brands="VISA MASTER AMEX"></form>
Sample form:

3. Get the token status
Once the tokenization request is processed, the customer is redirected to your shopperResultUrl
along with a GET parameter resourcePath
.
resourcePath=/v1/checkouts/{checkout_id}/omnitoken
Sample request:

4. Send payment using the token
Perform a server-to-server POST request over the omni token retrieved in the previous step.
Alternatively, use one-click checkout to authorize the payment with a
selected stored omni token.
Sample request:
