> **Description:** Test-environment endpoint to automatically approve payments without user interaction for automated testing.

# Force Approve a payment

All ePayment API requests must include a valid Bearer token in the `Authorization` header.
See [Authorization](https://developer.vippsmobilepay.com/docs/APIs/epayment-api/api-guide/concepts.md#authorization) for how to obtain one.

To simplify automated testing in the
[test environment](https://developer.vippsmobilepay.com/docs/knowledge-base/test-environment.md)
the ePayment API provides a "force approve" endpoint that confirms payments
without using the test app:
[`POST:/epayment/v1/payments/{reference}/approve`][force-approve-endpoint].

*Express* is not supported for this endpoint. Attempted use in production is not allowed, and will fail. Important: All test users must manually approve at least one payment in the Vipps or MobilePay app before this endpoint can be used for that user.

You may get `HTTP 500 Internal Server Error` for an expired card. If this is the case,
you should [create a new test user](https://developer.vippsmobilepay.com/docs/knowledge-base/portal.md#add-a-new-user).

Here are the expected properties for the request body:

See the [API spec][force-approve-endpoint] for more details.

[force-approve-endpoint]: https://developer.vippsmobilepay.com/redocusaurus/epayment-swagger-id.yaml

> **Full site overview:** For every page in this documentation, read [https://developer.vippsmobilepay.com/llms.txt](https://developer.vippsmobilepay.com/llms.txt).
