Send Money - os-salahuddin/php8-cluster GitHub Wiki

User Existence

Check whether user exist or not

This API check User is already exists in the system

URL

[GET] http://127.0.0.1:8282/api/v1/private/user/existence/check

Sample request

{
    "mobile_number" : "+88017xxxxxxxx"
}

Sample Request Format

Parameter Type Description Always Present
mobile_number string mobile number Yes

Sample Response

{
    "code": 200,
    "messages": [
        "User Found"
    ],
    "data": {
        "id": 17,
        "name": "John Smith",
        "email": "[email protected]",
        "mobile_number": "+88017xxxxxxxx",
        "avatar": "https://deshipay.s3.ap-southeast-1.amazonaws.com/deshipay/users/photos/thumbnails/laLXlucvdKqUSdkP7sBaS63e41637652156.png",
        "kyc_status": 1
    }
}
{
    "code": 422,
    "messages": [
        "The mobile number format is invalid."
    ],
    "data": null,
    "error_title": null
}

Sample Response Format

Parameter Type Description Always Present
code Int HTTP status code (e.g., 200, 422) Yes
messages Array Response messages Yes
data Object User details (null if error) No (if error)
data.id Int Unique user ID Yes
data.name String Full name of the user Yes
data.email String Email address of the user Yes
data.mobile_number String User's mobile number Yes
data.avatar String URL to the user's profile picture Yes
data.kyc_status Int KYC (Know Your Customer) verification status Yes

List of recent recipient of Send Money

Get recent recipient List

This API provides the recent recipient of send money

URL

[GET] http://127.0.0.1:8282/api/v1/private/transaction/send-money/recent-recipients

Sample Response

{
    "code": 200,
    "messages": [],
    "data": {
        "recipients": [
            {
                "name": "John Smith",
                "mobile_number": "+88017xxxxxxxx",
                "avatar": "https://deshipay.s3.ap-southeast-1.amazonaws.com/deshipay/users/photos/thumbnails/laLXlucvdKqUSdkP7sBaS63e41637652156.png"
            },
            {
                "name": "John Doe",
                "mobile_number": "+88017xxxxxxxx",
                "avatar": "https://deshipay.s3.ap-southeast-1.amazonaws.com/deshipay/users/photos/thumbnails/QkoT3jloVyKL29fq9DzsZMkI81688374546.jpg"
            },
            {
                "name": "Joelha",
                "mobile_number": "+88017xxxxxxxx",
                "avatar": "https://deshipay.s3.ap-southeast-1.amazonaws.com/deshipay/users/photos/thumbnails/5QObsPBWJjnuMjzLB4TsQQhWm1671020340.png"
            }
        ]
    }
}

Sample Response Format

Parameter Type Description Always Present
code Int HTTP code (e.g., 200) Yes
messages Array Result messages Yes
data.recipients Array List of recipients Yes
data.recipients[].name String Name of the recipient (null if not available) No
data.recipients[].mobile_number String Mobile number of the recipient Yes
data.recipients[].avatar String URL to the avatar image of the recipient Yes

Send Money

Get Summary

This API provides the summary information of send money

URL

[POST] http://127.0.0.1:8282/api/v1/private/transaction/send-money/summary

Sample request

{
    "requestee_mobile_number" : "+88017xxxxxxxx",
    "amount": 110,
    "remarks": "Test Remarks !"
}

Sample Request Format

Parameter Type Description Always Present
requestee_mobile_number string mobile number Yes
amount Number amount Yes
remarks string remarks Yes

Sample Response

{
    "code": 200,
    "messages": [],
    "data": {
        "summary": {
            "nature_of_transaction": "Transfer",
            "recipient": {
                "name": "John Smith",
                "mobile_number": "+8807xxxxxxxx",
                "avatar": "https://deshipay.s3.ap-southeast-1.amazonaws.com/deshipay/users/photos/thumbnails/uAunPoSMD9E2JJeVYBKtZdLpj1692785293.png"
            },
            "card": null,
            "amount": "৳1,000",
            "charge": "৳5",
            "total_payable": "৳1,005",
            "remarks": "TR"
        }
    }
}

Sample Response Format

Parameter Type Description Always Present
code Int HTTP code (e.g., 200) Yes
messages Array Result messages Yes
data.summary Object Transaction summary Yes
data.summary.nature_of_transaction String Nature of the transaction (e.g., Transfer) Yes
data.summary.recipient Object Details of the recipient Yes
data.summary.recipient.name String Name of the recipient Yes
data.summary.recipient.mobile_number String Mobile number of the recipient Yes
data.summary.recipient.avatar String URL to the avatar image of the recipient Yes
data.summary.card String Card details (null if not available) No
data.summary.amount String Transaction amount Yes
data.summary.charge String Transaction charge Yes
data.summary.total_payable String Total amount payable (including charge) Yes
data.summary.remarks String Remarks related to the transaction Yes

Execute request

This API Performs execution of send money request with amount

URL

[GET] http://127.0.0.1:8282/api/v1/private/transaction/send-money/execute

Sample request

{
    "requestee_mobile_number" : "+88017xxxxxxxx",
    "amount": 110,
    "pin": 1235,
    "remarks": "Test Remarks !"
}

Sample Request Format

Parameter Type Description Always Present
requestee_mobile_number string mobile number Yes
amount Number amount Yes
pin Number pin Yes
remarks string remarks Yes

Sample Response

{
    "code": 200,
    "messages": [
        "Send money is successful."
    ],
    "data": {
        "summary": {
            "recipient": {
                "name": "John Smith",
                "mobile_number": "+88017xxxxxxxx",
                "avatar": "https://deshipay.s3.ap-southeast-1.amazonaws.com/deshipay/users/photos/thumbnails/uAunPoSMD9E2JJeVYBKtZdLpj1692785293.png",
                "type": "consumer"
            },
            "invoice_id": "BZCTQUD942",
            "date": "19 February, 2025",
            "time": "04:20 PM",
            "total_payable": "৳1,005",
            "new_balance": "৳121,055.14",
            "fee": "৳5",
            "amount": "৳1,000",
            "remarks": "TR !"
        }
    }
}
{
    "code": 422,
    "messages": [
        "Sorry! PIN does not match."
    ],
    "data": null,
    "error_title": "E_PIN_ERROR"
}

Sample Response Format

Parameter Type Description Always Present
code Int HTTP code (e.g., 200, 422) Yes
messages Array Result messages Yes
data Object Transaction data (null if error) No
data.summary Object Transaction summary details Yes
data.summary.recipient Object Recipient details Yes
data.summary.recipient.name String Name of the recipient Yes
data.summary.recipient.mobile_number String Mobile number of the recipient Yes
data.summary.recipient.avatar String URL to the recipient’s avatar Yes
data.summary.recipient.type String Type of recipient (e.g., consumer) Yes
data.summary.invoice_id String Unique transaction invoice ID Yes
data.summary.date String Transaction date Yes
data.summary.time String Transaction time Yes
data.summary.total_payable String Total payable amount (including fees) Yes
data.summary.new_balance String Updated balance after the transaction Yes
data.summary.fee String Transaction fee Yes
data.summary.amount String Transaction amount Yes
data.summary.remarks String Transaction remarks Yes
error_title String Error code (e.g., E_PIN_ERROR), present only in error responses No