Authentication
Keep merchant keys on the server and authenticate Ivorypay x402 initiation and transaction-status requests.
Initiation and merchant transaction-status requests require your merchant API key. Build and signed submit are public facilitation endpoints; do not send a merchant secret from a payer client.
Send it in the Authorization header: no Bearer prefix, just the raw key:
Authorization: <merchant-api-key>Example:
curl -X POST "https://facilitator.ivorypay.io/api/x402/initiate" \
-H "Authorization: $IVORYPAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": 0.01,
"token": "USDC",
"network": "BASE_MAINNET",
"resourceUrl": "https://yourapp.com/premium-content",
"resourcesDescription": "Access to premium content"
}'Keep Keys Server-Side
Do not expose your merchant API key in browser code, mobile apps, or public repositories.
Recommended pattern:
Your frontend requests paid access from your backend.
Your backend calls Ivorypay x402 using the merchant API key.
Your backend returns only the x402 payment payload needed by the client.
Your frontend asks the customer wallet to sign.
Your backend submits the signed payment payload.
Missing API Key
If the Authorization header is missing on initiation or transaction status, the API returns an error:
Last updated