Braintree test automation
Payments
Braintree puts every card field in its own iframe. DoesQA walks through them like a shopper and proves the payment lands.
What we test on Braintree
Hosted card fields and validation
3D Secure challenges
PayPal and Google Pay through Braintree
Declines and error states
Order confirmation and downstream orders
How to test Braintree
Use the Braintree sandbox. The sandbox only accepts Braintree's published test card numbers (for example Visa 4111111111111111). Transaction success can also depend on amount, AVS and CVV. Test a successful payment, a decline, and 3D Secure if you use it. Add PayPal through Braintree if you offer it.
Run those journeys on every release, on every market where Braintree is on.
In DoesQA, Switch Frame moves into each hosted field and back, and Set value types like a real customer so field validation behaves as it does for shoppers.
Braintree test checklist
A successful payment through hosted fields, using a Braintree sandbox test card.
A declined or unsuccessful verification, using the numbers Braintree publishes for that outcome.
A 3D Secure challenge, if you use it (see 3D Secure).
PayPal or Google Pay through Braintree, if you offer it.
The confirmation, and the order that lands downstream.
Where Braintree tests usually break
Each hosted field sits in its own iframe.
A test that stays on the parent page cannot fill number, expiry or CVV. In DoesQA, Switch Frame, Set value and Switch to parent frame handle each field.
The sandbox rejects cards that are not on the official list.
Unlike some other test modes, Braintree's sandbox only accepts specific test numbers. Use the official testing reference.
Amount and AVS can still fail a valid test card.
Braintree documents that transaction success also depends on amount and AVS or CVV rules. Match those as well as the card number.
What you need to get started
A checkout URL pointed at the Braintree sandbox, not production.
Braintree's published sandbox test cards. A valid Visa is 4111111111111111; other numbers trigger declines or unsuccessful verifications. Source: Testing (fetched 10 November 2026).
If you offer PayPal through Braintree, a PayPal sandbox buyer account. See PayPal.




