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 number | Scheme | Expiration | Cvc | Result | Processing |
---|---|---|---|---|---|
4111 1111 1111 1111 | Visa | 03/2030 | 737 | Success | Immediate |
4111 1111 4555 1142 | Visa | 03/2030 | 737 | Decline (insufficient funds) | Immediate |
5577 0000 5577 0004 | Mastercard | 03/2030 | 737 | Success | Immediate |
5555 3412 4444 1115 | Mastercard | 03/2030 | 737 | Decline (insufficient funds) | Immediate |
3500 1111 0200 1111 | JCB | 03/2030 | 737 | Success | Asynchronious |
3500 0000 0200 5676 | JCB | 03/2030 | 737 | Decline (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.
Updated 9 months ago