Testing
Testing guide for JGME Pay integrations, including provider simulators, webhook validation, and test scenarios.
JGME Pay runs a single live environment. Every request below moves real money, so validate with the smallest amount your providers accept and reverse anything you do not need.
Test Setup
Use the API base URL
API base URL: https://api.jgmepay.com
Use your API credentials
Get your client-id and client-secret from Settings -> Security -> API Keys and Webhooks in https://merchant.jgmepay.com.
Set webhook endpoint
Configure a test callback URL so you can validate async transaction updates.
What To Validate Before Go-Live
Auth and Headers
Confirm all requests include client-id and client-secret.
Amount Format
Confirm you send integer minor-unit values only. Decimals are not supported.
Status Lifecycle
Validate pending/processing to final states (success or failed) in your
business flow.
Webhook Handling
Verify signature validation, retries, idempotency, and response timing.
Core Test Scenarios
| Scenario | Expected Result |
|---|---|
| Valid charge request | 201 response with transaction reference |
| Invalid credentials | Authentication failure (401/403) |
| Decimal amount sent | Validation/provider failure |
| Duplicate reference | 409 with DuplicateTransactionReference |
| Invalid provider slug | Error with InvalidProvider |
| Webhook delivery | Callback received and processed once (idempotent) |
Simulate Success, Failed, and Pending Outcomes
Simulated outcomes are not available on a live environment: a transaction
resolves to whatever the provider returns. Exercise the failed and pending
branches of your integration against your own test doubles, and use the status
endpoint or webhooks to confirm the real lifecycle end to end.
When testing pending flows, do not treat the initial API response as final. Wait for webhook updates or verify the transaction status from your backend before marking the transaction as success or failed.
Card Test Details
Test card numbers are not available on a live environment. Validate the PIN, OTP and 3DS branches with a real card and the smallest amount your acquirer accepts, then refund it.
Provider-Specific Test Data
Provider test simulators are not available on a live environment. Coordinate a test window with tech@jgmepay.com before exercising a new provider end to end.
Quick Test Request
curl --location 'https://api.jgmepay.com/payments/v1/checkouts' \
--header 'client-id: <your-client-id>' \
--header 'client-secret: <your-client-secret>' \
--header 'Content-Type: application/json' \
--data '{
"reference": "test-001",
"amount": 10000,
"currency": "NGN",
"country": "NG",
"user": {
"phoneNumber": "08012345678"
}
}'