Bank Beneficiary - os-salahuddin/php8-cluster GitHub Wiki

Beneficiary

Get beneficiary list

This API provides the beneficiary list for Bank Beneficiary

URL

[GET] http://127.0.0.1:8282/api/v2/private/wallet/withdraw-money-bank/beneficiary-list

Sample Response

{
    "code": 200,
    "messages": [
        "success"
    ],
    "data": {
        "beneficiaries_active": [
            {
                "id": 977,
                "bank": {
                    "bank_id": 139,
                    "bank_name": "AB Bank Limited",
                    "bank_name_bn": "এবি ব্যাংক লিমিটেড",
                    "logo": "https://deshipay.s3.ap-southeast-1.amazonaws.com/deshipay/bank/logo/rwHOI1653562249.png",
                    "code": "020"
                },
                "branch": {
                    "bank_id": 139,
                    "branch_id": 22,
                    "name": "Anderkilla"
                },
                "name": "John Smith",
                "ac_no": "25xxxxxxxx01",
                "is_npsb_enable": true,
                "npsb_note": "Transfers are processed instantly. However in rare cases of issues, it may take up to 3 to 7 working days to resolve. Charge ( 1% + Instant Transfer Fee) is applicable.",
                "beftn_note": "It may take 1-2 bank working days to receive the amount. By proceeding you are agreeing to this conditions. Charge 1% is applicable.",
                "status": 1,
                "status_text": "Active",
                "message_text": "Bank beneficiary account is inactive."
            },
            {
                "id": 1127,
                "bank": {
                    "bank_id": 157,
                    "bank_name": "Dutch-Bangla Bank Limited",
                    "bank_name_bn": "ডাচ-বাংলা ব্যাংক লিমিটেড",
                    "logo": "https://deshipay.s3.ap-southeast-1.amazonaws.com/deshipay/bank/logo/Z1hCJ1653803627.jpg",
                    "code": "090"
                },
                "branch": {
                    "bank_id": 157,
                    "branch_id": 2671,
                    "name": "Abdullahpur Branch"
                },
                "name": "Smith doe",
                "ac_no": "25xxxxxxxx01",
                "is_npsb_enable": true,
                "npsb_note": "Transfers are processed instantly. However in rare cases of issues, it may take up to 3 to 7 working days to resolve. Charge ( 1% + Instant Transfer Fee) is applicable.",
                "beftn_note": "It may take 1-2 bank working days to receive the amount. By proceeding you are agreeing to this conditions. Charge 1% is applicable.",
                "status": 1,
                "status_text": "Active",
                "message_text": "Bank beneficiary account is inactive."
            }
        ],
        "beneficiaries_inactive": [
            {
                "id": 1017,
                "bank": {
                    "bank_id": 2,
                    "bank_name": "Bank Asia Limited",
                    "bank_name_bn": "ব্যাংক এশিয়া লিমিটেড",
                    "logo": "https://dev-apigw-personal.deshipay.com/banking/bank/logo/bank-asia.png",
                    "code": "070"
                },
                "branch": {
                    "bank_id": 2,
                    "branch_id": 1182,
                    "name": "Agrabad Branch"
                },
                "name": "John Doe",
                "ac_no": "25xxxxxxxx01",
                "is_npsb_enable": true,
                "npsb_note": "Transfers are processed instantly. However in rare cases of issues, it may take up to 3 to 7 working days to resolve. Charge ( 1% + Instant Transfer Fee) is applicable.",
                "beftn_note": "It may take 1-2 bank working days to receive the amount. By proceeding you are agreeing to this conditions. Charge 1% is applicable.",
                "status": 0,
                "status_text": "Inactive",
                "message_text": "Bank beneficiary account is inactive."
            },
            {
                "id": 1003,
                "bank": {
                    "bank_id": 140,
                    "bank_name": "Agrani Bank Ltd",
                    "bank_name_bn": "অগ্রণী ব্যাংক লিমিটেড",
                    "logo": "https://deshipay.s3.ap-southeast-1.amazonaws.com/deshipay/bank/logo/GkCtS1656928096.png",
                    "code": "010"
                },
                "branch": {
                    "bank_id": 140,
                    "branch_id": 351,
                    "name": "Agamashi Lane Branch"
                },
                "name": "John Sohn",
                "ac_no": "25xxxxxxxx01",
                "is_npsb_enable": true,
                "npsb_note": "Transfers are processed instantly. However in rare cases of issues, it may take up to 3 to 7 working days to resolve. Charge ( 1% + Instant Transfer Fee) is applicable.",
                "beftn_note": "It may take 1-2 bank working days to receive the amount. By proceeding you are agreeing to this conditions. Charge 1% is applicable.",
                "status": 2,
                "status_text": "Pending Verification",
                "message_text": "We need to review if the Bank account you've added is correct. It may take 1-3 working days to complete the process."
            }
        ],
        "beneficiaries_rejected": [
            {
                "id": 1119,
                "bank": {
                    "bank_id": 143,
                    "bank_name": "Bangladesh Commerce Bank Limited",
                    "bank_name_bn": "বাংলাদেশ কমার্স ব্যাংক লিমিটেড",
                    "logo": "https://deshipay.s3.ap-southeast-1.amazonaws.com/deshipay/bank/logo/YO3eO1657168352.png",
                    "code": "030"
                },
                "branch": {
                    "bank_id": 1,
                    "branch_id": 1,
                    "name": "Banani Branch"
                },
                "name": "John Sohn",
                "ac_no": "25xxxxxxxx01",
                "is_npsb_enable": true,
                "npsb_note": "Transfers are processed instantly. However in rare cases of issues, it may take up to 3 to 7 working days to resolve. Charge ( 1% + Instant Transfer Fee) is applicable.",
                "beftn_note": "It may take 1-2 bank working days to receive the amount. By proceeding you are agreeing to this conditions. Charge 1% is applicable.",
                "status": 1,
                "status_text": "Active",
                "message_text": "Bank beneficiary account is inactive."
            }
        ],
        "remaining_banks": [
            {
                "bank_id": 142,
                "bank_name": "Ansar VDP Unnayan Bank",
                "bank_name_bn": "আনসার-ভিডিপি উন্নয়ন ব্যাংক",
                "logo": "https://deshipay.s3.ap-southeast-1.amazonaws.com/deshipay/bank/logo/wpTpz1657168438.jpg",
                "code": "ANSAR VDP BANK",
                "is_npsb_enable": false,
                "npsb_note": "Transfers are processed instantly. However in rare cases of issues, it may take up to 3 to 7 working days to resolve. Charge ( 1% + Instant Transfer Fee) is applicable.",
                "beftn_note": "It may take 1-2 bank working days to receive the amount. By proceeding you are agreeing to this conditions. Charge 1% is applicable."
            }
          ]
    }
}

