Create Payment
Use the payments API to create and verify payments from your backend.
Create Payment
Use the payments API to create and verify payments from your backend.
Method: POST Endpoint: /api/v1/payments/create
Example request
POST https://api.jjuma.com/api/v1/payments/create
{
"amount": 50000,
"currency": "UGX",
"description": "Premium content access",
"customer_name": "John Doe",
"customer_email": "john@example.com",
"redirect_url": "https://yourwebsite.com/success",
"return_url": "https://yourwebsite.com/success",
"cancel_redirect_url": "https://yourwebsite.com/failed",
"webhook_url": "https://yourwebsite.com/webhooks/jjuma"
}
- Required: amount greater than zero, enabled 3-letter ISO currency code, and customer_name.
- Optional: description, customer email/phone, redirect_url, return_url, cancel_redirect_url, webhook_url, metadata, external order ID, idempotency key, and provider.
- Currency is case-insensitive, stored uppercase, and rejected when unsupported or disabled in admin settings.
- Use redirect_url or return_url for the browser Continue flow. Use webhook_url for server-to-server payment updates. callback_url remains a legacy browser-return alias for older integrations.
Example response
{
"status": "success",
"data": {
"transaction_id": "TXN-A1B2C3D4E5F6",
"reference": "REF-12345678",
"payment_url": "https://pay.jjuma.com/pay/TXN-A1B2C3D4E5F6",
"status": "pending"
}
}