Transaction History List API

This API is used to get merchant's transaction history list

Path/{version}/transaction-history-list
HTTP MethodPOST
Versionv1.0
SNAP Service Code12

Request Header

Field NameField TypeMandatoryField Description
Content-typeStringMMedia type of the resource, i.e. application/json
X-TIMESTAMPStringMClient’s current local time in ISO-8601 format
X-SIGNATUREStringMUnique identifier for partner
AuthorizationStringMRepresents access_token of a request; string starts with keyword “Bearer ” followed by access_token. Can get this token from Access Token B2B response
X-PARTNER-IDStringMUnique identifier for partner
X-EXTERNAL-IDStringMAlphanumeric string. Preferably UUID. Reference number that should be unique in the same day or 1 day idempotency key
CHANNEL-IDStringMDevice identification on which the API services are currently being accessed by the end user. Given by BI
Content-type: application/json
X-TIMESTAMP: 2020-12-18T15:34:40+07:00
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
Authorization: Bearer gp9HjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
X-PARTNER-ID: 82150823919040624621823174737537
X-EXTERNAL-ID: 41807553358950093184162180797837
CHANNEL-ID: 95221

Request Body

Field NameField TypeMandatoryField Description
referenceNoString(64)OTransaction identifier on service provider system
partnerReferenceNoString(64)OTransaction identifier on service consumer system
fromDateTimeString(25)OStarting time range in ISO-8601 format. Default: NOW - 3 months. Limited to the latest of 6 months, e.g: if NOW = 2024-02-23T23:59:59+07:00, fromDateTime can start from 2023-08-01T00:00:00+07:00
toDateTimeString(25)OEnding time range in ISO-8601 format. Default: NOW
pageSizeintOMaximum number of transaction returned in one pagination. Default: 10. Max: 50
pageNumberintOCurrent page number. Default: 0
additionalInfoObjectOAdditional information
additionalInfo.typesArray of StringOTransaction type, i.e: PAYMENT, TOP_UP, WITHDRAWAL, DISBURSEMENT
additionalInfo.{type}.statusesArray of StringOTransaction status. {type}: payment, topUp, withdrawal, disbursement
{
  "referenceNo": "2020102977770000000009",
  "partnerReferenceNo": "2020102900000000000001",
  "fromDateTime":"2019-07-03T12:08:56+07:00",
  "toDateTime":"2020-07-03T12:08:56+07:00",
  "pageSize":"10",
  "pageNumber":"2",
  "additionalInfo": {
    "types": ["PAYMENT", "TOP_UP", "WITHDRAWAL", "DISBURSEMENT"],
    "payment": {
      "statuses": ["DENIED"]
    },        
    "topUp": {
      "statuses": ["SETTLEMENT"]
    },
    "withdrawal": {
      "statuses": ["CANCELLED"]
    },
    "disbursement": {
      "statuses": ["FAILED"]
    }
  }
}

Response Header

Field NameField TypeMandatoryField Description
Content-typeStringMMedia type of the resource, i.e. application/json
X-TIMESTAMPStringMClient’s current local time in ISO-8601 format
Content-type: application/json
X-TIMESTAMP: 2020-12-18T15:34:40+07:00

Response Body

Field NameField TypeMandatoryField Description
responseCodeString(7)MResponse code (HTTP status code + service code + case code)
responseMessageString(150)MResponse description
dateTimeString(25)MTransaction created time in ISO-8601 format
amountObjectMAmount information
amount.valueString(16,2)MNet amount of the transaction
amount.currencyString(3)MCurrency
remarkString(256)OTransaction remark
statusString(32)MTransaction status (BI-SNAP)
typeString(32)MTransaction type (BI-SNAP)
additionalInfoObjectOAdditional information
additionalInfo.referenceNoString(64)MTransaction identifier on service provider system
additionalInfo.partnerReferenceNoString(64)MTransaction identifier on service consumer system
additionalInfo.statusString(32)MTransaction status (Midtrans)
additionalInfo.typeString(32)MTransaction type (Midtrans)
additionalInfo.channelString(100)MTransaction channel
additionalInfo.customerEmailString(100)OCustomer email
additionalInfo.accountNoString(32)OAccount number
{
  "responseCode": "2001200",
  "responseMessage": "Success",
  "detailData": [
    {
      "dateTime": "2019-07-03T12:08:56+07:00"",
      "amount": {
        "value": "12345678.00",
        "currency": "IDR"
      },
      "remark": "Payment to Warung Ikan Bakar",
      "status": "SUCCESS",
      "type": "PAYMENT",
      "additionalInfo": {
        "referenceNo": "2020102977770000000009",
        "partnerReferenceNo": "2020102900000000000001",
        "status": "SETTLEMENT",
        "type": "PAYMENT",
        "channel": "qris",
        "customerEmail": "[email protected]",
        "accountNo": "123456"
      }
    }
  ]
}
{
  "responseCode": "4011200", 
  "responseMessage": "Unauthorized. Client"
}

List of Response Codes

Response CodeHTTP StatusDescription
2001200200Successful
4001201400Invalid field format {........}
4001202400Missing mandatory field {........}
4011200401Unauthorized signature
4011201401Access token invalid
4031218403Inactive account
4091200409Cannot use same X-EXTERNAL-ID in same day
5001201500Unknown internal server failure, please retry the process again