Transaction History List

This section will explain how merchants can inquiry transaction history list using SNAP specification.

ServiceCodeMethodURLDescription
12POST/{version}/transaction-history-listAPI Transaction History Detail

Request

Header

The following table is a header of request parameter:

Field NameAttrib.DatatypeDescription
Content-TypeMStringRepresent media type of request e.g “application/json”
AuthorizationMBearer token obtained from Access Token API in the format Bearer <AccessToken>
X-TIMESTAMPMString(25)Client's current local time in “yyyy-MM-ddTHH:mm:ssTZD” format
X-SIGNATUREMSee General API Symmetric Signature
X-PARTNER-IDMSee Credential Exchange
X-EXTERNAL-IDMString(max 36), NumericUnique request reference number from partner. Must be unique.
CHANNEL-IDMSee Credential Exchange

Body

The following table is a body of request parameter:

Field Name

Attrib.

Datatype

Description

fromDateTime

M

String(25)

Starting time range
Default:
NOW (DESC)
or NOW - 3 months (ASC)

toDateTime

M

String(25)

Ending time range
Default:
NOW - 3 months (DESC)
or NOW (ASC)


Response

Header

The following table is a header of response parameter:

Field NameAttrib.DatatypeDescription
X-TIMESTAMPMString(25)“yyyy-MM-ddTHH:mm:ssTZD” format

Body

The following table is a body of response parameter:

Field Name

Attrib.

Datatype

Description

responseCode

M

String(7)

Response code

responseMessage

M

String(150)

Response description

detailData

O

Array

[].dateTime

M

String(25)

Transaction date : ISO 8601 (without millis). e.g “yyyy-MM-ddTHH:mm:ssZ”

[].amount.value

M

String(16,2)

Net amount of the transaction.
If it’s IDR then value includes 2 decimal digits.
e.g. IDR 10.000, will be placed with 10000.00

[].amount.currency

M

String(3)

Currency (should always be IDR)

[].status

M

String(32)

Transaction Status
INIT, SUCCESS, CLOSED, CANCELLED

INIT: queued/approved
SUCCESS: completed/processed/non-payout
CLOSED: failed

[].type

M

String(32)

Transaction type. Will always be SEND_MONEY

[].additionalInfo.referenceNo

O

String

Unique reference_no of a payout (only if payout is present)

[].additionalInfo.beneficiaryName

O

String

Name of the beneficiary (only if payout is present)

[].additionalInfo.beneficiaryAccount

O

String

Account number of the beneficiary (only if payout is present)

[].additionalInfo.account

M

String

Name of beneficiary bank/channel used

[].additionalInfo.transactionStatus

M

String

Current status of the Transaction. Value is either credit or debit

[].additionalInfo.transactionType

M

String

Transaction Type, one of account_validation_fee, payout_fee, payout, refund, topup, topup_reversal, manual, or balance_transfer

Sample

Request

The following section is a sample of request parameter:

curl --location --request POST 'https://merchants.midtrans.com/v1.0/transaction-history-list' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIxMmUzODE4Mi00YjIxLTQ0YWMtOTVkNi1mMjFhMjEwZmIxZTAiLCJjbGllbnRJZCI6IjY2ODA1MmUzNGYxOTRhYThiZTc5ZTE1YTIxZTRmYzJmIiwibmJmIjoxNjYzODQwNTU5LCJleHAiOjE2NjM4NDE0NTksImlhdCI6MTY2Mzg0MDU1OX0.fEr0vIbB2kY8alZ-SROl3ftAFbfRd0uU-lGq9XuFi8M' \
--header 'Content-Type: application/json' \
--header 'X-TIMESTAMP: 2022-03-04T08:02:09+07:00' \
--header 'X-SIGNATURE: yqmBXZ3yV6NPG1LtwXMm3quXzJMRX5Ms+r9ebc5xWIZGSKbZL3Oy871GHb7WQUucLa5nxN/HcnZYoNHc+KkWTQ==' \
--header 'X-PARTNER-ID: 668052e34f194aa8be79e15a21e4fc2f' \
--header 'X-EXTERNAL-ID: 91919644194391346361915387229113' \
--header 'CHANNEL-ID: 95221' \
--data-raw '{
   "fromDateTime": "2019-07-03T12:08:56+07:00",
   "toDateTime": "2019-07-03T12:08:56+07:00"
}'

Response

The following section is a sample of response parameter:

Content-Type : application/json
x-timestamp  : 2022-03-04T08:02:09+07:00
-------------------------------------------------------------------------------
{
   "responseCode": "2001200",
   "responseMessage": "Success",
   "detailData": [
      {
         "dateTime": "2019-07-03T12:08:56+07:00",
         "amount": {
            "value": "12345678.00",
            "currency": "IDR"
         },
         "status": "SUCCESS",
         "type": "SEND_MONEY",
         "additionalInfo": {
            "referenceNo": "kUxaHUDZEtAvOvJifE",
            "beneficiaryName": "John Doe",
            "beneficiaryAccount": "123456",
            "account": "bca",
            "transactionStatus": "credit",
            "transactionType": "Payout"
         }
      }
   ]
Content-Type : application/json
x-timestamp  : 2022-03-04T08:02:09+07:00
-------------------------------------------------------------------------------
{"responseCode": "4011200", "responseMessage": "Unauthorized. Client"}

Migration

Request

The following table is a comparison of request parameter:

Payouts non-SNAP-based (current)

Payouts SNAP-based

Description

GET /api/v1/statements

POST /{version}/transaction-history-list

from_date

fromDateTime

Starting time range
Default:
NOW (DESC)
or NOW - 3 months (ASC)

to_date

toDateTime

Ending time range
Default:
NOW - 3 months (DESC)
or NOW (ASC)

Response

The following table is a comparison of response parameter:

Payouts non-SNAP-based (current)

Payouts SNAP-based

Description

responseCode

Response code

responseMessage

Response description

[].created_at

detailData[].dateTime

Transaction date : ISO 8601 (without millis). e.g “yyyy-MM-ddTHH:mm:ssZ”

[].amount

detailData[].amount.value

Net amount of the transaction.
If it’s IDR then value includes 2 decimal digits.
e.g. IDR 10.000, will be placed with 10000.00

detailData[].amount.currency

Currency (should always be IDR)

detailData[].status

Transaction Status
INIT, SUCCESS, CLOSED, CANCELLED

INIT: queued/approved
SUCCESS: completed/processed/non-payout
CLOSED: failed

detailData[].type

Transaction type. Will always be SEND_MONEY

[].reference_no

detailData[].additionalInfo.referenceNo

Unique reference_no of a payout (only if payout is present)

[].beneficiary_name

detailData[].additionalInfo.beneficiaryName

Name of the beneficiary (only if payout is present)

[].beneficiary_account

detailData[].additionalInfo.beneficiaryAccount

Account number of the beneficiary (only if payout is present)

[].account

detailData[].additionalInfo.account

Name of beneficiary bank/channel used

[].status

additionalInfo.transactionStatus

Current status of the Transaction. Value is either credit or debit

[].type

additionalInfo.transactionType

Transaction Type, one of account_validation_fee, payout_fee, payout, refund, topup, topup_reversal, manual, or `balance_transfer

Response Codes

Payouts non-SNAP-based (current)Payout SNAP-basedDescription
2001200Successful
4001201Invalid Field Format [fieldName]
4001202Missing Mandatory Field [fieldName]
4011200Unauthorized
4011201Invalid Token (B2B)
5001200Internal Server Error