Developer platform
Integrate Once. Unlock More.
A REST API over HTTPS with JSON payloads, idempotent writes and signed webhooks. Every endpoint on this page is an illustrative example of the intended contract until production access is issued.
Authentication
Bearer API keys, scoped per environment. Secret keys stay on your server and are never exposed to the browser.
Predictable objects
Payments, payouts and settlements share consistent identifiers, amounts and status values.
Idempotency
Send an Idempotency-Key with every write so a retry cannot create a duplicate transaction.
Endpoints
/v1/paymentsCreate a collection. Create a pay-in request against an enabled local method.
/v1/payoutsRequest a payout. Disburse to a wallet or bank beneficiary.
/v1/transactions/{id}Retrieve a transaction. Read the current state and full history of a transaction.
/v1/balanceRead merchant balance. Collected, pending, reserved and available balances by currency.
Example endpoints. The production API contract will be published when it is available.
Developer platform
Integrate Once. Unlock More.
A REST API with predictable objects, idempotent writes and signed webhooks. Add a payment method by enabling it for your account, not by rewriting your integration.
/v1/payments
Create a pay-in request against an enabled local method.
/v1/payouts
Disburse to a wallet or bank beneficiary.
/v1/transactions/{id}
Read the current state and full history of a transaction.
/v1/balance
Collected, pending, reserved and available balances by currency.
Authentication
Bearer keys scoped per environment.
Webhooks
Signed payloads with retry and replay.
Errors
Stable codes and documented states.
curl -X POST https://api.cvxpay.com/v1/payments \
-H "Authorization: Bearer $CVXPAY_SECRET_KEY" \
-H "Idempotency-Key: 8f14e45f-ceea-467a" \
-H "Content-Type: application/json" \
-d '{
"amount": 250000,
"currency": "BDT",
"method": "bkash",
"reference": "ORDER-10231",
"customer": { "name": "A. Rahman", "phone": "+8801700000000" },
"callback_url": "https://merchant.example/webhooks/cvxpay"
}'Webhooks
Events, signed and retried.
CVXPay sends an HTTPS POST to your endpoint for each state change. Every payload is signed with your webhook secret so you can reject anything that was not sent by us. Failed deliveries are retried with backoff.
payment.createdA collection request has been created.payment.succeededThe channel confirmed the collection.payment.failedThe collection did not complete.payout.createdA payout request has been accepted.payout.succeededThe beneficiary received the funds.payout.failedThe payout was rejected or returned.settlement.completedA settlement has been released to the merchant.// Verify a CVXPay webhook signature
const crypto = require("crypto");
const expected = crypto
.createHmac("sha256", process.env.CVXPAY_WEBHOOK_SECRET)
.update(`${timestamp}.${rawBody}`)
.digest("hex");
const valid = crypto.timingSafeEqual(
Buffer.from(expected),
Buffer.from(signature)
);Sandbox
Build against test credentials first.
Sandbox keys are issued during onboarding. Requests behave like production, but no money moves and no message reaches a real customer. Use simulated wallet numbers and test card values to exercise success, failure and pending states.
- Separate base URL and keys from production
- Simulated success, failure and pending outcomes
- Webhook replay so you can test your handler
Sandbox access is granted after your merchant application is reviewed.
Error codes
| Code | HTTP | Meaning |
|---|---|---|
| invalid_request | 400 | A required field is missing or malformed. |
| authentication_failed | 401 | The API key is missing, invalid or from the wrong environment. |
| method_unavailable | 409 | The requested payment method is not enabled for this merchant. |
| limit_exceeded | 422 | The amount is outside the configured minimum or maximum for the method. |
| duplicate_request | 409 | The idempotency key has already been used with a different payload. |
| not_found | 404 | The referenced transaction or settlement does not exist. |
Start with CVXPay
Your Business.
Our Payment Infrastructure.
Discover payment solutions designed around your business needs.