<?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 = 'client-id';
$api->Config->ClientPassword = 'api-key';
$api->Config->TemporaryFolder = '../tmp/';
$api->Config->DebugMode = false;
try {
$response = $api->Conversions->GetConversion("cvr_01JE92STKQNGZ2W67D224J4S2R");
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.entities.Conversion;
public class ViewConversion {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
Conversion conversion = mangopay.getConversionsApi().getConversion("cvr_01HTFQG61V40A3SSBMPB50QQZ0");
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(conversion);
System.out.println(prettyJson);
}
}
using MangoPay.SDK;
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 conversionId = "cvr_01J53K1QWW4PHD8GN8DDYXMPTA";
var viewConversion = await api.Conversions.GetInstantConversion(conversionId);
string prettyPrint = JsonConvert.SerializeObject(viewConversion, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
{
"Id": "cvr_01HQ1QSE554QW3HYQ9DMVF0D5H",
"QuoteId": null,
"Type": "CONVERSION",
"Nature": "REGULAR",
"CreationDate": 1708381747,
"Status": "SUCCEEDED",
"AuthorId": "204071581",
"DebitedWalletId": "204844308",
"CreditedWalletId": "204079338",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 10000
},
"CreditedFunds": {
"Currency": "GBP",
"Amount": 8468
},
"Fees": {
"Currency": "EUR",
"Amount": 100
},
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1708381747,
"ConversionRateResponse": {
"ClientRate": 0.8468,
"MarketRate": 0.8554
},
"Tag": "Created using the Mangopay API Postman collection"
}
{
"Id": "cvr_01HP1H6P56SSSTBZK1K9THFP79",
"QuoteId": "cvrquote_01HP1H6EK4H39SCQ8WJ349WMBB",
"Type": "CONVERSION",
"Nature": "REGULAR",
"CreationDate": 1707301099,
"Status": "SUCCEEDED",
"AuthorId": "204071581",
"DebitedWalletId": "204079338",
"CreditedWalletId": "209408867",
"DebitedFunds": {
"Currency": "GBP",
"Amount": 1000
},
"CreditedFunds": {
"Currency": "USD",
"Amount": 1263
},
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1707301100,
"ConversionRateResponse": {
"ClientRate": 1.2504,
"MarketRate": 1.263
},
"Tag": "Created using the Mangopay API Postman collection"
}
Conversions
View a Conversion
GET
/
v2.01
/
{ClientId}
/
conversions
/
{ConversionId}
<?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 = 'client-id';
$api->Config->ClientPassword = 'api-key';
$api->Config->TemporaryFolder = '../tmp/';
$api->Config->DebugMode = false;
try {
$response = $api->Conversions->GetConversion("cvr_01JE92STKQNGZ2W67D224J4S2R");
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.entities.Conversion;
public class ViewConversion {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
Conversion conversion = mangopay.getConversionsApi().getConversion("cvr_01HTFQG61V40A3SSBMPB50QQZ0");
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(conversion);
System.out.println(prettyJson);
}
}
using MangoPay.SDK;
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 conversionId = "cvr_01J53K1QWW4PHD8GN8DDYXMPTA";
var viewConversion = await api.Conversions.GetInstantConversion(conversionId);
string prettyPrint = JsonConvert.SerializeObject(viewConversion, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
{
"Id": "cvr_01HQ1QSE554QW3HYQ9DMVF0D5H",
"QuoteId": null,
"Type": "CONVERSION",
"Nature": "REGULAR",
"CreationDate": 1708381747,
"Status": "SUCCEEDED",
"AuthorId": "204071581",
"DebitedWalletId": "204844308",
"CreditedWalletId": "204079338",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 10000
},
"CreditedFunds": {
"Currency": "GBP",
"Amount": 8468
},
"Fees": {
"Currency": "EUR",
"Amount": 100
},
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1708381747,
"ConversionRateResponse": {
"ClientRate": 0.8468,
"MarketRate": 0.8554
},
"Tag": "Created using the Mangopay API Postman collection"
}
{
"Id": "cvr_01HP1H6P56SSSTBZK1K9THFP79",
"QuoteId": "cvrquote_01HP1H6EK4H39SCQ8WJ349WMBB",
"Type": "CONVERSION",
"Nature": "REGULAR",
"CreationDate": 1707301099,
"Status": "SUCCEEDED",
"AuthorId": "204071581",
"DebitedWalletId": "204079338",
"CreditedWalletId": "209408867",
"DebitedFunds": {
"Currency": "GBP",
"Amount": 1000
},
"CreditedFunds": {
"Currency": "USD",
"Amount": 1263
},
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1707301100,
"ConversionRateResponse": {
"ClientRate": 1.2504,
"MarketRate": 1.263
},
"Tag": "Created using the Mangopay API Postman collection"
}
All conversions returned by this endpoint contain the
QuoteId parameter. For instant conversions, it is null.
Note – Conversion data retained for 13 monthsAn API call to retrieve a conversion whose
CreationDate is older than 13 months may return 404 Not Found.For more information, see the Data availability periods article.Path parameters
string
The unique identifier of the conversion.
Responses
200 - Instant conversion
200 - Instant conversion
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
string
The unique identifier of the active quote which guaranteed the rate for the conversion.Returned
null in the case of an instant conversion.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.
Unix timestamp
The date and time at which the object was created.
string
Returned values:
CREATED, SUCCEEDED, FAILEDThe status of the transaction.string
The unique identifier of the user at the source of the transaction. In a conversion, both the debited and credited wallets are owned by the author.
string
The unique identifier of the debited wallet (in the sell currency).
string
The unique identifier of the credited wallet (in the buy currency).
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.
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 (the buy 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, CreditedFunds.Amount = (DebitedFunds.Amount - Fees) * MarketRate. object
Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet).Note: The fees currency must match the debited funds currency.
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
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.object
Information about the
MarketRate used to convert funds and other indicative rates.Show properties
Show properties
float
Max. 7 decimal placesThe indicative rate including Mangopay’s markup, used during the billing cycle:
ClientRate = MarketRate * (1 - MarginsResponse.Mangopay). The MarginsResponse.Mangopay.Amount gives the amount of debited currency that will be billed by Mangopay to your platform for the transaction.The ClientRate fluctuates in line with the MarketRate.float
Max. 7 decimal placesThe rate used to convert funds during the conversion: (
DebitedFunds.Amount - Fees) * MarketRate = CreditedFunds.Amount.The market rate fluctuates in line with FX market dynamics and is common to all platforms for the currency pair.float
Max. 7 decimal placesThe indicative rate including the
UserMargin, if your platform defined it in the request or the quote: FinalRate = ClientRate * (1 - MarginsResponse.User). The MarginsResponse.User.Amount gives the amount of debited currency that your platform could bill to the user for the transaction.If no UserMargin was included, the FinalRate is the same as the ClientRate.string
Max. length: 255 charactersCustom data that you can add to this object.
200 - Quoted conversion
200 - Quoted conversion
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
string
The unique identifier of the active quote which guaranteed the rate for the conversion.Returned
null in the case of an instant conversion.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.
Unix timestamp
The date and time at which the object was created.
string
Returned values:
CREATED, SUCCEEDED, FAILEDThe status of the transaction.string
The unique identifier of the user at the source of the transaction. In a conversion, both the debited and credited wallets are owned by the author.
string
The unique identifier of the debited wallet (in the sell currency).
string
The unique identifier of the credited wallet (in the buy currency).
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.
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 (the buy 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, CreditedFunds.Amount = (DebitedFunds.Amount - Fees) * MarketRate. object
Information about the fees taken by the platform for this transaction (and hence transferred to the Fees Wallet).Note: The fees currency must match the debited funds currency.
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
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.object
Information about the
MarketRate used to convert funds and other indicative rates.Show properties
Show properties
float
Max. 7 decimal placesThe indicative rate including Mangopay’s markup, used during the billing cycle:
ClientRate = MarketRate * (1 - MarginsResponse.Mangopay). The MarginsResponse.Mangopay.Amount gives the amount of debited currency that will be billed by Mangopay to your platform for the transaction.The ClientRate fluctuates in line with the MarketRate.float
Max. 7 decimal placesThe rate used to convert funds during the conversion: (
DebitedFunds.Amount - Fees) * MarketRate = CreditedFunds.Amount.The market rate fluctuates in line with FX market dynamics and is common to all platforms for the currency pair.float
Max. 7 decimal placesThe indicative rate including the
UserMargin, if your platform defined it in the request or the quote: FinalRate = ClientRate * (1 - MarginsResponse.User). The MarginsResponse.User.Amount gives the amount of debited currency that your platform could bill to the user for the transaction.If no UserMargin was included, the FinalRate is the same as the ClientRate.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.
{
"Id": "cvr_01HQ1QSE554QW3HYQ9DMVF0D5H",
"QuoteId": null,
"Type": "CONVERSION",
"Nature": "REGULAR",
"CreationDate": 1708381747,
"Status": "SUCCEEDED",
"AuthorId": "204071581",
"DebitedWalletId": "204844308",
"CreditedWalletId": "204079338",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 10000
},
"CreditedFunds": {
"Currency": "GBP",
"Amount": 8468
},
"Fees": {
"Currency": "EUR",
"Amount": 100
},
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1708381747,
"ConversionRateResponse": {
"ClientRate": 0.8468,
"MarketRate": 0.8554
},
"Tag": "Created using the Mangopay API Postman collection"
}
{
"Id": "cvr_01HP1H6P56SSSTBZK1K9THFP79",
"QuoteId": "cvrquote_01HP1H6EK4H39SCQ8WJ349WMBB",
"Type": "CONVERSION",
"Nature": "REGULAR",
"CreationDate": 1707301099,
"Status": "SUCCEEDED",
"AuthorId": "204071581",
"DebitedWalletId": "204079338",
"CreditedWalletId": "209408867",
"DebitedFunds": {
"Currency": "GBP",
"Amount": 1000
},
"CreditedFunds": {
"Currency": "USD",
"Amount": 1263
},
"ResultCode": "000000",
"ResultMessage": "Success",
"ExecutionDate": 1707301100,
"ConversionRateResponse": {
"ClientRate": 1.2504,
"MarketRate": 1.263
},
"Tag": "Created using the Mangopay API Postman collection"
}
<?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 = 'client-id';
$api->Config->ClientPassword = 'api-key';
$api->Config->TemporaryFolder = '../tmp/';
$api->Config->DebugMode = false;
try {
$response = $api->Conversions->GetConversion("cvr_01JE92STKQNGZ2W67D224J4S2R");
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.entities.Conversion;
public class ViewConversion {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
Conversion conversion = mangopay.getConversionsApi().getConversion("cvr_01HTFQG61V40A3SSBMPB50QQZ0");
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(conversion);
System.out.println(prettyJson);
}
}
using MangoPay.SDK;
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 conversionId = "cvr_01J53K1QWW4PHD8GN8DDYXMPTA";
var viewConversion = await api.Conversions.GetInstantConversion(conversionId);
string prettyPrint = JsonConvert.SerializeObject(viewConversion, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
Was this page helpful?