Sandbox Testing
Use the sandbox to build and test your integration end to end before go-live. Sandbox and production are separate: credentials, sessions and data do not carry across.
Environments
| Environment | Widget base URL | Purpose |
|---|---|---|
| Sandbox | https://vas-widget-sandbox.pagamio.tech | Development and testing. |
| Production | Provided at go-live | Live customers and real money. |
In the sandbox, purchases run against the Pagamio VAS sandbox, so no real product is delivered. Point your wallet integration at your own test wallet API; Pagamio's sandbox calls it exactly as production will.
Widget URLs look like https://vas-widget-sandbox.pagamio.tech/w/{partnerCode}/. Server-to-server calls go to https://vas-widget-sandbox.pagamio.tech/partner/v1/....
Test Plan
Run at least these scenarios and confirm both the widget and your own ledger.
| # | Scenario | How to trigger | Expect |
|---|---|---|---|
| 1 | Session and launch | Create a session, or sign a launch token, and open the URL. | Widget shows your branding and the categories. |
| 2 | Successful purchase | Buy a low-value product with a funded test wallet. | Receipt shown; wallet hold then capture; transaction.completed bridge event; transaction COMPLETED. |
| 3 | Insufficient funds | Use a test wallet with too little balance. | "Insufficient funds in your wallet."; no deduction; transaction.failed event; failureCode INSUFFICIENT_FUNDS. |
| 4 | Inactive wallet | Use a blocked or inactive test wallet. | "Your wallet is not active. Please contact our support." |
| 5 | Unknown customer | Use a customer your wallet does not know. | "We couldn't find a wallet for your account. Please contact our support." |
| 6 | Provider failure | Buy a sandbox product that fails (ask Pagamio for a test product or number). | Hold released; purchase failed; wallet balance restored. |
| 7 | Replayed hold/capture | Have your wallet receive the same reference twice (a retry). | No double movement; idempotent response. |
| 8 | Slow wallet | Delay your wallet response beyond the read timeout. | Hold confirmed by query and the purchase continues, or the purchase fails with a timeout message and a hold found by query is released. Without a query endpoint, the hold lapses at its TTL. |
| 9 | Close and return | Close the widget in web-view, iframe and (for launch) with return_url. | Bridge close event received, or redirect to return_url. |
| 10 | Expired session | Wait past the idle timeout, then act in the widget. | "Your session has expired"; open a new session. |
| 11 | Statement | Fetch yesterday's payment legs. | Your ledger matches each outcome. |
For sandbox test products, test numbers and funded test customers, ask your Pagamio contact. Never test with real customer data.
Debugging Checklist
| Symptom | Check |
|---|---|
401 UNAUTHORIZED on /partner/v1 | Header is Authorization: ApiKey pk_... (not Bearer); key is for this environment. |
403 FORBIDDEN | The key lacks the scope (sessions:create, transactions:read, reconciliation:read). |
| "This link is no longer valid" after a launch | See common rejections. |
| Widget refuses to load in an iframe | Your page origin is not on the allowed origins list, or includes a path. |
| Purchase fails with "Something went wrong" | Your wallet returned a 4xx without a recognised reason; check your wallet logs for the X-Correlation-Id. |
| Hold stays with no capture | Capture or release is being retried; check your wallet API's availability. See Timing Requirements. |
When contacting Pagamio support, include your partner code, the environment, the approximate time, the transaction id or payment-leg reference, and the X-Correlation-Id if you have it. Never send API keys, launch secrets or tokens.
Last updated: September 2026