External integration

OrbitWeb Studio Paystack API

Initialize Paystack payments from an external platform while OrbitWeb Studio securely controls transaction verification and the final redirect.

ProtocolHTTPS / JSON
AuthenticationBearer token
API status Available
01 — Access

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.

Server-to-server only

Never place the Bearer token in JavaScript, a mobile application, a public repository or any browser request. Your backend must call this API.

1Request integration access from OrbitWeb Studio.
2Store the supplied Bearer token securely.
3Provide the final success URL for your platform.
4Generate unique order and payment UUIDs.
02 — Quick start

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
curl --request POST 'https://www.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"
    }
  }'
03 — Endpoint

Initialize payment

POST /api/payments/initialize

Required headers

HeaderValuePurpose
AuthorizationBearer {token}Authenticates the external platform.
Acceptapplication/jsonRequests JSON responses, including validation errors.
Content-Typeapplication/jsonIdentifies the request body as JSON.
04 — Saved authorization

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.

POST /api/payments/one-click
cURL
curl --request POST 'https://www.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"
  }'
Customer binding is mandatory

The external customer identifier and test/production mode must match the saved instrument. A unique payment UUID is required for every attempt.

04 — Verification endpoint

Read payment status

After the browser returns to your platform, confirm the payment from your backend before changing local order state.

GET /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.

200 OK · JSON
{
  "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"
  }
}
Reconcile every field

Accept success only when order UUID, payment UUID, reference, amount and currency all match the records stored before initialization.

05 — Request body

Parameters

All required values are validated before any request is sent to Paystack.

ParameterTypeRequiredDescription
emailstringYes Valid customer email address used by Paystack.
amountnumberYes Amount in the main currency unit. Must be at least 1. It is multiplied by 100 before being sent to Paystack.
currencystringYes Currency code accepted by the connected Paystack account, such as ZAR or MZN.
modestringNo Use the exact value test to select Paystack test credentials. If omitted or set to any other value, production credentials are used.
orderUUIDYes Unique order identifier from the external platform. Returned in the final redirect.
paymentUUIDYes Unique payment identifier. It becomes the Paystack transaction reference and cannot be reused.
customerobjectNo Optional customer information stored in Paystack metadata.
customer.namestringNo Customer’s full name.
customer.phonestringNo Customer’s phone number, preferably in international format.
metadataobjectNo Additional platform-specific data. Reserved order and payment keys are always overwritten with the validated UUIDs.
save_payment_methodbooleanNo Explicit consent to retain a reusable card reference after a successful transaction.
external_customer_idstringConditional Required when saving a method and later required on the one-click endpoint.
consentobjectConditional When saving, send scope=future_on_session and a consent policy version.
UUID ownership

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.

06 — Response

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.

200 OK · JSON
{
  "success": true,
  "data": {
    "authorization_url": "https://checkout.paystack.com/access-code",
    "reference": "d03f50bd-3c9b-4a08-a6d6-27409211a85e"
  }
}

What to do next

  1. Store the responseAssociate the returned reference and authorization URL with your order.
  2. Open PaystackRedirect the customer to the exact authorization_url.
  3. Wait for confirmationPaystack notifies OrbitWeb Studio through a signed server-to-server webhook.
  4. Reconcile the paymentOrbitWeb Studio notifies your configured backend URL with the verified order and payment UUIDs.
07 — Errors

HTTP status codes

401Bearer token is absent, invalid or not configured.
422One or more request parameters failed validation.
502Paystack rejected the request or could not be reached.
500An unexpected internal error occurred.

Validation error example

422 Unprocessable Entity
{
  "message": "The payment field must be a valid UUID.",
  "errors": {
    "payment": [
      "The payment field must be a valid UUID."
    ]
  }
}
08 — Verification

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.

1External platformInitializes payment
→
2PaystackCollects payment
→
3OrbitWeb Studio APIVerifies transaction
→
4Your platformConfirms status server-to-server

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.

09 — Security

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 order or payment.
  • 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.
Integration support

Ready to connect your platform?

Contact OrbitWeb Studio to register your success URL and receive a private integration token.

Request API access ↗