Paystack API Reference

The Paystack API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Base URL

All API requests are made to the following base URL:

https://api.paystack.co

Authentication

Authenticate your API calls by including your secret key in the Authorization header of every request:

Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxx

You can find your API keys in the Paystack Dashboard. Use sk_test_ keys in development and sk_live_ keys in production.

Request format

The API accepts application/json encoded request bodies. All monetary amounts must be in the lowest currency unit — for NGN, amounts are in kobo (₦1 = 100 kobo).

Response format

All responses are JSON. Successful responses include a status: true field and a data object. Error responses include status: false and a message explaining the error.

POST/transaction/initialize
curl https://api.paystack.co/transaction/initialize   -H "Authorization: Bearer sk_test_xxxx"   -H "Content-Type: application/json"   -X POST   -d '{"email":"[email protected]","amount":50000}'
Response
{
  "status": true,
  "message": "Authorization URL created",
  "data": {
    "authorization_url": "https://checkout.paystack.com/0peioxfhpn",
    "access_code": "0peioxfhpn",
    "reference": "7PVGX8MEk85tgeEpVDtD"
  }
}