pay.platnova.com. The checkout shows every payment method that is live for the currency, and then sends them back to your site.
The button never sees your API key. Your server creates the checkout with your key and passes only the checkout link to the browser.
How it works
- Your server calls
POST /v1/checkoutwith your API key. - Your server gives the returned
data.urlto the browser. - The button sends your customer to that link, and they pay on Platnova’s hosted checkout.
- After a successful payment, Platnova sends them to your
success_url. - Your server confirms the payment with a webhook or by retrieving the checkout. Don’t rely on the redirect alone.
1. Create the checkout on your server
Use your API key in theX-API-KEY header. Every payment method that is live for the currency is offered, and new methods reach your customers as we turn them on; payment_options is ignored.
id and the hosted checkout url:
Who pays the fee
fee_bearer is optional and decides who pays Platnova’s deposit fee:
"customer"(the default, used when you leave it out): the fee is added on top, so the customer paysamountplus the fee and you receiveamount."merchant": the customer pays exactlyamount, and you receiveamountless the fee.
"merchant", Nova Tag transfer isn’t offered: the payer’s app adds its own fee on top, so the merchant can’t bear it there. Every other live method still is.
Save
data.id against your order. You’ll need it to confirm the payment. Put your own order id in success_url, because Platnova redirects to it exactly as you sent it, with nothing added.2. Add the script to your page
Load the script once, on any page that shows the button:v1 is a stable version: we fix bugs inside it but never change how it behaves. If your site sends a Content Security Policy, allow https://pay.platnova.com in script-src.
3. Show the button
Pick whichever fits how your page is built.Option A: you already have the link when the page renders
Render the checkouturl from step 1 into the page:
Option B: create the checkout when the customer clicks
This is best when the cart can change, or when you don’t want to create a checkout for every page view. CallPlatnovaPay.button with a createCheckout function that asks your server for a fresh link:
createCheckout throws, takes longer than 20 seconds, or returns anything other than a Platnova checkout link, the button resets and shows “We couldn’t open checkout. Please try again.” It also calls onError and dispatches a platnova:error event that bubbles up from the button.
Options
Pass either
checkoutUrl or createCheckout, not both. PlatnovaPay.button returns { element, destroy }. If your single-page app adds buttons after the page loads, call PlatnovaPay.init() to pick them up.
The button only ever sends customers to Platnova’s checkout (
https://pay.platnova.com, plus the sandbox checkout host). It refuses any other link, so nobody can use it to redirect your customers somewhere else. A link it refuses is left exactly as you wrote it, and the reason is logged in the browser console.4. Handle the redirect back
After a successful payment, the checkout shows a confirmation and then sends the customer to yoursuccess_url. Use that page to thank them. A customer who decides not to pay can use Cancel and return to [your business name] on the checkout, which sends them to your cancel_url in the same tab, exactly as you sent it. If they may already be paying (for example, they have an open bank-transfer account or crypto invoice), the checkout asks them to confirm first, because the payment can still arrive after they leave. If you leave out cancel_url, the checkout shows no return action and customers can only close the tab, so always send your own cancel_url. Either way, keep the order payable on your side until the checkout is paid or you cancel the order. With option B, the button resets when they come back to your page.
A visit to success_url is not proof of payment: anyone can type that URL into their browser.
5. Confirm the payment on your server
Confirm the payment from your server before you fulfil the order. Use either or both of these:- Webhook (recommended). Configure a webhook for
checkout.paid, andcheckout.failedif you want to hear about payments that did not settle. The event’sdata.checkout_idmatches theidyou saved in step 1.data.amountis what you are credited,data.paid_amountis what the customer paid, anddata.referenceis the payment reference. - Retrieve the checkout. Call
GET /v1/checkout/{id}. A paid checkout hasstatus: "success"withpaid_atandpayment_reference. An unpaid one stayspending.
No JavaScript? Use a button image
If you can’t run scripts, for example in an email, link a static button image to the checkouturl:
Email clients often block SVG, so use the PNG there. To see every variant live, open the button demo page.
Testing in sandbox
Point your server athttps://sandbox.api.platnova.co with your sandbox API key. Sandbox checkout links live on Platnova’s sandbox checkout host, and the button accepts them exactly as it accepts live ones. See Environments.
