Card Bill Payment - os-salahuddin/php8-cluster GitHub Wiki

Credit Card Bill Payment

Get Summary

This API provides the Summary information for credit card bill payment

URL

[POST] http://127.0.0.1:8282/api/v1/private/wallet/ccard-bill-pay/summary

Sample request

{
    "card_token" : "eFZIpkrcnarOVrVfNTe2mIjZisqkgiBMUcCwH3JmaInfc8yml8J9Nuw3VXo0q6yZA24Tte7YLPkx02LeKabSTt06sBDEKskl9Rle",
    "card_type" : "VISA_DEBIT",
    "amount" : 100,
    "remarks" : "Test remarks",
    "masked_card_number" : "411111XXXXXX1111",
}

Sample Request Format

Parameter Type Description Always Present
card_token String Token for the card Yes
card_type String Type of the card (e.g., VISA_DEBIT) Yes
amount Int Amount for the transaction Yes
remarks String Remarks for the transaction Yes
masked_card_number String Masked card number Yes

Sample Response

{
    "code": 200,
    "messages": [
        "Success"
    ],
    "data": {
        "summary": {
            "nature_of_transaction": "Debit Card Transfer",
            "recipient": {
                "name": null,
                "mobile_number": null,
                "avatar": null
            },
            "card": "VISA DEBIT",
            "amount": "৳106.00",
            "charge": "৳2.12",
            "total_payable": "৳108.12",
            "remarks": "Test remarks",
            "trxId": "2bf1c1ae-db3e-4e8b-8945-2754f48bad0d",
            "masked_card_no": "411111XXXXXX1111"
        }
    }
}

Sample Response Format

Parameter Type Description Always Present
code Int HTTP code (e.g., 200) Yes
messages Array Result messages Yes
data.summary Object Summary of the transaction Yes
data.summary.nature_of_transaction String Nature of the transaction (e.g., Debit Card Transfer) Yes
data.summary.recipient Object Recipient details Yes
data.summary.recipient.name String Name of the recipient No
data.summary.recipient.mobile_number String Mobile number of the recipient No
data.summary.recipient.avatar String Avatar image URL of the recipient No
data.summary.card String Type of the card (e.g., VISA DEBIT) Yes
data.summary.amount String Amount of the transaction Yes
data.summary.charge String Additional charge for the transaction Yes
data.summary.total_payable String Total payable amount Yes
data.summary.remarks String Remarks for the transaction Yes
data.summary.trxId String Transaction ID Yes
data.summary.masked_card_no String Masked card number Yes

Execute request

This API performs execution of credit card bill payment

URL

[POST] http://127.0.0.1:8282/api/v1/private/wallet/ccard-bill-pay/execute

Sample request

{
    "trxId" : "2bf1c1ae-db3e-4e8b-8945-2754f48bad0d",
    "pin" : "xxxx"
}

Sample Request Format

Parameter Type Description Always Present
trxId String Transaction id received from summary api Yes
pin String pin Yes

Sample Response

{
    "code": 200,
    "messages": [
        "Amount has been successfully refunded."
    ],
    "data": [
        {
            "summary": {
                "recipient": {
                    "name": "John Smith",
                    "mobile_number": "+88017xxxxxxxx",
                    "avatar": "https://deshipay.s3.ap-southeast-1.amazonaws.com/deshipay/users/photos/c4c9ea1d-3b4b-43de-81dd-c1258201336e-1722502562.jpg"
                },
                "invoice_id": "BZCTPFY942",
                "remarks": "Test remarks"
            }
        }
    ]
}
{
    "code": 422,
    "messages": [
        "Bill information could not retrieve."
    ],
    "data": null
}

Sample Response Format

Parameter Type Description Always Present
code Int HTTP code (e.g., 200) Yes
messages Array Result messages Yes
data Array List of transactions Yes
data[].summary Object Summary of the transaction 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 Avatar image URL of the recipient Yes
data[].summary.invoice_id String Invoice ID for the transaction Yes
data[].summary.remarks String Remarks for the transaction No