Widget Omni Tokens

COPYandPAY Omni Tokens

Last updated:April 30, 2024

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

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 omni tokenization form.

Create the omni token form

Display the tokenization form on your checkout page. Shopper submits the card information to create omni token.

Get the omni token status

Find out if the omni token was successful.

OPTIONAL

Send the payment using the token

Send the payment using the stored omni token.

Transactions:
DB
DB

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 a card.omniToken required in the second step to create the omni token form.

Sample request:

2. Create the omni token form

Create the omni 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}/omnitoken"></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 omni 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:


See also