Guides
Payment links
Create a shareable pay page for a fixed amount.
A payment link is a hosted page your customer can open on any phone. You share the url from the response. Each paid visit still sends payment.success.
Create a link
Create a payment link
curl -X POST https://middleware.test.nextcba.com/api/v1/pg/v1/payment-links \
-H "Authorization: Bearer $CSWITCH_SECRET_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"title": "Silk wrap dress", "amountKobo": 6500000, "usage": "reusable"}'Options
amountKobois required. The customer does not type an amount.usageisreusable(default) orsingle. A single link stops after one paid session.expiresAtis an ISO date-time. After that the link stops accepting payments.descriptionis optional text on the page.
Read a link later with GET /payment-links/{id}. paidCount is how many sessions on that link are paid. The webhook data includes paymentLinkId when the payment came from a link.