Sample Response Format

Parameter Type Description Always Present
code Int HTTP status code (e.g., 200) Yes
messages Array Result messages Yes
data.beneficiaries_active Array List of active beneficiaries Yes
data.beneficiaries_active[].id Int Unique ID of the active beneficiary Yes
data.beneficiaries_active[].bank Object Bank information Yes
data.beneficiaries_active[].bank.bank_id Int Unique ID of the bank Yes
data.beneficiaries_active[].bank.bank_name String Name of the bank Yes
data.beneficiaries_active[].bank.bank_name_bn String Name of the bank in Bengali Yes
data.beneficiaries_active[].bank.logo String URL to the bank's logo Yes
data.beneficiaries_active[].bank.code String Bank code Yes
data.beneficiaries_active[].branch Object Branch information Yes
data.beneficiaries_active[].branch.branch_id Int Unique ID of the branch Yes
data.beneficiaries_active[].branch.name String Name of the branch Yes
data.beneficiaries_active[].name String Name of the beneficiary Yes
data.beneficiaries_active[].ac_no String Account number of the beneficiary Yes
data.beneficiaries_active[].is_npsb_enable Bool Whether NPSB is enabled for the beneficiary Yes
data.beneficiaries_active[].npsb_note String NPSB related note Yes
data.beneficiaries_active[].beftn_note String BEFTN related note Yes
data.beneficiaries_active[].status Int Status of the beneficiary (1 = Active, 2 = Pending Verification, 0 = Inactive) Yes
data.beneficiaries_active[].status_text String Textual representation of the beneficiary status Yes
data.beneficiaries_active[].message_text String Message related to the beneficiary status Yes
data.beneficiaries_inactive Array List of inactive beneficiaries Yes
data.beneficiaries_inactive[].id Int Unique ID of the inactive beneficiary Yes
data.beneficiaries_inactive[].bank Object Bank information Yes
data.beneficiaries_inactive[].bank.bank_id Int Unique ID of the bank Yes
data.beneficiaries_inactive[].bank.bank_name String Name of the bank Yes
data.beneficiaries_inactive[].bank.bank_name_bn String Name of the bank in Bengali Yes
data.beneficiaries_inactive[].bank.logo String URL to the bank's logo Yes
data.beneficiaries_inactive[].bank.code String Bank code Yes
data.beneficiaries_inactive[].branch Object Branch information Yes
data.beneficiaries_inactive[].branch.branch_id Int Unique ID of the branch Yes
data.beneficiaries_inactive[].branch.name String Name of the branch Yes
data.beneficiaries_inactive[].name String Name of the beneficiary Yes
data.beneficiaries_inactive[].ac_no String Account number of the beneficiary Yes
data.beneficiaries_inactive[].is_npsb_enable Bool Whether NPSB is enabled for the beneficiary Yes
data.beneficiaries_inactive[].npsb_note String NPSB related note Yes
data.beneficiaries_inactive[].beftn_note String BEFTN related note Yes
data.beneficiaries_inactive[].status Int Status of the beneficiary (1 = Active, 2 = Pending Verification, 0 = Inactive) Yes
data.beneficiaries_inactive[].status_text String Textual representation of the beneficiary status Yes
data.beneficiaries_inactive[].message_text String Message related to the beneficiary status Yes
data.beneficiaries_rejected Array List of rejected beneficiaries Yes
data.beneficiaries_rejected[].id Int Unique ID of the rejected beneficiary Yes
data.beneficiaries_rejected[].bank Object Bank information Yes
data.beneficiaries_rejected[].bank.bank_id Int Unique ID of the bank Yes
data.beneficiaries_rejected[].bank.bank_name String Name of the bank Yes
data.beneficiaries_rejected[].bank.bank_name_bn String Name of the bank in Bengali Yes
data.beneficiaries_rejected[].bank.logo String URL to the bank's logo Yes
data.beneficiaries_rejected[].bank.code String Bank code Yes
data.beneficiaries_rejected[].branch Object Branch information Yes
data.beneficiaries_rejected[].branch.branch_id Int Unique ID of the branch Yes
data.beneficiaries_rejected[].branch.name String Name of the branch Yes
data.beneficiaries_rejected[].name String Name of the beneficiary Yes
data.beneficiaries_rejected[].ac_no String Account number of the beneficiary Yes
data.beneficiaries_rejected[].is_npsb_enable Bool Whether NPSB is enabled for the beneficiary Yes
data.beneficiaries_rejected[].npsb_note String NPSB related note Yes
data.beneficiaries_rejected[].beftn_note String BEFTN related note Yes
data.beneficiaries_rejected[].status Int Status of the beneficiary (1 = Active, 2 = Pending Verification, 0 = Inactive) Yes
data.beneficiaries_rejected[].status_text String Textual representation of the beneficiary status Yes
data.beneficiaries_rejected[].message_text String Message related to the beneficiary status Yes
data.remaining_banks Array List of remaining banks Yes
data.remaining_banks[].bank_id Int Unique ID of the bank Yes
data.remaining_banks[].bank_name String Name of the bank Yes
data.remaining_banks[].bank_name_bn String Name of the bank in Bengali Yes
data.remaining_banks[].logo String URL to the bank's logo Yes
data.remaining_banks[].code String Bank code Yes
data.remaining_banks[].is_npsb_enable Bool Whether NPSB is enabled for the bank Yes
data.remaining_banks[].npsb_note String NPSB related note Yes
data.remaining_banks[].beftn_note String BEFTN related note Yes

