Get Payment Details

Get all payment information created using a specific payment link.


Endpoints: /v1/payment-links/{order_id}
HTTP Method: GET

Accept: application/json
Content-Type: application/json
Authorization: Basic AUTH_STRING

AUTH_STRING value is result of basicAuth("YourServerKey"+":")

order_id refers to your payment link Order ID.

Midtrans API validates HTTP request by using Basic Authentication method. The username is your Server Key while the password is empty. The authorization header value is represented by AUTH_STRING. AUTH_STRING is base-64 encoded string of your username and password separated by colon symbol (:). For more details, refer to API Authorization and Headers.


Sample Response

  "id": "1",
  "payment_link_url": "",
  "order_id": "001",
  "payment_link_type": "FIXED_AMOUNT",  
  "merchant_id": "M001",
  "payment_link_id": "abc",
  "enabled_payments": [
  "usage_limit": 2,
  "gross_amount": 190000,
  "credit_card_3d_secure": true,
  "whitelist_bins": [
  "expiry_start": "2020-12-31 18:00 +0700",
  "expiry_duration": 2,
  "expiry_unit": "days",
  "usage": 2,
  "item_details": [
      "id": "1",
      "name": "Pillow",
      "price": 95000,
      "quantity": 2,
      "brand": "Midtrans",
      "category": "Furniture",
      "merchant_name": "PT. Midtrans",
      "item_id": "pil-001",
      "payment_link_id": "1",
      "created_at": "2017-11-02T10:53:21.000Z",
      "updated_at": "2017-11-02T10:53:21.000Z"
  "customer_details": {
    "id": "1",
    "first_name": "John",
    "last_name": "Doe",
    "email": "[email protected]",
    "phone": "+62181000000000",
    "notes": "Thank you for your purchase. Please follow the instructions to pay.",
    "payment_link_id": "1",
    "created_at": "2017-11-02T10:53:21.000Z",
    "updated_at": "2017-11-02T10:53:21.000Z"
  "purchases": [
           "id": 49118,
           "snap_token": "4fdbd319-0706-4cc7-9fb5-508bf8824886",
           "order_id": "1525840754698-1658897316-1658897332986",
           "payment_status": "EXPIRE",
           "payment_method": "BANK_TRANSFER",
           "created_at": "2022-07-27T04:48:53.000Z",
           "updated_at": "2022-07-27T04:49:09.000Z",
           "payment_link_id": 54210
           "id": 49119,
           "snap_token": "b50ac063-32e3-4e94-b951-86099bc42dc6",
           "order_id": "1525840754698-1658897316-1658897356076",
           "payment_status": "PENDING",
           "payment_method": "BANK_TRANSFER",
           "created_at": "2022-07-27T04:49:16.000Z",
           "updated_at": "2022-07-27T04:49:27.000Z",
           "payment_link_id": 54210
//the following info are only for dynamic_amount type :
  "dynamic_amount": {
    "min_amount": 5000,
    "max_amount": 5000,
    "preset_amount": 5000

Response Detail

idStringID of payment link
order_idStringOrder ID of payment link or Transactions. Order ID returned under purchases refer to transaction's order ID
payment_link_typeStringType of payment link whether it's DYNAMIC_AMOUNT and FIXED_AMOUNT
merchant_idStringMerchant's Midtrans account ID
payment_link_idStringPayment link ID, refers to last part of payment link URL. E.g. if payment link URL is, payment link ID refers to abc
usage_limitIntegerMaximum usage of payment link (counted by # of successful payment that can be made)
usageIntegerCurrent count of payment link usage (counted by # of successful payment that have been made)
gross_amountIntegerTransaction amount
enabled_paymentsArrayList of payment methods that are enabled for said payment link
item_detailsObjectTransaction's item details
customer_detailsObjectDetails of customer of each transactions
expiry_startStringPayment link's expiry start time
expiry_durationIntegerPayment link's expiry duration
expiry_unitStringTime unit of payment link's expiry duration
purchasesArrayList of transactions made using the specified payment link