Quick Start
Get up and running with Chapa API v2 in minutes with this step-by-step guide.
This quick start walks you through the simplest end-to-end payment flow using Chapa API v2:
Initialize payment → Redirect customer → Verify payment
This flow applies to Hosted Checkout, which is the recommended starting point.
Step 1: Create a Chapa Account
Create (or sign in to) your merchant account on the Chapa Dashboard.

From the dashboard, you'll be able to:
- Manage API keys
- Switch between Test and Live modes
- View payments, payouts, refunds, and webhooks
Step 2: Use Test Mode for Development
Chapa supports two environments:
| Mode | Description |
|---|---|
| Test Mode | No real money is moved |
| Live Mode | Real transactions |
Always start in Test mode while building and validating your integration. Switch to Live mode only when you're ready to accept real payments.
Do not mix test and live keys — this will cause authentication errors.
Step 3: Get Your API Keys
From your dashboard, navigate to:
You'll find:
| Key Type | Usage |
|---|---|
| Private Key | Used on your server to authorize API requests. Never expose this in frontend code. |
| Public Key | Used only for client-side integrations (e.g., Inline.js) |
Step 4: Prepare Payment Details
Before initializing a payment, collect the required payment information.
Required Parameters
| Parameter | Description |
|---|---|
amount | Amount in integer cents, minimum 100 |
currency | Supported currency code |
Supported Currencies
| Code | Currency |
|---|---|
USD | US Dollar |
UGX | Ugandan Shilling |
ETB | Ethiopian Birr |
DJF | Djiboutian Franc |
Optional Parameters (Recommended)
| Parameter | Description |
|---|---|
merchant_reference | Your unique payment reference, maximum 20 characters |
customer | Customer details object |
customer.first_name | Customer's first name |
customer.last_name | Customer's last name |
customer.email | Customer's email address |
customer.phone_number | Customer's phone number |
preferred_payment_methods | Array of preferred payment methods |
meta | Internal metadata (order ID, notes) |
Phone number is required for some payment methods and high-risk businesses and must follow international format (e.g., +251960724272).
Step 5: Initialize the Payment (Server-Side)
Call the Hosted Payment endpoint from your backend to generate a checkout URL.
Endpoint:
POST https://api.chapa.global/v2/payments/hostedHeaders:
Authorization: Bearer <CHAPA_PRIVATE_KEY>
Content-Type: application/json
Idempotency-Key: <UNIQUE_OPERATION_KEY>For cURL, set PRIVATE_KEY in your shell. Set IDEMPOTENCY_KEY for this operation and reuse it on retries. Replace the placeholders in the JavaScript example before running it.
{
"amount": 10000,
"currency": "ETB",
"merchant_reference": "ref-1791192600",
"preferred_payment_methods": [
"telebirr"
],
"customer": {
"first_name": "Abebe",
"last_name": "Kebede",
"email": "abebe.kebede@example.com",
"phone_number": "251911000000"
},
"callback_url": "https://example.com/chapa/callback",
"return_url": "https://example.com/chapa/return",
"meta": {
"order_id": "ORD-1001"
},
"customization": {
"title": "Order #1001",
"description": "Payment for order 1001",
"logo": "https://example.com/logo.png"
}
}curl -X POST 'https://api.chapa.global/v2/payments/hosted' \
-H "Authorization: Bearer $PRIVATE_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 10000,
"currency": "ETB",
"merchant_reference": "ref-1791192600",
"preferred_payment_methods": [
"telebirr"
],
"customer": {
"first_name": "Abebe",
"last_name": "Kebede",
"email": "abebe.kebede@example.com",
"phone_number": "251911000000"
},
"callback_url": "https://example.com/chapa/callback",
"return_url": "https://example.com/chapa/return",
"meta": {
"order_id": "ORD-1001"
},
"customization": {
"title": "Order #1001",
"description": "Payment for order 1001",
"logo": "https://example.com/logo.png"
}
}'const response = await fetch("https://api.chapa.global/v2/payments/hosted", {
method: "POST",
headers: {
"Authorization": "Bearer <PRIVATE_KEY>",
"Idempotency-Key": "<IDEMPOTENCY_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"amount": 10000,
"currency": "ETB",
"merchant_reference": "ref-1791192600",
"preferred_payment_methods": [
"telebirr"
],
"customer": {
"first_name": "Abebe",
"last_name": "Kebede",
"email": "abebe.kebede@example.com",
"phone_number": "251911000000"
},
"callback_url": "https://example.com/chapa/callback",
"return_url": "https://example.com/chapa/return",
"meta": {
"order_id": "ORD-1001"
},
"customization": {
"title": "Order #1001",
"description": "Payment for order 1001",
"logo": "https://example.com/logo.png"
}
})
});
const data = await response.json();
console.log(data);Step 6: Redirect the Customer to Checkout
If initialization is successful, Chapa returns a checkout URL:
{
"status": "success",
"message": "Payment initiated successfully",
"data": {
"checkout_url": "https://checkout.chapa.global/CH0Vn2VASWCi",
"created_at": "2026-10-05T09:30:00Z",
"expires_at": "2026-10-06T09:30:00Z"
}
}{
"status": "error",
"message": "Idempotency-Key header is required for payment operations",
"error": {
"code": "MISSING_REQUIRED_FIELD",
"details": null
}
}{
"status": "error",
"message": "Invalid API key or User does not exist",
"error": {
"code": "UNAUTHORIZED",
"details": null
}
}{
"status": "error",
"message": "API key environment does not match business environment.",
"error": {
"code": "INVALID_VALUE",
"details": null
}
}{
"status": "error",
"message": "Merchant reference has been used before",
"error": {
"code": "INVALID_STATE",
"details": null
}
}{
"status": "error",
"message": "Failed to marshal subaccounts",
"error": {
"code": "PROCESSING_FAILED",
"details": null
}
}Redirect your customer to checkout_url to complete the payment on Chapa's hosted checkout page.
Step 7: Listen for Post-Payment Signals
After the customer completes (or abandons) the payment, Chapa may notify you via:
- Redirect back to your application (if configured)
- Webhook events (recommended)
- Dashboard updates
Important: Redirects and webhooks are signals only. You must still verify the payment on your server before fulfilling the order.
Step 8: Verify the Payment Before Fulfillment
Confirm the payment status by verifying the transaction on your server. Use your merchant reference or the Chapa payment reference, which you can find at the end of checkout_url or in the payment webhook payload.
Endpoint:
GET https://api.chapa.global/v2/payments/{paymentReference}/verifyFor cURL, set PRIVATE_KEY in your shell. Replace the placeholders in the JavaScript example before running it.
curl -X GET 'https://api.chapa.global/v2/payments/CH0Vn2VASWCi/verify' \
-H "Authorization: Bearer $PRIVATE_KEY"const response = await fetch("https://api.chapa.global/v2/payments/CH0Vn2VASWCi/verify", {
method: "GET",
headers: {
"Authorization": "Bearer <PRIVATE_KEY>"
},
});
const data = await response.json();
console.log(data);Example Successful Response:
{
"status": "success",
"message": "Payment verification result",
"data": {
"chapa_reference": "CH0Vn2VASWCi",
"merchant_reference": "ref-1759656600",
"amount": 10000,
"currency": "ETB",
"status": "SUCCESS",
"payment_method": "telebirr",
"processor_reference": "TB123456789",
"service_fee": 300,
"customer": {
"first_name": "Abebe",
"last_name": "Kebede",
"email": "abebe.kebede@example.com",
"phone_number": "251911000000"
},
"created_at": "2026-10-05T09:30:00Z",
"updated_at": "2026-10-05T09:30:00Z"
}
}{
"status": "error",
"message": "Customer not found",
"error": {
"code": "NOT_FOUND",
"details": null
}
}{
"status": "error",
"message": "Invalid API key or User does not exist",
"error": {
"code": "UNAUTHORIZED",
"details": null
}
}{
"status": "error",
"message": "API key environment does not match business environment.",
"error": {
"code": "INVALID_VALUE",
"details": null
}
}{
"status": "error",
"message": "Payment not found",
"error": {
"code": "NOT_FOUND",
"details": null
}
}Before fulfillment, confirm data.status === "SUCCESS" and match the amount, currency, and payment reference to the expected order. Only then should you:
- Mark the order as paid
- Deliver goods or services
- Update your internal records
Best Practices
Do
- Always verify payments server-side
- Use authenticated webhooks to trigger server-side verification
- Use unique
merchant_referencevalues - Use idempotency keys for retries
Don't
- Never trust frontend success alone
- Never expose private keys in client-side code
Next Steps
- Hosted Checkout - Full payment integration guide
- Dashboard Overview - Manage your payments from the dashboard
- v1 Documentation - Legacy API documentation