The Detail That Catches People Out
If you've integrated PayPal's own checkout before, it's natural to assume Braintree — a company PayPal owns — behaves the same way in sandbox testing. It doesn't. PayPal's sandbox accepts any card number that passes the Luhn checksum. Braintree's official documentation says the opposite: "The sandbox will not accept any credit card numbers other than the ones listed."
| Number | Scenario | Network |
| 4111 1111 1111 1111 | Success | Visa |
| 5555 5555 5555 4444 | Success | Mastercard |
Decline behavior works differently here too: for standard transactions, whether a payment succeeds or gets declined is controlled by the
transaction amount you submit, not the card number. Card verification scenarios (used for Vault and recurring billing) are the exception — those are controlled by specific reserved card numbers. Check
Braintree's official testing reference for the current, complete list of both.
Where Luhnly Fits In
Since Braintree's sandbox only recognizes its own reserved numbers, Luhnly-generated cards won't process a transaction there directly. But the same gap applies as with Stripe and Square:
- Bulk test data for seeding databases or staging environments with many unique, harmless-looking records
- Form-validation and UI testing — verifying your input mask and card-brand detection before a request ever reaches Braintree's API
- Load testing with many distinct numbers instead of the same two repeated everywhere
Use Braintree's official numbers for anything hitting their actual API, and Luhnly for everything upstream of that call.
Frequently Asked Questions
Can I use a Luhnly-generated number with Braintree's sandbox?
No. Braintree's own documentation states the sandbox will not accept any credit card numbers other than its own reserved list. This is true even though Braintree is owned by PayPal, whose own sandbox works the opposite way and accepts any Luhn-valid number.
How do I trigger a decline in Braintree's sandbox?
For transactions, decline behavior is controlled by the transaction amount you submit, not the card number. For card verification (used in Vault and recurring billing scenarios), specific reserved card numbers trigger specific verification failures instead.
Is Braintree the same as PayPal for testing purposes?
No, and this catches people out. Braintree is a PayPal-owned company, but its sandbox model is closer to Stripe's than to PayPal's own sandbox — it only accepts specific reserved test numbers.