Saved Wallet - os-salahuddin/php8-cluster GitHub Wiki

Get saved wallet

This API provides list of saved wallet

URL

[POST] http://127.0.0.1:8282/api/v1/st-pay/token/list

Sample Response

{
    "code": 200,
    "messages": [
        "success"
    ],
    "data": {
        "customer_tokens": [
             {
                "wallet_no": "+88017****942",
                "private_key": "4fadaa97-d0fb-4e6f-95d5-ce314161bcd",
                "business_name": "Bkash Limited",
                "business_logo": "https://s3.amazonaws.com/mfs-logos/bkash.png",
                "created_at": "17 Jun 2021, 03:26 PM"
            },
            {
                "wallet_no": "+88017****942",
                "private_key": "4fadaa97-d0fb-4e6f-95d5-ce314161bcdf",
                "business_name": "Nagad",
                "business_logo": "https://s3.amazonaws.com/mfs-logos/nagad.png",
                "created_at": "25 Dec 2022, 11:45 AM"
            }
        ]
    }
}

Sample Response Format

Parameter Type Description Always Present
code Int HTTP code (e.g., 200) Yes
messages Array Result messages (empty if no messages) Yes
data.customer_tokens Array List of customer tokens Yes
data.customer_tokens[].wallet_no String Wallet number Yes
data.customer_tokens[].private_key String Private key for the wallet Yes
data.customer_tokens[].business_name String Name of the business Yes
data.customer_tokens[].business_logo String URL of the business logo Yes
data.customer_tokens[].created_at String Timestamp when the wallet was created Yes

Remove a saved wallet

This API is used to delete a saved wallet based on private token

URL

[POST] http://127.0.0.1:8282/api/v1/st-pay/token/cancel

Sample request

{
    "private_key" : "4fadaa97-d0fb-4e6f-95d5-ce314161bcdf",
}

Sample Request Format

Parameter Type Description Always Present
private_key string Private key associated with wallet Yes

Sample Response

{
    "code": 200,
    "messages": [
        "Saved Account Removed Successfully"
    ],
    "data": {
        "customer_ref": "1000100001",
        "private_key": "4fadaa97-d0fb-4e6f-95d5-ce314161bcdf"
    }
}