> For the complete index of the 402pay docs, see [llms.txt](https://developer.402pay.co/llms.txt).

# Accept a payment

Count an underpaid payment, or one that needs review, as paid with what arrived.

`POST https://dash.402pay.co/api/v1/payments/{id}/accept`

Works on an `underpaid` payment or one that `needs_review`, when what arrived is enough for you. The payment becomes `succeeded` with what arrived: `amount_received` shows it, `reporting.amount` is its USD value, less any `customer_fee`, with the fee taken on that, and `settlement.amount` adds up every transfer, whole. The timeline gains an `accepted` event, and you receive `payment.succeeded`.

The example accepts a link payment that received 90% of its price. Any open checkout for the rest stops waiting.

### Path

- `id` (string, required): The payment's ID, such as `pmt_QI02vLdJGd48hBbg`.

### Errors

- 404 `not_found` No payment with that ID belongs to your business.
- 403 `test_mode_unavailable` A test key can't accept a payment on a live business, so use a live key.
- 409 `payment_not_acceptable` The payment isn't `underpaid` or `needs_review`.

Any request can also fail on its key or its body. See [errors](https://developer.402pay.co/api/errors.md).

Request, cURL:

```bash
curl -X POST "https://dash.402pay.co/api/v1/payments/pmt_Kson1iADtxwHYH5M/accept" \
  -H "Authorization: Bearer $PAY402_SECRET_KEY"
```

Request, Node.js:

```js
const response = await fetch("https://dash.402pay.co/api/v1/payments/pmt_Kson1iADtxwHYH5M/accept", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.PAY402_SECRET_KEY}`,
  },
});
const { data } = await response.json();
```

Request, Python:

```python
import os

import requests

response = requests.post(
    "https://dash.402pay.co/api/v1/payments/pmt_Kson1iADtxwHYH5M/accept",
    headers={
        "Authorization": f"Bearer {os.environ['PAY402_SECRET_KEY']}",
    },
)
data = response.json()["data"]
```

Response, 200 OK:

```json
{
  "data": {
    "id": "pmt_Kson1iADtxwHYH5M",
    "kind": "payment",
    "status": "succeeded",
    "amount": 19900,
    "currency": "USD",
    "fee_payer": "business",
    "customer_fee": 0,
    "amount_received": 17910,
    "reporting": {
      "currency": "USD",
      "amount": 17910,
      "fee": 0,
      "transaction_fee": 25,
      "customer_fee": 0,
      "net": 17885
    },
    "fee_rate_bps": 0,
    "method": {
      "rail": "crypto",
      "asset": "USDC",
      "network": "polygon",
      "amount": "179.10",
      "expected_amount": "199.00",
      "overpaid_amount": null,
      "from_address": "0xadb252a42ccdd382c58673cb88a05d0f52e0ab6e",
      "tx_hash": "0xca57b032a212f2940f33dbfd296f14758a44534efe87d126c42e1b1838b35639",
      "explorer_url": "https://polygonscan.com/tx/0xca57b032a212f2940f33dbfd296f14758a44534efe87d126c42e1b1838b35639"
    },
    "settlement": {
      "destination": "wallet",
      "asset": "USDC",
      "network": "polygon",
      "amount": "179.10",
      "wallet_id": "wal_1fIGZOrILmsCO0jw",
      "address": "0xee44DbeB8F3d1F216f7317c5B08C1fA1C8b8CA81",
      "tx_hash": "0xca57b032a212f2940f33dbfd296f14758a44534efe87d126c42e1b1838b35639",
      "explorer_url": "https://polygonscan.com/tx/0xca57b032a212f2940f33dbfd296f14758a44534efe87d126c42e1b1838b35639"
    },
    "customer_id": "cst_gWFWcc7Ga0Pv7LSC",
    "link_id": "lnk_nt842tPNne3lf0ka",
    "url": null,
    "reference": null,
    "metadata": {},
    "success_url": null,
    "cancel_url": null,
    "expires_at": null,
    "canceled_at": null,
    "checkout_id": "chk_cT8iEk2tGkc9wC46",
    "description": "Team plan, monthly",
    "country": "US",
    "failure_code": null,
    "failure_message": null,
    "confirmed_at": "2026-09-26T21:23:16.700Z",
    "created_at": "2026-09-26T21:22:47.082Z",
    "updated_at": "2026-09-26T21:23:16.700Z",
    "events": [
      {
        "type": "created",
        "created_at": "2026-09-26T21:22:47.082Z",
        "data": null
      },
      {
        "type": "method_selected",
        "created_at": "2026-09-26T21:22:47.082Z",
        "data": {
          "rail": "crypto",
          "asset": "USDC",
          "network": "polygon"
        }
      },
      {
        "type": "detected",
        "created_at": "2026-09-26T21:22:47.098Z",
        "data": {
          "amount": "179.10",
          "network": "polygon",
          "tx_hash": "0xca57b032a212f2940f33dbfd296f14758a44534efe87d126c42e1b1838b35639"
        }
      },
      {
        "type": "underpaid",
        "created_at": "2026-09-26T21:22:47.098Z",
        "data": {
          "expected": "199.00",
          "received": "179.10"
        }
      },
      {
        "type": "accepted",
        "created_at": "2026-09-26T21:23:16.700Z",
        "data": null
      }
    ]
  }
}
```
