Redirect
π€ Success & Failure Redirect URLs
These are redirect URLs (not webhooks) that return the user to your website after an invoice-related action is completed.
β Success redirect: Triggered when an invoice is successfully paid. The user is redirected to the configured
successUrl
.β Failure Redirect: Triggered when the invoice is canceled, rejected, expired, or if an error occurs. The user is redirected to the configured
failureUrl
.
π§ Configuration
To enable redirect functionality, the URLs must be defined in one of the following ways:
Merchant-level configuration: Set the
successUrl
andfailureUrl
fields in your merchant profile in the Thedex merchant settings.Sign in at app.thedex.cloud.
After logging in, navigate to the "Merchants" section.
Click the "Edit" button on your merchant.
Fill in Success redirect Url or Failure redirect Url.
Complete form.
Per-request configuration: If not set at the merchant level, you can specify
successUrl
andfailureUrl
directly in your API request when creating an invoice.
If both options are used, the values passed in the API request will override the merchant defaults
π Behavior
If the invoice was created via API: The user is redirected automatically to either the success or failure URL as soon as the invoice status is updated.
If the invoice was created via Thedex UI:
The user must click a button (e.g., "Return to website") to initiate the redirect.
β οΈ Important: These URLs are intended for user redirection only. They are not intended for server-to-server communication or for receiving payment status updates. Use webhooks for backend notification and processing.


Last updated