Skip to main content
POST
Create v1 (Legacy)

Authorizations

Authorization
string
header
required

JWT issued by POST /api/v1.1/access-token/b2b. Send Authorization: Bearer <token>.

X-PARTNER-ID
string
header
required

Merchant API key (Credential.api_key). Required on every request.

Path Parameters

account_id
string
required

Account identifier in ULID format.

Body

application/json
reff_no
string
required

Merchant reference number for this payment link.

Maximum string length: 40
Pattern: ^[^\s\/]+$
Example:

"INV20240513001"

title
string
required

Title displayed for the payment link.

Maximum string length: 255
Example:

"Invoice Payment"

max_usage
integer
required

Maximum number of successful payments allowed for this link.

Required range: 1 <= x <= 1000000
Example:

1

total_amount
number
required

Total payment amount. Must equal the sum of all line items. Minimum and maximum limits depend on merchant configuration and selected payment methods.

Example:

150000

items
object[]
required

List of line items used to compose the total payment amount.

Minimum array length: 1
required_customer_detail
boolean | null

Whether customer details are required during checkout.

Example:

true

customer_pays_fee
boolean | null

When true, payment method fees are added to the amount charged to the payer.

Example:

false

expired_at
string | null

Optional expiration time as a Unix timestamp in milliseconds (13 digits), interpreted in Asia/Jakarta timezone.

Pattern: ^\d{13}$
Example:

"1705305600000"

whitelisted_payment_method
string[] | null

Restricts accepted payment methods for this link. Omit or send an empty array to allow all active payment-link methods. Each entry must be a valid payment method code from the payment methods catalog.

redirect_url
string<uri> | null

Optional URL to redirect the payer after payment flow completion.

Maximum string length: 2048
Example:

"https://merchant.example.com/payment/return"

success_redirect_url
string<uri> | null

URL to redirect the payer after successful payment. Must start with http:// or https://.

Maximum string length: 2048
Example:

"https://merchant.example.com/payment/success"

expired_redirect_url
string<uri> | null

URL to redirect the payer after payment expiry. Must start with http:// or https://.

Maximum string length: 2048
Example:

"https://merchant.example.com/payment/expired"

optional_metadata
object | null

Optional merchant-defined metadata stored with the payment link.

Response

Created

status
integer
required

HTTP status code.

Example:

200

success
boolean
required

Indicates whether the request was successful.

Example:

true

data
object

Payment link resource payload.