---
title: "Settle a payment"
method: POST
path: "/x402/credit_account"
tags: ["x402 Payment Transactions"]
---

# Settle a payment

`POST /x402/credit_account`

## Request

- Base URL: `https://api.telnyx.com/v2`
- URL: `https://api.telnyx.com/v2/x402/credit_account`
- Auth: HTTP bearer

Settles an x402 payment using the quote ID and a signed payment authorization. The payment signature can be provided via the `PAYMENT-SIGNATURE` header or the `payment_signature` body parameter. Settlement is idempotent — submitting the same quote ID multiple times returns the existing transaction.

## Headers

- `PAYMENT-SIGNATURE` string

## Request body

- X402SettleRequest
  - `id` string, required: The quote ID to settle.
  - `payment_signature` string: Base64-encoded signed payment authorization (x402 PaymentPayload). Can alternatively be provided via the PAYMENT-SIGNATURE header.

## Response `200`

Payment already settled (idempotent response)

- X402TransactionResponse
  - `data` object
    - `id` string: Unique transaction identifier.
    - `record_type` 'x402_transaction'
    - `amount` string: The transaction amount in the specified currency.
    - `currency` string: The currency of the transaction amount (e.g. USD).
    - `status` 'settled': The settlement status of the transaction.
    - `quote_id` string: The original quote ID associated with this transaction.
    - `tx_hash` string, nullable: The on-chain transaction hash, if available.
    - `created_at` string, date-time: ISO 8601 timestamp when the transaction was created.

## Other responses

- `201`: Payment settled successfully
- `400`: Bad request — invalid signature, expired authorization, invalid nonce, or malformed payment payload
- `401`: Unauthorized
- `403`: Forbidden — x402 payments not enabled, account tier ineligible, or account suspended
- `422`: Unprocessable entity — missing required parameters or insufficient funds/allowance
- `500`: Internal server error — facilitator unavailable, transaction failed on-chain, or unknown error
- `502`: Bad gateway — upstream settlement service error
- `503`: Service unavailable — facilitator or settlement timeout

## Changes

- **2026-10-15** `a72569d69430`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/team-telnyx/apis/telnyx-api/changes/x402/credit_account/post.md)

---

[API](https://skmtc.dev/team-telnyx/apis/telnyx-api.md) - [All operations](https://skmtc.dev/team-telnyx/apis/telnyx-api/llms.txt) - [OpenAPI document](https://skmtc.dev/team-telnyx/apis/telnyx-api/revisions/0f17b8167873?raw)
