Skip to main content
POST
/
v1.0
/
payment-link-manage
/
{account_id}
Create payment link
curl --request POST \
  --url https://singa-payment-gateway.test/api/v1.0/payment-link-manage/{account_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "reff_no": "INV-20260508-001",
  "title": "Invoice May 2026",
  "max_usage": 100,
  "total_amount": 150000,
  "items": [
    {
      "name": "Subscription Plan",
      "quantity": 1,
      "unit_price": 150000
    }
  ],
  "required_customer_detail": true,
  "expired_at": 1780232399000,
  "whitelisted_payment_method": [
    "QRIS"
  ],
  "redirect_url": "https://merchant.example.com/payment/success",
  "optional_metadata": {}
}
'
{
  "status": 200,
  "success": true,
  "data": {
    "id": 12345,
    "reff_no": "INV-20260508-001",
    "title": "Invoice May 2026",
    "payment_url": "https://pay.example.com/b2b/INV-20260508-001",
    "status": "open",
    "status_computed": "open",
    "is_expired": false,
    "required_customer_detail": true,
    "max_usage": 100,
    "current_usage": 0,
    "total_amount": 150000,
    "items": [
      {
        "name": "Subscription Plan",
        "quantity": 1,
        "unit_price": 150000,
        "subtotal": 150000
      }
    ],
    "whitelisted_payment_method": [
      "QRIS"
    ],
    "expired_at": "2026-05-31T23:59:59+07:00",
    "redirect_url": "https://merchant.example.com/payment/success",
    "optional_metadata": {},
    "payment_date": "2026-05-08T14:30:00+07:00",
    "created_at": "2026-05-08T14:30:00+07:00",
    "updated_at": "2026-05-08T14:30:00+07:00",
    "account": {
      "id": "01HZ7N9K3R0F2QW3X4Y5Z6V7AB",
      "name": "Main Operating Account",
      "status": "active",
      "email": null,
      "phone": null
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.singapay.id/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Merchant access token obtained from POST /v1.0/access-token/b2b. Send as Authorization: Bearer <token>.

Path Parameters

account_id
string
required

Account ULID.

Example:

"01HZ7N9K3R0F2QW3X4Y5Z6V7AB"

Body

application/json

Request body for POST /v1.0/payment-link-manage/{account_id}.

reff_no
string
required
Maximum string length: 40
Example:

"INV-20260508-001"

title
string
required
Maximum string length: 255
Example:

"Invoice May 2026"

max_usage
integer
required
Required range: 1 <= x <= 1000000
Example:

100

total_amount
number<float>
required
Example:

150000

items
object[]
required
Minimum array length: 1
required_customer_detail
boolean
Example:

true

expired_at
integer | null

Unix timestamp in milliseconds.

Example:

1780232399000

whitelisted_payment_method
string[] | null
redirect_url
string | null
Example:

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

optional_metadata
object

Response

Payment link created successfully.

Standard success envelope wrapping one payment link.

status
integer
required
Example:

200

success
boolean
required
Example:

true

data
PaymentLink · object
required

Payment Link resource returned by merchant API.