---
title: "Respond to an invoice (accept or decline)"
method: POST
path: "/api/v1/invoices/{id}/respond"
tags: ["invoices"]
---

# Respond to an invoice (accept or decline)

`POST /api/v1/invoices/{id}/respond`

## Request

- Base URL: `http://localhost:3000`
- URL: `http://localhost:3000/api/v1/invoices/{id}/respond`
- Auth: HTTP bearer

Respond to an invoice (accept or decline)

## Path parameters

- `id` string, required

## Request body

- object
  - `action` 'accept' | 'decline', required

## Response `200`

Default Response

- object
  - `success` true, required
  - `data` object, required
    - `message` string
    - `invoiceId` number
    - `status` string
    - `transactionId` number
  - `meta` object, required
    - `timestamp` number, required

## Other responses

- `400`: Invalid invoice ID
- `401`: Default Response
- `403`: Default Response
- `404`: Invoice not found
- `422`: Invoice cannot be accepted or declined in its current state
- `500`: Default Response

---

[API](https://skmtc.dev/farmersonly/apis/farmersonly-club-api.md) - [All operations](https://skmtc.dev/farmersonly/apis/farmersonly-club-api/llms.txt) - [OpenAPI document](https://skmtc.dev/farmersonly/apis/farmersonly-club-api/revisions/b4fa9123ba90?raw)
