Online payments
Online payments let you take a payment from your own checkout. Your backend generates a link, you send the payer to it, and Paydot returns them to your site when they are done.
The flow is synchronous for the payer and asynchronous for you. The payer comes back to your callback URL; the outcome reaches you through a webhook or the status API. Those are two separate things, and only the second one is reliable.
Enable the feature
Section titled “Enable the feature”Everything is configured under Online Payments in the Paydot portal. Only an account owner can change it.
| Setting | Required | What it does |
|---|---|---|
| Callback URL | Yes | Where Paydot sends the payer once they are done. The switch will not turn on until this is saved. |
| API Token | Yes | The bearer token for the generate-link call. If you have not generated one, enabling the feature generates it for you. |
| Online Payments switch | Yes | Turns the feature on. While it is off, the generate-link call answers 409. |
| Webhook URL | No | Where Paydot posts a signed event when a payment reaches a final status. |
The webhook endpoint and its signing secret are configured on the same screen. See Payment webhooks for the endpoint requirements, signature verification and the test event.
The flow
Section titled “The flow”| Step | What happens | Page |
|---|---|---|
| 1 | Your backend posts an amount, a reference and your own data to the generate endpoint. | Generate a payment link |
| 2 | You send the payer to the url you got back. | Generate a payment link |
| 3 | The payer picks their bank and authorises the payment. | — |
| 4 | The payer follows the return step and lands on your callback URL, carrying paymentId and data. | Return to shop |
| 5 | You confirm what actually happened. | Checking payment status and Payment webhooks |
Where each value reaches you
Section titled “Where each value reaches you”The three channels do not carry the same things. Design your integration around what each one actually gives you.
| Callback URL | Webhook event | GET /payments/{paymentId} | |
|---|---|---|---|
| Arrives | When the payer follows the return step | When the payment reaches a final status | Whenever you ask for it |
| Carries the status | No | Yes | Yes |
| Carries the amount paid | No | Yes | Yes |
Carries your data | Yes | Yes | No |
| Signed | No | Yes | Not applicable |
| Will reach you | Only if the payer comes back | Retried for roughly 22 hours | On request |