Getting started
This tutorial walks through authenticating and creating a payment with cURL. Replace placeholders with your sandbox credentials and base URL. Prerequisites: Active Vpay terminal credentials (client_id, client_secret) and HTTPS access to {sandboxBaseUrl}.
1. Confirm base URL
Use your sandbox or production Payment Gateway host:https://sandbox.example.com
2. Obtain an access token
token for subsequent requests. See Authentication.
3a. Integrated checkout — start payment
3b. Payment link — generate link
4. Open checkout in the browser
Integrated checkout:paymentLink URL from step 3b, or:
callbackSuccessUrl or callbackFailUrl (integrated checkout).
5. Query payment status
After the payer returns to your site, confirm the final state from your backend:state values.
6. Next steps
Integrated checkout
Full redirect flow and callbacks.
Payment links
Shareable URLs and expiration.
API reference
Endpoint details and field tables.
Testing
Sandbox cards and Swagger.
Common issues
| Symptom | Likely cause | Action |
|---|---|---|
401 Unauthorized | Missing, expired, or invalid Bearer token | Call POST /api/public/security/auth again |
400 validation errors | Required fields missing or invalid amounts | Check Conventions and validators |
VPAY_001 | Duplicate transactionReferenceNumber | Use a new unique reference per payment |
VPAY_005 | Terminal not registered or inactive | Contact Vpay support with your client_id |

