Payment Flow
Flow
Strategy
When to use
Flow A — Client-Side EIP-712
What you need before starting
npm install ethersimport { ethers } from 'ethers';
const BASE_URL = 'https://facilitator.ivorypay.io';
const API_KEY = process.env.IVORYPAY_API_KEY;
const PRIVATE_KEY = process.env.EVM_PRIVATE_KEY;Step 1 — Initiate the payment
Step 2 — Decode the payment requirement
Step 3 — Build the EIP-712 typed data hash locally
Step 4 — Sign the hash
Step 5 — Build the payment-signature header
Step 6 — Submit the payment
Flow B — Facilitator-Assisted Build
Step 3 — Call /build to get the typed data hash
/build to get the typed data hashFlow C — Permit2 Signing
What you need before starting
Step 1 — Initiate the payment
Step 2 — Decode the payment requirement
Step 3 — Call /build to get the typed data hash and spender
/build to get the typed data hash and spenderStep 4 — Build the Permit2 typed data hash locally
Step 5 — Sign the hash
Step 6 — Build the payment-signature header and submit
Verify a Payment Reference
Last updated