Test gateway

Use this during development to test the various flows using payment methods

To ease your integration and test scenarios, Upodi come with a simulation gateway out of the box. The test gateway is a fictive implementation of a payment gateway and offers you the ability to test payment when in sandbox mode.

Adding a payment method

Post a request to /paymentmethods/ to add a payment method. Payload is described below.

curl --location 'https://api-front.upodi.io/PaymentMethods' \
--header 'X-version: {version}' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {ApiKey}' \
--data '{
    "Gateway": "test",
    "source": {
        "card": {
            "number": "4111 1111 1111 1111",
            "expiry": "03/2030",
            "cvc": 737
    "CustomerID": "{customerId}",
    "MakeDefault": true

Test gateway only support the following test cards. There are no 3d secure implementation for the test gateway as no actual PSP is being invoked. These cards are fictive and cannot be used in production.

Test data for the source object

The following non-active cards can be used for testing.

Card numberSchemeExpirationCvcResultProcessing
4111 1111 1111 1111Visa03/2030737SuccessImmediate
4111 1111 4555 1142Visa03/2030737Decline (insufficient funds)Immediate
5577 0000 5577 0004Mastercard03/2030737SuccessImmediate
5555 3412 4444 1115Mastercard03/2030737Decline (insufficient funds)Immediate
3500 1111 0200 1111JCB03/2030737SuccessAsynchronious
3500 0000 0200 5676JCB03/2030737Decline (insufficient funds)Asynchronious

Syncronous and asynchronous payment methods

Asynchronous processing (JCB test cards) marks the invoice as pending and will away a future time to resolve the payment.