# Testing

## Testing payments

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

&#x20;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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kasko.io/kasko-api-documentation/testing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
