Create payment link
Create a shareable payment collection link. The same link is payable by an agent over x402 or by a person on the hosted checkout page.
POST
/api/payment-links
Request Body
application/json
Price in atomic units (1000000 = 1.0 USDC).
Valid values
"USDC"Default
"USDC"Valid values
"base""base-sepolia"Default
"base"Human-readable label shown to the payer.
JSON or text delivered to the payer after payment.
ISO 8601 expiry timestamp.
Format
"date-time"Max payments accepted; null for unlimited.
Where to send the payer after a browser payment. Must be on an allow-listed origin.
Responses
Payment link created
application/json
{
"success": "<boolean>",
"paymentLink": {
"id": "<integer>",
"linkId": "<string>",
"amount": "<string>",
"currency": "<string>",
"network": "<string>",
"payTo": "<string>",
"assetAddress": "<string>",
"scheme": "<string>",
"description": "<string>",
"resourceContent": "<string>",
"status": "<string>",
"expiresAt": "<string>",
"maxUses": "<integer>",
"useCount": "<integer>",
"url": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}