Add beneficiary

This API is used to add beneficiary for bank

URL

[POST] http://127.0.0.1:8282/api/v2/private/wallet/withdraw-money-bank/beneficiary-add

Sample request

{
    "bank_id" : "139",
    "bank_branch_id" : "22",
    "account_name" : "John Smith",
    "account_no" : "25xxxxxxxx01"
}

Sample Request Format

Parameter Type Description Always Present
bank_id Int bank id Yes
bank_branch_id Int branch id Yes
account_name String Account name Yes
account_no String Account no Yes

Sample Response

{
    "code": 200,
    "messages": [
          "We need to review if the Bank account you've added is correct. It may take 1-3 working days to complete the process."
    ],
    "data": null
}
{
    "code": 422,
    "messages": [
        "Sorry! Beneficiary name does not match with NID name."
    ],
    "data": null,
    "error_title": null
}
{
    "code": 422,
    "messages": [
        "We have detected that this account number is already associated with an existing account. Kindly check the number and try again.",
        "Sorry! Beneficiary name does not match with NID name.",
        "We have detected that an account is already associated with selected bank"
    ],
    "data": null,
    "error_title": null
}

Sample Response Format

Parameter Type Description Always Present
code Int HTTP code (e.g., 200) Yes
messages Array Result messages Yes
data Mixed Object or null Yes

