Payments
Initialize and verify Paystack enrollment payments via the REST API.
Initialize a payment
Create a new Paystack payment session and get a checkout URL to redirect the student to.
Warning
Rate limit: 10 requests / minute per tenant.
This limit is intentionally tight to prevent fraud probing.
Exceeding it returns HTTP 429 with a Retry-After header.
See Rate limits for retry guidance.
Headers
| Header | Required | Value |
|---|---|---|
x-api-key | Yes | Your tenant API key |
Content-Type | Yes | application/json |
Body
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Student/payer email |
amount | number | Yes | Amount in kobo (NGN × 100) |
studentId | string | No | Your internal student ID |
metadata | object | No | Arbitrary key-value pairs echoed back on the webhook |
Response 200 OK
Redirect the student to authorization_url to complete payment.
Example (cURL)
Example (Python)
Verify a payment
Check whether a payment was successful by reference.
Headers
| Header | Required | Value |
|---|---|---|
x-api-key | Yes | Your tenant API key |
Response 200 OK
status values: "success" | "failed" | "abandoned" | "pending"
Get payment config
Retrieve the tenant's payment configuration — public key, surcharge settings, and branding.
Headers
| Header | Required | Value |
|---|---|---|
x-api-key | Yes | Your tenant API key |
Response 200 OK
Get payment status
Lightweight status check — no full Paystack round-trip. Result may be cached for up to 60 seconds; use Verify a payment for authoritative results.
Headers
| Header | Required | Value |
|---|---|---|
x-api-key | Yes | Your tenant API key |
Response 200 OK
List transactions
Headers
| Header | Required | Value |
|---|---|---|
x-api-key | Yes | Your tenant API key |
Query params
| Param | Type | Default | Description |
|---|---|---|---|
limit | number | 20 | Max results |
offset | number | 0 | Pagination offset |
status | string | — | Filter by status |
Response 200 OK
Get payment stats
Aggregated revenue and count metrics.
Headers
| Header | Required | Value |
|---|---|---|
x-api-key | Yes | Your tenant API key |
Response 200 OK
Webhook — payment completed
Nexa forwards a POST to your webhook URL when a payment is confirmed.
Payload
Warning
customerEmail and any fields you pass via metadata may contain personally
identifiable information (PII). Store and handle this data in accordance with
your privacy policy and applicable data-protection regulations.
See REST API Overview → Webhook verification for signature verification.