# Collect a due payment through Finix

Debits the merchant's bank account for one scheduled instalment. Reach for it when a payment is due and the desk wants the money now, rather than recording that it arrived later. Idempotent: pressing it twice is one debit, and the second press reads the first attempt back. The payment moves to processing at once and then to completed or failed when the rail resolves - the same states the manual verbs write, so nothing downstream changes. Refused when the deal's merchant is not provisioned, when the payment is already settled, and while a movement for it is still in flight.

Access class: `workspace:admin`.

## Endpoint

`POST /v1/payments/{id}/collect`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| id | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "idempotencyKey": "string"
  },
  "params": {
    ":id": "string"
  },
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "amountMinor": 1,
    "appliedAt": "string",
    "createdAt": "string",
    "currency": "string",
    "dealId": 1,
    "direction": "string",
    "failureCode": "string",
    "failureMessage": "string",
    "id": 1,
    "idempotencyKey": "string",
    "paymentId": 1,
    "payoutId": 1,
    "resolvedAt": "string",
    "startedBy": 1,
    "state": "string",
    "traceNumber": "string",
    "transferId": "",
    "updatedAt": "string"
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
