JSON Objects

Amount


{
       "vat": "12313",
       "discount": "1000",
       "shipping": "11"
 }

Parameter

Description

vat Integer Required from 0 - 99999999999

Tax amount

discount
Integer Required from 0 - 99999999999

Discount amount in positive integer

shipping
Integer Optional from 0 - 99999999999

Shipping amount


📘

Note

Product gross amount total + VAT + shipping - discount should not be less than 0




Customer Details


{
   "id": "customer_id",
   "name": "merchant A",
   "email": "[email protected]",
   "phone": "82313123123"
 }

Parameter

Description

Id String(36) Optional

Id of the customer

Name
String(40) Required

Name of the customer

Email
String(255) Optional

Email of the customer

Phone
String (15) Optional

Phone number of the customer and not start with “0”




Payment Link


{
    "is_custom_expiry": true,
    "enabled_payments": [
        "bca_va"
    ],
    "credit_card": {
        "secure": true,
        "type": "authorize",
        "bank": "bni",
        "whitelist_bins": [
            "48111111"
        ],
        "installment": {
            "required": true,
            "terms": {
                "mandiri": [
                    3
                ],
                "bca": [
                    3
                ],
                "bni": [
                    3
                ],
                "bri": [
                    3
                ],
                "cimb": [
                    3
                ],
                "maybank": [
                    3
                ],
                "offline": [
                    3
                ]
            }
        }
    },
    "bca_va": {
        "number": "12345678901",
        "free_text": {
            "inquiry": [
                {
                    "id": "id inquiry",
                    "en": "en inquiry"
                }
            ],
            "payment": [
                {
                    "id": "id payment",
                    "en": "en payment"
                }
            ]
        }
    },
    "bni_va": {
        "number": "12312312312"
    },
    "permata_va": {
        "number": "12312312312",
        "recipient_name": "name"
    },
    "bri_va": {
        "number": "12312312312"
    },
    "cimb_va": {
        "number": "12312312312"
    },
    "expiry": {
        "unit": "months",
        "duration": 1,
        "start_time": "2025-02-21 09:48:29 +0700"
    }
}

Parameter

Description

Is_custom_expiry Boolean, default: false

Indicate payment link to use custom expiry. If false then the payment link expiry will be same as invoice due_date

Enabled_payments
array<string> Required

Payment methods that will be used in payment link. Please refer to here for the available payments.

bca_va
Object: Optional

BCA VA properties for payment link. Please refer to here for more details. (Note: sub_company_code will not be used).

bni_va
Object: Optional

BNI VA properties for payment link. Please refer to here for more details.

permata_va
Object: Optional

Permata VA properties for payment link. Please refer to here for more details.

bri_va
Object: Optional

BRI VA properties for payment link. Please refer to here for more details.

cimb_va
Object: Optional

CIMB VA properties for payment link. Please refer to here for more details.

Expiry
Object: Optional

Payment link expiry property. Please refer to here for more details. (Note: either duration or start_time must be 2 years or 730 days from now)

credit_card
Object: Optional

Payment link credit card property. Please refer to here for more details.




Virtual Account


{
   "name": "bca_va",
   "number": "12345678901"
}

Parameter

Description

Name String Required

Bank provider name, should be either bca_va, mandiri_bill, bni_va, bri_va, cimb_va,
permata_va

Number
String Optional

Custom va number with different min and max length for each bank provider
bca_va: min 11 and max 11
mandiri_bill: min 1 and max 12
bni_va: min 1 and max 8
bri_va: min 1 and max 13
cimb_va: min 1 and max 16
permata_va: min 10 and max 10




Item Detail


{
    "item_id": "SKU1111",
    "description": "midtrans pillow",
    "quantity": 1,
    "price": 2000
}

Parameter

Description

Item_id String(30) Optional

Id of the item

Description
String(150) Required

Name or description of the item

Quantity
Integer Required

Number of items (max: 99999999)

Price
Integer Required

Price of items (max: 99999999)