Transactions list

Transactions List

GET api.vitawallet.io/api/businesses/transactions?page=:page&count=:count

This method allows you to list all the transactions of a business, supports paging and filters.

Path Parameters

NameTypeDescription

sender_wallet

string

Filter transactions by sending wallet UUID.

recipient_wallet

string

Filter transactions by recipient wallet UUID.

status

string

Filter transactions by status Allowed status started completed pending denied processed

transactions_type

string

Filter transactions by type

currency

string

Filter transactions by currency Allowed currencies: clp #(chilean pesos)

count

number

Total transactions default: 20

page

number

Page number

{
    "transactions": [
        {
            "id": "1",
            "type": "business_transaction",
            "attributes": {
                "recipient_wallet": {
                    "token": "i789iuji78oi78",
                    "uuid": "0748559-2e50-43f1-b4c0-0196de0295db",
                    "balances": {
                        "clp": 12000
                    },
                    "is_master": true,
                    "created_at": "2020-01-15T20:37:17.926Z"
                },
                "sender_wallet": null,
                "status": "completed",
                "order": "12345678901010000121234",
                "currency": "clp",
                "category": "recharge",
                "amount": "12000.0",
                "total": "12000.0",
                "fee_value": "0.0",
                "total_fee": "0.0",
                "created_at": "2020-03-24T20:37:17.926Z"
            }
        },
        {
            "id": "2",
            "type": "business_transaction",
            "attributes": {
                "recipient_wallet": {
                    "token": "iops87eopss478oios",
                    "uuid": "023d6e20-2e50-43f1-b4c0-0196de0295db",
                    "balances": {
                        "clp": 20000
                    },
                    "is_master": false,
                    "created_at": "2020-02-05T20:37:17.926Z"
                },
                "sender_wallet": null,
                "status": "completed",
                "order": "123456789010100001212347",
                "currency": "clp",
                "category": "recharge",
                "amount": "20000.0",
                "total": "20000.0",
                "fee_value": "0.0",
                "total_fee": "0.0",
                "created_at": "2020-03-24T20:44:32.994Z"
            }
        }
    ],
    "total": 2,
    "count": 20
}

SDK

Note that the get method can take an optional parameter, which helps identify the page number you want to get and the number of items.

import Business from 'vita-business-node';

try {
    const transactions = await Business.transactions().get({page, count});
} catch {}

Get Transaction

GET api.vitawallet.io/api/businesses/transactions/:id

This method allows you to obtain the information of a transaction by its id.

Path Parameters

NameTypeDescription

id

string

Transaction id

{
    "transaction": {
        "id": "1",
        "type": "business_transaction",
        "attributes": {
            "recipient_wallet": {
                "token": "i789iuji78oi78",
                "uuid": "0748559-2e50-43f1-b4c0-0196de0295db",
                "balances": {
                    "clp": 12000
                },
                "is_master": true,
                "created_at": "2020-01-15T20:37:17.926Z"
            },
            "sender_wallet": null,
            "status": "completed",
            "order": "12345678901010000121234",
            "currency": "clp",
            "category": "recharge",
            "amount": "12000.0",
            "total": "12000.0",
            "fee_value": "0.0",
            "total_fee": "0.0",
            "created_at": "2020-03-24T20:37:17.926Z"
        }
    }
}

SDK

Note that the transactions module can receive the id of the transaction to search for.

get method hanldes the request to Vita Business services.

import Business from 'vita-business-node';

try {
    const transactions = await Business.transactions(id).get();
} catch {}

Última actualización