Get a List of Card Transactions
Getting the list of card transactions which are linked to a specified account.
Method: POST
{{URL}}/cardv2
Headers
Name | Value |
---|---|
Content-Type | application/json |
Example
Payload Parameters
Parameters | Description |
---|---|
reference Optional | String Unique reference ID of the request Sample Value: "visadps100161" |
transactionType Mandatory | String Type of operation / transaction Constant Value: "GET_CARDTRANSACTION_LIST" |
customerId Mandatory | String Unique ID of customer who holds the card Sample Value: "100000000006001" |
cardId Mandatory | String Unique ID of the card Sample Value: "3e694d9b13a449e58c6b3b91b0e16251" |
accountNumber Mandatory | String Account number linked to the card Sample Value: "400320588344662" |
cardTransactionType Optional | String Type of transaction initiated or processed using the card Sample Value: "" |
fromDate Optional | String Transaction record starting from which date Sample Value: "20-11-2024" |
toDate Optional | String Transaction record till which date Sample Value: "20-11-2024" |
product Mandatory | String Name of the product associated with the card Sample Value: "DEFAULT" |
channel Mandatory | Enum Processing channel through which the card transaction happens Valid Values: PULSE VISA_DPS Sample Value: "VISA_DPS" |
program Mandatory | String Name of the program to which the card product is mapped Sample Value: "DEFAULT" |
pagination Optional | Object |
offset Optional | Number Starting point of fetching the list of transactions Sample Value: 1 |
max Optional | Number Maximum number of transaction records to retrieve in this request from the starting point (offset value) Sample Value: 6 |
- cURL
- C#
- Go
- NodeJs
curl --location --globoff '{{URL}}/cardv2' \
--header 'Content-Type: application/json' \
--data '{"method":"ledger.CARD.request","id":"1","params":{"payload":{"reference":"REF1634130469012","transactionType":"GET_CARDTRANSACTION_LIST","customerId":"100000000184006","cardId":"79210cfaa0cf43978c2cfb874745c07f","accountNumber":"","cardTransactionType":"PURCHASE","fromDate":"04-01-2023","toDate":"06-01-2023","product":"CARDS","channel":"PULSE","program":"CARDS","pagination":{"offset":0,"max":6}}},"api":{"signature":"{{signature}}","apiKey":"{{apiKey}}","credential":"{{credential}}"}}'
using System;
using RestSharp;
using System.Threading;
using System.Threading.Tasks;
namespace HelloWorldApplication {
class HelloWorld {
static async Task Main(string[] args) {
var options = new RestClientOptions("{{URL}}/cardv2")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Get);
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@" ""method"": ""ledger.CARD.request"",
" + "\n" +
@" ""id"": ""1"",
" + "\n" +
@" ""params"": {
" + "\n" +
@" ""payload"": {
" + "\n" +
@" ""reference"": ""visadps100161"",
" + "\n" +
@" ""transactionType"": ""GET_CARDTRANSACTION_LIST"",
" + "\n" +
@" ""customerId"": ""100000000006001"",
" + "\n" +
@" ""cardId"": ""3e694d9b13a449e58c6b3b91b0e16251"",
" + "\n" +
@" ""accountNumber"": ""400320588344662"",
" + "\n" +
@" ""cardTransactionType"": """",
" + "\n" +
@" ""fromDate"": ""20-11-2024"",
" + "\n" +
@" ""toDate"": ""20-11-2024"",
" + "\n" +
@" ""product"": ""DEFAULT"",
" + "\n" +
@" ""channel"": ""VISA_DPS"",
" + "\n" +
@" ""program"": ""DEFAULT"",
" + "\n" +
@" ""pagination"": {
" + "\n" +
@" ""offset"": 1,
" + "\n" +
@" ""max"": 6
" + "\n" +
@" }
" + "\n" +
@" },
" + "\n" +
@" ""api"": {
" + "\n" +
@" ""signature"": ""{{signature}}"",
" + "\n" +
@" ""apiKey"": ""{{Api-key}}"",
" + "\n" +
@" ""credential"": ""{{cred}}""
" + "\n" +
@" }
" + "\n" +
@" }
" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
}
}
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{URL}}/cardv2"
method := "GET"
payload := strings.NewReader(`{`+"
"+`
"method": "ledger.CARD.request",`+"
"+`
"id": "1",`+"
"+`
"params": {`+"
"+`
"payload": {`+"
"+`
"reference": "visadps100161",`+"
"+`
"transactionType": "GET_CARDTRANSACTION_LIST",`+"
"+`
"customerId": "100000000006001",`+"
"+`
"cardId": "3e694d9b13a449e58c6b3b91b0e16251",`+"
"+`
"accountNumber": "400320588344662",`+"
"+`
"cardTransactionType": "",`+"
"+`
"fromDate": "20-11-2024",`+"
"+`
"toDate": "20-11-2024",`+"
"+`
"product": "DEFAULT",`+"
"+`
"channel": "VISA_DPS",`+"
"+`
"program": "DEFAULT",`+"
"+`
"pagination": {`+"
"+`
"offset": 1,`+"
"+`
"max": 6`+"
"+`
}`+"
"+`
},`+"
"+`
"api": {`+"
"+`
"signature": "{{signature}}",`+"
"+`
"apiKey": "{{Api-key}}",`+"
"+`
"credential": "{{cred}}"`+"
"+`
}`+"
"+`
}`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'GET',
'hostname': '{{URL}}',
'path': '/cardv2',
'headers': {
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"method": "ledger.CARD.request",
"id": "1",
"params": {
"payload": {
"reference": "visadps100161",
"transactionType": "GET_CARDTRANSACTION_LIST",
"customerId": "100000000006001",
"cardId": "3e694d9b13a449e58c6b3b91b0e16251",
"accountNumber": "400320588344662",
"cardTransactionType": "",
"fromDate": "20-11-2024",
"toDate": "20-11-2024",
"product": "DEFAULT",
"channel": "VISA_DPS",
"program": "DEFAULT",
"pagination": {
"offset": 1,
"max": 6
}
},
"api": {
"signature": "{{signature}}",
"apiKey": "{{Api-key}}",
"credential": "{{cred}}"
}
}
});
req.write(postData);
req.end();
Body
{
"method": "ledger.CARD.request",
"id": "1",
"params": {
"payload": {
"reference": "visadps100161",
"transactionType": "GET_CARDTRANSACTION_LIST",
"customerId": "100000000006001",
"cardId": "3e694d9b13a449e58c6b3b91b0e16251",
"accountNumber": "400320588344662",
"cardTransactionType": "",
"fromDate": "20-11-2024",
"toDate": "20-11-2024",
"product": "DEFAULT",
"channel": "VISA_DPS",
"program": "DEFAULT",
"pagination": {
"offset": 1,
"max": 6
}
},
"api": {
"signature": "{{signature}}",
"apiKey": "{{Api-key}}",
"credential": "{{cred}}"
}
}
}
Response: 200
Response Parameters
Parameters | Description |
---|---|
Id | String Response ID echoed from the request ID Sample Value: "1" |
result | Object |
totalRecords | Number Total number of records retrieved in the response for the request Sample Value: 10 |
api | Object |
type | String Acknowledgement for type of operation requested for Sample Value: "GET_CARDTRANSACTION_LIST_ACK" |
reference | String Unique reference for the API response Sample Value: "REFvisadps100161" |
dateCreated | Number Unix timestamp of the response was created Sample Value: 1732105574 |
originalReference | String Original reference ID taken from the request Sample Value: "visadps100161" |
cardTransactionList | Array |
cardId | String Unique ID of the card Sample Value: "3e694d9b13a449e58c6b3b91b0e16251" |
transactionNumber | String Unique number assigned to the transaction Sample Value: "QA00000000070026" |
senderAccountNumber | String Account number of the sender who initiated the transaction Sample Value: "400320588344662" |
receiverAccountNumber | String Account number of the receiver who received the payment Sample Value: "100788802670372" |
processId | String Unique ID of the transaction process Sample Value: "5a27c393-2df2-456a-8785-6cec88d099fd" |
program | String Name of the program to which the card product is mapped Sample Value: "DEFAULT" |
channel | Enum Processing channel through which the card transaction happens Valid Values: PULSE VISA_DPS Sample Value: "VISA_DPS" |
referenceNumber | String Unique reference number of the transaction Sample Value: "84b7f78602af4119a420b406a3605642" |
transactionType | String Type of transaction Sample Value: "COMPLETION" |
transactionSubType | String Specific type of transaction Sample Value: "COMPLETION_DOM" |
to | String Destination or merchant information related to the transaction Sample Value: "AFD1 CITY NAME COUS" |
transactionDateTime | String Date and time when the transaction was processed Sample Value: "2024-11-20T10:00:00Z" |
currency | String Currency in which the transaction was processed Sample Value: "USD" |
transactionAmount | String Amount of transaction Sample Value: "46.23" |
status | String Current status of the transaction Sample Value: "COMPLETED" |
totalRecords | Number Total number of records retrieved in the response for the request Sample Value: 8 |
api | Object |
type | String Acknowledgement for type of operation requested for Sample Value: "GET_CARD_LIST_ACK" |
reference | String Unique reference for the API response Sample Value: "REFvisadps100009" |
dateCreated | Number Unix timestamp of the response was created Sample Value: 1732086118 |
originalReference | String Original reference ID taken from the request Sample Value: "visadps100009" |
{
"id": "1",
"result": {
"totalRecords": 10,
"api": {
"type": "GET_CARDTRANSACTION_LIST_ACK",
"reference": "REFvisadps100161",
"dateCreated": 1732105574,
"originalReference": "visadps100161"
},
"cardTransactionList": [
{
"cardId": "3e694d9b13a449e58c6b3b91b0e16251",
"transactionNumber": "QA00000000070026",
"senderAccountNumber": "400320588344662",
"receiverAccountNumber": "100788802670372",
"processId": "5a27c393-2df2-456a-8785-6cec88d099fd",
"program": "DEFAULT",
"channel": "VISA_DPS",
"referenceNumber": "84b7f78602af4119a420b406a3605642",
"transactionType": "COMPLETION",
"transactionSubType": "COMPLETION_DOM",
"to": "AFD1 CITY NAME COUS",
"transactionDateTime": "2024-11-20T10:00:00Z",
"currency": "USD",
"transactionAmount": "46.23",
"status": "COMPLETED"
},
{
"cardId": "3e694d9b13a449e58c6b3b91b0e16251",
"transactionNumber": "QA00000000070025",
"senderAccountNumber": "400320588344662",
"receiverAccountNumber": "400320588344662",
"processId": "5a27c393-2df2-456a-8785-6cec88d099fd",
"program": "DEFAULT",
"channel": "VISA_DPS",
"referenceNumber": "d0c36938904648f380c4bd818ee54e25",
"transactionType": "PRE_AUTH",
"transactionSubType": "PRE_AUTH_DOM",
"to": "AFD1 CITY NAME COUS",
"transactionDateTime": "2024-11-20T09:59:41Z",
"currency": "USD",
"transactionAmount": "75.00",
"status": "COMPLETED"
},
{
"cardId": "3e694d9b13a449e58c6b3b91b0e16251",
"transactionNumber": "QA00000000070023",
"senderAccountNumber": "400320588344662",
"receiverAccountNumber": "100788802670372",
"processId": "20897e29-e125-40d6-a1b6-27d03ea1eee9",
"program": "DEFAULT",
"channel": "VISA_DPS",
"referenceNumber": "d63af6766bc4491ab5fe4e38a752eab7",
"transactionType": "WITHDRAWAL",
"transactionSubType": "WITHDRAWAL_DOM",
"to": "ATM6 CITY NAME COUS",
"transactionDateTime": "2024-11-20T09:59:41Z",
"currency": "USD",
"transactionAmount": "70.00",
"status": "COMPLETED"
},
{
"cardId": "3e694d9b13a449e58c6b3b91b0e16251",
"transactionNumber": "QA00000000070021",
"senderAccountNumber": "400320588344662",
"receiverAccountNumber": "100788802670372",
"processId": "bb0be055-7b27-44f3-bf72-bf4de6e8877c",
"program": "DEFAULT",
"channel": "VISA_DPS",
"referenceNumber": "78b1ccd9186e4574913e89b34ba1152f",
"transactionType": "WITHDRAWAL",
"transactionSubType": "WITHDRAWAL_DOM",
"to": "ATM2 CITY NAME COUS",
"transactionDateTime": "2024-11-20T09:59:40Z",
"currency": "USD",
"transactionAmount": "60.00",
"status": "COMPLETED"
},
{
"cardId": "3e694d9b13a449e58c6b3b91b0e16251",
"transactionNumber": "QA00000000070020",
"senderAccountNumber": "400320588344662",
"receiverAccountNumber": "100788802670372",
"processId": "3ab9c456-daf3-4712-853d-8698306e3745",
"program": "DEFAULT",
"channel": "VISA_DPS",
"referenceNumber": "66bc45ed786d442fbe261277500e52aa",
"transactionType": "WITHDRAWAL",
"transactionSubType": "WITHDRAWAL_DOM",
"to": "ATM2 CITY NAME COUS",
"transactionDateTime": "2024-11-20T09:59:40Z",
"currency": "USD",
"transactionAmount": "20.00",
"status": "COMPLETED"
},
{
"cardId": "3e694d9b13a449e58c6b3b91b0e16251",
"transactionNumber": "QA00000000070019",
"senderAccountNumber": "400320588344662",
"receiverAccountNumber": "100788802670372",
"processId": "32d94fb4-a536-488b-9eda-6bfd4ffd49c1",
"program": "DEFAULT",
"channel": "VISA_DPS",
"referenceNumber": "047e05eb8dc24f9fb373d3c2f4586624",
"transactionType": "COMPLETION",
"transactionSubType": "COMPLETION_DOM",
"to": "AFD1 CITY NAME COUS",
"transactionDateTime": "2024-11-20T09:48:30Z",
"currency": "USD",
"transactionAmount": "46.23",
"status": "COMPLETED"
}
]
}
}