Payment Link Generator
Enter your project details below. Your Gammal Tech account must be approved and payments enabled for the project before customers can pay.
What Is a Payment Link?
A payment link is a URL that takes a customer to a checkout page for a specified payment. With this pay by link approach, you send the link, the customer opens it, and Gammal Tech handles the payment page. The selected currency determines whether the customer pays from a Gammal Tech wallet or by card.
You can generate and share the link without writing code. If your website automatically delivers a download, grants account access, or fulfills an order, it also needs the payment-verification flow explained below.
How to Set Up a Payment Link
- Prepare your project. If you do not have a Gammal Tech account, register once using identity documents from your country of citizenship. Approval can take up to 10 days. After approval, open the dashboard, enter developer mode, and create or select your project.
- Enable payments. Open the project settings, provide the Payment Callback URL, and enable payments. Copy the project ID.
- Enter the payment details. Add the project ID, amount, and a description your customer will recognize. Choose the payment currency.
- Choose one-time or recurring payment. Leave recurrence as one-time, or select monthly or yearly for a supported international-card currency. Recurrence is unavailable for wallet and EGP-card payments.
- Generate and check the link. Check the project ID, amount, currency, and description before sharing.
How to send a payment link: Copy the generated link into a WhatsApp message, email, SMS, website button, or QR code so the customer can open the checkout page.
Three Payment Modes
The payment mode is determined by the currency parameter in the link.
Wallet
Egyptian Card
EGP. Customer pays with a local Egyptian debit or credit card. No login needed.International Card
Does the customer need a Gammal Tech account? Card checkout does not require a Gammal Tech login. Wallet payments use the customer's Gammal Tech wallet. These customer checkout options are separate from the approved account and project the merchant needs to create payment links.
Can I create an international payment link? Select a supported currency such as USD, EUR, or GBP to use international-card checkout. The builder also offers monthly and yearly recurring links for supported currencies other than EGP. Currency support does not establish merchant eligibility in every country.
recurrence to monthly or yearly, the customer subscribes and their card is automatically charged on each billing cycle. Only available with international card payments (not EGP or wallet).Build the Link Manually
Every payment link follows this base URL:
https://api.gammal.tech/sdk/pay/link/?pid={PROJECT_ID}&amount={AMOUNT}&desc={DESCRIPTION}
Add optional parameters as needed:
// Wallet payment (no currency — customer pays from Gammal Tech wallet)
https://api.gammal.tech/sdk/pay/link/?pid=5&amount=100&desc=Course+Access
// Egyptian card payment (currency=EGP)
https://api.gammal.tech/sdk/pay/link/?pid=5&amount=100&desc=Course+Access¤cy=EGP
// International card payment (supported currencies except EGP)
https://api.gammal.tech/sdk/pay/link/?pid=5&amount=10&desc=Pro+Plan¤cy=USD
// Monthly subscription (recurring — international card only)
https://api.gammal.tech/sdk/pay/link/?pid=5&amount=10&desc=Pro+Monthly¤cy=USD&recurrence=monthly
// Yearly subscription with callback (international card only)
https://api.gammal.tech/sdk/pay/link/?pid=5&amount=99&desc=Annual+Plan¤cy=USD&recurrence=yearly&callback=https%3A%2F%2Fyoursite.com%2Fthanks
// One time international card payment with callback
https://api.gammal.tech/sdk/pay/link/?pid=5&amount=50&desc=Premium¤cy=EUR&callback=https%3A%2F%2Fyoursite.com%2Fthanks
Parameters Reference
| Parameter | Required | Description |
|---|---|---|
pid |
Required | Your Project ID. Find it in your dashboard. |
amount |
Required | Payment amount as a positive number. The builder applies the listed minimum where available (for example, 1 for USD and 70 for EGP). Checkout confirms the applicable minimum for your selected currency. |
desc |
Required | What the customer is paying for. Max 200 characters. Spaces can be + or %20. |
currency |
Optional |
If omitted: wallet mode (customer pays from their Gammal Tech balance in EGP). If EGP: Egyptian card mode (customer pays with a local Egyptian card).If another supported currency: international card mode (customer pays with an international card). Supported: EGP, USD, EUR, GBP, AED, SAR, KWD, QAR, BHD, OMR, CAD, AUD, JPY, JOD, CNY, INR, CHF, SEK, NOK, DKK, PLN. |
recurrence |
Optional |
Set to monthly or yearly to create a recurring subscription. The customer's card is automatically charged on each billing cycle.Only works with international card payments (when currency is set to something other than EGP). Ignored in wallet and Egyptian card modes.
|
callback |
Optional | HTTPS URL to redirect the customer after successful payment. If omitted, the customer sees a success page on Gammal Tech. |
Handling the Callback
For card payments, a callback URL can return the customer to your site with the parameters shown below. These signed payment-token examples describe card checkout. Wallet callbacks follow their own payment flow; check the current payment documentation before integrating them.
// One time payment success
https://yoursite.com/thanks?status=success&txn=GT-TXN-abc123...&payment_token=eyJhbGc...
// Subscription success (includes subscription ID and recurrence)
https://yoursite.com/thanks?status=success&txn=GT-TXN-abc123...&payment_token=eyJhbGc...&subscription=sub_1abc...&recurrence=monthly
// Cancelled — customer closed the payment page
https://yoursite.com/thanks?status=cancelled
txn parameter is the Gammal Tech transaction ID. Each one is unique and starts with GT-TXN-. For subscriptions, you also receive a subscription ID that you can store for reference. The payment_token is a signed proof of payment — see the next section to learn how to verify it.?status=success into their browser and visit your callback page without paying. Before delivering the product, you must verify the payment_token using our SDK. See Verify the Payment below.Verify the Payment
When a card-payment callback includes payment_token, verify it with Gammal Tech. The browser example can display the verification result; protected product delivery also needs trusted fulfillment checks. Two distinctions matter:
- Prevent fakes. A malicious visitor could type
?status=successin the URL to fool a naive checkout page. Verifying thepayment_tokenwith us proves the payment is real. - Track verification separately from delivery. The response distinguishes a first token check from a repeat. A first verification does not prove that fulfillment completed; a browser can close before the next step.
Add this script to your callback page to display the verification result. The browser verification helper needs no API key. For protected downloads, account access, or order fulfillment, your trusted service must independently validate payment evidence and match the expected project, amount, currency, and order before granting access. See the current integration documentation for the applicable payment flow.
<!-- Add to your thank-you page -->
<p id="payment-status" role="status">Checking your payment...</p>
<script src="https://api.gammal.tech/sdk/pay/link/verify.js"></script>
<script>
GammalVerify(function (payment) {
var status = document.getElementById('payment-status');
if (payment.status === 1) {
status.textContent = 'Payment verified. Check your order status for fulfillment.';
} else if (payment.status === 2) {
status.textContent = 'This payment was checked previously. Check your order status.';
} else {
status.textContent = 'Payment confirmation is unavailable. Please contact support if you were charged.';
}
});
</script>
Status codes
| Status | Meaning | What to do |
|---|---|---|
1 |
Valid, first verification. The token is genuine and has never been verified before. | Show the verified payment result. Your trusted fulfillment service separately validates the order and records delivery. |
2 |
Valid, but already verified. The token is genuine, but someone (often the customer reloading the page or following a bookmark) has verified it before. | Show the existing order status from your records. A prior verification is not proof of completed delivery; the fulfillment service handles retries without duplicate delivery. |
0 |
Invalid. The token is fake, expired, malformed, or the request failed. | Do not grant access from this result. Show a neutral confirmation message and a support route if the customer was charged. |
Full example with payment status display
A customer-facing display example. It does not authorize or perform product delivery:
<p id="order-status" role="status">Checking your payment...</p>
<script src="https://api.gammal.tech/sdk/pay/link/verify.js"></script>
<script>
GammalVerify(function (payment) {
var status = document.getElementById('order-status');
if (payment.status === 1 || payment.status === 2) {
// This updates the customer-facing display only.
status.textContent = 'Payment verified: ' + String(payment.currency) +
' ' + String(payment.amount) + '. Check your order status for fulfillment.';
} else {
status.textContent = 'Payment confirmation is unavailable. ' +
'Please contact support if you were charged.';
}
// Never grant protected access from this browser result alone.
// Your trusted fulfillment service validates the payment evidence,
// matches the expected project, amount, currency and order,
// and records fulfillment once for each transaction.
});
</script>
Response details
The payment object passed to your callback contains:
| Field | Type | Description |
|---|---|---|
status |
number | Always present. 0 = invalid, 1 = valid first time, 2 = valid but already verified. |
txn |
string | Transaction ID, starts with GT-TXN-. Present on status 1 and 2. |
amount |
number | Payment amount as a number. Present on status 1 and 2. |
currency |
string | Currency code (EGP, USD, EUR, etc). Present on status 1 and 2. |
description |
string | What the customer paid for. Present on status 1 and 2. |
project_id |
number | Your project ID — useful when handling payments from multiple projects on the same callback page. Present on status 1 and 2. |
first_verified_at |
string | Timestamp of the first verification, in YYYY-MM-DD HH:MM:SS format. Present only on status 2. |
verification_count |
number | How many times this token has been verified, including the current call. Present only on status 2. |
reason |
string | Short error code: invalid_signature, missing_token, network_error, timeout, etc. Present only on status 0. |
Advanced: explicit token and timeout
Use GammalVerifyAdvanced when you need to pass the callback token explicitly or set a timeout. This example reads the token from the current URL without persisting it in browser storage:
<p id="advanced-payment-status" role="status">Checking your payment...</p>
<script src="https://api.gammal.tech/sdk/pay/link/verify.js"></script>
<script>
var token = new URL(window.location.href).searchParams.get('payment_token');
GammalVerifyAdvanced({
payment_token: token,
timeout: 15000
}, function (payment) {
var status = document.getElementById('advanced-payment-status');
status.textContent = payment.status === 1 || payment.status === 2
? 'Payment verified. Check your order status for fulfillment.'
: 'Payment confirmation is unavailable. Please contact support if you were charged.';
});
</script>
Best practices
txn to prevent duplicate fulfillment.