Accepting payments
Create and track Mobile Money collections.
Mobile Money
http
1POST https://paylinky.vercel.app/api/v1/collectRequest
| Field | Required | Description |
|---|---|---|
amount | Yes | Positive number, within the platform min/max |
currency | Yes | The currency of the country (XAF, XOF, CDF…) |
country_code | Yes | ISO code returned by /countries, e.g. CM |
operator | Yes | Exact operator name from /countries (case-insensitive) |
phone | Yes | International wallet number, e.g. +237670000000. Spaces, dashes and brackets are accepted |
reference | No | Your order reference (≤ 191 chars). Returned as merchant_reference; reusing it returns the existing payment |
notify_url | No | Public http(s) URL for this payment's webhook (overrides your default endpoint) |
otp | No | OTP when confirming an otp_required flow (see Payment flows) |
bash
1curl -X POST https://paylinky.vercel.app/api/v1/collect \2 -H "Authorization: Bearer $PAYLINKY_KEY" \3 -H "Content-Type: application/json" \4 -d '{5 "amount": 5000,6 "currency": "XAF",7 "country_code": "CM",8 "operator": "MTN Mobile Money",9 "phone": "+2376XXXXXXXX",10 "reference": "order_cm_12345",11 "notify_url": "https://shop.example/webhooks/paylinky"12 }'Response — 202 Accepted (USSD push)
json
1{2 "transaction_id": "0b9c7f0e-2d0b-4d76-9f5a-6b8a1c1d2e3f",3 "reference": "PLK-7XK2M9QPLA",4 "merchant_reference": "order_cm_12345",5 "status": "pending",6 "payment_method": "mobile_money",7 "amount": 5000,8 "fee_amount": 300,9 "credited_amount": 4700,10 "currency": "XAF",11 "sandbox": false,12 "country_code": "CM",13 "operator": "MTN Mobile Money",14 "phone": "+2376XXXXXXXX",15 "created_at": "2026-01-01T10:00:00.000Z",16 "expires_at": null17}The customer receives a prompt on their phone and approves with their Mobile Money PIN. status stays pending until the provider confirms — never deliver on the 202.
| Field | Description |
|---|---|
transaction_id | Paylinky UUID — use with GET /transaction/{id} |
reference | Paylinky reference |
merchant_reference | Your reference, or null |
flow / wave_url | Present for redirect flows such as Wave |
fee_amount / credited_amount | Fee and the amount credited to your balance on success |
sandbox, simulation | true for sandbox keys |
Idempotent replays
Sending the same reference with identical amount, currency and country_code returns the existing payment with idempotent_replay: true. A different payload with the same reference returns 409 reference_conflict.
After a network timeout (
504 upstream_timeout) do not create a second payment. Check the status of the original reference/transaction_id first.Check the status
http
1GET https://paylinky.vercel.app/api/v1/transaction/{transaction_id}You can pass the transaction_id, the Paylinky reference or your merchant_reference. Paylinky re-checks pending live payments with the provider on each call. A 200 means the transaction was found — always read status.
bash
1curl https://paylinky.vercel.app/api/v1/transaction/order_cm_12345 -H "Authorization: Bearer $PAYLINKY_KEY"