Warning: Provisional contract proposal
These endpoints are not operational and no SDK is published. Examples use test identifiers only and nothing is sent anywhere.
Documentation
Build on the KrokoPay API
A REST contract for charges, the hosted checkout, customers, subscriptions and webhooks. Read it end to end, walk the flows in the test environment, and integrate when the endpoints go live.
Start with the quickstart
From a test key to a paid test charge in five steps, using only cURL or fetch. Nothing to install.
- Get your test keys
- Store the secret key
- Create a charge
- Pay in the test checkout
- Confirm the payment
At a glance
- Base URL
- https://api.krokopay.app/v1
- Proposal version
- 2026-11-01
- Authentication
- Authorization: Bearer kp_test_sk_…
- Format
- JSON over HTTPS, snake_case fields, amounts in centavos
- Environment
- Test only
Browse by topic
Get started
5 pagesWhat the platform is, your first test charge, keys and the test environment.
- IntroductionKrokoPay is a payments platform with its own checkout. This page explains the objects you work with, the environments and the conventions every endpoint follows.
- QuickstartFrom a test key to a paid test charge in five steps, using only cURL or fetch. Nothing to install.
- AuthenticationEvery request is authenticated with your secret key, sent as a Bearer token over HTTPS. This page covers the header, the two key types and the errors you get when something is wrong.
- API keysThe keys that identify your account: what each one is for, how to recognize it by its prefix, and how to store, roll and replace it safely.
- Test environmentEverything you can try today without real money: test keys, test cards for each outcome, a simulated Pix payment and simulated webhooks, plus what is not available yet.
Payments
4 pagesCharges, the hosted checkout, customers and recurring billing.
- Creating chargesA charge is a single request for money from a buyer. Create it on your server, send the buyer to its checkout_url, and follow its status until it is paid, failed or expired.
- CheckoutKrokoPay hosts the payment page for every charge and payment link. Send the buyer to one URL; the checkout handles Pix, cards, your brand and every outcome.
- CustomersA customer is the person or company that pays you. Attach customers to charges and subscriptions to keep a payment history per buyer.
- SubscriptionsCharge a customer every month or year from a recurring price. Start subscriptions from a payment link or the API, and follow renewals, failures, pauses and cancellations through events.
Reliability
3 pagesEvents, safe retries and how errors are reported.
- WebhooksKrokoPay sends an HTTPS POST to your server when something happens to a charge, subscription or payout. Verify the signature, answer 2xx quickly and process the event once.
- IdempotencyRetry POST requests safely. Send an Idempotency-Key header and KrokoPay performs the operation once, answering every repeat with the original response.
- ErrorsHow the API reports problems: one error object, a small set of HTTP status codes and stable error codes you can branch on, including the reasons a card payment fails.
See the flows working
The demo dashboard creates charges, payment links and webhook deliveries with the same objects these pages describe.
Open the developer areaMissing something?
The contract is still open. Tell us which resources or fields your integration needs.
Talk to us