Testing
How test mode works, test API keys, and test cases for all payment methods and features.
Overview
PayMongo provides a full test environment that mirrors the live API. In test mode, no real money moves and no real transactions are processed. Get your test API keys from the dashboard under Developers > API Keys.
| Test mode | Live mode | |
|---|---|---|
| API keys | sk_test_... / pk_test_... | sk_live_... / pk_live_... |
| Real charges | No | Yes |
Test cards
Use any future expiry date and any 3-digit CVC.
Successful payments
| Card number | Network | 3DS required |
|---|---|---|
4343434343434345 | Visa | No |
4571736000000075 | Visa | No |
5123000000000002 | Mastercard | No |
4120000000000007 | Visa | Yes — select Authorize at prompt |
5123000000000001 | Mastercard | Supported but optional |
Declines
| Card number | Reason |
|---|---|
4200000000000018 | Expired card |
4300000000000017 | Invalid CVC |
5100000000000198 | Insufficient funds |
4111111111111111 | Generic decline |
Testing e-wallets
Attach the Payment Method normally. You'll receive a next_action.redirect.url — open it and select Authorize or Fail on the PayMongo test page. No real GCash, Maya, GrabPay, or ShopeePay account needed.
Testing QR Ph
In test mode, QR Ph generates real QR codes. Do not scan and pay them — it will process a real transaction. Use the test_url in the response to simulate scenarois.
Testing Hold Then Capture
Use any test card with capture_type: "manual". After authorization the status becomes awaiting_capture. Then:
| Scenario | Expected result |
|---|---|
| Capture amount ≤ Payment Intent amount | succeeded |
| Capture amount > Payment Intent amount | Error: allowed_amount_exceeded |
4120000000000007 — select Authorize | Status: awaiting_capture |
4120000000000007 — select Fail | awaiting_payment_method, no payment attached |
5234000000000106 — select Authorize | Auth passes, payment fails → awaiting_payment_method |
Testing Card Vaulting
Create a Customer first, then set setup_future_usage in the Payment Intent pointing to that customer.
| Card | Expected result |
|---|---|
4120000000000007 | 3DS success → card vaulted |
5234000000000106 | Payment fails → card NOT vaulted |
4120000000000007 (select Fail) | Auth fails → card NOT vaulted |
To reuse a vaulted card, attach the customer payment method ID to a new Payment Intent without setup_future_usage.
Testing Subscriptions
| Test case | Card | Expected result |
|---|---|---|
| Successful activation | 4120000000000007 | Select Authorize → subscription: active |
| Failed activation | 5234000000000106 | Select Fail → incomplete (→ incomplete_cancelled after 24 hours) |
| Activation succeeds, recurring fails | 5123000000000001 | First payment → active; next cycle fails → past_due, then unpaid |
Testing Direct Online Banking
Brankas (BDO, Landbank, Metrobank): The test page pre-populates OTP 123456. Complete the flow to simulate a successful payment. Close the page early to simulate abandonment (EXPIRED), denial (DENIED), or cancellation (CANCELLED).
UnionBank: Use OTP 111111 for success. Other codes (222222–666666) simulate various failure scenarios.
BPI: Select account ***0001 then click Pay to reach the OTP page. Use 123456 for success, 654321 for invalid OTP, 000000 for expired OTP.
Updated about 4 hours ago