Dark Mode

Update Sub Account API


The following endpoint updates subaccount's informations

/merchants/subaccount/:id

Path Attributes

id

String
Mandatory

Unique identifier of the subaccount, which can be taken from the response of Register subaccount API or Fetch Subaccount API

Request Attributes

name

String
Optional

Name of the sub account

ref_id

String
Optional

The unique identifier of Subaccount from the merchant

is_enabled

Boolean
Optional

Modify enabling/disabling the subaccount.

Example Request to Update Sub Account API

Example
curl -X PUT \
  https://api.durianpay.id/v1/merchants/subaccount/mer_123 \
  -H 'authorization: [Base64({Your_Secret_Key}:)]' \
  -H 'content-type: application/json' \
  -d '{
    "name": "Awesome Sub Organization 001",
    "is_enabled": true,
    "ref_id": "organization_001"    
  }'

Response Code

200 - Success

1
2
3
4
5
6
7
8
9
{
  "data": {
      "id": "sub_123",
      "name": "Awesome Sub Organization 001",
      "email": "organization_001@masterorg.biz",
      "is_enabled": true,
      "ref_id": "organization_001",
  }
}

500 - Internal server error