---
search:
  tags:
    - Payments
    - POST
seo:
  description: >-
    Creates a payment for the given amount and method. Returns the payment with
    a pending status… Reference for the POST /payments endpoint in the Apipay
    API.
sidebar:
  label: Create a payment
  badge: POST
title: Create a payment
type: openapi-operation
---
Creates a payment for the given amount and method. Returns the payment with a `pending` status until the customer completes it.

`POST /payments`

**Request body** (`application/json`, required)

- `amount` (integer, required)
- `currency` (string, required)
- `method` (PaymentMethod, required)
- `customer_id` (string)
- `description` (string)

Request body example:

```json
{
  "amount": 150000,
  "currency": "IDR",
  "method": "qris",
  "customer_id": "cus_8f3a2b1c",
  "description": "Order"
}
```

**Responses**

- `201` — The created payment.
- `400` — The request was malformed or missing a required field.
- `401` — The API key is missing, invalid, or revoked.

Response example, 201:

```json
{
  "id": "pay_6b2f9d4e",
  "amount": 150000,
  "currency": "IDR",
  "method": "qris",
  "status": "pending",
  "customer_id": "cus_8f3a2b1c",
  "description": "Order",
  "created_at": "2019-08-24T14:15:22Z"
}
```
