---
agentTools:
  projectIndex: https://onebrick.readme.io/llms.txt
---

# Check Disbursement Status using Disbursement ID

This API enables you to check the transaction status before and after created using Disbursement ID

> 📘 Environment for End Point URL
>
> **Please Replace the environment in the URL with:**
>
> When the environtment is sandbox, ***replace the {environment} with sandbox***. so the URL will be <https://sandbox.onebrick.io/v2/payments/gs/bifast-disbursements>
>
> When the environment is production,  ***replace the {environment} with api***. so the URL will be <https://api.onebrick.io/v2/payments/gs/bifast-disbursements>

## Request parameters

| Key Parameters | Data Type | Description                             |
| :------------- | :-------- | :-------------------------------------- |
| disbursementId | String    | Disbursement ID of specific transaction |

### Additional Request Parameters

| Key Parameters | Data Type | Description                           | Limitation                                                 |
| :------------- | :-------- | :------------------------------------ | :--------------------------------------------------------- |
| name           | String    | Name of the user that send the money  | 1. Alpha Numeric 2. Space Allowed 3. Max 40 Characters     |
| identityType   | String    | Allowed Value only KTP/SIM/KITAS/NPWP | Allowed Value only KTP/SIM/KITAS/NPWP                      |
| identityNumber | String    | Identity Number of the User           | 1. Alpha Numeric 2. Min 10 characters 3. Max 16 Characters |
| countryCode    | String    | Country Code based on the user        | Allowed Value are 2 all caps characters                    |
| provinceCode   | String    | Province Code based on the user       | Allowed Value are 2 all caps characters                    |
| cityCode       | String    | City Code based on the user           | Allowed Value are 4 all caps characters                    |
| jobCode        | String    | Job Code based on the user            | Allowed Value are 4 all caps characters                    |
| address        | String    | Address of the user                   | 1. Alpha Numeric 2. Space Allowed 3. Max 40 Characters     |
| placeOfBirth   | String    | Place of the user birth               | 1. Alpha Numeric 2. Space allowed 3. Max 40 Characters     |
| dateOfBirth    | String    | Date of Birth of the user             | YYYY-MM-DD Format                                          |

## Response parameters

| Key Parameters        | Data type | Description                                      |
| :-------------------- | :-------- | :----------------------------------------------- |
| referenceId           | String    | Reference ID given by end user                   |
| id                    | String    | Transaction id generated by brick                |
| amount                | String    | Amount of transaction                            |
| status                | String    | The Status of transaction                        |
| createdAt             | Timestamp | Time when the transaction created                |
| type                  | String    | Type of transaction                              |
| bankAccountNo         | Number    | Account number of beneficiary                    |
| bankShortCode         | String    | Bank Short Code                                  |
| bankAccountHolderName | String    | Description that filled related to fund transfer |
| bankName              | String    | Beneficiary bank name                            |

### Additional Response Parameters

