Skip to main content
This guide takes you from zero to a working, hosted checkout you can send a customer to.

1. Get an API key

Open the app, go to Developers, and create a key. The full secret is shown once — copy it immediately and store it somewhere safe. Keys look like:
Treat your secret key like a password. Never commit it, never ship it in client-side code, and never paste it into a page or chat. If a key leaks, revoke it in Developers and create a new one.
You can also create a key over the API — see API keys.

2. Confirm the key works

Every request authenticates with an Authorization: Bearer header. Ping the API to check your key and see which account it is scoped to:
Response

3. Create a payment

Create a hosted checkout session. The only required fields are amount, currency and a redirect_url to return the customer to when they are done.
The response includes a checkout_url. Redirect the customer there.

4. Send the customer to checkout

Redirect to checkout_url. Pesarc hosts the payment page, handles the on-chain settlement and gas sponsorship, then returns the customer to your redirect_url.

5. Confirm the result

Do not trust the browser redirect alone. Confirm the payment server-side:
  • Webhook — if you passed a webhook_url, Pesarc notifies your endpoint when the payment settles. See Webhooks.
  • Poll — read the session status any time from GET /checkout/:id.
That’s a full loop: key → payment → hosted checkout → confirmation. From here, wire it into your store, your SaaS billing, or an AI agent.