API Reference · Payments
Payment Links
No-code shareable payment links (/pl/{slug}).
The payment_link object
Represents a payment_link entity in the rafiqPay system.
| Field | Type & Flags | Description |
|---|---|---|
| id | string | Unique payment link ID (pl_...). |
| slug | string | Public URL slug. |
| mode | enum | live | test. |
| amount | string | The price in naira. "0" lets the customer enter the amount. |
Example payment_link JSON
payment_link example payload
{
"id": "pl_01",
"slug": "kanzu-arabic-cohort",
"mode": "live",
"amount": "45000.00"
}Endpoints & Operations
POST/v1/linksProposed
Create a payment link
Creates a reusable payment link.
Request Example
POST /v1/links
cURL · v1
curl -X POST "https://api.rafiqpay.net/v1/links" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a" \
-H "Idempotency-Key: idem_create-payment-link_01" \
-H "Content-Type: application/json" \
-d '{
"name": "Arabic Cohort 4",
"slug": "kanzu-arabic-cohort",
"amount": "45000.00"
}'Response (200 OK)
Response payload
{
"id": "pl_01",
"slug": "kanzu-arabic-cohort"
}GET/v1/links/:idProposed
Retrieve a payment link
Retrieves a payment link.
Request Example
GET /v1/links/:id
cURL · v1
curl -X GET "https://api.rafiqpay.net/v1/links/:id" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a"Response (200 OK)
Response payload
{
"id": "pl_01",
"active": true
}PATCH/v1/links/:idProposed
Update a payment link
Updates or deactivates a payment link.
Request Example
PATCH /v1/links/:id
cURL · v1
curl -X PATCH "https://api.rafiqpay.net/v1/links/:id" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a" \
-H "Content-Type: application/json" \
-d '{
"active": false
}'Response (200 OK)
Response payload
{
"id": "pl_01",
"active": false
}GET/v1/linksProposed
List payment links
Lists payment links.
Request Example
GET /v1/links
cURL · v1
curl -X GET "https://api.rafiqpay.net/v1/links" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a"Response (200 OK)
Response payload
{
"object": "list",
"data": [],
"hasMore": false,
"nextCursor": null
}Related Webhook Events
These events are dispatched to your webhook endpoints when actions occur on this resource: