Skip to main content

Testing

Before going live, always run a full test in the Sandbox environment.

Test cards​

Card typeNumberExpiryCVVOTP
Uzcard8600 0001 0156 080412/27—SMS
HUMO9860 0901 0156 080401/27—Browser console*
Visa4111 1111 1111 111112/27123SMS
Mastercard5555 5555 5555 444412/27123SMS

* 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)​

  1. Get an accessToken via /v1/merchant/auth
  2. Create a payment link via POST /v1/user-service-tokens
  3. Open paymentUrl, enter the test card and OTP
  4. Check the status via GET /v1/payment/{id} — should be SUCCESS
  5. Confirm the webhook was received (if configured)

Successful payment (Back2Back)​

  1. Get an accessToken
  2. Register the card: POST /v1/card
  3. If needsVerification: true — confirm OTP: POST /v1/card/confirm/{cardToken}
  4. Initiate payment: POST /v2/payment/init
  5. Execute payment: POST /v2/payment/perform
  6. Check status: GET /v1/payment/{id}

Refund​

  1. Complete a successful payment
  2. Issue a refund: POST /v2/payment/revert with a unique externalId for the refund
  3. Check status: GET /v1/payment/{id} — should be REVERTED

Two-step payment (HOLD)​

  1. Initiate a payment with captureMode: MANUAL
  2. Execute the payment — status will be HOLD
  3. Confirm the charge: POST /v2/payment/capture → status SUCCESS
    or cancel: POST /v2/payment/void → status VOID

Negative scenarios​

  • Wrong OTP — expect error 4021
  • Expired OTP / too many attempts — error 4029
  • Insufficient funds — error 6200
  • Duplicate externalId — error 1013

Pre-production checklist​

  • Successful payment processed
  • Refund processed
  • Webhook received and signature verified
  • API errors handled (4xx, 5xx)
  • Token refresh implemented (refreshToken)
  • externalId is unique for every payment
  • No card data is logged
  • Site runs over HTTPS