Introduction
Use Ivorypay session helpers to accept payments for API access, with confirmed settlement before delivering a protected resource.
This guide describes the Ivorypay session helper API. It is not a drop-in standard facilitator: /verify, /settle, and /supported are not provided. The resource server sends the actual HTTP 402/PAYMENT-REQUIRED response and waits for confirmed settlement before granting access. accepted.amount is an exact atomic-unit string. Retain the initiation wrapper reference for merchant status and expiresAt to bound the signed deadline.
Ivorypay x402 lets you charge for access to APIs, files, content, or actions using the x402 HTTP payment flow. Payments are made on-chain using USDC on Base: no custodial accounts, no card networks.
Base URL
https://facilitator.ivorypay.ioAll endpoint paths are prefixed with /api/x402:
https://facilitator.ivorypay.io/api/x402/initiate
https://facilitator.ivorypay.io/api/x402/build
https://facilitator.ivorypay.io/api/x402/submit
https://facilitator.ivorypay.io/api/x402/verify/:referenceWhat You Can Do
Create a payment requirement for a protected resource.
Build transaction signing data for a customer wallet.
Ask a customer wallet to sign the payment authorization.
Submit the signed authorization for payment processing.
Verify a payment reference and retrieve the on-chain proof.
Two Integration Flows
There are two ways to integrate, depending on how much EIP-712 signing logic you want to handle yourself:
Who computes the typed data hash?
Your code (using ethers.js)
The facilitator via POST /build
Extra API call?
No
Yes (/build)
Complexity
Higher
Lower
Best for
Full control, strict latency
Most integrations
Both flows produce the same result. Choose Flow B if you are new to EIP-712 or EIP-3009.
Next Steps
Start with Quickstart to install dependencies and choose your flow.
Review Authentication for how to pass your API key.
Check Supported Assets for available tokens and networks.
Follow the Payment Flow for the complete, annotated walkthrough.
Use the API Reference while integrating.
See Examples for complete, copy-paste ready code.
Last updated