Singapay Home Page
Logo Icon
  1. Payment Link
  2. Create

Information

MethodPathFormatAuthentication
POSTapi/v1.0/payment-link-manage/{account_id}jsonOAuth 2.0 with Access Token

Request Details

Headers Structure

FieldValueTypeMandatoryLengthDescriptionExample
X-PARTNER-IDapi_keyAlphanumericMandatoryAPI key obtained from the merchant dashboard.b3ed7d4b-a96c-6c08-b3c7-12c3124242d9
Acceptapplication/jsonAlphabeticMandatorySpecifies JSON as the expected response format.application/json
AuthorizationBearer {bearerToken}AlphanumericMandatoryBearer token obtained from the get access token endpoint.Bearer eyJ0eXAiOiJKV1{…}

Body Structure

FieldTypeMandatoryLengthDescriptionExample
reff_noAlphanumericMandatory-Unique reference number for the payment link (usually filled by the calling system).PL20250121001
titleAlphanumericMandatory-Title or name for the payment link.Invoice Pembelian Laptop
required_customer_detailBooleanMandatory1Determines if the customer is required to fill in contact details (name, email, phone).true
max_usageNumericMandatory-The maximum number of times this payment link can be used. (Min: 1, Max: 1,000,000)10
expired_atNumericConditional-Expiration date/time of the payment link (in Epoch/Unix Millisecond Timestamp format / 13 digits). It is null if there is no expiration.1738368000000
total_amountNumericMandatory-The total amount to be paid. Must be at least 10,000.100000
itemsArray ObjectMandatory-List of items included in the payment.-
> nameAlphabeticMandatory-Name of the item.Laptop ASUS ROG
> quantityNumericMandatory-Quantity of the item.1
> unit_priceNumericMandatory-Price per unit of the item. Can be negative for discounts.50000
whitelisted_payment_methodArray String/NullConditional-List of allowed (whitelisted) payment method codes for this link.[ “VA_BRI”, “QRIS”, “INDOMARET” ]
redirect_urlString/NullConditional2048URL to redirect the customer after payment success or expiry. Set to null or omit to disable.https://example.com/thank-you

Body Example

{
    "reff_no": "PL20251027A002",
    "title": "Pembelian Tiramisu + Ongkir + Pajak",
    "required_customer_detail": true,
    "max_usage": 5,
    "expired_at": 1761801600000,
    "total_amount": 55000,
    "items": [
        {
            "name": "Tiramisu Cake Slice",
            "quantity": 2,
            "unit_price": 25000
        },
        {
            "name": "Pajak (10%)",
            "quantity": 1,
            "unit_price": 5000
        },
        {
            "name": "Ongkir",
            "quantity": 1,
            "unit_price": 10000
        },
        {
            "name": "Promo Ongkir",
            "quantity": 1,
            "unit_price": -10000
        }
    ],
    "whitelisted_payment_method": ["VA_BRI", "QRIS", "INDOMARET"],
    "redirect_url": "https://example.com/thank-you"
}

Response Details

Response Structure

FieldTypeMandatoryLengthDescriptionExample
statusNumericMandatory3HTTP Status Code.200
successBooleanMandatory1Indicates the success of the request.true
dataObjectMandatory-The main object containing the details of a single payment link.-
> idNumericMandatory-Internal ID of the Payment Link.104
> reff_noAlphanumericMandatory-Reference number of the Payment Link.PL20250121001
> titleAlphanumericMandatory-Title of the payment link.Invoice Pembelian Laptop
> payment_urlStringMandatory-URL to access the payment link.http://localhost:3000/b2b/PL
> statusAlphabeticMandatory-Status of the payment link. Values are open or closed.open
> status_computedAlphabeticMandatory-The computed status of the payment link. Values are open, closed, or expired.expired
> required_customer_detailBooleanMandatory1Indicates if customer details are required.true
> max_usageNumericMandatory-Maximum usage count for the payment link.10
> current_usageNumericMandatory-Current usage count of the payment link.0
> expired_atDatetime/NullConditional-Expiration date of the payment link (ISO 8601 format). It is null if there is no expiration.2025-02-01T00:00:00+07:00
> is_expiredBooleanMandatory1Indicates if the payment link has expired.true
> total_amountNumericMandatory-Total amount of the payment link.100000.00
> itemsArray Object/NullConditional-List of items included in the payment.-
>> nameAlphabeticMandatory-Name of the item.Laptop ASUS ROG
>> quantityNumericMandatory-Quantity of the item.1
>> unit_priceNumericMandatory-Price per unit of the item.50000
>> subtotalNumericMandatory-Subtotal for the item (quantity * unit_price).50000
> whitelisted_payment_methodArray String/NullConditional-List of allowed (whitelisted) payment method codes. It is null if all methods are allowed.[ “VA_BRI”, “QRIS”, “INDOMARET” ]
> redirect_urlString/NullConditional-URL to redirect the customer after payment success or expiry. It is null if not set.https://example.com/thank-you
> payment_dateDatetime/NullConditional-Date/time of the last successful payment (ISO 8601 format or null).2025-10-21T18:29:13+07:00
> created_atDatetimeMandatory-Creation date/time of the payment link (ISO 8601 format).2025-10-21T18:29:13+07:00
> updated_atDatetimeMandatory-Last update date/time of the payment link (ISO 8601 format).2025-10-21T18:29:13+07:00
> accountObjectMandatory-Account information associated with the payment link.-
>> idAlphanumericMandatory-Account ID.01K7P073Q8RE2A9PQT8Q7MXPN4
>> nameAlphabeticMandatory-Account Name.Moh. Zulkifli Katili
>> emailStringMandatory-Account email address.tes@gmail.com
>> phoneNumericMandatory-Account phone number.08123993201
>> statusAlphabeticMandatory-Account Status.active

Response Example

Success: Here’s an example of a successful response.

{
    "status": 200,
    "success": true,
    "data": {
        "id": 104,
        "reff_no": "PL20250121001",
        "title": "Invoice Pembelian Laptop",
        "payment_url": "http://localhost:3000/b2b/PL20250121001",
        "status": "open",
        "status_computed": "expired",
        "required_customer_detail": true,
        "max_usage": 10,
        "current_usage": 0,
        "expired_at": "2025-02-01T00:00:00+07:00",
        "is_expired": true,
        "total_amount": "100000.00",
        "items": [
            {
                "name": "Laptop ASUS ROG",
                "quantity": 1,
                "unit_price": 50000,
                "subtotal": 50000
            },
            {
                "name": "Mouse Wireless",
                "quantity": 1,
                "unit_price": 50000,
                "subtotal": 50000
            }
        ],
        "whitelisted_payment_method": [
            "VA_BRI",
            "QRIS",
            "INDOMARET"
        ],
        "redirect_url": "https://example.com/thank-you",
        "payment_date": "2025-10-21T18:29:13+07:00",
        "created_at": "2025-10-21T18:29:13+07:00",
        "updated_at": "2025-10-21T18:29:13+07:00",
        "account": {
            "id": "01K7P073Q8RE2A9PQT8Q7MXPN4",
            "name": "Moh. Zulkifli Katili",
            "email": "tes@gmail.com",
            "phone": "08123993201",
            "status": "active"
        }
    }
}