Testing Mollie Components

Mollie Components can be tested during implementation with the regular test mode.

First, you will have to initialize the Mollie(profileId[, options]) constructor with your profile ID and the testmode option:

var mollie = Mollie('pfl_3RkSN1zuPE', { locale: 'nl_NL', testmode: true });

Then, you can implement the remainder of Mollie Components as specified in our guide. When test mode is enabled for Mollie Components, the card tokens you receive should be used in combination with your Test API key instead of your Live API key. Therefore, make sure you use the correct API key when creating the payment.

Test card numbers

You can use test card numbers provided by the different card issuers to test different types of cards. Refer to our testing guide for a list of test card numbers.

Testing failure scenarios

Credit card payments can fail for various reasons ranging from having provided an invalid card number to having the card issuer reject the payment due to insufficient funds. In the case of a failed credit card payment, the API therefore includes a failureReason in the payment response to provide more context.

To test the various card payment failure reasons the Mollie API can return, refer to our testing guide.