Launch and grow your payment experience with PAYSEED
Integrate PAYSEED to accept payments, verify transactions, process refunds, and manage your account programmatically.
PAYSEED uses API keys for authentication. Include your secret key in the Authorization header of every request:
Authorization: Bearer PS_SK_TEST_xxxxxxxxImportant: Never expose your secret key in client-side code, browser storage, or public repositories.
Secret keys (PS_SK_*) must only be used on your backend. Public keys (PS_PK_*) may be used in client-facing components.
All monetary amounts in the PAYSEED API are expressed in the smallest currency unit (e.g., pesewas for GHS, kobo for NGN). This avoids floating-point rounding errors.
Example conversions:
GHS 250.00 → amount: 25000 (250 × 100 pesewas)NGN 1,500.00 → amount: 150000 (1500 × 100 kobo)GHS 1.00 → amount: 100/api/v1/payments/initialize/api/v1/payments/:reference/api/v1/payments/:reference/refund/api/v1/transactions/api/v1/customers/api/v1/payment-links/api/v1/settlements/api/v1/payments/initializeamount currency email reference callback_url metadata curl -X POST https://api.payseed.example/v1/payments/initialize \
-H "Authorization: Bearer PS_SK_TEST_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"amount": 50000,
"currency": "GHS",
"email": "customer@example.com",
"reference": "merchant_unique_reference",
"callback_url": "https://merchant.example.com/payment-return",
"metadata": {
"order_id": "ORDER-1024"
}
}'{
"status": true,
"message": "Payment session created",
"data": {
"reference": "PS_TEST_123456789",
"checkout_url": "https://checkout.payseed.example/PS_TEST_123456789",
"status": "initiated"
}
}Never mark a payment as successful simply because the customer was redirected to your callback URL. Always verify the payment using one of these methods:
GET /api/v1/payments/:reference from your backend and check the status, amount, and currency match your records.payment.successful webhook event, verify its signature, and confirm the transaction details before delivering value.Critical rule
Customers must only be credited after a verified server-side payment confirmation — never because the payment page redirects them back. PAYSEED verifies the transaction directly with the upstream provider and checks the reference, amount, and currency before confirming a payment.
PAYSEED sends signed webhook events to your configured endpoints. Available events:
Each webhook delivery includes a Payseed-Signature header. Verify it by computing an HMAC-SHA256 of the request body using your webhook signing secret:
import crypto from 'crypto';
const signature = crypto
.createHmac('sha256', WEBHOOK_SECRET)
.update(rawBody)
.digest('hex');
if (signature !== request.headers['payseed-signature']) {
return res.status(401).send('Invalid signature');
}| Code | Description |
|---|---|
| 200 | Successful request |
| 201 | Resource created successfully |
| 400 | Bad request — invalid parameters |
| 401 | Unauthorized — invalid or missing API key |
| 404 | Resource not found |
| 409 | Conflict — duplicate reference or idempotency key |
| 429 | Rate limit exceeded |
| 500 | Server error — please retry |
List endpoints return 25 items per page. Use page and per_page query parameters for pagination.
Rate limit: 100 requests per minute per API key. Responses include X-RateLimit-Remaining and X-RateLimit-Reset headers.
Use the Idempotency-Key header to prevent duplicate operations. PAYSEED stores the key for 24 hours and returns the original response for duplicate requests.
npm install payseedcomposer require payseed/payseedpip install payseedgo get payseed