Payment Links
Create a hosted payment page in one request and share the URL anywhere — WhatsApp, SMS, invoices, social bios. Payers choose their channel and pay; no integration needed on their side.
Create a payment link
POST
/api/v1/merchant/payment-linksCreate a new hosted payment page for your merchant account.
Authenticates with your API keys.
Body parameters
| Parameter | Description | |
|---|---|---|
title | required | stringHeadline shown on the payment page, e.g. “Pro plan — October”. |
description | optional | stringSupporting text shown under the title. |
amount | optional | integerAmount in minor units. Omit it to let the payer type in any amount (great for donations). |
reusabledefault: true | optional | booleanWhether the link can be paid many times. false deactivates the link after the first successful payment. |
redirectUrl | optional | stringWhere the payer lands after a successful payment. |
expiresAt | optional | stringISO 8601 timestamp after which the link stops accepting payments. |
curl -X POST "https://api.namibrapay.com/api/v1/merchant/payment-links" \
-H "X-API-Key: pk_test_xxxxxxxxxxxxxxxx" \
-H "X-API-Secret: sk_test_xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"title": "Photography session",
"description": "60-minute outdoor shoot incl. 10 edited photos",
"amount": 45000,
"redirectUrl": "https://yourbrand.com/thanks"
}'201
{
"success": true,
"data": {
"id": "pl_9dka21fj",
"slug": "photography-session",
"url": "https://pay.namibrapay.com/photography-session",
"title": "Photography session",
"amount": 45000,
"reusable": true,
"status": "active"
}
}Share and get paid
Anyone who opens data.url gets your branded payment page and can pay with MTN MoMo, Telecel Cash, AirtelTigo Money or a bank transfer. Every successful charge fires your webhooks like any other transaction, and appears in your dashboard and transaction list.
Open-collect links
When you omit
amount, the payer enters their own amount on the page — perfect for tips, donations and pay-what-you-want pricing.Manage links
GET
/api/v1/merchant/payment-linksList all payment links on your account.
Authenticates with your API keys.
PATCH
/api/v1/merchant/payment-links/{id}Update a link — pause it by setting
status to inactive, or re-activate a paused one. Expired links can't be reactivated.Authenticates with your API keys.
curl -X PATCH "https://api.namibrapay.com/api/v1/merchant/payment-links/pl_9dka21fj" \
-H "X-API-Key: pk_test_xxxxxxxxxxxxxxxx" \
-H "X-API-Secret: sk_test_xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "status": "inactive" }'