Per user price or return urls
Prepare a custom checkout session for a specific user
You can create a checkout session through our API for a specific user, to customize any of these parameters:
price
success URL
error URL
Create a custom checkout session
To prepare a custom checkout session, you will need the following parameters from your dashboard:
your project api secret: in your project, bottom of the left menu "api key",
your product ID: in your project, checkout, products,
user wallet address and email.
To customize the checkout session, you may want to set (each field is optional):
custom price: set as cents, like "150" for 1.5$
success url: the redirect url will always contains the purchase id (added as ‘id’ in query string) and transaction hash
error url: the error redirect URL will contain error id and message (‘error_id’ and ‘error_message’ in query string).
Only use this from your backend as it involves your API secret
As result, you will obtain a transactionId and session that you will use to redirect the user to checkout page.
Redirect the user to (customized) checkout page
To prepare a custom checkout session, you will need the following parameter from your dashboard:
your project public api key: in your project, bottom of the left menu "api key".
With specific transactionID
and session
from the previous request, you can redirect the user to this url:
Last updated