---
seo:
  description: >-
    The Apipay API lets you accept payments, manage customers, and react to
    payment events in real time. All requests and responses use JSON, and every
    request…
sidebar:
  label: Overview
title: Apipay API
---
The Apipay API lets you accept payments, manage customers, and react to
payment events in real time. All requests and responses use JSON, and
every request must be authenticated with a bearer API key.

## Authentication

Pass your secret API key as a bearer token on every request:

```
Authorization: Bearer sk_live_...
```

Use a `sk_test_...` key against the sandbox server to build and test
without moving real money.

Version 1.0.0

Base URL: `https://api.apipay.id/v1`, `https://sandbox.apipay.id/v1`

## Payments

Create and manage payments.

- [`GET /payments`](/api/payments/list-payments) — List payments.
- [`POST /payments`](/api/payments/create-payment) — Create a payment.
- [`GET /payments/{paymentId}`](/api/payments/get-payment) — Retrieve a payment.
- [`POST /payments/{paymentId}/cancel`](/api/payments/cancel-payment) — Cancel a payment.

## Customers

Store customer details for repeat payments.

- [`GET /customers`](/api/customers/list-customers) — List customers.
- [`POST /customers`](/api/customers/create-customer) — Create a customer.
- [`GET /customers/{customerId}`](/api/customers/get-customer) — Retrieve a customer.

## Webhooks

- [`POST paymentSucceeded`](/api/webhooks/payment-succeeded) — payment.succeeded.
- [`POST paymentFailed`](/api/webhooks/payment-failed) — payment.failed.
