One-time payments
Below you will find two general scenarios of how to make a one-time payment. If you do not have PCI DSS, choose the widget payment scenario.
All API operations are carried out within a payment session. One payment session can include several operations: for example, you can accept and then refund a payment.
- You have PCI DSS
- You are using our payment widget
To create a one-time payment, complete the following steps:
Create a payment session sending a
session/create
request.Alternatively, you can use the
session/init/payment
method. In this case, specify all the payment parameters right away and skip the next step.Send a
session/start/payment
request to start the payment.Wait for a
ready_to_confirm
webhook. When you receive it, it means that Smart Glocal is ready to make the payment and is waiting for your confirmation.Send a
session/confirm
request or asession/cancel
request to confirm or cancel the operation.If you receive an
action_required
webhook, it means that you need to take an additional action to perform the payment. For instance, the user might need to go through 3D Secure. Redirect the user for 3D Secure authentication using the link from the webhook.Wait for a
payment_finished
webhook containing the result of the payment. If the status issucceeded
, the payment was successful.
Sequence diagram of payments with PCI DSS
To create a one-time payment using our payment widget, complete the following steps:
Complete Steps 1–5.
If you receive an
action_required
webhook, send the HTTP 200 OK in response but do nothing, as the user will be redirected for 3D Secure within the widget.Wait for a
ready_to_confirm
webhook. When you received it, it means that Smart Glocal is ready to make the payment and is waiting for your confirmation.Send a
session/confirm
request or asession/cancel
request to confirm or cancel the operation.Wait for a
payment_finished
webhook containing the result of the payment. If the status issucceeded
, the payment was successful.