Collection - Standard Checkout
Redirect customers to JGME Pay hosted checkout using a server-side API request.
Standard checkout is a redirect flow:
- Your backend creates a checkout session.
- JGME Pay returns a checkout URL.
- You redirect the customer to that URL.
- Customer completes payment and JGME Pay notifies your system via webhook.
Why Use Standard Checkout?
Fastest Launch
Minimal frontend complexity. Your backend creates a checkout and redirects users.
Hosted Experience
JGME Pay handles payment method UI and provider-specific interactions.
Reliable Status Updates
Use webhook events and transaction verification for final payment outcomes.
Integration Steps
Collect payment details on your backend
Prepare required fields like amount, currency, country, and customer information.
Create checkout session
Send a request to POST /payments/v1/checkouts with your client-id and client-secret.
Redirect customer
Redirect users to data.shortURL (or data.url) from the response.
Confirm final status
Process webhook notifications and/or verify transaction status before order fulfillment.
Create Checkout Request
curl --location 'https://api.jgmepay.com/payments/v1/checkouts' \
--header 'client-id: <client-id>' \
--header 'client-secret: <client-secret>' \
--header 'Content-Type: application/json' \
--data '{
"reference": "ORDER-1001",
"amount": 50000,
"currency": "NGN",
"country": "NG",
"redirectURL": "https://yourapp.com/payment/complete",
"webhook": "https://yourapp.com/webhooks/jgmepay",
"user": {
"email": "customer@example.com",
"phoneNumber": "2348012345678",
"name": "John Doe"
}
}'Sample response:
{
"data": {
"url": "https://checkout.jgmepay.com/payfusion/66579afe04916ddcfcf73e7b",
"shortURL": "https://l.6bd.co/XXXXX",
"reference": "ORDER-1001",
"amount": 50000
}
}Parameter Reference
| Field | Type | Required | Description |
|---|---|---|---|
reference | string | Recommended | Unique transaction identifier from your system |
amount | integer | Yes | Amount in minor units (no decimals) |
currency | string | Yes | ISO currency code (for example NGN) |
country | string | Yes | ISO country code (for example NG) |
user | object | Yes | Customer object (email/phone/name fields) |
redirectURL | string | No | Customer return URL after checkout |
webhook | string | No | Per-transaction webhook override URL |
metadata | object | No | Custom fields for your internal tracking |
Amount Rule (Important)
JGME Pay does not support decimal API amounts. Send integer minor-unit values only.
500.00 NGN->500001250.75 NGN->125075
See Amount Specification for full conversion rules.
After Redirect and Payment
After checkout, customer is redirected to your redirectURL with transaction context such as status and reference.
If webhooks are configured, JGME Pay sends asynchronous status updates to your webhook endpoint.
For critical flows, verify transaction status from your backend before shipping goods or crediting wallets.
If payment fails, allow user retry and keep your order state pending until final success is confirmed.
Production Best Practices
| Practice | Why It Matters |
|---|---|
| Generate references server-side | Prevent duplicate references and improve reconciliation |
| Process webhook idempotently | Avoid duplicate order fulfillment on retries |
| Validate redirect parameters | Protect against malformed/forged client-side values |
| Use backend verification | Ensure final status before business-critical actions |