COPYandPAY Omni Tokens

Last updated:April 16, 2025

COPYandPAY allows you to securely collect card data from shopper and initiate provisioning of an omni token in the Token Vault.

To better understand omni tokens for eCommerce and inStore, please read Tokenization Guide.
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

Prepare the checkout

Send the request parameters server-to-server to prepare the payment form.

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.

Get the payment status

Find out if the payment and omni token were successful.

Transactions:
DB
DB
TK
TK

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:

Language:
curl https://eu-test.oppwa.com/v1/checkouts \
-d "entityId=8ac7a4c79394bdc801939736f1e8064f" \
-d "testMode=EXTERNAL" \
-d "createOmniToken=true" \
-d "amount=31.12" \
-d "currency=EUR" \
-d "paymentType=DB" \
-d "standingInstruction.mode=INITIAL" \
-d "standingInstruction.source=CIT" \
-d "standingInstruction.type=UNSCHEDULED" \
-d "customer.givenName=Smith" \
-d "customer.ip=192.168.0.0" \
-d "customer.surname=John" \
-d "customer.language=DE" \
-d "customer.email=john.smith@gmail.com" \
-d "billing.city=MyCity" \
-d "billing.country=DE" \
-d "billing.postcode=712121" \
-d "billing.state=DE" \
-d "billing.street1=MyStreet" \
-d "integrity=true" \
-H "Authorization: Bearer OGFjN2E0Yzc5Mzk0YmRjODAxOTM5NzM2ZjFhNzA2NDF8enlac1lYckc4QXk6bjYzI1NHNng="

Try it Out

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:

Language:
https://eu-test.oppwa.com/v1/checkouts//payment
curl -G https://eu-test.oppwa.com/v1/checkouts/{id}/payment \
 -d "entityId=8ac7a4c79394bdc801939736f1e8064f" \
 -H "Authorization: Bearer OGFjN2E0Yzc5Mzk0YmRjODAxOTM5NzM2ZjFhNzA2NDF8enlac1lYckc4QXk6bjYzI1NHNng="

Try it Out


See also