GajaWallet Payment API
Integrate your application with GajaWallet using a simple server-to-server payment API.
Your system communicates only with GajaWallet. Payment provider routing and processing are handled internally by GajaWallet.
Base URL
All GajaWallet API requests use the following base URL.
https://gajawallet.com
Authentication
Merchant API authentication credentials will be provided from your GajaWallet Merchant account.
Payment Flow
The normal GajaWallet payment process consists of four steps.
Merchant sends transaction information to GajaWallet.
Merchant redirects customer to the returned payment URL.
GajaWallet processes the payment using the available payment provider.
Merchant receives payment status notification.
Create Payment
Creates a new payment session.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
merchant_code |
string | YES | Your GajaWallet merchant code. |
merchant_order_id |
string | YES | Unique order ID generated by your system. |
source_amount |
number | YES | Payment amount in source currency. |
merchant_gross_amount |
number | YES | Gross merchant transaction amount. |
fx_rate |
number | OPTIONAL | FX rate when applicable. |
payor_name |
string | YES | Customer name. |
payor_email |
string | OPTIONAL | Customer email address. |
return_url |
string | OPTIONAL | URL where the customer may return after payment. |
Example Request
{
"merchant_code": "MERCHANT001",
"merchant_order_id": "ORDER-20260912-001",
"source_amount": 100000,
"merchant_gross_amount": 9000,
"fx_rate": 11.1111,
"payor_name": "John Doe",
"payor_email": "john@example.com",
"return_url": "https://merchant.example.com/payment/return"
}
Example Response
{
"session_id": 1024,
"payment_url": "https://gajawallet.com/session/example-token",
"status": "pending"
}
payment_url
returned by GajaWallet.
Payment Status
Retrieves the current status of a payment session.
Example
GET https://gajawallet.com/session/SESSION_TOKEN/status
Example Response
{
"status": "completed"
}
Hosted Payment Page
Customers complete their payment on the GajaWallet hosted payment page.
Normally merchants do not need to manually construct this URL.
Use the payment_url returned by
Create Payment API.
Payment Webhook
GajaWallet sends a server-to-server notification when the payment reaches an important transaction state.
Completed Payment Event
{
"event": "payment.completed",
"merchant_order_id": "ORDER-20260912-001",
"status": "completed"
}
Payment Status
| Status | Description |
|---|---|
| pending | Payment is waiting for customer/provider processing. |
| completed | Payment has been successfully completed. |
| expired | Payment session is no longer valid. |
Error Handling
GajaWallet uses standard HTTP status codes.
| HTTP Code | Description |
|---|---|
200 |
Request processed successfully. |
400 |
Invalid request. |
401 |
Authentication failed. |
404 |
Requested resource was not found. |
422 |
Request validation failed. |
500 |
Internal server error. |