Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Disbursement API Documentation] Adjust API Docs for Fund Disbursement #284

Merged
merged 4 commits into from
Apr 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions source/includes/_fund_disbursement.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ request.body = json.encode({
"amount": 15000,
"note": "Test API Disburse",
"partner_trx_id": "OYON0000064",
"email": "[email protected]"
"email": "[email protected]",
"additional_data": {
"partner_merchant_id": "merchant_abcd123"
}
});
request.headers.addAll(headers);

Expand Down Expand Up @@ -73,7 +76,10 @@ func main() {
"amount": 15000,
"note": "Test API Disburse",
"partner_trx_id": "OYON0000064",
"email": "[email protected]"
"email": "[email protected]",
"additional_data": {
"partner_merchant_id": "merchant_abcd123"
}
}`)

client := &http.Client {
Expand Down Expand Up @@ -109,7 +115,7 @@ func main() {
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n\t\"recipient_bank\": \"008\",\n\t\"recipient_account\": \"0201245681\",\n\t\"amount\": 15000,\n\t\"note\": \"Test API Disburse\",\n\t\"partner_trx_id\": \"OYON0000064\",\n\t\"email\": \"[email protected]\"\n}");
RequestBody body = RequestBody.create(mediaType, "{\n\t\"recipient_bank\": \"008\",\n\t\"recipient_account\": \"0201245681\",\n\t\"amount\": 15000,\n\t\"note\": \"Test API Disburse\",\n\t\"partner_trx_id\": \"OYON0000064\",\n\t\"email\": \"[email protected]\",\n \"additional_data\": {\n \"partner_merchant_id\": \"merchant_abcd123\"\n }\n}");
Request request = new Request.Builder()
.url("{{base_url}}/api/remit")
.method("POST", body)
Expand All @@ -128,7 +134,10 @@ var data = JSON.stringify({
"amount": 15000,
"note": "Test API Disburse",
"partner_trx_id": "OYON0000064",
"email": "[email protected]"
"email": "[email protected]",
"additional_data": {
"partner_merchant_id": "merchant_abcd123"
}
});

var xhr = new XMLHttpRequest();
Expand Down Expand Up @@ -164,7 +173,7 @@ $request->setHeader(array(
'x-oy-username' => '{{username}}',
'x-api-key' => '{{api-key}}'
));
$request->setBody('{\n "recipient_bank": "008",\n "recipient_account": "0201245681",\n "amount": 15000,\n "note": "Test API Disburse",\n "partner_trx_id": "OYON0000064",\n "email": "[email protected]"\n}');
$request->setBody('{\n\t\"recipient_bank\": \"008\",\n\t\"recipient_account\": \"0201245681\",\n\t\"amount\": 15000,\n\t\"note\": \"Test API Disburse\",\n\t\"partner_trx_id\": \"OYON0000064\",\n\t\"email\": \"[email protected]\",\n \"additional_data\": {\n \"partner_merchant_id\": \"merchant_abcd123\"\n }\n}');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
Expand All @@ -191,7 +200,10 @@ payload = json.dumps({
"amount": 15000,
"note": "Test API Disburse",
"partner_trx_id": "OYON0000064",
"email": "[email protected]"
"email": "[email protected]",
"additional_data": {
"partner_merchant_id": "merchant_abcd123"
}
})
headers = {
'Content-Type': 'application/json',
Expand Down
Loading