SDKs
ZuriPay provides a REST API that can be consumed from any programming language using standard HTTP clients.
ZuriPay does not currently offer official SDK packages. The API is designed as a straightforward REST interface that works with any HTTP client. The examples throughout this documentation use cURL, JavaScript (fetch), and Python (requests).
Recommended HTTP clients
| Language | Library | Install |
|---|---|---|
| JavaScript/Node.js | Built-in fetch or axios | npm install axios |
| Python | requests | pip install requests |
| PHP | cURL or Guzzle | composer require guzzlehttp/guzzle |
| Ruby | Net::HTTP or httparty | gem install httparty |
| Go | net/http (built-in) | N/A |
Base URLs
All API requests should be made to the following base URLs:
- Production:
https://api.zuripay.app - Sandbox:
https://staging.zuripay.app
Common headers
Every request to the ZuriPay API should include these headers:
- Name
Authorization- Type
- string
- Description
Your API key as a Bearer token:
Bearer sk_live_your_api_key.
- Name
Content-Type- Type
- string
- Description
Must be
application/jsonfor all POST/PUT requests.
Example: Complete payment flow
Here is a complete example showing how to initialize a transaction, then verify its status:
Initialize and verify a transaction
// Step 1: Initialize a transaction
const initResponse = await fetch(
'https://api.zuripay.app/v1/transactions',
{
method: 'POST',
headers: {
'Authorization': 'Bearer sk_live_your_api_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
amount: 5000,
email: '[email protected]',
currency: 'USD',
success_url: 'https://yoursite.com/success',
failure_url: 'https://yoursite.com/failure',
}),
}
)
const { transaction_reference } = await initResponse.json()
// Step 2: Verify the transaction
const verifyResponse = await fetch(
`https://api.zuripay.app/v1/transactions/verify?reference=${transaction_reference}`,
{
headers: {
'Authorization': 'Bearer sk_live_your_api_key',
},
}
)
const verification = await verifyResponse.json()
console.log(verification.status) // "pending", "success", or "failed"