Skip to main content
PUT
/
consumers
/
{consumer_id}
/
transactions
/
{transaction_id}
Update transaction
curl --request PUT \
  --url https://api-{programRef}.sandbox.paylead.tech/consumers/{consumer_id}/transactions/{transaction_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": 123,
  "executed_at": "2023-07-15T14:32:45",
  "id": "<string>",
  "raw_label": "<string>",
  "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"
  },
  "country_code": "FR",
  "is_realtime": true,
  "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"
}
'
import requests

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

payload = {
"amount": 123,
"executed_at": "2023-07-15T14:32:45",
"id": "<string>",
"raw_label": "<string>",
"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"
},
"country_code": "FR",
"is_realtime": True,
"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"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 123,
executed_at: '2023-07-15T14:32:45',
id: '<string>',
raw_label: '<string>',
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'
},
country_code: 'FR',
is_realtime: true,
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'
})
};

fetch('https://api-{programRef}.sandbox.paylead.tech/consumers/{consumer_id}/transactions/{transaction_id}', 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/{transaction_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 123,
'executed_at' => '2023-07-15T14:32:45',
'id' => '<string>',
'raw_label' => '<string>',
'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'
],
'country_code' => 'FR',
'is_realtime' => true,
'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'
]),
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/{transaction_id}"

payload := strings.NewReader("{\n \"amount\": 123,\n \"executed_at\": \"2023-07-15T14:32:45\",\n \"id\": \"<string>\",\n \"raw_label\": \"<string>\",\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 \"country_code\": \"FR\",\n \"is_realtime\": true,\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}")

