Skip to main content
POST
/
payments
/
verify
Verify a payment credential
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    protocol: 'x402',
    credential: '<string>',
    price: '0.01',
    walletId: 'byw_abc123',
    resource: '/analyse',
    currency: 'USD',
    description: '<string>',
    network: 'eip155:8453'
  })
};

fetch('https://api.prudra.dev/payments/verify', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "valid": true,
  "paymentId": "pay_abc123",
  "txHash": "0xabc...",
  "amount": "0.01",
  "coin": "USDC",
  "protocol": "x402",
  "settledAt": "2023-11-07T05:31:56Z",
  "settlementPending": true,
  "settlementToken": "<string>"
}

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
protocol
enum<string>
required
Available options:
x402,
mpp
credential
string
required

Raw payment credential (x402 X-PAYMENT payload or MPP proof)

price
string
required
Example:

"0.01"

walletId
string
required
Example:

"byw_abc123"

resource
string
required
Example:

"/analyse"

currency
string
default:USD
description
string
network
string
Example:

"eip155:8453"

Response

Payment verified

valid
boolean
required
paymentId
string
Example:

"pay_abc123"

txHash
string
Example:

"0xabc..."

amount
string
Example:

"0.01"

coin
string
Example:

"USDC"

protocol
enum<string>
Available options:
x402,
mpp
settledAt
string<date-time>
settlementPending
boolean
settlementToken
string | null