Skip to main content

Swirepay API Documentation

Welcome to the Swirepay API documentation. This site provides comprehensive API reference docs for all Swirepay services.

Base URL

All API requests are made to:

https://api.swirepay.com

Authentication

Every request must include your API key in the x-api-key header:

curl -H "x-api-key: sk_live_your_api_key_here" https://api.swirepay.com/v1/customer

Response Format

Success Response

All successful responses follow a standard envelope:

{
"message": "OK",
"entity": { ... },
"responseCode": 200,
"status": "SUCCESS"
}

For paginated list endpoints, the entity contains pagination metadata:

{
"message": "OK",
"entity": {
"content": [ ... ],
"pageable": { "pageNumber": 1, "pageSize": 10, ... },
"totalElements": 100,
"totalPages": 10,
...
},
"responseCode": 200,
"status": "SUCCESS"
}

Error Response

Error responses have a different structure:

{
"dateTime": 1773043315925,
"status": "58e1612f8e683d0b:FAILED",
"responseCode": 401,
"message": "The apikey is invalid",
"messageCode": "5062",
"actionRequired": null,
"exceptionReason": "The apikey is invalid",
"exception": null
}

Webhooks

Subscribe to HTTPS notifications for payments, refunds, disputes, transfers, inventory, and more. Configure endpoints in Developer → Webhooks in the dashboard and verify deliveries using x-swirepay-event and x-swirepay-signature.

API modules

ModuleGuidesAPI reference
Payment CenterPayment Center guidesPayment Center API
Transfer CenterTransfer Center guidesTransfer Center API