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.

CredentialFormatWhere it lives
Merchant IDSANDBOX_MERCHANT_001Request header X-Merchant-Id
API keypk_test_…Request header X-Api-Key
API secretsk_test_…Backend configuration only. Used to sign requests.
Result / webhook secretwhsec_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 numberExpiryCVV3DS OTPExpectedCodeMessage
4000 0000 0000 0002Visa12/34123111111APPROVED000Approved
5100 0000 0000 0008Mastercard12/34123111111APPROVED000Approved
4000 0000 0000 1166Visa12/34123111111DECLINED116Decline, not sufficient funds
4000 0000 0000 1299Visa12/34123111111DECLINED129Suspected counterfeit card; manual review flag
4000 0000 0000 1257Visa12/34999111111DECLINED125CVV/CVC check failed
4000 0000 0000 0549Visa01/20123111111DECLINED054Expired card
4000 0000 0000 0911Visa12/34123111111PENDING091Issuer or acquirer temporarily unavailable
4000 0000 0000 7775Visa12/34123000000DECLINED3DS_FAILED3DS authentication failed
4000 0000 0000 8880Visa12/34123111111PENDINGTIMEOUTSimulated acquirer timeout; retry status check
4000 0000 0000 9995Visa12/34123111111DECLINEDCANCELLEDCustomer cancelled on the payment page
5200 0000 0000 1161Mastercard12/34123111111DECLINED116Decline, not sufficient funds
5300 0000 0000 1293Mastercard12/34123111111DECLINED129Suspected 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.

IDScenarioCardActionExpected result
T01Approved Visa4000 0000 0000 0002Complete 3DS with OTP 111111.APPROVED, final=true, paymentApproved=true, resultCode=000
T02Approved Mastercard5100 0000 0000 0008Complete 3DS with OTP 111111.APPROVED, final=true, resultCode=000
T03Insufficient funds4000 0000 0000 1166Complete 3DS with OTP 111111.DECLINED, resultCode=116
T04Suspected counterfeit4000 0000 0000 1299Complete 3DS with OTP 111111.DECLINED, resultCode=129, requiresManualReview=true
T05Wrong CVV/CVC4000 0000 0000 1257Use CVV 999.DECLINED, resultCode=125
T06Expired card4000 0000 0000 0549Use expiry 01/20.DECLINED, resultCode=054
T073DS failure4000 0000 0000 7775Use OTP 000000 or cancel 3DS.DECLINED, resultCode=3DS_FAILED
T08Acquirer timeout4000 0000 0000 8880Complete as the simulator instructs.PENDING first; the status check stays safe to retry
T09Customer cancellation4000 0000 0000 9995Cancel on the payment page.DECLINED or CANCELLED by result mapping
T10Duplicate payment IDAny approved cardCall paymentinit twice with the same merchantPaymentId.Second call returns DUPLICATE_MERCHANT_PAYMENT_ID
T11Invalid signature—Send a wrong X-Signature.Fails with AUTH_FAILED or SIGNATURE_INVALID
T12Unsupported currency—Send an unsupported currency.Validation error; no payment page is created

Result URL tests

IDTestHow to runRequired result
R01POST, approvedresultDeliveryMethod=POST, approved card.POST fields with final=true and paymentApproved=true.
R02POST, declinedresultDeliveryMethod=POST, decline card.POST fields with final=true and paymentApproved=false.
R03GET, approvedresultDeliveryMethod=GET, approved card.The browser returns with result fields in the query string.
R04Browser closedClose the browser after the attempt, then call the status check.You reconcile the final status through the API.
R05Result URL downMake 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.