---
updatedAt: 2026-03-05T09:18:04.000Z
agentTools:
  projectIndex: https://neutronpay.readme.io/llms.txt
---

# Confirm a transaction

Request to confirm the transaction specified by the transaction ID

Confirms a `quoted` transaction to begin execution. This is the second step in the two-step transaction flow.

### Flow

```
POST /api/v2/transaction/       →  Creates transaction (quoted)
PUT  /api/v2/transaction/{id}/confirm  →  Confirms and executes (this endpoint)
```

### Example Request

```bash
curl -X PUT https://api.neutron.me/api/v2/transaction/5e25d2f4-9bca-4b7a-a1ad-2cf056100cb6/confirm \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

No request body is needed — just the transaction ID in the URL.

### What Happens After Confirmation

| Transaction Type      | After Confirm                                     |
| --------------------- | ------------------------------------------------- |
| **Lightning send**    | Payment sent immediately, settles in seconds      |
| **Lightning receive** | Invoice becomes active, waiting for sender to pay |
| **On-chain send**     | Bitcoin transaction broadcast to network          |
| **On-chain receive**  | Address activated, waiting for on-chain payment   |
| **Internal swap**     | Executes instantly — funds moved between wallets  |
| **Fiat payout**       | Payout queued for processing                      |

### Error Cases

| Error                                | Cause                                               |
| ------------------------------------ | --------------------------------------------------- |
| **400** — Transaction in final state | Already confirmed, completed, cancelled, or expired |
| **401** — Unauthorized               | Invalid or expired access token                     |
| **404** — Not found                  | Transaction ID doesn't exist                        |

**Example error (already in final state):**

```json
{
  "resultStatus": "error",
  "code": "2005",
  "error": "transaction 5e25d2f4-... already in final state usercanceled",
  "errorMetadata": {
    "params": "{\"State\":\"usercanceled\",\"TxnID\":\"5e25d2f4-...\"}"
  }
}
```

### Important Notes

* Quoted transactions have an **expiry time** — confirm before it expires or the transaction moves to `expired` state
* Review the `fxRate` and fee breakdown from the [create](/reference/createtransaction) response before confirming
* Confirmation is **irreversible** for most transaction types (especially Lightning and on-chain sends)
* If you don't want to proceed, use [Cancel](/reference/canceltransaction) instead

### Related

* [Create a transaction](/reference/createtransaction) — Step 1: create the transaction
* [Cancel a transaction](/reference/canceltransaction) — Cancel instead of confirming
* [Transaction Status Types](/reference/transaction-status-types) — What happens after confirmation

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Neutronpay API",
    "version": "2.2.6",
    "description": "Neutron API Reference"
  },
  "servers": [
    {
      "url": "https://api.neutron.me",
      "description": "Development environment"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "JWT Authorization header using the Bearer scheme. Example: 'Authorization: Bearer {token}'"
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Transactions",
      "description": "Transaction management endpoints"
    }
  ],
  "paths": {
    "/api/v2/transaction/{transactionId}/confirm": {
      "put": {
        "summary": "Confirm a transaction",
        "description": "Request to confirm the transaction specified by the transaction ID",
        "tags": [
          "Transactions"
        ],
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the transaction",
            "schema": {
              "deprecated": false,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "resultStatus": {
                      "type": "string",
                      "description": "Status of the result"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code"
                    },
                    "error": {
                      "type": "string",
                      "description": "Error message"
                    },
                    "errorMetadata": {
                      "type": "object",
                      "properties": {
                        "params": {
                          "type": "string",
                          "description": "Additional error parameters in JSON format"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "TransactionInFinalState": {
                    "summary": "Transaction is in final state",
                    "value": {
                      "resultStatus": "error",
                      "code": "2005",
                      "error": "transaction 58493016-d0eb-4715-8a9d-596f1b1d07f8 already in final state usercanceled",
                      "errorMetadata": {
                        "params": "{\"State\":\"usercanceled\",\"TxnID\":\"58493016-d0eb-4715-8a9d-596f1b1d07f8\"}"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication credentials"
          },
          "404": {
            "description": "Not Found - The requested transaction does not exist"
          }
        },
        "operationId": "confirmTransaction"
      }
    }
  },
  "x-readme": {}
}
```