HomeGuidesChangelogDiscussions
Log In
Guides

Card Transactions

Fetch Card Transaction Details

Card controls include the capability of a card issuer to monitor all transactions on one or all their cards.

Get list of all transactions for a card:
The API call and response below shows a typical instance of getting all transaction details of a particular card, listed chronologically by order of recency. You would need to provide the card_id of said card in your /cards/{id}/transactions API request.

curl --location --request GET 'https://api-sandbox.spendjuice.com/cards/d5a929b7-ff37-432d-8dc0-5ecb1c47ad23/transactions?limit=15' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJqdWljZSIsImV4cCI6MTY1MjI4MTk5MiwiaWF0IjoxNjM2NzI5OTkyLCJpc3MiOiJqdWljZSIsImp0aSI6IjhjY2VlYmNjLWM5ZWUtNDE4Ni05MjhkLWEyZjQyZjMzMjdmZiIsIm5iZiI6MTYzNjcyOTk5MSwic3ViIjoiY2FyZC1pbnRlZ3JhdG9yOjE4YjdjOWI2LWNmNGYtNDg2YS1hNDFlLTZiY2IyMDBlYjIyZiIsInR5cCI6ImFjY2VzcyJ9.FgYD7KTWMdFGjaf3rjQxre7iWIZ9_mnP2AJaCWGW3PBRVNilAzu_UzJAtpEYlYJx6p0l7tUpivX-xZ2wBswcgw'
"data": [
        {
            "amount": 4000,
            "card_balance_after": 46000,
            "card_balance_before": 50000,
            "conversion_rate": 1,
            "created_at": "2021-11-12T17:48:36.824Z",
            "credit_currency": null,
            "credit_id": null,
            "debit_currency": "USD",
            "debit_id": "13b632d4-e0e8-4bc4-8ddf-529a0053e8be",
            "id": "84e5de39-acec-49b3-907d-7fe01f40a490",
            "narrative": "20200823t06:13:45/idigic internet nor",
            "type": "deduct"
        },
        {
            "amount": 50000,
            "card_balance_after": 50000,
            "card_balance_before": 0,
            "conversion_rate": 1,
            "created_at": "2021-11-12T17:32:39.722Z",
            "credit_currency": "USD",
            "credit_id": "13b632d4-e0e8-4bc4-8ddf-529a0053e8be",
            "debit_currency": null,
            "debit_id": null,
            "id": "0aa555d3-56c0-4256-a7d8-92b59b5c1bf2",
            "narrative": null,
            "type": "credit"
        }
    ],
    "message": "Ok",
    "next_page": null
}

For a single transaction
In the case of getting all transaction details for a card, use the /cards/transaction/{id} endpoint to return the details of a specific transaction, you would equally need to provide the card_id of said card in your API request.

curl --location --request GET 'https://api-sandbox.spendjuice.com/cards/transaction/84e5de39-acec-49b3-907d-7fe01f40a490' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJqdWljZSIsImV4cCI6MTY1MjI4MTk5MiwiaWF0IjoxNjM2NzI5OTkyLCJpc3MiOiJqdWljZSIsImp0aSI6IjhjY2VlYmNjLWM5ZWUtNDE4Ni05MjhkLWEyZjQyZjMzMjdmZiIsIm5iZiI6MTYzNjcyOTk5MSwic3ViIjoiY2FyZC1pbnRlZ3JhdG9yOjE4YjdjOWI2LWNmNGYtNDg2YS1hNDFlLTZiY2IyMDBlYjIyZiIsInR5cCI6ImFjY2VzcyJ9.FgYD7KTWMdFGjaf3rjQxre7iWIZ9_mnP2AJaCWGW3PBRVNilAzu_UzJAtpEYlYJx6p0l7tUpivX-xZ2wBswcgw'
{
    "data": {
        "amount": 4000,
        "card_balance_after": 46000,
        "card_balance_before": 50000,
        "conversion_rate": 1,
        "created_at": "2021-11-12T17:48:36.824Z",
        "credit_currency": null,
        "credit_id": null,
        "debit_currency": "USD",
        "debit_id": "13b632d4-e0e8-4bc4-8ddf-529a0053e8be",
        "id": "84e5de39-acec-49b3-907d-7fe01f40a490",
        "narrative": "20200823t06:13:45/idigic internet nor",
        "type": "deduct"
    },
    "message": "Ok"
}

📘

Test Cards

Perform a mock transaction: We advise that you test your implementations before going live.
This endpoint is only available in the sandbox environment.

Your card id is required to call the /cards/{id}/mock-transaction endpoint.