Demo: embedded checkout (iframe)
Try the PlanetPay payment window exactly as your customers will see it on your site. Test mode: no money moves. Back to the documentation
▶ Pay with PlanetPay
Events received by your page
Click "Pay" to start.
Webhook then received by your server
—
1. Your server creates the recharge
POST /v1/recharge
{ "amount": 5, "currency": "XOF",
"reference": "ORDER-1001",
"callback_url": "https://votresite.com/webhook" }
→ { "id": "rch_…", "payment_url": "https://planetpay.site/pay/…" }
2. Your page opens the checkout
<script src="https://planetpay.site/js/planetpay.js"></script>
<script>
PlanetPay.open(paymentUrl, {
onSuccess: function (e) { showThanks(e.reference); },
onFailure: function (e) { showRetry(); },
onClose: function (e) { }
});
</script>
3. Your server receives the confirmation
POST https://votresite.com/webhook
X-PlanetPay-Signature: hmac_sha256(secret, ts + "." + body)
{ "event": "recharge.completed", "data": { … } }
