Testing

Testing payments

Depending of chosen payment provider configured for product, testing credentials differ.

Some of the payment setups are more nuanced that others, however, some can be performed by a single API call.

The following sections tries to comprehensively describe each payment service provider's required steps in order to successfully make a payment within a testing scenario.

All of the examples below replace variables that depend on the product & previous requests with curly braces.

Insurer

If the selected payment provider is by insurer, then the respective payment can be made with the example below:

curl --request POST \
  --url 'https://api.qa-u.eu1.kaskoqa.com/payments?key={{ public_key }}' \
  --header 'Content-Type: application/json' \
  --data '{
    "token": {{ payment_token }},
    "method": "invoice",
    "provider": "invoice",
    "policy_id": {{ policy_id }}
}'

Stripe

To learn more how to test Stripe payments, refer to https://stripe.com/docs/testing for more information.

Credit card

Last updated