---
title: "Create Payment Link"
method: POST
path: "/v1/payment-links"
---

# Create Payment Link

`POST /v1/payment-links`

## Request

- Base URL: `https://api.sandbox.midtrans.com`
- URL: `https://api.sandbox.midtrans.com/v1/payment-links`
- Auth: HTTP basic

## Request body

- object
  - `transaction_details` object, required
    - `order_id` string, required
    - `gross_amount` integer, required
  - `usage_limit` integer, required
  - `customer_details` object

## Response `200`

200

- object
  - `order_id` string
  - `payment_url` string

## Other responses

- `400`: 400

---

[API](https://skmtc.dev/midtrans/apis/coreapi.md) - [All operations](https://skmtc.dev/midtrans/apis/coreapi/llms.txt) - [OpenAPI document](https://skmtc.dev/midtrans/apis/coreapi/revisions/bbf7d11a1f1f?raw)
