Quick Start
Create your first payment link and process a test payment in just a few requests.
Requirements
- Test credentials (Sandbox):
Service ID,OAuth Username,OAuth Password
→ How to get them
Step 1: Get an access token
POST https://api-dev.globalpay.uz/v1/merchant/auth
Content-Type: application/json
{
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD"
}
Response:
{
"accessToken": "eyJ...",
"refreshToken": "eyJ...",
"expiresIn": 3600
}
Save the accessToken — you'll need it for all subsequent requests.
Step 2: Create a payment link
POST https://api-dev.globalpay.uz/v1/user-service-tokens
Authorization: Bearer {accessToken}
Content-Type: application/json
{
"serviceId": "YOUR_SERVICE_ID",
"amount": 1000000,
"currency": "UZS",
"externalId": "test-order-001",
"returnUrl": "https://example.com/success",
"failUrl": "https://example.com/fail",
"description": "Test payment"
}
Amount units
Amount is in tiyin: 1 UZS = 100 tiyin.
Example: 10,000 UZS → amount: 1000000
Response:
{
"token": "abc123...",
"paymentUrl": "https://checkout.globalpay.uz/pay/abc123"
}
Step 3: Redirect the user
Open paymentUrl in a browser. Use a test card:
| Card | Number | Expiry | CVV |
|---|---|---|---|
| Uzcard | 8600 0001 0156 0804 | 12/27 | — |
| Visa | 4111 1111 1111 1111 | 12/27 | 123 |
Enter the OTP from SMS (or from the browser console for Humo in Sandbox).
Step 4: Check the status
After the redirect to returnUrl, check the payment status:
GET https://api-dev.globalpay.uz/v1/payment/{id}
Authorization: Bearer {accessToken}
Status SUCCESS means the payment went through. See all statuses: Payment Statuses.
Next steps
- Access & Environments — switching to production
- Payment Statuses — all possible statuses explained
- Testing — full test scenarios and cards
- Payments → Checkout — full documentation