---
title: "Report a return from Ponto that carried an error instead of a code"
method: POST
path: "/api/v1/banking/ponto/callback/declined"
tags: ["Money"]
---

# Report a return from Ponto that carried an error instead of a code

`POST /api/v1/banking/ponto/callback/declined`

## Request

- Base URL: `http://localhost:5180`
- URL: `http://localhost:5180/api/v1/banking/ponto/callback/declined`
- Auth: API key in cookie `better-auth.session_token`

The state is not spent, so going back into Ponto can still finish the attempt, and the answer names the attempt and the account it was started from, for a browser that did not start it. A cancel or a passing fault leaves the attempt as it was. A fault in how this deployment is set up with Ponto is logged with the error Ponto gave and ends the attempt, because trying again cannot help. Only the person who started the attempt may report it.

## Request body

- object
  - `state` string, required
  - `error` string, required
  - `description` string

## Response `200`

What the return means.

- object
  - `ok` unknown, required
  - `data` object, required
    - `connectionId` string, required: Stable record id, e.g. `lse_012`.
    - `bankAccountId` string, nullable, required: Stable record id, e.g. `lse_012`.
    - `outcome` 'declined' | 'passing' | 'misconfigured', required: `declined` where the owner or their bank said no, `passing` where Ponto had a passing fault and trying again may work, `misconfigured` where the fault is in how this deployment is set up with Ponto and the attempt is ended.
  - `meta` object, required
    - `requestId` string, required: Echoed in the x-request-id header. Quote it in a bug report.

## Other responses

- `403`: The attempt is on a team the caller is not on, or somebody else started it.
- `404`: No attempt carries that state.

---

[API](https://skmtc.dev/dardaris/apis/dardaris-api.md) · [All operations](https://skmtc.dev/dardaris/apis/dardaris-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dardaris/apis/dardaris-api/revisions/4aff33835c73?raw)
