Merchant Initiated Orders
Not all payment methods support this flow. Please confirm support before enabling, as a 'Not Supported' error will be thrown when attempting to use tokenisation with an unsupported provider.
This flow utilises the same endpoint as Create Order and is controlled by two payload fields:
Create a traditional order with the `getToken` field set to True, prompting the customer to complete the checkout flow.
Pass the token returned via webhook notification from the initial order to any future Create Order calls where you wish to use those tokenized payment details for processing (as illustrated in the flow below).
Status updates on merchant initiated payment should be handled the same as customer-initiated transactions outlined here Exception Handling.
The merchant or integrator must confirm that the customer consented when initiating a token transaction. Optty does not take any liability for the customer's consent to token transactions.

Additional Fields on Orders Endpoint
getToken
boolean
Specifies whether you would like to create a token of the payers data to be used in future merchant initiated transactions.
Defaults to False.
token
string
This is the token returned via web hook when a payment is completed with getToken set to True. It will then proceed with the payment without customer interaction.
The flow to get the status of the order after it has been initiated via the Create Order endpoint with a token passed in is the same as a non-token payment. A valid web hook with the same structure will be returned when the status is updated, and the structure of the Get Order endpoint will remain the same.
The only variation here is the functionality of the redirect URL. For a customer present transaction it will not redirect a customer to a checkout page, it will instead immediately redirect the customer to the dynamicRedirectURL with the status of the payment in the same format of URL parameters as a non-token payment. Allowing the merchant to use the same implementation for displaying the status to the customer for tokenised and non-tokenised payments.
For a customer not present transaction, there is no need to do anything with the Redirect URL, there is no payment processing done when redirected.
Last updated