Set the link
1
Open the payment settings
In the builder, open Integration and expand Payment.
2
Paste your checkout URL
Enter the address that starts checkout on your side, for example
https://yourapp.com/billing/checkout. It has to be a full address starting with https:// or http://.3
Choose the embed behavior and save
Pick Redirect or postMessage (see below), then click Save payment settings.
plan_id and cuprice_plan_id query parameters. Checkout Flow lists everything Cuprice sends.
Redirect or postMessage
With Redirect inside an embed, the whole browser tab moves to your checkout, not only the iframe.
With postMessage, the checkout link must still be set, because Cuprice does not build the payload without one. The standalone share link has no host page to receive the message, so its buttons do nothing in this mode. Choose Redirect if buyers also use the share link.
Listen for the event on the page that holds the embed:
startCheckout stands for your own code. The payload fields are described in Checkout Flow.
Without a checkout link
Until you set a link, buyers cannot check out:Test the handoff
Cuprice has no test mode of its own. To check the flow before buyers use it:-
Ask Cuprice for the payload your checkout will get for a plan, without clicking through the page. The
handoffUrlin the response is the exact link a buyer would be sent to.Plan IDs come from the Share API. See Checkout Payload for the full response. - Run your checkout route against your payment provider’s test or sandbox mode.
- To click through the real page, point the checkout link at your staging route, try it, then put the live URL back. Real buyers use the same link in the meantime, so do this before you share the page.
