- Getting Started
- Tutorials
- Reference
- API Reference
- Basic Payment
- Forex
- Authentication
- Card Account
- Apple Pay
- Virtual Account
- Bank Account
- Token Account
- Customer
- Billing Address
- Merchant Billing Address
- Shipping Address
- Merchant Shipping Address
- Corporate
- Recipient
- Merchant
- Marketplace & Cart
- Airline
- Lodging
- Passenger
- Tokenization
- Recurring Migration
- 3D Secure
- Custom Parameters
- Async Payments
- Webhook notifications
- Risk
- Response Parameters
- Card On File
- Chargeback
- Result Codes
- Brands Reference
- Regression Testing
- Data Retention Policy
- API Reference
- FAQ
One-Click Checkout
This guide allows you to achieve a significant speedup of the checkout process by re-using the data a customer entered for a previous transaction/registration. It's based on one of these two guides:
After the customer account details are stored, as part of the initial transaction/registration, you will need to keep a record of the associated registration IDs (token) that you can then use in step 1 below.
How it works
1. Prepare the checkout
NOTE: For demonstration purposes we have created a registration, which will be used in your one-click checkout, with id(s): 8ac7a4a08abc7972018ac77425bc3a0f,8ac7a49f8abc7227018ac77426621618. Following the guides above, you may add additional registrations options to the checkout.
First perform a server-to-server POST request to prepare the checkout, this should include the registration IDs of the customer as shown below.
The registration IDs should be sent in the registrations[n].id
parameter, where n is a sequence number from zero, incrementing for each of the customer's registration IDs. The Standing Instruction parameters should be sent as standingInstruction.source
as CIT
, standingInstruction.mode
as REPEATED
and standingInstruction.type
as UNSCHEDULED
. For example, if the customer has two accounts on file, you would send registrations[0].id = {first registration.id}
and registrations[1].id = {second registration.id}
.

2. Create the payment form
Then, to show the payment form you just need to add the following lines of HTML/Javascript to your page and populating the following variables
- The checkout's
id
that you got in the response from step 1<script src="https://eu-test.oppwa.com/v1/paymentWidgets.js?checkoutId={checkoutId}"></script>
- The
shopperResultUrl
, which is the page on your site where the customer should be redirected to after the payment is processed and the brands that will be available.<form action="{shopperResultUrl}" class="paymentWidgets">VISA MASTER AMEX</form>
When Primeiro Pay builds up the payment form it automatically fetches the registrations data from the server and displays the pre-filled widgets to the shopper.
Require CVV
Show initial payment from
3. Get the payment status
As usual, once the payment has been processed, the customer is redirected to your shopperResultUrl
along with a GET parameter resourcePath
.
IMPORTANT: The baseUrl must end in a "/", e.g. "https://eu-test.oppwa.com/".
Then, to get the status of the payment, you should make a GET request to the baseUrl + resourcePath
, including your authentication parameters.
Example for a resourcePath:
resourcePath=/v1/checkouts/{checkoutId}/payment

We recommend that you verify the following fields from the Payment Status response, by comparing the returned values with expected:
- ID(s)
- Amount
- Currency
- Brand
- Type