Payments, built into your checkout.
The Kashu® API lets your server charge cards, save them for later, bill subscriptions and hear about every change by webhook. Start in test mode: test keys never touch live data.
Start here
Make a test payment, then learn how keys and modes work.
Quickstart
In this guide you take a test payment from start to finish. You make a checkout session on your server, pay it in a local test page with Kashu's card form, read the payment back and refund it. Everything runs in test mode, so no real card is charged.
Keys and modes
Every request carries an API key as a Bearer token in the Authorization header. The key decides which account the request acts for, whether it sees test or live data, and what it may do.
Conventions
The rules every endpoint follows.
Idempotency
A network error can leave you unsure whether a request reached Kashu. An idempotency key makes the retry safe. Send the request again with the same Idempotency-Key header, and Kashu answers with the result of the first request instead of doing the work twice.
Errors
When Kashu cannot carry out a request, it answers with an HTTP status of 400 or more and one error object. Every error the API can return is in the table at the end of this page, and every error's doc_url links to its row.
Pagination
Every list endpoint answers a page at a time, newest first. A page looks like this:
Versioning
The Kashu API changes without breaking code that already works. Each path starts /v1, and within v1 the API has dated versions. The current version is 2026-11-06.
Take payments
Charge cards, save them, bill on a schedule and follow disputes.
Payments
A payment charges a card once. It takes the money at once, or it authorizes the amount now so you capture it later. Refunds return part or all of a captured payment.
Customers and saved cards
A customer is a buyer you charge more than once. Save a card for a customer, and you can charge it later from your server without the buyer typing it again.
Card form and Kashu.js
Kashu.js puts Kashu's card form in your checkout page. The buyer types their card into the form, which sits in a frame served by Kashu, so the card number never touches your page or your servers. You get back either a paid checkout session or a card token you can charge from your server.
Checkout sessions
A checkout session is one amount for a buyer to pay through Kashu's card form. Your server makes the session, your page shows the form with the session's client secret, and the form takes the card and pays. You never handle the card.
Subscriptions
A subscription bills a customer's saved card on a schedule. You state the amount and the interval when you make it. Each charge it makes, the first one included, is an ordinary payment that names the subscription.
Disputes
A dispute is a buyer asking their bank to reverse a payment. Kashu records each dispute against its payment, so you can see it, follow it and act on it in your own systems.
Stay in sync
Hear about every change on your own server.
Need keys? Kashu turns on API access for your account and sends your first test keys. Write to help@kashupay.com.