Payment links
Shareable URLs a sub-merchant creates to request a payment. Opening a link
presents the hosted checkout, which creates the payment intent — no code
required on the merchant side.
Platform-wide concepts (auth, idempotency, versioning, errors) live on the
Link types
| Type | Behavior |
|---|---|
single_use | Fixed amount and reference; consumed on its first successful payment, refuses a second visit. The invoice. |
reusable | No pre-set amount — the customer enters any amount at checkout. The "pay me" link. |
Create a link
POST /payment-links
Request:
POST /payment-links
Authorization: Bearer sk_test_...
Content-Type: application/json
{
"type": "single_use",
"amount": 2500,
"reference": "inv-1"
}
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
type | single_use | reusable | ✅ | Link consumption mode |
amount | integer (FJD cents) | ✅ for single_use | Fixed amount, consumed on first success |
reference | string | ❌ | Merchant invoice ID |
Response (200):
{
"url": "https://checkout.transxact.io/..."
}
The url is the hosted checkout: it presents the shopper a vertical method
list (M-PAiSA, MyCash, card) and drives the payment in test or live mode. A
successful payment lands on a branded confirmation page.
List links
GET /payment-links
Returns the sub-merchant's links.
Code examples:
| Language | Example |
|---|---|
| Python | transxact.payment_links.create({"type": "single_use", "amount": 2500, "reference": "inv-1"}) |
| Node.js | await transxact.paymentLinks.create({ type: "single_use", amount: 2500, reference: "inv-1" }) |
Related: Payment intents — what the
checkout creates when a shopper pays a link.