Testing Your Integration

Testing Best PracticesAnchorIcon

We recommend that you test your integration end to end in the sandbox environment before deploying in production. This means that you should test from the POS application UI to invoke API calls to the Braintree card reader, complete payment using test cards, check the Braintree control panel and validate the solution works end to end, including the unhappy path flows.

In order to make sure your application can handle various context status' use the amounts in the table below to simulate different scenarios in the Braintree sandbox environment.

note

The sandbox and production environments are entirely separate. Nothing created in the sandbox (e.g. contexts, locations, transactions) will transfer to production. Your login information, merchant ID, and API keys will also be different. See Try It Out for more details. The content of this page is only applicable in the sandbox environment.

Testing with Digital WalletsAnchorIcon

The Braintree sandbox does not allow for testing of digital wallets on the Braintree dev kit readers. The behavior of these payments methods is exactly the same as contactless cards from both an API perspective and from a UX/UI perspective.

Transaction amountsAnchorIcon

When working with in-store transactions in the sandbox environment, you can pass specific amounts to simulate different context status'. Transactions performed with the test amounts below will end with the corresponding Context Status and Payment Status.

Amount

Context Status

Payment Status

0.01 - 1999.99

COMPLETE

SUBMITTED_FOR_SETTLEMENT

1004.00

COMPLETE

SUBMITTED_FOR_SETTLEMENT

2000.00 - 2999.99

FAILED

PROCESSOR_DECLINED

3000.00 - 3000.99

FAILED

FAILED

5001.00

FAILED

GATEWAY_REJECTED

5002.00 and up (except 9000.00)

COMPLETE

SUBMITTED_FOR_SETTLEMENT

9000.00 (insert card to test)

FAILED

VOIDED

Simulating Processor ResponsesAnchorIcon

Braintree will also return raw processor response codes in the API response. You may want to parse and consume these detailed processor response codes to provide detailed reason codes to your cashier or accounting team.

note

Click on the link above. Try passing the number listed in the "code" column as the "amount in your request. This will simulate that processor response.

Integration Readiness QuestionnaireAnchorIcon

It is most important to test all of the the use cases relevant to your business, however, it is also critical that your integration meets the most basic requirements to function properly once you deploy to the production environment. The questions below are meant as a gut check to make sure you are meeting those requirements and using best development practices:

Idempotency to your sale and refund requests?
Merchant Account ID in your sale and refund API requests? Hint
timeout logic based on our recommendations?
handling errors and non-happy path flows?
EMV receipt data from the API response?
logging the requestId and other important data elements from the API response?
If you answered yes to the above questions then we suggest you schedule a demo and code review with your PayPal Solutions Engineer or Integration Engineer!