Settlements By ID API


The following endpoint retrieves the settlement based on ID

/settlements/:id

Query parameters

Following are the parameters to be sent in the request body:

Fieldis required?Description
idmandatorystring Unique identifier of the settlement ID

Example

curl --location --request GET 'api.durianpay.id/v1/settlements/set_WDizQUoyWy8680' \
--header 'Authorization: <SECRET KEY>'

Response Code : 200

Here is an example of success response

{
  "data": {
    "id": "set_WDizQUoyWy8680",
    "settlement_amount": "50000",
    "status": "settled",
    "fee": "10000",
    "created_at": "2021-05-17T08:32:00.628182Z",
    "settled_at": "2021-05-27T08:32:00.628182Z",
    "promo_amount": "10000"
  }
}

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": "sql: no rows in result set",
    "error_code": "DPAY_SETTLEMENT_NOT_FOUND"
}