Lesson 6 — Payment links and going live

Not every payment needs an integration. A payment link is a hosted

checkout at a URL you can paste anywhere — an invoice, a WhatsApp message, a

social bio. This lesson creates one, then walks the test-to-live transition.

Single-use (the invoice): fixed amount, consumed on first success:


curl https://api.transxact.io/payment-links \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{ "type": "single_use", "amount": 2500, "reference": "inv-1" }'

Reusable ("pay me"): no fixed amount; the customer enters one at

checkout:


curl https://api.transxact.io/payment-links \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{ "type": "reusable" }'

The response url is the hosted checkout: a vertical method list — M-PAiSA

first — driving the same intent lifecycle from Lessons 2–5. A single-use link

refuses its second visit; each opened session expires after 24 hours.

You can also create links from the dashboard's "New payment link" form, which

previews the fee and your net.

Go live

1. Complete your due diligence — check onboarding status in the dashboard.

2. Enable rails in the dashboard rail config.

3. Create live keys: transxact keys:create --mode live.

4. Test each rail against the real test endpoints (rail credentials come

from scripts/setup-mpaisa.sh / scripts/setup-mycash.sh).

5. Watch the first disbursement — disbursements run daily T+1, net of fees;

disbursement.sent arrives by webhook.

Magic values do nothing in live mode. /simulate/:id is test-mode only and

returns an error for live intents.

Where to go from here

  • Quickstart — the whole flow condensed onto one page.
  • API reference — every endpoint, parameter, and error code.
  • OpenAPI spec — generate a typed client from it.
  • SDKs — twelve first-party libraries wrap all of this with retries,

idempotency, and webhook verification (sdks/<language>/README.md).

magic-value cheatsheet with quick simulate.

Exercise

1. Create a reusable link in test mode, open it, pay FJ$10 via MyCash, then

open it again and pay again — it stays open.

2. Create a single-use link for FJ$25 and confirm the second attempt is

refused.

3. Find both payments in the dashboard feed and compare the fee/net columns

across rails.


_Pattern decisions behind this tutorial (per-lesson structure, exercise

format) are recorded in ADR-0014; the canonical documentation conventions are

the documentation-standard term in CONTEXT.md._