Test Bank Cards
Sangho uses Braintree to process bank card payments. In Sandbox, use the standard Braintree card numbers to simulate different scenarios — no real charge is ever made.
Test cards
| Number | Brand | Behavior | Error Code |
|---|---|---|---|
4111 1111 1111 1111 | Visa | ✅ Payment succeeds | — |
5500 0000 0000 0004 | Mastercard | ✅ Payment succeeds | — |
4000 0000 0000 0002 | Visa | ❌ Card declined | CARD_DECLINED |
4000 0000 0000 9995 | Visa | ❌ Insufficient funds | INSUFFICIENT_FUNDS |
4000 0000 0000 3220 | Visa | 🔐 Triggers 3DS | — |
4000 0000 0000 0069 | Visa | ❌ Expired card | CARD_EXPIRED |
4000 0000 0000 0127 | Visa | ❌ Incorrect CVV | INCORRECT_CVC |
Expiration date: any future date, e.g. 12/28 ·
CVV: 123 ·
Postal code: 75001
3D Secure in Sandbox
Use card 4000 0000 0000 3220 to trigger the
3DS flow. In Sandbox, the authentication form is simulated and accepts
any OTP code.
Card error codes
These card codes surface in the error’s code field, in the same format as the rest of the API.
| Error Code | Description |
|---|---|
CARD_DECLINED | Card declined by the issuing bank. |
INSUFFICIENT_FUNDS | Insufficient funds in the account. |
CARD_EXPIRED | Expiration date has passed. |
INCORRECT_CVC | Incorrect CVV. |
Card Form (Braintree Hosted Fields)
The @sanghosdk/js SDK is a server-side client — it does not expose a browser-side
card widget. The Hosted Fields form is served directly by the Sangho-hosted checkout page
(intent.url): your frontend has nothing to mount itself,
it simply redirects the client to that URL as in the other integration guides.