Create a payment link
/v1/payment-linksCreate a link and share the returned url with customers — via email, WhatsApp, a button on your site, anywhere. name and linkType are always required; the other required fields depend on linkType (see amount and plan).
Body parameters
namestringrequiredInternal label shown in the dashboard (1–200 chars). Not the customer-facing title.
linkTypestringrequiredfixed — amount required at creation. open — omit amount; the customer enters it at pay time. subscription — plan required; paying enrols the customer in recurring billing.
Allowed: 'fixed''open''subscription'
amountintegeroptionalAmount in kobo. **Required** when linkType is fixed. Must be omitted for open. Ignored for subscription (the plan amount is charged).
planstringoptionalPlan code (PLN_…). **Required** when linkType is subscription. Must be an active plan you own.
descriptionstringoptionalOptional description (up to 500 chars), shown on the hosted checkout page.
redirectUrlstringoptionalWhere to send the customer after a successful payment. Must be a valid URL.
singleUsebooleanoptionalWhen true, the link auto-deactivates after the first successful payment. Defaults to false. Ignored for subscription.
activebooleanoptionalWhether the link accepts payments immediately. Defaults to true.
targetAmountintegeroptionalFundraising goal in kobo. **Only valid for open links** — the link auto-deactivates once cumulative payments reach it. Rejected for fixed/subscription.
trialPeriodDaysintegeroptionalFree-trial length in days. **Only valid for subscription links** (max 365). The customer pays a small one-off card-verification fee instead of the first cycle; the first plan charge fires this many days later.
metadataobjectoptionalArbitrary key/value pairs echoed on every charge created via this link.
Response
201linkCodestringTagPay link code (`PLK_…`). Use this in every payment-link API call (retrieve, update).
urlstringShareable customer-facing URL. Hand this out directly — it opens the hosted checkout.
namestringInternal label.
descriptionstring | nullOptional description shown on the hosted page.
amountinteger | nullFixed amount in kobo, or `null` for `open` links.
currencystringAlways `NGN`.
linkTypestringOne of `fixed`, `open`, `subscription`.
planCodestring | nullPlan code for `subscription` links, otherwise `null`.
activebooleanWhether the link currently accepts payments.
singleUsebooleanWhether the link auto-deactivates after the first successful payment.
paidAtstring | nullISO-8601 timestamp of the payment that exhausted a single-use link, else `null`.
totalCollectedintegerCumulative successful payments through this link, in kobo.
paymentCountintegerNumber of successful payments through this link.
targetAmountinteger | nullFundraising goal in kobo for `open` links, else `null`.
trialPeriodDaysinteger | nullTrial length in days for `subscription` links, else `null`.
redirectUrlstring | nullPost-payment redirect URL, or `null`.
metadataobject | nullArbitrary key/value pairs echoed on every charge created via this link.
createdAtstringISO-8601 creation timestamp.
updatedAtstringISO-8601 last-update timestamp.
Errors
VALIDATION_ERROR400A field is missing, has the wrong name, or violates a per-type rule (e.g. `amount` is required for fixed-type links).NOT_FOUND404The supplied `plan` code does not exist or is not owned by you.UNAUTHORIZED401Secret key missing or invalid.