> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/classic-push-provisioning/developer-guide/sandbox-testing.md).

# Sandbox testing

## Sandbox testing configuration <a href="#sandbox-testing-configuration" id="sandbox-testing-configuration"></a>

If project onboarding has not started, you can still test your integration with the Push Provisioning SDK using the sandbox environment.

For testing, use the following:

* Key for card data encryption. Retrieve this key from the TSH Onboarding Portal.
* Key for authorization code signature. Use this key when signing the JWT.

Below is the test data you can use in the sandbox environment:

\
Public key

```
-----BEGIN CERTIFICATE-----
MIIEKTCCAxGgAwIBAgIMa3BA3M18ovOLDPVJMA0GCSqGSIb3DQEBCwUAMF0xCzAJ
BgNVBAYTAkZSMRAwDgYDVQQKDAdHZW1hbHRvMRAwDgYDVQQLDAdUb3Vyc0RDMSow
KAYDVQQDDCFDQlAgU3RhZ2luZyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMTkw
MzE4MTExMjMzWhcNMjUwNzE2MDgwNzA4WjBqMQ4wDAYDVQQHDAVUb3VyczELMAkG
A1UEBhMCRlIxEzARBgNVBAoMCkdlbWFsdG8gU0ExGjAYBgNVBAsMEUJhbmtpbmcg
JiBQYXltZW50MRowGAYDVQQDDBFHMEQ0MyBJU1MgRU5DIExBQjCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAJzCukpAX7cYB2wrqBhnlfrU4AlR5qoOp78K
PStWz+tTzALg9BWa9nOHNqVq78U4UYlP1AVbdMFyEUIS+Qe1FX27V4do99EhiAmD
ghhChFJbWFcZKWr3zbkreTubEZumzBtbECAziv1/WlEWZASowrvNlTVmuPY8PgTU
7bnD97IdSe5X7FO5NkbMcV3C9znD5PkjF67oM09WJqf9ZCWpfQaYYGTxEfb/IZr1
2g2U7P+fSGuHkshDuIAM80PAKa1Tp9cDQBAmT3/qdF2XCJRYgoPchF+M4cjusA6t
TByBCLE50Q7akyVGj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xJb2/fKF5FnOuN+tNdpO4QOOIDby55OGavcKYlxWnTqeP
rRHf3+pyu+reGM8DJCLdeAFapT+C2VmIQNqEyUiDAoGBAJK9+CY2iW6EJziNKV/d
PlfBSWJTEtqKJrAktG7dnmJXU8f7ANqHEwfS6Nqy9bVZKoCwNoiaqe6CsfNfFZ2n
lY6B5qR6Nh92x4+2X30sSYIhMBEA7wHX0lmWP1M2p8MH85y8JRACfr7z+DWf8DLR
FyPWw08/a6dV+TPZMaJsrG5Q
-----END PRIVATE KEY-----
```

```
Encrypted Payload
```

```
308006092A864886F70D010703A0803080020102318201513082014D0201028006497373756572303C06092A864886F70D010107302FA00F300D06096086480165030402010500A11C301A06092A864886F70D010108300D060960864801650304020105000482010014B297DCE72EBA08152514FE422FC66D7F1E216F685C1DF38E8335B4921098BB0FBFDCA33D0B7936F9810FD8E042DC2BED366B699351E0E4A55139504A469DCBA7E826C9E6C2FCB4766CC58E83C4DC21E2F5368D6FBB048354ADBAC2F121C9956E1CFDA5CE400D07D0088F847E32A2DFAD3A9BDC98A298EF78BF76262ECA387149BD9AA99C6C1B9875AD07828F00EE091F8F8598292F3A723B31FD1125F0B391595C08D249BEA1CF9F66E543CD69EB4509C191562EF6C96CF6FDDF6594B2B8EB1560C79F843FF1E16FB1313D9959605F3B99F2F18F56197D20501DED5311764FEE4E23E2F9A1CB1E9D7B507A536B254B7D8E3F50A642B73A4B2E73D4F045B2A7308006092A864886F70D010701301D060960864801650304012A041044581CF583193FD8E155FAAD73E3D817A080048180798EC2C1B0EFB6A6160B033DAED79FADBDD0DAB7139384A2CF85A85D309939744C36FE20868231C3EDEB9CE9DF3BA481344026838E65E9729519D6353472E2CE04871212FA68BFF57F2E86BD7718FCD4107E60F97170579982E129573652F7F8D7144825D1B22282305A0FA342F207641C7A2A0FE7FA9AEF5E4DA2CA718BFFAA00000000000000000000
```

