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 modeLive mode
API keyssk_test_... / pk_test_...sk_live_... / pk_live_...
Real chargesNoYes

Test cards

Use any future expiry date and any 3-digit CVC.

Successful payments

Card numberNetwork3DS required
4343434343434345VisaNo
4571736000000075VisaNo
5123000000000002MastercardNo
4120000000000007VisaYes — select Authorize at prompt
5123000000000001MastercardSupported but optional

Declines

Card numberReason
4200000000000018Expired card
4300000000000017Invalid CVC
5100000000000198Insufficient funds
4111111111111111Generic 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:

ScenarioExpected result
Capture amount ≤ Payment Intent amountsucceeded
Capture amount > Payment Intent amountError: allowed_amount_exceeded
4120000000000007 — select AuthorizeStatus: awaiting_capture
4120000000000007 — select Failawaiting_payment_method, no payment attached
5234000000000106 — select AuthorizeAuth 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.

CardExpected result
41200000000000073DS success → card vaulted
5234000000000106Payment 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 caseCardExpected result
Successful activation4120000000000007Select Authorize → subscription: active
Failed activation5234000000000106Select Fail → incomplete (→ incomplete_cancelled after 24 hours)
Activation succeeds, recurring fails5123000000000001First 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 (222222666666) 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.