> ## Documentation Index
> Fetch the complete documentation index at: https://docs.grogov.us/llms.txt
> Use this file to discover all available pages before exploring further.

# Sandbox access

> Request a sandbox API key, portal IDs, and test cards.

Use the sandbox at `https://apistagepc.grogov.us` to test your integration without moving real money. GroGov provides credentials on request. There are no shared public API keys.

## Requesting sandbox credentials

Email `support@grogov.us` with your company name and a technical contact. GroGov provides the following credentials and test data:

| You receive | Use it for |
| - | - |
| A sandbox **API key** (`pc_…`) | `Authorization: ApiKey pc_…`, or to obtain an access token at `POST /auth/token` |
| One or more test **`portalId`** values | Select the agency payment configuration for each test payment |
| A list of **test cards** and the outcome each one triggers | Exercising approvals, declines and gateway errors deterministically |

A portal is an agency's payment configuration in GroGov. Use the sandbox `portalId` values supplied for your API account.

Use only test card numbers in the sandbox. Production is the environment for live payments and requires separate access.

## Testing error paths

Your test portals and cards let you reproduce the main outcomes:

| Outcome | How |
| - | - |
| `200`, `status: "succeeded"` | An approving test card |
| `402 PAYMENT_DECLINED` | A declining test card |
| `403 PORTAL_ACCESS_DENIED` | A `portalId` your account is not allowed to use (any random UUID works) |
| `400 VALIDATION_ERROR` | For example, an `amountCents` that does not equal the sum of `lineItems[].amountCents` |
| `501 CAPTURE_NOT_SUPPORTED` | `capture: "auth"` |
| `409 IDEMPOTENCY_MISMATCH` | Reuse an `Idempotency-Key` with a different body |

## Hosted checkout sandbox

[Hosted checkout](/guides/hosted-checkout/overview) needs no API key, but it needs a sandbox portal set up for it. Email `support@grogov.us` with:

* The `https` return and cancel addresses you will test with. A test host works, as long as it uses `https`.
* Your site's origin, if you will show the checkout in an iframe.

GroGov replies with:

| You receive | Use it for |
| - | - |
| A sandbox **`portal_id`** with hosted checkout turned on | `portal_id` in your checkout requests to `https://apistagepc.grogov.us` |
| The portal's **signing secret** | [Verifying results](/guides/hosted-checkout/results-and-signatures#verifying-the-signature) |

Pay on the checkout page with `4111111111111111`, any future expiry date, and CVV `123`. The checkout page is in the sandbox too, so no real money moves. The checkout runs against the payment processor's sandbox, so the decline and error cards in [Test data](/guides/test-data) do not trigger those outcomes on the checkout page.

<Card title="Worked scenarios" icon="list-checks" href="/guides/test-scenarios">
  Test payment flows with cURL using your sandbox API key and portal ID.
</Card>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.