Settlements Details Fetch API
The following endpoint retrieves the details of all Settlements for a particular merchant
/settlements/details
Query parameters
Following are the parameters to be sent in the request body:
Field | is required? | Description |
---|---|---|
from | optional | Date Date in YYYY-MM-DD format from when the settlements should be fetched |
to | optional | Date Date in YYYY-MM-DD format up till when settlements are to be fetched |
skip | optional | integer The number of settlements to be skipped. The default value is 0. This can be used for pagination, in combination with count |
limit | optional | integer Number of settlements to be fetched. Default value is 10, Max value is 100. This can be used for pagination, in combination with the skip parameter |
Example
curl --location --request GET 'api.durianpay.id/v1/settlements/details?skip=0&limit=10&from=2020-01-10&to=2021-05-04' \
--header 'Authorization: <SECRET KEY>'
Response Code : 200
Here is an example of success response
{
"settlement_detail": [
{
"settlement_id": "set_WDizQUoyWy1234",
"payment_id": "pay_O7laHvW2BI1234",
"payment_reference": "",
"order_id": "ord_KlQRqodMqq0540",
"order_reference": "order_ref_001",
"status": "settled",
"currency": "IDR",
"settlement_amount": "19635.00",
"total_settlement_fee": "365.00",
"payment_discount": "",
"settled_at": "2021-05-17T08:32:00.628182Z",
"group": "",
"payment_amount": "20000.00",
"payment_date": "2021-05-17T08:26:43.990125Z",
"transaction_amount": "20000.00",
"payment_details_type": "ewallet_details",
"payment_method_id": "SHOPEEPAY"
},
{
"settlement_id": "set_TRwNzfqK3P1235",
"payment_id": "pay_fs96kcgrKn7284",
"payment_reference": "",
"order_id": "ord_WOQtD8gRav7601",
"order_reference": "order_ref_001",
"status": "settled",
"currency": "IDR",
"settlement_amount": "911901.98",
"total_settlement_fee": "13100.02",
"payment_discount": "",
"settled_at": "2021-05-04T06:30:35.824815Z",
"group": "",
"payment_amount": "925002.00",
"payment_date": "2021-04-30T04:14:41.080551Z",
"transaction_amount": "925002.00",
"payment_details_type": "ewallet_details",
"payment_method_id": "OVO"
},
{
"settlement_id": "set_TRwNzfqK3P1235",
"payment_id": "pay_QsU1fcIXlE9414",
"payment_reference": "",
"order_id": "ord_dfY7gE0cMC9107",
"order_reference": "dfY7gE0cMC9407",
"status": "settled",
"currency": "IDR",
"settlement_amount": "571701.47",
"total_settlement_fee": "6951.53",
"payment_discount": "",
"settled_at": "2021-05-04T06:30:35.824815Z",
"group": "",
"payment_amount": "578653.00",
"payment_date": "2021-05-03T20:53:21.354088Z",
"transaction_amount": "578653.00",
"payment_details_type": "card_details",
"payment_method_id": "CARD"
},
{
"settlement_id": "set_TRwNzfqK3P1235",
"payment_id": "pay_orCMZbO0y09316",
"payment_reference": "",
"order_id": "ord_uYRvZ7o0Hb1557",
"order_reference": "order_ref_001",
"status": "settled",
"currency": "IDR",
"settlement_amount": "915651.98",
"total_settlement_fee": "9350.02",
"payment_discount": "",
"settled_at": "2021-05-04T06:30:35.824815Z",
"group": "",
"payment_amount": "925002.00",
"payment_date": "2021-05-03T01:44:03.496904Z",
"transaction_amount": "925002.00",
"payment_details_type": "ewallet_details",
"payment_method_id": "OVO"
}
],
"settlement_count": 4,
"transaction_count": 4
}
Error Response Code : 400
Here is an example error response for invalid request
{
"error": "error parsing limit parameter: a"
}
Error Response Code : 401
Here is an example error response for unauthorized access
{
"error": "invalid Authorization header in request",
"error_code": "DPAY_UNAUTHORIZED_ACCESS"
}
Error Response Code : 404
Here is an example error response for resource not found
{
"error": "settlement does not exists",
"error_code": "DPAY_SETTLEMENT_NOT_FOUND"
}