Build a post-payment landing page with order parameters
When your product skips the built-in success page and redirects to your URL, you can receive order details as query parameters.
In the product settings (create or edit product), enable Include Order Parameters in Redirect URL together with Redirect URL After Payment and Skip Success Page. The checkout then appends a fixed set of query names after payment succeeds.
Host thank-you.html on your own HTTPS site, set that address as the Redirect URL, and read the parameters in the browser with JavaScript.
When are parameters added?
They are merged into the redirect URL only when all of the following are true:
- Redirect URL After Payment is set to your page (for example https://yoursite.com/thank-you).
- Skip Success Page (Redirect Immediately) is enabled.
- Include Order Parameters in Redirect URL is enabled.
Query parameter names
These keys are added or updated on the redirect URL. Missing values are sent as empty strings.
| Parameter | Meaning |
|---|---|
orderId | Order id. |
customerName | Customer full name. |
email | Customer email. |
phoneNumber | Customer phone number. |
totalAmount | Total paid amount as a decimal string (dot as decimal separator). |
currency | Order currency code (for example MZN, USD). |
paymentGateway | Payment gateway identifier used for the order (may be empty depending on flow). |
paymentReference | Gateway payment reference (may be empty depending on flow). |
lang | Language code for this order (for example en or pt). |
totalAmount uses an invariant (culture-independent) format so the decimal separator is a dot.
Optional: {orderId} in the Redirect URL
You may include the text {orderId} in the Redirect URL; it is replaced with the real order id before query parameters are applied. Existing query strings on your URL are preserved; order fields are merged in.
Example redirect URL (illustrative)
Values are URL-encoded; your actual URL will differ.
https://example.com/thank-you?orderId=674a1b2c3d4e5f6789012345&customerName=Jo%C3%A3o%20Silva&email=joao%40example.com&phoneNumber=%2B258841234567&totalAmount=1500.00¤cy=MZN&paymentGateway=mpesa&paymentReference=ABC123XYZ&lang=pt
These parameters can include personal data. Always use HTTPS on your landing page. Query strings may appear in browser history, server logs, and analytics—treat values as untrusted input and escape them before outputting HTML.
Sample: thank-you.html
Uses the exact parameter names above (orderId, customerName, email, phoneNumber, totalAmount, currency, paymentGateway, paymentReference, lang).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Thank you</title>
<style>
body { font-family: system-ui, sans-serif; max-width: 560px; margin: 48px auto; padding: 0 16px; }
h1 { color: #0f2755; }
dl { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; }
dt { font-weight: 600; color: #374151; }
</style>
</head>
<body>
<h1>Thank you for your purchase</h1>
<p>Summary from the URL query string.</p>
<dl>
<dt>Order ID</dt><dd id="orderId"></dd>
<dt>Customer</dt><dd id="customerName"></dd>
<dt>Email</dt><dd id="email"></dd>
<dt>Phone</dt><dd id="phoneNumber"></dd>
<dt>Amount</dt><dd id="amount"></dd>
<dt>Gateway</dt><dd id="paymentGateway"></dd>
<dt>Reference</dt><dd id="paymentReference"></dd>
<dt>Language</dt><dd id="lang"></dd>
</dl>
<script>
const p = new URLSearchParams(window.location.search);
const t = (k) => p.get(k) || '—';
document.getElementById('orderId').textContent = t('orderId');
document.getElementById('customerName').textContent = t('customerName');
document.getElementById('email').textContent = t('email');
document.getElementById('phoneNumber').textContent = t('phoneNumber');
document.getElementById('amount').textContent =
(p.get('totalAmount') || '') + ' ' + (p.get('currency') || '');
document.getElementById('paymentGateway').textContent = t('paymentGateway');
document.getElementById('paymentReference').textContent = t('paymentReference');
document.getElementById('lang').textContent = t('lang');
</script>
</body>
</html>
For server-rendered pages you can read the same query keys on the server instead of JavaScript—always sanitize before output.
All tutorials