Skip to main content
POST
/
consumers
/
{consumer_id}
/
transactions
/
history
Create a bulk of historical transactions
curl --request POST \
  --url https://api-{programRef}.sandbox.paylead.tech/consumers/{consumer_id}/transactions/history \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "banks": [
    {
      "accounts": [
        {
          "id": "<string>",
          "iban": "FR7630006000011234567890189",
          "name": "exemple_account",
          "transactions": [
            {
              "amount": 123,
              "executed_at": "2023-07-15T14:32:45",
              "id": "<string>",
              "raw_label": "<string>",
              "account_id": "acc_9876543210",
              "acquirer_reference_number": "74999912345678901234567",
              "authorization_id_response": "1A2B3C",
              "brand": {
                "address": "1 Rue de la Paix",
                "category_code": "CLOTHING",
                "city": "Paris",
                "country": "FR",
                "id": "brand_nike",
                "mcc": "5941",
                "name": "Nike",
                "post_code": "75001",
                "public_reference": "FR0123456789"
              },
              "category": "shopping",
              "deleted": "2023-11-07T05:31:56Z",
              "is_realtime": false,
              "label": "PURCHASE NIKE STORE",
              "retrieval_reference_number": "1A2B3C4D5E6F",
              "scheme": "visa",
              "scheme_id": "019876543210987",
              "store": {
                "address": "1 Rue de la Paix",
                "category_code": "Clothing",
                "city": "Paris",
                "country": "FR",
                "id": "store_123456",
                "merchant_id": "merchant_nike_fr",
                "name": "Nike Store",
                "post_code": "75001",
                "public_reference": "RCS987654321",
                "terminal_id": "TERM1234"
              },
              "truncated_dpan": "1A2B",
              "truncated_pan": "1A2B"
            }
          ]
        }
      ],
      "bank_id": "<string>",
      "id": "1",
      "status": "SUCCESS"
    }
  ]
}
'
import requests

url = "https://api-{programRef}.sandbox.paylead.tech/consumers/{consumer_id}/transactions/history"

payload = { "banks": [
{
"accounts": [
{
"id": "<string>",
"iban": "FR7630006000011234567890189",
"name": "exemple_account",
"transactions": [
{
"amount": 123,
"executed_at": "2023-07-15T14:32:45",
"id": "<string>",
"raw_label": "<string>",
"account_id": "acc_9876543210",
"acquirer_reference_number": "74999912345678901234567",
"authorization_id_response": "1A2B3C",
"brand": {
"address": "1 Rue de la Paix",
"category_code": "CLOTHING",
"city": "Paris",
"country": "FR",
"id": "brand_nike",
"mcc": "5941",
"name": "Nike",
"post_code": "75001",
"public_reference": "FR0123456789"
},
"category": "shopping",
"deleted": "2023-11-07T05:31:56Z",
"is_realtime": False,
"label": "PURCHASE NIKE STORE",
"retrieval_reference_number": "1A2B3C4D5E6F",
"scheme": "visa",
"scheme_id": "019876543210987",
"store": {
"address": "1 Rue de la Paix",
"category_code": "Clothing",
"city": "Paris",
"country": "FR",
"id": "store_123456",
"merchant_id": "merchant_nike_fr",
"name": "Nike Store",
"post_code": "75001",
"public_reference": "RCS987654321",
"terminal_id": "TERM1234"
},
"truncated_dpan": "1A2B",
"truncated_pan": "1A2B"
}
]
}
],
"bank_id": "<string>",
"id": "1",
"status": "SUCCESS"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
banks: [
{
accounts: [
{
id: '<string>',
iban: 'FR7630006000011234567890189',
name: 'exemple_account',
transactions: [
{
amount: 123,
executed_at: '2023-07-15T14:32:45',
id: '<string>',
raw_label: '<string>',
account_id: 'acc_9876543210',
acquirer_reference_number: '74999912345678901234567',
authorization_id_response: '1A2B3C',
brand: {
address: '1 Rue de la Paix',
category_code: 'CLOTHING',
city: 'Paris',
country: 'FR',
id: 'brand_nike',
mcc: '5941',
name: 'Nike',
post_code: '75001',
public_reference: 'FR0123456789'
},
category: 'shopping',
deleted: '2023-11-07T05:31:56Z',
is_realtime: false,
label: 'PURCHASE NIKE STORE',
retrieval_reference_number: '1A2B3C4D5E6F',
scheme: 'visa',
scheme_id: '019876543210987',
store: {
address: '1 Rue de la Paix',
category_code: 'Clothing',
city: 'Paris',
country: 'FR',
id: 'store_123456',
merchant_id: 'merchant_nike_fr',
name: 'Nike Store',
post_code: '75001',
public_reference: 'RCS987654321',
terminal_id: 'TERM1234'
},
truncated_dpan: '1A2B',
truncated_pan: '1A2B'
}
]
}
],
bank_id: '<string>',
id: '1',
status: 'SUCCESS'
}
]
})
};

