v1.1TESTING
Sandbox and test cards
Sandbox credentials, synthetic test cards and the mandatory test plan for developers and QA teams.
01 · SANDBOX
Sandbox credentials
MultiPrime issues sandbox credentials for your merchant: a merchant ID, an API key, an API secret and a result/webhook secret. Use one sandbox merchant at a time.
| Credential | Format | Where it lives |
|---|---|---|
| Merchant ID | SANDBOX_MERCHANT_001 | Request header X-Merchant-Id |
| API key | pk_test_… | Request header X-Api-Key |
| API secret | sk_test_… | Backend configuration only. Used to sign requests. |
| Result / webhook secret | whsec_test_… | Backend configuration only. |
Test cards work only in the sandbox simulator and are never enabled in production.
Before you test
- Configure your backend with the sandbox MERCHANT_ID, API_KEY and API_SECRET.
- Set MERCHANT_RESULT_URL and make it accept POST form fields.
- Create payments with BASEURL/cgi-bin/paymentinit.cgi.
- Reconcile with BASEURL/cgi-bin/paymentstatuscheck.cgi.
- Store merchantPaymentId, paymentId, gatewayTransactionId, amount, currency and reference for every test payment.
02 · TEST CARDS
Synthetic test cards
Use any of these cards on the sandbox payment page. Enter the 3DS OTP when asked.
| Card number | Expiry | CVV | 3DS OTP | Expected | Code | Message |
|---|---|---|---|---|---|---|
| 4000 0000 0000 0002Visa | 12/34 | 123 | 111111 | APPROVED | 000 | Approved |
| 5100 0000 0000 0008Mastercard | 12/34 | 123 | 111111 | APPROVED | 000 | Approved |
| 4000 0000 0000 1166Visa | 12/34 | 123 | 111111 | DECLINED | 116 | Decline, not sufficient funds |
| 4000 0000 0000 1299Visa | 12/34 | 123 | 111111 | DECLINED | 129 | Suspected counterfeit card; manual review flag |
| 4000 0000 0000 1257Visa | 12/34 | 999 | 111111 | DECLINED | 125 | CVV/CVC check failed |
| 4000 0000 0000 0549Visa | 01/20 | 123 | 111111 | DECLINED | 054 | Expired card |
| 4000 0000 0000 0911Visa | 12/34 | 123 | 111111 | PENDING | 091 | Issuer or acquirer temporarily unavailable |
| 4000 0000 0000 7775Visa | 12/34 | 123 | 000000 | DECLINED | 3DS_FAILED | 3DS authentication failed |
| 4000 0000 0000 8880Visa | 12/34 | 123 | 111111 | PENDING | TIMEOUT | Simulated acquirer timeout; retry status check |
| 4000 0000 0000 9995Visa | 12/34 | 123 | 111111 | DECLINED | CANCELLED | Customer cancelled on the payment page |
| 5200 0000 0000 1161Mastercard | 12/34 | 123 | 111111 | DECLINED | 116 | Decline, not sufficient funds |
| 5300 0000 0000 1293Mastercard | 12/34 | 123 | 111111 | DECLINED | 129 | Suspected counterfeit card; manual review flag |
03 · TEST COMMANDS
Mandatory test calls
Create a test payment
paymentinit · cURL
curl -X POST "BASEURL/cgi-bin/paymentinit.cgi" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-Merchant-Id: SANDBOX_MERCHANT_ID" \
-H "X-Api-Key: SANDBOX_API_KEY" \
-H "X-Timestamp: 1780000000" \
-H "X-Nonce: 6b45e1f4c3f64a9a9d3e4219cb7f95c1" \
-H "X-Signature: SIGNATURE" \
-d '{
"merchantPaymentId": "QA-ORDER-0001",
"reference": "QA-ORDER-0001",
"amount": "1.00",
"currency": "GEL",
"description": "QA test payment QA-ORDER-0001",
"language": "EN",
"resultUrl": "MERCHANT_RESULT_URL",
"resultDeliveryMethod": "POST",
"saveCard": false
}'Expected response
{
"success": true,
"code": "PAYMENT_PAGE_CREATED",
"paymentId": "GATEWAY_PAYMENT_ID",
"merchantPaymentId": "QA-ORDER-0001",
"gatewayTransactionId": "GATEWAY_TRANSACTION_ID",
"redirectUrl": "HOSTED_PAYMENT_PAGE_URL",
"redirectMethod": "POST",
"redirectParams": {
"trans_id": "GATEWAY_TRANSACTION_ID"
},
"resultUrl": "MERCHANT_RESULT_URL",
"resultDeliveryMethod": "POST"
}Check its status
paymentstatuscheck · cURL
curl -X GET "BASEURL/cgi-bin/paymentstatuscheck.cgi?merchantPaymentId=QA-ORDER-0001" \
-H "Accept: application/json" \
-H "X-Merchant-Id: SANDBOX_MERCHANT_ID" \
-H "X-Api-Key: SANDBOX_API_KEY" \
-H "X-Timestamp: 1780000010" \
-H "X-Nonce: 2e98f878c60e4dfbb94bba4fa65c5e3f" \
-H "X-Signature: SIGNATURE"Expected response
{
"success": true,
"code": "PAYMENT_STATUS_CHECKED",
"final": true,
"paymentApproved": true,
"status": "APPROVED",
"merchantPaymentId": "QA-ORDER-0001",
"resultCode": "000",
"resultCodeType": "APPROVAL",
"resultCodeDescription": "Approved"
}04 · TEST PLAN
Mandatory test scenarios
Run every scenario with amount 1.00 before you ask for live access.
| ID | Scenario | Card | Action | Expected result |
|---|---|---|---|---|
| T01 | Approved Visa | 4000 0000 0000 0002 | Complete 3DS with OTP 111111. | APPROVED, final=true, paymentApproved=true, resultCode=000 |
| T02 | Approved Mastercard | 5100 0000 0000 0008 | Complete 3DS with OTP 111111. | APPROVED, final=true, resultCode=000 |
| T03 | Insufficient funds | 4000 0000 0000 1166 | Complete 3DS with OTP 111111. | DECLINED, resultCode=116 |
| T04 | Suspected counterfeit | 4000 0000 0000 1299 | Complete 3DS with OTP 111111. | DECLINED, resultCode=129, requiresManualReview=true |
| T05 | Wrong CVV/CVC | 4000 0000 0000 1257 | Use CVV 999. | DECLINED, resultCode=125 |
| T06 | Expired card | 4000 0000 0000 0549 | Use expiry 01/20. | DECLINED, resultCode=054 |
| T07 | 3DS failure | 4000 0000 0000 7775 | Use OTP 000000 or cancel 3DS. | DECLINED, resultCode=3DS_FAILED |
| T08 | Acquirer timeout | 4000 0000 0000 8880 | Complete as the simulator instructs. | PENDING first; the status check stays safe to retry |
| T09 | Customer cancellation | 4000 0000 0000 9995 | Cancel on the payment page. | DECLINED or CANCELLED by result mapping |
| T10 | Duplicate payment ID | Any approved card | Call paymentinit twice with the same merchantPaymentId. | Second call returns DUPLICATE_MERCHANT_PAYMENT_ID |
| T11 | Invalid signature | — | Send a wrong X-Signature. | Fails with AUTH_FAILED or SIGNATURE_INVALID |
| T12 | Unsupported currency | — | Send an unsupported currency. | Validation error; no payment page is created |
Result URL tests
| ID | Test | How to run | Required result |
|---|---|---|---|
| R01 | POST, approved | resultDeliveryMethod=POST, approved card. | POST fields with final=true and paymentApproved=true. |
| R02 | POST, declined | resultDeliveryMethod=POST, decline card. | POST fields with final=true and paymentApproved=false. |
| R03 | GET, approved | resultDeliveryMethod=GET, approved card. | The browser returns with result fields in the query string. |
| R04 | Browser closed | Close the browser after the attempt, then call the status check. | You reconcile the final status through the API. |
| R05 | Result URL down | Make MERCHANT_RESULT_URL return an error for a while. | The gateway keeps the final status; you reconcile with the status check. |
05 · GO-LIVE
Acceptance criteria
- paymentinit returns paymentId, gatewayTransactionId, redirectUrl, redirectMethod and redirectParams.
- The customer browser reaches the hosted payment page with the returned redirect data.
- The gateway verifies the status with the acquirer before the result URL delivery.
- The status check returns the same final status that was sent to the result URL.
- Orders are marked paid only when status=APPROVED and paymentApproved=true.
- Declined, pending, failed and unknown payments are never marked paid.
- A duplicate merchantPaymentId is rejected or returns the existing payment.
- Requests with invalid signatures are rejected.
Passed every test?
Send us your results, and we will issue live credentials for your merchant.