Amount Verify before transaction processing

This API is used to verify transaction amount for Bank beneficiary.

URL

[POST] http://127.0.0.1:8282/api/v2/private/wallet/withdraw-money-bank/beneficiary-verify

Sample request

{
    "account_no": "15xxxxxxxxxx1",
    "beneficiary_id": 1004,
    "transaction_amount": "0.15"
}

Sample Request Format

Parameter Type Description Always Present
account_no string account no Yes
beneficiary_id Int Beneficiary id Yes
transaction_amount Int Transaction amount Yes

Sample Response

{
    "code": 200,
    "messages": [
          "Beneficiary verify successfully."
    ],
    "data": null
}
{
    "code": 422,
    "messages": [
        "Sorry! Beneficiary not found"
    ],
    "data": null
}
{
    "code": 403,
    "messages": [
        "Sorry! Beneficiary does not belong to you."
    ],
    "data": null
}

Sample Response Format

Parameter Type Description Always Present
code Int HTTP code (e.g., 200) Yes
messages Array Result messages Yes
data Mixed Object or null Yes

Update Beneficiary - active or inactive

This API is used to update with active or inactive status for the Bank beneficiary

URL

[PATCH] http://127.0.0.1:8282/api/v1/private/wallet/withdraw-money-bank/beneficiary-list-update?status=active

Sample request

{
    "banks":[1017]
}

Sample Request Format

Parameter Type Description Always Present
banks Array Bank beneficiary id Yes

Sample Response

{
    "code": 200,
    "messages": [
          "success"
    ],
    "data": null
}
{
    "code": 422,
    "messages": [
        "Sorry! Beneficiary not found"
    ],
    "data": null
}
{
    "code": 401,
    "messages": [
        "Sorry! Beneficiary does not belong to you."
    ],
    "data": null
}

Sample Response Format

Parameter Type Description Always Present
code Int HTTP code (e.g., 200) Yes
messages Array Result messages Yes
data Mixed Object or null Yes