\
Authorization code

```
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJUUENTQU5EQk9YIiwic3ViIjoiSTE4ZGViYTU0NTA5MDMyIiwiZXhwIjoxNjI5OTg0NDA2LCJhdWQiOiJBUFBMRV9QQVkifQ.dX8mDEdsHuBxFUVilUdW1OvSPfa0XXy940nNMai-lISPggTUo5nV1_FKiktYrtZ0LOxzO6h5h5ZmhkewSq7viVoKj7IxDU65LsnrBOrQw6wenETjO2aOVyBltxzb9PSr48vzVRiqfNFmRnJC05xvkeeinPZkV1PkjL0V5Psgo6_gUHerpE5y2rMOFkHUwRsOdbwhEe6l6AH9SR8mMqBB9r5805Hu3J850whjunEYhDhXeEEcbQKoD2sDBHAO5L2hJsvKNkBpNSLOL8ajUIcRHUpb4BDl8QW0cIC7zCSP-e7JUEga-_V1e8gB5X3oodyY5JmSRd2OPuDj6IWOqwCBCg
```

* **issuerId**: TPCSANDBOX

> <i class="fa-info-circle">:info-circle:</i>
>
> #### TPCSANDBOX configuration <a href="#tpcsandbox-configuration" id="tpcsandbox-configuration"></a>
>
> Sandbox is not connected to the payment network.

### Apple Pay sandbox testing <a href="#apple-pay-sandbox-testing" id="apple-pay-sandbox-testing"></a>

* Pre-production environment (PPROD)
  * Customer opens a test account with Apple.
  * The test account must use the devices selected for testing in the Pre-Production environment, together with the Apple Pay test sandbox. For details, see [Apple Pay Sandbox Testing](https://developer.apple.com/apple-pay/sandbox-testing/).

> <i class="fa-info-circle">:info-circle:</i>
>
> #### Note <a href="#note" id="note"></a>
>
> * Confirm the Apple Pay sandbox is available in the customer’s country before testing. See [Sandbox testing eligible country](https://developer.apple.com/apple-pay/sandbox-testing/). If the country is not listed, change the region on your test device in **Settings > General > Language & Region**. Select a country that supports Apple Pay.
> * Visa and Mastercard do not guarantee push provisioning will always work with [Apple's test cards](https://developer.apple.com/apple-pay/sandbox-testing/). Use sandbox testing primarily to validate the encrypted payload and authorization code with the Push Provisioning SDK.

* Production environment (PROD)
  * Apple must allowlist the customer devices used in the certification phase for the Production environment, based on their Secure Element identifier (SEID).
  * Remove device allowlisting when the customer’s product goes live, based on customer request.

### Enabling sandbox mode in Google Pay <a href="#enabling-sandbox-mode-in-google-pay" id="enabling-sandbox-mode-in-google-pay"></a>

By default, Google Pay runs in production mode with real payments. Optionally, you can reconfigure Google Pay to run in sandbox mode by placing a special file on your device. Once connected, Google Pay routes requests to the Google sandbox environment, which connects to the TSP sandbox environment.

It is recommended to use the sandbox mode during your development and pre-production testing.

> <i class="fa-info-circle">:info-circle:</i>
>
> #### Note <a href="#note-1" id="note-1"></a>
>
> Google Pay services are required to run the Push Provisioning SDK. The Google Pay app does not need to be installed on the device.

#### Using the ADB command to toggle to sandbox mode <a href="#using-the-adb-command-to-toggle-to-sandbox-mode" id="using-the-adb-command-to-toggle-to-sandbox-mode"></a>

adb shell touch /sdcard/Download/android\_pay\_env\_override\_sandboxadb reboot

To return to the production mode, delete the file and reboot the device as follows:

adb shell rm /sdcard/Download/android\_pay\_env\_override\_sandboxadb reboot

#### Checking the mode of your device <a href="#checking-the-mode-of-your-device" id="checking-the-mode-of-your-device"></a>

To check whether your Android device is in sandbox or production mode, go to **Android Settings > Google > Google Pay** or **Android Settings > Google > Account Services > Google Pay**. If you see a small pop-up that says "Sandbox", the device is configured to make sandbox calls. If you do not see a pop-up, the device is configured to make production calls.

On devices that do not show Google Pay under Google settings, use the following ADB command to open Google Pay settings:

adb shell am start -ncom.google.android.gms/com.google.android.gms.tapandpay.settings.TapAndPaySettingsActivity


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.payments.thalescloud.io/classic-push-provisioning/developer-guide/sandbox-testing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
