Skip to main content
POST
/
payments
/
challenge
Generate a dual payment challenge
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    walletId: '<string>',
    hostname: '<string>',
    price: '<string>',
    description: '<string>',
    intent: 'charge',
    acceptX402: true,
    acceptMPP: true
  })
};

fetch('https://api.prudra.dev/payments/challenge', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "mpp": "<string>",
  "x402": "<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
walletId
string
required
hostname
string
required
price
string
required
description
string | null
intent
enum<string>
default:charge
Available options:
charge,
session
acceptX402
boolean
default:true
acceptMPP
boolean
default:true

Response

Challenge generated

mpp
string | null

WWW-Authenticate MPP challenge string

x402
string | null

X-PAYMENT-REQUIREMENTS base64 value