req, _ := http.NewRequest("PUT", 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.put("https://api-{programRef}.sandbox.paylead.tech/consumers/{consumer_id}/transactions/{transaction_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123,\n \"executed_at\": \"2023-07-15T14:32:45\",\n \"id\": \"<string>\",\n \"raw_label\": \"<string>\",\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 \"country_code\": \"FR\",\n \"is_realtime\": true,\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}")
.asString();
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 123,\n \"executed_at\": \"2023-07-15T14:32:45\",\n \"id\": \"<string>\",\n \"raw_label\": \"<string>\",\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 \"country_code\": \"FR\",\n \"is_realtime\": true,\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}"

response = http.request(request)
puts response.read_body
{
  "amount": 123,
  "executed_at": "2023-07-15T14:32:45",
  "id": "<string>",
  "raw_label": "<string>",
  "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"
  },
  "country_code": "FR",
  "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"
}
{
"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>"
}
{
"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

transaction_id
string
required

UUID of the transaction or Unique ID of the transaction that you have registered when the transaction was created.

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
amount
number
required

Signed transaction amount in the transaction currency; negative for debits, positive for credits.

Example:

-85.5

currency
enum<string>
required

ISO 4217 currency code (alpha-3 or numeric)

Available options:
AED,
AFN,
ALL,
AMD,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BHD,
BIF,
BMD,
BND,
BOB,
BOV,
BRL,
BSD,
BTN,
BWP,
BYN,
BZD,
CAD,
CDF,
CHE,
CHF,
CHW,
CLF,
CLP,
CNY,
COP,
COU,
CRC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ERN,
ETB,
EUR,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
IRR,
ISK,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRU,
MUR,
MVR,
MWK,
MXN,
MXV,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLE,
SOS,
SRD,
SSP,
STN,
SVC,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
USD,
USN,
UYI,
UYU,
UYW,
UZS,
VED,
VES,
VND,
VUV,
WST,
XAD,
XAF,
XCD,
XCG,
XOF,
XPF,
XSU,
XUA,
YER,
ZAR,
ZMW,
ZWG
Required string length: 3
Examples:

"EUR"

"978"

executed_at
required

ISO 8601 date/datetime at which the transaction was executed.

Example:

"2023-07-15T14:32:45"

id
string
required

Unique identifier for the resource on your system

Example:

"tx_12345678abcdef"

raw_label
string
required

Raw descriptor as received from the bank, before any cleaning.

Example:

"PURCHASE NIKE STORE PARIS"

type
enum<string>
required

Nature of the transaction as reported by the bank.

Available options:
bank,
card,
check,
deferred_card,
deposit,
loan_payment,
order,
payback,
summary_card,
transfer,
unknown,
withdrawal
acquirer_reference_number
string | null

Alphanumeric (accepts spaces, _ and -) acquirer reference number, unique identifier assigned to a card transaction by the acquirer, max 23 characters

Required string length: 1 - 23
Pattern: ^[a-zA-Z0-9 _-]{1,23}$
Example:

"74999912345678901234567"

authorization_id_response
string | null

Alphanumeric (accepts spaces, _ and -) reference number assigned by the issuer in response to a transaction authorization request, max 6 characters

Required string length: 1 - 6
Example:

"1A2B3C"

brand
BrandSchema · object | null

Brand metadata resolved for the transaction.

channel
enum<string> | null

Channel through which the transaction was made.

Available options:
store,
online
country_code
string | null

ISO 3166-1 alpha-2 country code where the transaction took place.

Pattern: ^\w{2}$
Example:

"FR"

is_realtime
boolean | null

Whether the transaction was pushed in real time (e.g. at authorization).

label
string | null

Cleaned, human-readable descriptor of the transaction.

Example:

"PURCHASE NIKE STORE"

retrieval_reference_number
string | null

Alphanumeric (accepts spaces, _ and -) retrieval reference number, unique identifier assigned to a card transaction during the authorization, max 12 characters

Required string length: 1 - 12
Pattern: ^[a-zA-Z0-9 _-]{1,12}$
Example:

"1A2B3C4D5E6F"

scheme
string | null

The network used for the transaction

Example:

"visa"

scheme_id
string | null

Alphanumeric (accepts spaces, _ and -) scheme identifier assigned to a card transaction by the card network

Minimum string length: 1
Pattern: ^[a-zA-Z0-9 _-]+$
Example:

"019876543210987"

state
enum<string> | null

Settlement state of the transaction.

Available options:
cleared,
authorization
store
StoreSchema · object | null

Store metadata resolved for the transaction.

truncated_dpan
string | null

Last 4 digits of the device token, must be a string without null bytes, and match 4 digits

Required string length: 4
Example:

"1A2B"

truncated_pan
string | null

Last 4 digits of the card number, must be a string without null bytes, and match 4 digits

Required string length: 4
Example:

"1A2B"

Response

Successful Response

amount
number
required

Signed transaction amount in the transaction currency; negative for debits, positive for credits.

Example:

-85.5

currency
enum<string>
required

ISO 4217 currency code (alpha-3 or numeric)

Available options:
AED,
AFN,
ALL,
AMD,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BHD,
BIF,
BMD,
BND,
BOB,
BOV,
BRL,
BSD,
BTN,
BWP,
BYN,
BZD,
CAD,
CDF,
CHE,
CHF,
CHW,
CLF,
CLP,
CNY,
COP,
COU,
CRC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ERN,
ETB,
EUR,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
IRR,
ISK,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRU,
MUR,
MVR,
MWK,
MXN,
MXV,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLE,
SOS,
SRD,
SSP,
STN,
SVC,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
USD,
USN,
UYI,
UYU,
UYW,
UZS,
VED,
VES,
VND,
VUV,
WST,
XAD,
XAF,
XCD,
XCG,
XOF,
XPF,
XSU,
XUA,
YER,
ZAR,
ZMW,
ZWG
Required string length: 3
Examples:

"EUR"

"978"

executed_at
required

ISO 8601 date/datetime at which the transaction was executed.

Example:

"2023-07-15T14:32:45"

id
string
required

Unique identifier for the resource on your system

Example:

"tx_12345678abcdef"

raw_label
string
required

Raw descriptor as received from the bank, before any cleaning.

Example:

"PURCHASE NIKE STORE PARIS"

type
enum<string>
required

Nature of the transaction as reported by the bank.

Available options:
bank,
card,
check,
deferred_card,
deposit,
loan_payment,
order,
payback,
summary_card,
transfer,
unknown,
withdrawal
acquirer_reference_number
string | null

Alphanumeric (accepts spaces, _ and -) acquirer reference number, unique identifier assigned to a card transaction by the acquirer, max 23 characters

Required string length: 1 - 23
Pattern: ^[a-zA-Z0-9 _-]{1,23}$
Example:

"74999912345678901234567"

authorization_id_response
string | null

Alphanumeric (accepts spaces, _ and -) reference number assigned by the issuer in response to a transaction authorization request, max 6 characters

Pattern: ^[a-zA-Z0-9 _-]{1,6}$
Example:

"1A2B3C"

brand
BrandSchema · object | null

Brand metadata resolved for the transaction.

channel
enum<string> | null

Channel through which the transaction was made.

Available options:
store,
online
country_code
string | null

ISO 3166-1 alpha-2 country code where the transaction took place.

Pattern: ^\w{2}$
Example:

"FR"

is_realtime
boolean
default:false

Whether the transaction was pushed in real time (e.g. at authorization).

label
string | null

Cleaned, human-readable descriptor of the transaction.

Example:

"PURCHASE NIKE STORE"

retrieval_reference_number
string | null

Alphanumeric (accepts spaces, _ and -) retrieval reference number, unique identifier assigned to a card transaction during the authorization, max 12 characters

Required string length: 1 - 12
Pattern: ^[a-zA-Z0-9 _-]{1,12}$
Example:

"1A2B3C4D5E6F"

scheme
string | null

The network used for the transaction

Example:

"visa"

scheme_id
string | null

Alphanumeric (accepts spaces, _ and -) scheme identifier assigned to a card transaction by the card network

Minimum string length: 1
Pattern: ^[a-zA-Z0-9 _-]+$
Example:

"019876543210987"

state
enum<string> | null

Settlement state of the transaction.

Available options:
cleared,
authorization
store
StoreSchema · object | null

Store metadata resolved for the transaction.

truncated_dpan
string | null

Last 4 digits of the device token, must be a string without null bytes, and match 4 digits

Pattern: ^[A-Za-z0-9]{4}$
Example:

"1A2B"

truncated_pan
string | null

Last 4 digits of the card number, must be a string without null bytes, and match 4 digits

Pattern: ^[A-Za-z0-9]{4}$
Example:

"1A2B"