In this case, the request is to add a new settlement bank through the API.
Copy curl -X POST \
{{baseUrl}}/v1/payment/settlement_bank \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_BEARER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "testing",
"account_no": "0000000",
"account_name": "testing testing",
"bank_code": "006",
"bank_slug": "BNG",
"bank_name": "required",
"display": "YES",
"settlement_email": "settlement@gmail.com"
}'
Copy {
"status": true,
"message": "settlement_bank.created",
"data": {}
}
In this case, the request is to access/fetch all settlement banks through the API.
Copy //A code snippet of how to consume the API
curl -X GET \
{{baseUrl}}/v1/payment/settlement_bank \
-H "Authorization: Bearer YOUR_BEARER_TOKEN"
Copy {
"status": true,
"message": "settlement_bank.view",
"data": {
"current_page": 1,
"data": [
{
"id": 1,
"title": "test",
"settle_bank": "Test",
"merchant_id": "MC00000",
"account_no": "000000000",
"account_name": "Test Test",
"bank_code": "GBN",
"bank_slug": "BNG",
"rev_status": "revhead",
"created_at": "2022-04-23T15:00:10.000000Z",
"updated_at": "2022-04-23T15:00:10.000000Z",
"bank_name": "required",
"display": "yes",
"order_no": 0000,
"settlement_email": test@test.ng
}
],
"first_page_url": "https://demo.backend.monicredit.com/api/v1/payment/settlement_bank?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://demo.backend.monicredit.com/api/v1/payment/settlement_bank?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://demo.backend.monicredit.com/api/v1/payment/settlement_bank?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "https://demo.backend.monicredit.com/api/v1/payment/settlement_bank",
"per_page": 50,
"prev_page_url": null,
"to": 1,
"total": 1
}
}
In this case, the request is to update a settlement bank through the API.
Copy //A code snippet of how to consume the API
curl -X PUT \
{{baseUrl}}/v1/payment/settlement-bank/:settlement_id \
-H "Authorization: Bearer YOUR_BEARER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "test",
"merchant_id": "6545fdfdfJKDHHJ",
"account_no": "000000",
"account_name": "Test Test",
"bank_code": "006",
"bank_slug": "BNG",
"bank_name": "required",
"display": "yes",
"settlement_email": "settle@gmail.com"
}'
Copy {
"status": true,
"message": "settlement_bank.updated",
"data": {}
}