Skip to main content

Payment Links

Create hosted payment pages you can share with customers. Accept cards, bank transfers, and crypto.


POST /links

Headers

HeaderValue
AuthorizationBearer $PAYSCRIBE_API_KEY
Content-Typeapplication/json

Parameters

FieldTypeRequiredDescription
amountnumberNoFixed amount. Omit it for a customer-entered amount.
currencystringYesNGN, USD
titlestringYesPayment title
descriptionstringNoPayment description
redirectstringNoURL to redirect after payment
success_messagestringNoMessage shown on the hosted page after payment (default: "Thank you for your payment.")
slugstringNoA custom slug for the hosted URL. Must be unique per business; a random slug is generated if omitted.
curl -X POST https://sandbox.payscribe.ng/api/v1/links \
-H "Authorization: Bearer $PAYSCRIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 15000,
"currency": "NGN",
"title": "Payment for Invoice #123",
"description": "Web development services",
"redirect": "https://example.com/thank-you"
}'

Response

{
"status": true,
"description": "Payment link created",
"message": {
"details": {
"id": "link_abc123",
"title": "Payment for Invoice #123",
"slug": "a1b2c3d4",
"full_url": "https://links.payscribe.co/inv/a1b2c3d4",
"amount": 15000,
"currency": "NGN",
"status": "active"
}
},
"status_code": 200
}

The create/update responses do not echo description, redirect, or success_message back — fetch the link with Get Payment Link to confirm what was saved.


GET /links

Headers

HeaderValue
AuthorizationBearer $PAYSCRIBE_API_KEY

Parameters

FieldTypeRequiredDescription
pageintegerNoPage number (default: 1)
per_pageintegerNoResults per page (default: 20)
statusstringNoFilter by active or inactive
qstringNoSearch title, slug, or link ID
curl -X GET "https://sandbox.payscribe.ng/api/v1/links?page=1&per_page=20" \
-H "Authorization: Bearer $PAYSCRIBE_API_KEY"

Response

{
"status": true,
"description": "Payment links fetched.",
"message": {
"details": {
"links": [
{
"id": "link_abc123",
"title": "Payment for Invoice #123",
"slug": "a1b2c3d4",
"url": "https://links.payscribe.co/inv/a1b2c3d4",
"amount": 15000,
"currency": "NGN",
"status": "active",
"created_at": "2026-07-20 12:00:00"
},
{
"id": "link_def456",
"title": "Donation",
"slug": "e5f6g7h8",
"url": "https://links.payscribe.co/inv/e5f6g7h8",
"amount": null,
"currency": "NGN",
"status": "active",
"created_at": "2026-07-19 10:30:00"
}
],
"total": 2,
"page": 1,
"per_page": 20
}
},
"status_code": 200
}

The list response does not include description or a paid flag per link — fetch the individual link with Get Payment Link for those. Note the list item's URL field is url (not full_url, which is what create/update return).


GET /links/{id}

Headers

HeaderValue
AuthorizationBearer $PAYSCRIBE_API_KEY

Parameters

FieldTypeRequiredDescription
idstringYesPayment link ID
curl -X GET https://sandbox.payscribe.ng/api/v1/links/link_abc123 \
-H "Authorization: Bearer $PAYSCRIBE_API_KEY"

Response

{
"status": true,
"description": "Links details fetched.",
"message": {
"details": {
"id": "link_abc123",
"title": "Payment for Invoice #123",
"description": "Web development services",
"amount": 15000,
"slug": "a1b2c3d4",
"currency": "NGN",
"success_message": "Thank you for your payment.",
"redirect_url": "https://example.com/thank-you",
"created_at": "2026-07-20 12:00:00",
"updated_at": "2026-07-20 12:00:00",
"status": "active",
"business": {
"id": "b_abc123",
"name": "Acme Ltd",
"business_logo": "https://res.cloudinary.com/.../logo.png"
},
"payments": {
"wallets": {
"is_enabled": true,
"mode": {
"payscribe": {"title": "Pay with your Payscribe wallet", "meta": []},
"palmpay": {"title": "Connect and pay with your Palmpay wallet", "meta": []}
}
},
"ussd": {"is_enabled": true, "mode": []},
"bank_transfer": {"is_enabled": true, "mode": []}
}
}
},
"status_code": 200
}

This response does not include a url/full_url field or a paid/paid_at flag — build the hosted URL from slug (https://links.payscribe.co/inv/{slug}), and use List Payment Links or Webhooks to know whether a link has been paid.


PATCH /links/{id}

Headers

HeaderValue
AuthorizationBearer $PAYSCRIBE_API_KEY
Content-Typeapplication/json

Parameters

FieldTypeRequiredDescription
idstringYesPayment link ID
amountnumberNoFixed amount; omit for a customer-entered amount
titlestringConditionalRequired with description and currency for a content update
descriptionstringConditionalRequired with title and currency for a content update
currencystringConditionalRequired with title and description for a content update
redirectstringNoURL to redirect after payment
statusstringNoUse active or inactive. It may be updated on its own.

A content update is not a partial patch: send title, description, and currency together. A status-only update may send just status.

curl -X PATCH https://sandbox.payscribe.ng/api/v1/links/link_abc123 \
-H "Authorization: Bearer $PAYSCRIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"amount": 20000, "title": "Updated payment", "description": "Updated August invoice payment", "currency": "NGN"}'

Response

{
"status": true,
"description": "Payment link updated successfully.",
"message": {
"details": {
"id": "link_abc123",
"title": "Updated payment",
"slug": "a1b2c3d4",
"full_url": "https://links.payscribe.co/inv/a1b2c3d4",
"amount": 20000,
"currency": "NGN",
"status": "active"
}
},
"status_code": 200
}

A status-only update ({"status": "inactive"}) returns "description": "Payment link status updated successfully." with "message": {"details": []} — it does not echo the link object back.


DELETE /links/{id}

Headers

HeaderValue
AuthorizationBearer $PAYSCRIBE_API_KEY

Parameters

FieldTypeRequiredDescription
idstringYesPayment link ID
curl -X DELETE https://sandbox.payscribe.ng/api/v1/links/link_abc123 \
-H "Authorization: Bearer $PAYSCRIBE_API_KEY"

Response

200 OK

{
"status": true,
"description": "Payment link deleted.",
"message": {
"details": []
},
"status_code": 200
}

Webhooks

EventDescription
payment_link.paidPayment link has been paid

Was this page helpful?

Report a docs issue →