Skip to main content
A failed request returns a non-2xx HTTP status and a body in the failure envelope:
Branch on the error code. It is stable and safe to match on. The message is written for humans and may change wording, so show it to people but never parse it. Log the X-Request-Id response header with every failure and quote it when you contact tech@vestrapay.com.
Validation failures on request bodies, such as a missing field or a malformed value, come back as HTTP 400 with a message that names the field. Fix the request and resend it. They are not listed below because the message is the guidance.

Reading the HTTP status

Authentication and session

Payments

Card

Transfer, bank and USSD

Services, sub-accounts and splits

Partners

KYB and settlement account

Webhook endpoints

Endpoint management errors come back as HTTP 400 or 409 with a message. The common causes are a URL that is not HTTPS, a URL that resolves to a private or loopback address, an unreachable hostname, and exceeding the limit of two endpoints per environment. webhook_endpoint_not_found (404) means the endpoint ID is wrong for this environment.

What to log

For every failure, log the HTTP status, the error code, the X-Request-Id header, and the payment reference when you have one. With those four values support can usually answer in a single reply.