Test Inputs

To test various scenarios, KOMOJU supports a handful of test card numbers and other payment method-specific inputs that simulate different outcomes.

Note that these only work in test mode. You're in test mode when you use the secret key of your test merchant. See Authentication.

If you're integrating KOMOJU using Hosted Fields or the WooCommerce plugin, you need to use 3-D Secure (3DS) aware cards, as these integrations support 3DS-aware cards only. If you see authentication failures continuously, please retry with the test cards which are clearly indicated as "3DS-aware". If you want to simulate a specific test scenario with 3DS-aware cards, please also refer to the section for Alternative Payment Methods.

Credit Card Numbers

Card NumberType
3530111333300000JCB
378282246310005American Express
4111111111111111Visa
5555555555554444MasterCard
30569309025904Diners Club
4100000000000100Visa (3DS-aware, use 08/2025 as expiry date)
5100000000000107Mastercard (3DS-aware, use 08/2025 as expiry date)
3528000000000106JCB (3DS-aware, use 08/2025 as expiry date)
4123111111111000Insufficient funds
4123111111111018Exceeds card limit
4123111111111034Bad verification value
4123111111111042Card expired
4123111111111059Cannot use card
4123111111111075Invalid card

WebMoney Numbers

Card NumberType
1111111111111111WebMoney prepaid card with a 2000 yen balance
e111111111111112Invalid card number
e111111111111113Prepaid card has already been used
e111111111111114Card has been declined due to an unknown error

Alternative Payment Methods

Not all payment methods accept number inputs. Additionally, testing 3DS currently does not work with the above card numbers. In these cases, you can use the following HTTP header to simulate error responses in test mode (in this example the scenario with insufficient funds will be emulated):

Komoju-Scenario: insufficient_funds

This header can be passed when creating payments, sessions, or customers.

  • When passed during payment creation, the payment will immediately fail with the given error.
  • When passed during session creation, all future attempts to pay will fail with the given error.
  • When passed during customer creation, all attempts to use that customer to pay will fail with the given error.