OrbitWeb Studio Paystack API
Initialize Paystack payments from an external platform while OrbitWeb Studio securely controls transaction verification and the final redirect.
Access requirements
Before integrating, the external platform must receive a private Bearer token from OrbitWeb Studio and register its approved success URL. The token must be stored only on the platform’s server.
Never place the Bearer token in JavaScript, a mobile application, a public repository or any browser request. Your backend must call this API.
Initialize your first payment
Send a JSON request from your server. Amounts use the main currency unit: for example, 1000 is converted internally to 100000 subunits.
curl --request POST 'https://orbitwebstudioafrica.com/api/payments/initialize' \
--header 'Authorization: Bearer YOUR_PRIVATE_TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"email": "customer@example.com",
"amount": 1000,
"currency": "MZN",
"mode": "test",
"order": "d26f47a0-bde8-43d9-833b-b5dc72f2134c",
"payment": "d03f50bd-3c9b-4a08-a6d6-27409211a85e",
"customer": {
"name": "Customer Name",
"phone": "+258840000000"
},
"metadata": {
"source": "your-platform"
}
}'
Initialize payment
/api/payments/initialize
Required headers
| Header | Value | Purpose |
|---|---|---|
Authorization | Bearer {token} | Authenticates the external platform. |
Accept | application/json | Requests JSON responses, including validation errors. |
Content-Type | application/json | Identifies the request body as JSON. |
Charge a consented card reference
This server-to-server endpoint charges a reusable Paystack authorization previously captured from a successful, explicitly consented payment. The private authorization code is never returned.
/api/payments/one-click
curl --request POST 'https://orbitwebstudioafrica.com/api/payments/one-click' \
--header 'Authorization: Bearer YOUR_PRIVATE_TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"email": "customer@example.com",
"amount": 1000,
"currency": "ZAR",
"order": "d26f47a0-bde8-43d9-833b-b5dc72f2134c",
"payment": "d03f50bd-3c9b-4a08-a6d6-27409211a85e",
"instrument": "saved-instrument-uuid",
"external_customer_id": "platform-customer-uuid",
"mode": "test"
}'
The external customer identifier and test/production mode must match the saved instrument. A unique payment UUID is required for every attempt.
Read payment status
After the browser returns to your platform, confirm the payment from your backend before changing local order state.
/api/payments/{payment_uuid}/status
Use the same private Bearer token. A successful response includes the original order and payment UUIDs, Paystack reference, amount, currency, status and verification time.
{
"success": true,
"data": {
"order": "d26f47a0-bde8-43d9-833b-b5dc72f2134c",
"payment": "d03f50bd-3c9b-4a08-a6d6-27409211a85e",
"reference": "d03f50bd-3c9b-4a08-a6d6-27409211a85e",
"amount": "1000.00",
"currency": "MZN",
"status": "success",
"verified_at": "2026-07-29T10:00:00+00:00"
}
}
Accept success only when order UUID, payment UUID, reference, amount and currency all match the records stored before initialization.
Parameters
All required values are validated before any request is sent to Paystack.
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Valid customer email address used by Paystack. |
amount | number | Yes | Amount in the main currency unit. Must be at least 1. It is multiplied by 100 before being sent to Paystack. |
currency | string | Yes | Currency code accepted by the connected Paystack account, such as ZAR or MZN. |
mode | string | No | Use the exact value test to select Paystack test credentials. If omitted or set to any other value, production credentials are used. |
order | UUID | Yes | Unique order identifier from the external platform. Returned in the final redirect. |
payment | UUID | Yes | Unique payment identifier. It becomes the Paystack transaction reference and cannot be reused. |
customer | object | No | Optional customer information stored in Paystack metadata. |
customer.name | string | No | Customer’s full name. |
customer.phone | string | No | Customer’s phone number, preferably in international format. |
metadata | object | No | Additional platform-specific data. Reserved order and payment keys are always overwritten with the validated UUIDs. |
save_payment_method | boolean | No | Explicit consent to retain a reusable card reference after a successful transaction. |
external_customer_id | string | Conditional | Required when saving a method and later required on the one-click endpoint. |
consent | object | Conditional | When saving, send scope=future_on_session and a consent policy version. |
The integrating platform generates and stores both UUIDs before calling the API. Keep them associated with the local order so the final redirect can be reconciled safely.
Successful response
A successful initialization returns HTTP 200. Redirect the customer’s browser to authorization_url. Do not redirect directly to your own success page.
{
"success": true,
"data": {
"authorization_url": "https://checkout.paystack.com/access-code",
"reference": "d03f50bd-3c9b-4a08-a6d6-27409211a85e"
}
}
What to do next
- Store the responseAssociate the returned reference and authorization URL with your order.
- Open PaystackRedirect the customer to the exact
authorization_url. - Wait for confirmationPaystack notifies OrbitWeb Studio through a signed server-to-server webhook.
- Reconcile the paymentOrbitWeb Studio notifies your configured backend URL with the verified
orderandpaymentUUIDs.
HTTP status codes
Validation error example
{
"message": "The payment field must be a valid UUID.",
"errors": {
"payment": [
"The payment field must be a valid UUID."
]
}
}
Callback and final redirect
The Paystack callback belongs to OrbitWeb Studio and is included automatically during initialization. A signed Paystack webhook confirms successful payments even if the customer never returns in the browser. External platforms must not call either endpoint manually and must not send their own callback URL in the payload.
Successful final redirect
https://your-platform.example/checkout-success?order={order_uuid}&payment={payment_uuid}Failed transaction redirect
https://your-platform.example/checkout-success?status=failed&order={order_uuid}&payment={payment_uuid}The final success URL is registered in the OrbitWeb Studio API configuration. It is intentionally not accepted in each request, preventing an attacker from injecting an arbitrary redirect destination.
Integration checklist
- Use HTTPSSend requests only to the official HTTPS API address.
- Protect the Bearer tokenStore it in server-side secrets or environment variables.
- Generate real UUIDsNever use sequential identifiers for
orderorpayment. - Do not trust browser redirectsUpdate local payment state only through your trusted server-side workflow.
- Keep references uniqueEvery payment attempt requires a new payment UUID.
- Do not log secretsRedact authorization headers from application and proxy logs.
Ready to connect your platform?
Contact OrbitWeb Studio to register your success URL and receive a private integration token.