<?php
require_once 'vendor/autoload.php';
use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;
$api = new MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$preauthorizationId = '192823192';
$response = $api->CardPreAuthorizations->GetTransactions($preauthorizationId);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
const mangopayInstance = require('mangopay4-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-client-id',
clientApiKey: 'your-api-key',
})
let myPreauthorization = {
Id: '192823192',
}
const listTransactionsPreauthorization = async (preauthorizationId) => {
return await mangopay.CardPreAuthorizations.getTransactions(preauthorizationId)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
listTransactionsPreauthorization(myPreauthorization.Id)
require 'mangopay'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'your-client-id'
client.client_apiKey = 'your-api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
def listTransactionsPreauthorization(preauthorizationId)
begin
response = MangoPay::PreAuthorization.transactions(preauthorizationId)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch Transactions: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myPreauthorization = {
Id: '192823192'
}
listTransactionsPreauthorization(myPreauthorization[:Id])
from pprint import pprint
import mangopay
mangopay.client_id='your-client-id'
mangopay.apikey='your-api-key'
from mangopay.api import APIRequest
handler = APIRequest(sandbox=True)
from mangopay.resources import PreAuthorization
preauth = PreAuthorization.get('preauth_m_01HPHN0G8236VVKDSF9SX87HE6')
transactions = PreAuthorization.get_transactions(self = preauth)
print('=== Transactions for PreAuthorization {} ==='.format(preauth.id))
for transaction in transactions:
print()
pprint(transaction._data)
using MangoPay.SDK;
using MangoPay.SDK.Entities;
using Newtonsoft.Json;
class Program
{
static async Task Main(string[] args)
{
MangoPayApi api = new MangoPayApi();
api.Config.ClientId = "your-client-id";
api.Config.ClientPassword = "your-api-key";
var preauthorizationId = "preauth_m_01J30NHM7E0TQ9W5NRQ964W7WF";
var viewTransactions = await api.CardPreAuthorizations.GetTransactionsAsync(preauthorizationId, new Pagination(1, 100));
string prettyPrint = JsonConvert.SerializeObject(viewTransactions, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
[
{
"Id": "payin_m_01HYP75VGJDCNSBRXKP8FQ1098",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1716585164,
"AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY",
"CreditedUserId": "204068024",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 6315
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 5683
},
"Fees": {
"Currency": "EUR",
"Amount": 632
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1716585165,
"Type": "PAYIN",
"Nature": "REGULAR",
"CreditedWalletId": "204089031",
"DebitedWalletId": null,
"DepositId": null
}
]
Transactions
List Transactions for a Preauthorization
GET
/
v2.01
/
{ClientId}
/
preauthorizations
/
{PreauthorizationId}
/
transactions
<?php
require_once 'vendor/autoload.php';
use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;
$api = new MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$preauthorizationId = '192823192';
$response = $api->CardPreAuthorizations->GetTransactions($preauthorizationId);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
const mangopayInstance = require('mangopay4-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-client-id',
clientApiKey: 'your-api-key',
})
let myPreauthorization = {
Id: '192823192',
}
const listTransactionsPreauthorization = async (preauthorizationId) => {
return await mangopay.CardPreAuthorizations.getTransactions(preauthorizationId)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
listTransactionsPreauthorization(myPreauthorization.Id)
require 'mangopay'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'your-client-id'
client.client_apiKey = 'your-api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
def listTransactionsPreauthorization(preauthorizationId)
begin
response = MangoPay::PreAuthorization.transactions(preauthorizationId)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch Transactions: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myPreauthorization = {
Id: '192823192'
}
listTransactionsPreauthorization(myPreauthorization[:Id])
from pprint import pprint
import mangopay
mangopay.client_id='your-client-id'
mangopay.apikey='your-api-key'
from mangopay.api import APIRequest
handler = APIRequest(sandbox=True)
from mangopay.resources import PreAuthorization
preauth = PreAuthorization.get('preauth_m_01HPHN0G8236VVKDSF9SX87HE6')
transactions = PreAuthorization.get_transactions(self = preauth)
print('=== Transactions for PreAuthorization {} ==='.format(preauth.id))
for transaction in transactions:
print()
pprint(transaction._data)
using MangoPay.SDK;
using MangoPay.SDK.Entities;
using Newtonsoft.Json;
class Program
{
static async Task Main(string[] args)
{
MangoPayApi api = new MangoPayApi();
api.Config.ClientId = "your-client-id";
api.Config.ClientPassword = "your-api-key";
var preauthorizationId = "preauth_m_01J30NHM7E0TQ9W5NRQ964W7WF";
var viewTransactions = await api.CardPreAuthorizations.GetTransactionsAsync(preauthorizationId, new Pagination(1, 100));
string prettyPrint = JsonConvert.SerializeObject(viewTransactions, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
[
{
"Id": "payin_m_01HYP75VGJDCNSBRXKP8FQ1098",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1716585164,
"AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY",
"CreditedUserId": "204068024",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 6315
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 5683
},
"Fees": {
"Currency": "EUR",
"Amount": 632
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1716585165,
"Type": "PAYIN",
"Nature": "REGULAR",
"CreditedWalletId": "204089031",
"DebitedWalletId": null,
"DepositId": null
}
]
This call returns all preauthorized pay-ins made against a given preauthorization, whether they were successful or not.
Path parameters
string
required
The unique identifier of the preauthorization.
Query parameters
string
Allowed values:
CREATED, SUCCEEDED, FAILEDThe status of the transaction. You can filter on multiple values by separating them with a comma.string
The code indicating the result of the operation. You can filter on multiple values by separating them with a comma.
Unix timestamp
The date before which the transaction was created (based on the transaction’s
CreationDate parameter). You can filter on a specific time range by using both the AfterDate and BeforeDate query parameters.Unix timestamp
The date after which the transaction was created (based on the transaction’s
CreationDate parameter). You can filter on a specific time range by using both the AfterDate and BeforeDate query parameters.string
Allowed values:
PAYIN, TRANSFER, CONVERSION, PAYOUTThe type of the transaction. You can filter on multiple values by separating them with a comma.string
Allowed values:
REGULAR, REPUDIATION, REFUND, SETTLEMENTThe nature of the transaction, providing more information about the context in which the transaction occurred. You can filter on multiple values by separating them with a comma.Responses
200
200
array
The list of transactions created by the platform.
Show properties
Show properties
object
The transaction created by the platform.
Show properties
Show properties
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
string
Max. length: 255 charactersCustom data that you can add to this object.
For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform.
For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform.
Unix timestamp
The date and time at which the object was created.
string
The unique identifier of the user at the source of the transaction.
string
Default value: The unique identifier of the owner of the credited wallet.The unique identifier of the user whose wallet is credited.
object
Information about the debited funds.
Show properties
Show properties
string
Returned values: The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings).The currency of the debited funds (the sell currency).
integer
An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as
1260 whereas JPY 12 would be represented as just 12).During a conversion, (DebitedFunds.Amount - Fees) * MarketRate = CreditedFunds.Amount. object
Information about the credited funds (
CreditedFunds = DebitedFunds - Fees).Show properties
Show properties
string
Returned values: The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings).The currency of the credited funds.
integer
An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as
1260 whereas JPY 12 would be represented as just 12).object
Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet).
Show properties
Show properties
string
Returned values: The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings).The currency of the fees.
integer
An amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as
1260 whereas JPY 12 would be represented as just 12).string
Returned values:
CREATED, SUCCEEDED, FAILEDThe status of the transaction.string
The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes.
string
The explanation of the result code.
Unix timestamp
The date and time at which the status changed to
SUCCEEDED, indicating that the transaction occurred. The statuses CREATED and FAILED return an ExecutionDate of null.string
The type of transaction.
string
Returned values:
REGULAR, REPUDIATION, REFUND, SETTLEMENTThe nature of the transaction, providing more information about the context in which the transaction occurred:REGULAR– Relative to most of the transactions (pay-ins, payouts, and transfers) in a usual workflow.REPUDIATION– Automatic withdrawal of funds from the platform’s repudiation wallet as part of the dispute process (when the user has requested a chargeback).REFUND– Reimbursement of a transaction to the user (pay-in refund), to a wallet (transfer refund), or of a payout (payout refund, only initiated by Mangopay).SETTLEMENT– Transfer made to the repudiation wallet by the platform to settle a lost dispute.
string
The unique identifier of the credited wallet.
string
The unique identifier of the debited wallet.
[
{
"Id": "payin_m_01HYP75VGJDCNSBRXKP8FQ1098",
"Tag": "Created using the Mangopay API Postman collection",
"CreationDate": 1716585164,
"AuthorId": "user_m_01HSDQD2RPPQ8NMM36EDGYBMEY",
"CreditedUserId": "204068024",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 6315
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 5683
},
"Fees": {
"Currency": "EUR",
"Amount": 632
},
"Status": "SUCCEEDED",
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1716585165,
"Type": "PAYIN",
"Nature": "REGULAR",
"CreditedWalletId": "204089031",
"DebitedWalletId": null,
"DepositId": null
}
]
<?php
require_once 'vendor/autoload.php';
use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;
$api = new MangoPayApi();
$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';
try {
$preauthorizationId = '192823192';
$response = $api->CardPreAuthorizations->GetTransactions($preauthorizationId);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
const mangopayInstance = require('mangopay4-nodejs-sdk')
const mangopay = new mangopayInstance({
clientId: 'your-client-id',
clientApiKey: 'your-api-key',
})
let myPreauthorization = {
Id: '192823192',
}
const listTransactionsPreauthorization = async (preauthorizationId) => {
return await mangopay.CardPreAuthorizations.getTransactions(preauthorizationId)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
listTransactionsPreauthorization(myPreauthorization.Id)
require 'mangopay'
MangoPay.configure do |client|
client.preproduction = true
client.client_id = 'your-client-id'
client.client_apiKey = 'your-api-key'
client.log_file = File.join(Dir.pwd, 'mangopay.log')
end
def listTransactionsPreauthorization(preauthorizationId)
begin
response = MangoPay::PreAuthorization.transactions(preauthorizationId)
puts response
return response
rescue MangoPay::ResponseError => error
puts "Failed to fetch Transactions: #{error.message}"
puts "Error details: #{error.details}"
return false
end
end
myPreauthorization = {
Id: '192823192'
}
listTransactionsPreauthorization(myPreauthorization[:Id])
from pprint import pprint
import mangopay
mangopay.client_id='your-client-id'
mangopay.apikey='your-api-key'
from mangopay.api import APIRequest
handler = APIRequest(sandbox=True)
from mangopay.resources import PreAuthorization
preauth = PreAuthorization.get('preauth_m_01HPHN0G8236VVKDSF9SX87HE6')
transactions = PreAuthorization.get_transactions(self = preauth)
print('=== Transactions for PreAuthorization {} ==='.format(preauth.id))
for transaction in transactions:
print()
pprint(transaction._data)
using MangoPay.SDK;
using MangoPay.SDK.Entities;
using Newtonsoft.Json;
class Program
{
static async Task Main(string[] args)
{
MangoPayApi api = new MangoPayApi();
api.Config.ClientId = "your-client-id";
api.Config.ClientPassword = "your-api-key";
var preauthorizationId = "preauth_m_01J30NHM7E0TQ9W5NRQ964W7WF";
var viewTransactions = await api.CardPreAuthorizations.GetTransactionsAsync(preauthorizationId, new Pagination(1, 100));
string prettyPrint = JsonConvert.SerializeObject(viewTransactions, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
Was this page helpful?
⌘I