Pay Button
Redirect URLs
Send users to a specific website after a successful or cancelled purchase.
The <CrossmintPayButton>
component offers two optional properties which can be used to redirect users to a website after a purchase:
successCallbackURL
redirects users to a given url after a successful transaction.failureCallbackURL
redirects users to a given url after a failed transaction.
Whitelisting Domains
For security reasons, you must whitelist the URLs from the Domains
tab on the console (staging, production).
Whitelisted domains must be https
. This means you will not be able to whitelist localhost
since it’s http
Payloads
The redirect URL will contain a query parameter with format ?p=payload
which contains an object with information about the outcome of the transaction.
The exact structure of the payload can vary depending on the specific implementation and the transaction details, but generally includes the following parameters:
type
: Payload type (purchase.succeeded
).status
: Transaction status ("success"
).walletAddress
: Address to which the minting is done.passThroughArgs
: Additional arguments passed through the transaction.clientId
: The client identifier.collectionId
: The collection identifier, usually the same asclientId
.txId
: The transaction identifier.orderId
: The order identifier associated with the transaction.