| Key Parameters | Data Type | Description                           |
| :------------- | :-------- | :------------------------------------ |
| name           | String    | Name of the user that send the money  |
| identityType   | String    | Allowed Value only KTP/SIM/KITAS/NPWP |
| identityNumber | String    | Identity Number of the User           |
| countryCode    | String    | Country Code based on the user        |
| provinceCode   | String    | Province Code based on the user       |
| cityCode       | String    | City Code based on the user           |
| jobCode        | String    | Job Code based on the user            |
| address        | String    | Address of the user                   |
| placeOfBirth   | String    | Place of the user birth               |
| dateOfBirth    | String    | Date of Birth of the user             |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Payment v2",
    "version": "2"
  },
  "servers": [
    {
      "url": "https://sandbox.onebrick.io/v2/payments/gs"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "publicAccessToken",
        "x-default": "Bearer"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/disbursements/{disbursementId}": {
      "get": {
        "summary": "Check Disbursement Status using Disbursement ID",
        "description": "This API enables you to check the transaction status before and after created using Disbursement ID",
        "operationId": "check-disbursement-status-using-reference-id",
        "parameters": [
          {
            "name": "disbursementId",
            "in": "path",
            "description": "Disbursement ID of the transaction",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"status\": 200,\n    \"data\": {\n        \"message\": \"We have successfuly retrieve your disbursement\",\n        \"id\": \"c8836b555a8842b2ac20fef1a\",\n        \"type\": \"disbursement\",\n        \"attributes\": {\n            \"referenceId\": \"182y1841\",\n            \"description\": \"Disbursement\",\n            \"amount\": \"29999\",\n            \"status\": \"failed\",\n            \"createdAt\": \"2030-12-22T10:12:08.000+07:00\",\n            \"disbursementMethod\": {\n                \"type\": \"bank_transfer\",\n                \"bankAccountNo\": \"78472\",\n                \"bankShortCode\": \"MANDIRI\",\n                \"bankAccountHolderName\": \"Test\",\n                \"bankName\": \"Bank Mandiri\"\n            },\n            \"errorCode\": \"\",\n            \"errorReason\": \"\"\n        }\n    },\n    \"metaData\": {\n        \"source\": \"API\",\n        \"entity\": \"Payment\"\n    },\n    \"error\": null\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 200,
                      "default": 0
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string",
                          "example": "We have successfuly retrieve your disbursement"
                        },
                        "id": {
                          "type": "string",
                          "example": "c8836b555a8842b2ac20fef1a"
                        },
                        "type": {
                          "type": "string",
                          "example": "disbursement"
                        },
                        "attributes": {
                          "type": "object",
                          "properties": {
                            "referenceId": {
                              "type": "string",
                              "example": "182y1841"
                            },
                            "description": {
                              "type": "string",
                              "example": "Disbursement"
                            },
                            "amount": {
                              "type": "string",
                              "example": "29999"
                            },
                            "status": {
                              "type": "string",
                              "example": "failed"
                            },
                            "createdAt": {
                              "type": "string",
                              "example": "2030-12-22T10:12:08.000+07:00"
                            },
                            "disbursementMethod": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "bank_transfer"
                                },
                                "bankAccountNo": {
                                  "type": "string",
                                  "example": "78472"
                                },
                                "bankShortCode": {
                                  "type": "string",
                                  "example": "MANDIRI"
                                },
                                "bankAccountHolderName": {
                                  "type": "string",
                                  "example": "Test"
                                },
                                "bankName": {
                                  "type": "string",
                                  "example": "Bank Mandiri"
                                }
                              }
                            },
                            "errorCode": {
                              "type": "string",
                              "example": ""
                            },
                            "errorReason": {
                              "type": "string",
                              "example": ""
                            }
                          }
                        }
                      }
                    },
                    "metaData": {
                      "type": "object",
                      "properties": {
                        "source": {
                          "type": "string",
                          "example": "API"
                        },
                        "entity": {
                          "type": "string",
                          "example": "Payment"
                        }
                      }
                    },
                    "error": {}
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "invalid token": {
                    "value": "{\n    \"status\": 401,\n    \"error\": {\n        \"code\": \"invalid_parameters_in_headers\",\n        \"message\": \"Please use valid Public_access_token in headers\",\n        \"action\": \"Please generate valid public access token via /v2/payments/auth/token APIs or contact to Brick sales team\",\n        \"reason\": \"Invalid public_access_token in headers\"\n    },\n    \"metaData\": {\n        \"source\": \"API\",\n        \"entity\": \"Payment\"\n    },\n    \"data\": null\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 401,
                      "default": 0
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "invalid_parameters_in_headers"
                        },
                        "message": {
                          "type": "string",
                          "example": "Please use valid Public_access_token in headers"
                        },
                        "action": {
                          "type": "string",
                          "example": "Please generate valid public access token via /v2/payments/auth/token APIs or contact to Brick sales team"
                        },
                        "reason": {
                          "type": "string",
                          "example": "Invalid public_access_token in headers"
                        }
                      }
                    },
                    "metaData": {
                      "type": "object",
                      "properties": {
                        "source": {
                          "type": "string",
                          "example": "API"
                        },
                        "entity": {
                          "type": "string",
                          "example": "Payment"
                        }
                      }
                    },
                    "data": {}
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "62aa98669833aa0028c5a455:65dc3e1e55ff1a0053fdc12c"
}
```