Skip to main content
POST
/
payments
/
settle
Settle an x402 payment on-chain
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({paymentId: 'pay_abc123', settlementToken: '<string>'})
};

fetch('https://api.prudra.dev/payments/settle', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "txHash": "0xabc...",
  "settledAt": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.prudra.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Your Prudra API key. Get one at dashboard.prudra.com/settings/api-keys

Body

application/json
paymentId
string
required
Example:

"pay_abc123"

settlementToken
string
required

Base64 token returned from POST /payments/verify

Response

200 - application/json

Payment settled on-chain

txHash
string
Example:

"0xabc..."

settledAt
string<date-time>