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.

FieldType & FlagsDescription
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

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"
}
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
}
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
}
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
}

These events are dispatched to your webhook endpoints when actions occur on this resource: