> ## Documentation Index
> Fetch the complete documentation index at: https://docs.launcx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Payments

> Create payments and retrieve their status via the LauncX V3 API.

All requests require the standard `x-api-key` + `x-timestamp` headers — see [Authentication](/authentication).

## Create Payment

`POST /api/v1/payments`

### Request body

| Field       | Type    | Required | Default | Notes                                   |
| ----------- | ------- | -------- | ------- | --------------------------------------- |
| `price`     | number  | Yes      | —       | Amount in IDR. **Minimum 15,000.**      |
| `playerId`  | string  | Yes      | —       | Your payer/player identifier.           |
| `flow`      | string  | No       | `embed` | Checkout flow.                          |
| `expiresIn` | integer | No       | `900`   | Seconds until expiry. **Maximum 3600.** |

```bash theme={null}
curl -X POST https://live.launcx.com/api/v1/payments \
  -H "Content-Type: application/json" \
  -H "x-api-key: {{your-v3-api-key}}" \
  -H "x-timestamp: {{unix_timestamp_in_milliseconds}}" \
  -d '{
    "price": 20000,
    "playerId": "payer_id",
    "flow": "embed",
    "expiresIn": 900
  }'
```

### Response

```json theme={null}
{
  "success": true,
  "data": {
    "orderId": "130e1a1d-9e61-42ca-b57a-4854eae7878f",
    "checkoutUrl": "https://payment.launcx.com/order/130e1a1d-9e61-42ca-b57a-4854eae7878f",
    "qrPayload": "QR_CODE",
    "playerId": "payer_id",
    "totalAmount": 20000
  }
}
```

## Get Payment

`GET /api/v3/payments/{id}`

<Note>
  This endpoint is under **`/api/v3`**, not `/api/v1`.
</Note>

```bash theme={null}
curl -X GET https://live.launcx.com/api/v3/payments/{id} \
  -H "x-api-key: {{your-v3-api-key}}" \
  -H "x-timestamp: {{unix_timestamp_in_milliseconds}}"
```

### Response

| Field                    | Type           | Notes                                            |
| ------------------------ | -------------- | ------------------------------------------------ |
| `id`                     | string         | Payment UUID.                                    |
| `client_id`              | string         | Your client UUID.                                |
| `payer_id`               | string         | The `playerId` from creation.                    |
| `amount`                 | string         | Decimal string (precision-preserving).           |
| `currency`               | string         | `IDR`.                                           |
| `expired_at`             | string         | ISO 8601 UTC.                                    |
| `status`                 | string         | `PENDING` \| `SUCCESS` \| `EXPIRED` \| `FAILED`. |
| `platform_fee`           | string         | Decimal string.                                  |
| `net_amount`             | string         | Decimal string.                                  |
| `paid_at`                | string \| null | ISO 8601 UTC.                                    |
| `settled_at`             | string \| null | ISO 8601 UTC.                                    |
| `retrieval_reference_no` | string \| null |                                                  |
| `created_at`             | string         | ISO 8601 UTC.                                    |
| `updated_at`             | string         | ISO 8601 UTC.                                    |
| `client_wallet_name`     | string \| null | Present if a wallet name is configured.          |

All amounts are decimal **strings**; all timestamps are ISO 8601 UTC.
