API request
POST /developers/v1/payment-links
Create a hosted payment link for payers.
curl -X POST "https://api.mainmoney.net/api/v2/developers/v1/payment-links" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{"amount":5000,"currencyCode":"CDF","merchantReference":"order-123","redirectUrl":"https://merchant.example/checkout/return","title":"Order #123","description":"Demo checkout","metadata":{"orderId":"123"},"brandColor":"#FF3976"}'Create a hosted checkout link. Payers complete payment on Mainmoney; you receive webhooks and optional redirect callbacks.
| Field | Required | Description |
|---|---|---|
amount | Yes | Payment amount in link currency |
currencyCode | Yes | ISO currency code (e.g. CDF) |
merchantReference | Yes | Your public payment id (1–128 chars: letters, digits, ., _, -) |
redirectUrl | No | HTTPS URL for signed payer return |
title | No | Checkout title (defaults to business name) |
description | No | Checkout description |
metadata | No | Arbitrary JSON echoed on link responses |
brandColor | No | Hex accent color on the pay page |
Developer links are created as single-use (LIMITED, maxUses: 1) so each merchantReference maps to one checkout.
| Field | Description |
|---|---|
id | Payment link id |
slug | Public pay slug |
url | Payer checkout URL |
merchantReference | Required. Public payment identifier (status, redirects, webhooks) |
title | Optional checkout title (defaults to business name) |
description | Optional checkout description |
metadata | Optional JSON metadata returned on link responses |
Logo defaults to app logo, then business profile logo. Upload a logo when creating the app in the developer dashboard.
Discover capabilities with GET /developers/v1/config. Sandbox links use Mainmoney test credentials and do not credit your business wallet.