fetch('https://api-{programRef}.sandbox.paylead.tech/consumers/{consumer_id}/transactions/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api-{programRef}.sandbox.paylead.tech/consumers/{consumer_id}/transactions/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'banks' => [
[
'accounts' => [
[
'id' => '<string>',
'iban' => 'FR7630006000011234567890189',
'name' => 'exemple_account',
'transactions' => [
[
'amount' => 123,
'executed_at' => '2023-07-15T14:32:45',
'id' => '<string>',
'raw_label' => '<string>',
'account_id' => 'acc_9876543210',
'acquirer_reference_number' => '74999912345678901234567',
'authorization_id_response' => '1A2B3C',
'brand' => [
'address' => '1 Rue de la Paix',
'category_code' => 'CLOTHING',
'city' => 'Paris',
'country' => 'FR',
'id' => 'brand_nike',
'mcc' => '5941',
'name' => 'Nike',
'post_code' => '75001',
'public_reference' => 'FR0123456789'
],
'category' => 'shopping',
'deleted' => '2023-11-07T05:31:56Z',
'is_realtime' => false,
'label' => 'PURCHASE NIKE STORE',
'retrieval_reference_number' => '1A2B3C4D5E6F',
'scheme' => 'visa',
'scheme_id' => '019876543210987',
'store' => [
'address' => '1 Rue de la Paix',
'category_code' => 'Clothing',
'city' => 'Paris',
'country' => 'FR',
'id' => 'store_123456',
'merchant_id' => 'merchant_nike_fr',
'name' => 'Nike Store',
'post_code' => '75001',
'public_reference' => 'RCS987654321',
'terminal_id' => 'TERM1234'
],
'truncated_dpan' => '1A2B',
'truncated_pan' => '1A2B'
]
]
]
],
'bank_id' => '<string>',
'id' => '1',
'status' => 'SUCCESS'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api-{programRef}.sandbox.paylead.tech/consumers/{consumer_id}/transactions/history"

payload := strings.NewReader("{\n \"banks\": [\n {\n \"accounts\": [\n {\n \"id\": \"<string>\",\n \"iban\": \"FR7630006000011234567890189\",\n \"name\": \"exemple_account\",\n \"transactions\": [\n {\n \"amount\": 123,\n \"executed_at\": \"2023-07-15T14:32:45\",\n \"id\": \"<string>\",\n \"raw_label\": \"<string>\",\n \"account_id\": \"acc_9876543210\",\n \"acquirer_reference_number\": \"74999912345678901234567\",\n \"authorization_id_response\": \"1A2B3C\",\n \"brand\": {\n \"address\": \"1 Rue de la Paix\",\n \"category_code\": \"CLOTHING\",\n \"city\": \"Paris\",\n \"country\": \"FR\",\n \"id\": \"brand_nike\",\n \"mcc\": \"5941\",\n \"name\": \"Nike\",\n \"post_code\": \"75001\",\n \"public_reference\": \"FR0123456789\"\n },\n \"category\": \"shopping\",\n \"deleted\": \"2023-11-07T05:31:56Z\",\n \"is_realtime\": false,\n \"label\": \"PURCHASE NIKE STORE\",\n \"retrieval_reference_number\": \"1A2B3C4D5E6F\",\n \"scheme\": \"visa\",\n \"scheme_id\": \"019876543210987\",\n \"store\": {\n \"address\": \"1 Rue de la Paix\",\n \"category_code\": \"Clothing\",\n \"city\": \"Paris\",\n \"country\": \"FR\",\n \"id\": \"store_123456\",\n \"merchant_id\": \"merchant_nike_fr\",\n \"name\": \"Nike Store\",\n \"post_code\": \"75001\",\n \"public_reference\": \"RCS987654321\",\n \"terminal_id\": \"TERM1234\"\n },\n \"truncated_dpan\": \"1A2B\",\n \"truncated_pan\": \"1A2B\"\n }\n ]\n }\n ],\n \"bank_id\": \"<string>\",\n \"id\": \"1\",\n \"status\": \"SUCCESS\"\n }\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api-{programRef}.sandbox.paylead.tech/consumers/{consumer_id}/transactions/history")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"banks\": [\n {\n \"accounts\": [\n {\n \"id\": \"<string>\",\n \"iban\": \"FR7630006000011234567890189\",\n \"name\": \"exemple_account\",\n \"transactions\": [\n {\n \"amount\": 123,\n \"executed_at\": \"2023-07-15T14:32:45\",\n \"id\": \"<string>\",\n \"raw_label\": \"<string>\",\n \"account_id\": \"acc_9876543210\",\n \"acquirer_reference_number\": \"74999912345678901234567\",\n \"authorization_id_response\": \"1A2B3C\",\n \"brand\": {\n \"address\": \"1 Rue de la Paix\",\n \"category_code\": \"CLOTHING\",\n \"city\": \"Paris\",\n \"country\": \"FR\",\n \"id\": \"brand_nike\",\n \"mcc\": \"5941\",\n \"name\": \"Nike\",\n \"post_code\": \"75001\",\n \"public_reference\": \"FR0123456789\"\n },\n \"category\": \"shopping\",\n \"deleted\": \"2023-11-07T05:31:56Z\",\n \"is_realtime\": false,\n \"label\": \"PURCHASE NIKE STORE\",\n \"retrieval_reference_number\": \"1A2B3C4D5E6F\",\n \"scheme\": \"visa\",\n \"scheme_id\": \"019876543210987\",\n \"store\": {\n \"address\": \"1 Rue de la Paix\",\n \"category_code\": \"Clothing\",\n \"city\": \"Paris\",\n \"country\": \"FR\",\n \"id\": \"store_123456\",\n \"merchant_id\": \"merchant_nike_fr\",\n \"name\": \"Nike Store\",\n \"post_code\": \"75001\",\n \"public_reference\": \"RCS987654321\",\n \"terminal_id\": \"TERM1234\"\n },\n \"truncated_dpan\": \"1A2B\",\n \"truncated_pan\": \"1A2B\"\n }\n ]\n }\n ],\n \"bank_id\": \"<string>\",\n \"id\": \"1\",\n \"status\": \"SUCCESS\"\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-{programRef}.sandbox.paylead.tech/consumers/{consumer_id}/transactions/history")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"banks\": [\n {\n \"accounts\": [\n {\n \"id\": \"<string>\",\n \"iban\": \"FR7630006000011234567890189\",\n \"name\": \"exemple_account\",\n \"transactions\": [\n {\n \"amount\": 123,\n \"executed_at\": \"2023-07-15T14:32:45\",\n \"id\": \"<string>\",\n \"raw_label\": \"<string>\",\n \"account_id\": \"acc_9876543210\",\n \"acquirer_reference_number\": \"74999912345678901234567\",\n \"authorization_id_response\": \"1A2B3C\",\n \"brand\": {\n \"address\": \"1 Rue de la Paix\",\n \"category_code\": \"CLOTHING\",\n \"city\": \"Paris\",\n \"country\": \"FR\",\n \"id\": \"brand_nike\",\n \"mcc\": \"5941\",\n \"name\": \"Nike\",\n \"post_code\": \"75001\",\n \"public_reference\": \"FR0123456789\"\n },\n \"category\": \"shopping\",\n \"deleted\": \"2023-11-07T05:31:56Z\",\n \"is_realtime\": false,\n \"label\": \"PURCHASE NIKE STORE\",\n \"retrieval_reference_number\": \"1A2B3C4D5E6F\",\n \"scheme\": \"visa\",\n \"scheme_id\": \"019876543210987\",\n \"store\": {\n \"address\": \"1 Rue de la Paix\",\n \"category_code\": \"Clothing\",\n \"city\": \"Paris\",\n \"country\": \"FR\",\n \"id\": \"store_123456\",\n \"merchant_id\": \"merchant_nike_fr\",\n \"name\": \"Nike Store\",\n \"post_code\": \"75001\",\n \"public_reference\": \"RCS987654321\",\n \"terminal_id\": \"TERM1234\"\n },\n \"truncated_dpan\": \"1A2B\",\n \"truncated_pan\": \"1A2B\"\n }\n ]\n }\n ],\n \"bank_id\": \"<string>\",\n \"id\": \"1\",\n \"status\": \"SUCCESS\"\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{}
{
"code": "<string>",
"status": 123,
"title": "<string>",
"errors": [
{}
],
"instance": "<string>"
}
{
"code": "<string>",
"status": 123,
"title": "<string>",
"errors": [
{}
],
"instance": "<string>"
}
{
"code": "<string>",
"status": 123,
"title": "<string>",
"errors": [
{}
],
"instance": "<string>"
}
{
"code": "<string>",
"status": 123,
"title": "<string>",
"errors": [
{}
],
"instance": "<string>"
}
{
"code": "<string>",
"status": 123,
"title": "<string>",
"errors": [
{}
],
"instance": "<string>"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

x-api-version
string
default:2.0.0

Path Parameters

consumer_id
string
required

Unique ID of the consumer that you have registered when the user was onboarded.

Required string length: 2 - 100

Body

application/json
banks
BucketBankSchema · object[]
required

List of bank connections and their associated accounts in the bucket.

Response

Successful Response

The response is of type EmptySchema · object.