Widget: dynamic setup

Why use a dynamic setup

Using a dynamic setup will grant you a greater flexibility.
For example, setting the amount (data-amount) dynamically will allow your customers to buy multiple products in one transaction.

As the payment logic and management is coming from our service, you don’t need to develop it from scratch.

It is also possible to set up metadata dynamically, which allow you to link the order data with the payment data, making it easier to identify a transaction when a refund is needed.

Payment results

The payment result will be send (POST) as JSON data to the URL specified in Webhooks created in the management console.
Please refer to Reference > Webhook and set up a a script to get data (POST) and update order status etc.

Setup process

  1. In the management console: adjust the widget theme
  2. Create a test application token
  3. Set up a script to output the widget HTML
  4. Set up a script to receive webhooks
  5. In the management console: create a webhook
  6. Make a test payment to test the webhook script
  7. Create a live application token
  8. Update your widget script to use the live application token
  9. The widget is ready