Skip to main content
Cuprice passes two return addresses to your checkout link: success_url and cancel_url. Cuprice never sees the payment, so it cannot redirect anyone afterwards. Your checkout does that, usually by handing both addresses to your payment provider when it creates the checkout session.

Defaults

If you set nothing, both addresses point back to your Cuprice share page:
The share page shows a confirmation with the plan name for success=true and a short notice for canceled=true. For a free plan the success address also carries &free=true.

Use your own pages

To bring buyers back to your site instead:
  1. In the builder, open Integration and expand Redirects.
  2. Under Production, fill in Success URL and Cancel URL, for example https://yoursite.com/welcome and https://yoursite.com/pricing.
  3. Click Save changes.
Both have to be full addresses starting with https:// or http://. You can also set them with Update Project (checkoutSuccessUrl and checkoutCancelUrl). Cuprice then sends these addresses as success_url and cancel_url:
Like the rest of the query string, these values pass through the buyer’s browser and can be edited. If your success and cancel pages are fixed, hard-code them in your checkout instead of reading the parameters.
Reaching the success page does not prove that anyone paid. Unlock features when your payment provider confirms the payment, usually through a webhook. See Feature Gating.

Test URLs

The Test fields under Redirects (checkoutTestSuccessUrl and checkoutTestCancelUrl in the API) are saved with the project, but the checkout handoff does not use them: buyers always get the Production addresses. To test, see Test the handoff.