curl https://pesarc.xyz/api/v1/payments \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"amount": 50000,
"currency": "NGN",
"reference": "order_1042",
"merchant_name": "Ada Fabrics",
"redirect_url": "https://ada-fabrics.com/thanks",
"webhook_url": "https://ada-fabrics.com/api/pesarc/webhook"
}'
{
"id": "pay_7Q2m",
"checkout_url": "https://pesarc.xyz/checkout/pay_7Q2m",
"status": "pending"
}
{
"error": {
"type": "invalid_request_error",
"message": "payout_address must be a 0x EVM address"
}
}
Endpoints
Create a payment
Create a hosted checkout session and get a checkout_url to send the customer to.
POST
/
api
/
v1
/
payments
curl https://pesarc.xyz/api/v1/payments \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"amount": 50000,
"currency": "NGN",
"reference": "order_1042",
"merchant_name": "Ada Fabrics",
"redirect_url": "https://ada-fabrics.com/thanks",
"webhook_url": "https://ada-fabrics.com/api/pesarc/webhook"
}'
{
"id": "pay_7Q2m",
"checkout_url": "https://pesarc.xyz/checkout/pay_7Q2m",
"status": "pending"
}
{
"error": {
"type": "invalid_request_error",
"message": "payout_address must be a 0x EVM address"
}
}
Creates a payment session. Redirect the customer to the returned
checkout_url;
Pesarc hosts the payment page, settles on-chain and sponsors gas.
Request
string
required
Bearer sk_live_…number
required
Amount to charge, in
currency. Positive, up to 1,000,000,000.string
required
Currency code, 2–8 characters (e.g.
NGN, GHS, KES).string
required
Where to send the customer when they finish. Must be a valid URL.
string
Your own id for this payment (max 64 chars). Use it to reconcile and dedupe.
string
Name shown to the customer on the checkout page (max 80 chars).
string
Short description of what’s being paid for (max 300 chars).
string
Optional
0x EVM address to settle this payment to.object
Arbitrary key/value data echoed back to you on reads and webhooks.
integer
How long the session stays open, 1–1440 minutes.
Response
string
The hosted page to redirect the customer to.
string
The payment id.
string
Initial status (e.g.
pending).curl https://pesarc.xyz/api/v1/payments \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"amount": 50000,
"currency": "NGN",
"reference": "order_1042",
"merchant_name": "Ada Fabrics",
"redirect_url": "https://ada-fabrics.com/thanks",
"webhook_url": "https://ada-fabrics.com/api/pesarc/webhook"
}'
{
"id": "pay_7Q2m",
"checkout_url": "https://pesarc.xyz/checkout/pay_7Q2m",
"status": "pending"
}
{
"error": {
"type": "invalid_request_error",
"message": "payout_address must be a 0x EVM address"
}
}
Confirm the final outcome server-side — via webhooks or
GET /checkout/:id — rather than trusting the
browser redirect.