Testing
Before going live, always run a full test in the Sandbox environment.
Test cards
| Card type | Number | Expiry | CVV | OTP |
|---|---|---|---|---|
| Uzcard | 8600 0001 0156 0804 | 12/27 | — | SMS |
| HUMO | 9860 0901 0156 0804 | 01/27 | — | Browser console* |
| Visa | 4111 1111 1111 1111 | 12/27 | 123 | SMS |
| Mastercard | 5555 5555 5555 4444 | 12/27 | 123 | SMS |
* For HUMO cards in Sandbox, the OTP appears in the browser console (F12 → Console): 🔐 TEST OTP CODE: 123456. In Production the OTP is sent via SMS.
warning
Test cards only work in Sandbox. Use the URL api-dev.globalpay.uz.
Test scenarios
Successful payment (Checkout)
- Get an
accessTokenvia/v1/merchant/auth - Create a payment link via
POST /v1/user-service-tokens - Open
paymentUrl, enter the test card and OTP - Check the status via
GET /v1/payment/{id}— should beSUCCESS - Confirm the webhook was received (if configured)
Successful payment (Back2Back)
- Get an
accessToken - Register the card:
POST /v1/card - If
needsVerification: true— confirm OTP:POST /v1/card/confirm/{cardToken} - Initiate payment:
POST /v2/payment/init - Execute payment:
POST /v2/payment/perform - Check status:
GET /v1/payment/{id}
Refund
- Complete a successful payment
- Issue a refund:
POST /v2/payment/revertwith a uniqueexternalIdfor the refund - Check status:
GET /v1/payment/{id}— should beREVERTED
Two-step payment (HOLD)
- Initiate a payment with
captureMode: MANUAL - Execute the payment — status will be
HOLD - Confirm the charge:
POST /v2/payment/capture→ statusSUCCESS
or cancel:POST /v2/payment/void→ statusVOID
Negative scenarios
- Wrong OTP — expect error
4021 - Expired OTP / too many attempts — error
4029 - Insufficient funds — error
6200 - Duplicate
externalId— error1013
Pre-production checklist
- Successful payment processed
- Refund processed
- Webhook received and signature verified
- API errors handled (4xx, 5xx)
- Token refresh implemented (
refreshToken) -
externalIdis unique for every payment - No card data is logged
- Site runs over HTTPS