Create Order Widget Integration
Last updated
Last updated
To test the functionality of the optty-create-order-widget
, follow these steps:
Access the Sandbox: Go to the Optty Widgets Sandbox at
Set Mode to Live: In the Mode dropdown, select Live.
Choose Currency: Select your desired currency.
Provide Your Sandbox Token: Enter your sandbox widgetToken
into the Insert JSON Web Token Here
input field.
Apply Configuration: Click the Apply Config
button to update the settings.
Select a Payment Provider: Scroll to the #10 Optty Easy Checkout Widget
section and choose a payment provider.
Process Payment: Navigate to the Optty Create Order Widget
section, modify the payload if needed to match your selected provider’s use case, and click Pay to test the in-context payment flow.
Prerequisites
Include the Optty JS Widget loader in your page
Ensure you have the necessary merchant credentials
Parameters
When using the optty-create-order-widget
, note the following about dynamicCallbackUrl
:
For In-Context implementation: dynamicCallbackUrl
is required
For standard implementation: dynamicCallbackUrl
is optional
When provided, dynamicCallbackUrl
should be a valid HTTPS URL that can receive requests for webhook notifications about order status changes.
paymentStatusFetchEnabled
: Determines whether to retrieve the payment status after the payment is completed. If set to true
, a payment object is included in the onFinalized
callback response.
Add this div where you want the payment provider options to appear:
Call the widget with required payload structure:
Working React Code Example for Optty Create Order Integration