Getting started

Kasera Pay API

Create payment requests from your code, get a checkout link, and know for certain when the money arrives.

Base URLhttps://pay.kasera.id/v1

OpenAPI spec the machine-readable description of every endpoint below.

Every request uses HTTPS and returns JSON. All amounts are whole rupiah (no decimals): amount = fee + net, always. Timestamps use ISO-8601 with a +07:00 offset.

Six endpoints, bearer authentication, and a payment.paid webhook. Need an account? Sign up in the dashboard, then create an API key under Developer.

Quickstart

Create your first payment request in Sandbox, with a test mode key. Nothing here moves money: test objects carry the same fields, fees and webhooks as live ones.

curl https://pay.kasera.id/v1/transactions \
  -H "Authorization: Bearer kp_test_..." \
  -H "Idempotency-Key: order-1234" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 150000,
    "description": "Community T-shirt",
    "external_id": "ORD-1234"
  }'

Send the checkout_url from the response to the buyer — that is Kasera Pay Checkout, and it is the whole integration. To render the payment inside your own screens instead, see Direct API. To learn when it's paid, set up a webhook — don't poll.

To see the request reach succeeded and the signed webhook fire, complete the test payment with the simulation endpoint on the test mode page.

Go live

When the integration works in Sandbox, swap the key for your kp_live_ one. Nothing else changes: the same request creates a real payment. Live and test mode have separate webhook endpoints and signing secrets, so point the live endpoint at your server before the first real payment.

Never put kp_live_ in frontend code or a public repository. Call the API only from your own server.

The API collects payments into your own account. Payouts go only to the account owner's verified bank account; there is no API for sending money to third-party bank accounts. Money meant for another person or legal entity needs that party's own verified account: see Payouts and payments on behalf of an organisation.