Return URLs
When a Customized Checkout or Embedded Components transaction completes, the gateway redirects the browser back to your platform using one of two URLs:
SUCCESSURL— used when the transaction is approved.FAILUREURL— used when the transaction is declined, cancelled, or fails validation. Defaults toSUCCESSURLif not configured.
Configuring Return URLs
Return URLs can be set two ways:
1. On the Terminal (Default)
As part of production setup, SportsPay configures SUCCESSURL and FAILUREURL on each of your terminals. Every StartSession on that terminal uses those URLs automatically — you don't need to pass them.
To set or change the configured return URLs for a terminal, email [email protected].
2. Per-Session (Dynamic Override)
You can override the terminal defaults on individual StartSession calls by passing SUCCESSURL and FAILUREURL as parameters. This is useful when you need to route different checkouts to different landing pages — for example, one URL for a registration flow and another for a membership renewal.
Dynamic overrides are only honored if the terminal has the DYNAMICURL setting enabled. If the setting is off and you pass a SUCCESSURL or FAILUREURL, the request is rejected with code 9001 CANNOT OVERRIDE URLS.
Production setup note. If you plan to use dynamic overrides in production, let SportsPay know in advance so
DYNAMICURLcan be enabled on your terminals. In test, the override is allowed regardless of the setting — see Development & Testing.
What the Gateway Appends
When the gateway redirects the browser back, it appends two query parameters to your return URL:
| Parameter | Description |
|---|---|
SecureID | The same SECUREID returned by StartSession. Use it to call GetResult and retrieve the transaction outcome. |
Status | 5000 for approved transactions, or the gateway error code for declined or cancelled transactions (see the table below). |
So if your SUCCESSURL is https://yoursite.com/checkout/return, the gateway redirects the browser to:
https://yoursite.com/checkout/return?SecureID=1ef3a4c0-1234-6abc-b6f0-0607737344b4&Status=5000
Status Values
| Status | Meaning |
|---|---|
5000 | Transaction approved. The browser is redirected to SUCCESSURL. |
9005 | Customer cancelled the transaction on the hosted page. |
9015 | Session expired or was terminated before completion. |
Other 9xxx | Validation error or gateway issue — see Payment Errors & Response Codes. |
| Card decline codes | The card was declined by the issuer — see Payment Errors & Response Codes. |
All non-5000 statuses send the browser to FAILUREURL. Call GetResult with the SecureID to get the full error message and any additional detail.
URL Requirements
HTTPS Required
All return URLs must use HTTPS. Plain HTTP URLs are rejected with code 9106 INVALID REDIRECT URL on production gateways. On test gateways, HTTP is allowed so you can redirect to localhost during development.
Top-Level Redirect vs Iframe Redirect
The return URL behavior is the same for both hosted methods, but the context differs:
- Customized Checkout — The redirect is a top-level browser navigation. Your return page runs in the main window.
- Embedded Components — The redirect happens inside the iframe. Your return page runs inside the embedded frame and needs to post the result up to the parent window. See Steps for Embedded Components for the parent/iframe hand-off.
For both methods, call GetResult server-side from your return page to retrieve the transaction outcome before showing anything to the customer.
Updated 12 days ago
