After payment
Verify
Server-side confirmation. Secret key, encrypted body. Fulfil from this, not from the browser callback.
POST
/payment/order/verify/newSecret key
Verify and refund send the secret key as api-key. Create, pay, fee, banks, and status use the public key. Never put the secret in a browser app.
Body is {"reference": "…"}.
House rule
The popup saying success is a courtesy. Your ledger moves when verify (or the webhook) says the order is done.