<?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->GetConversionQuote("cvrquote_01JE9135DQRED1CX6FNXDNVSDD");
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.entities.ConversionQuote;
public class ViewQuote {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
ConversionQuote quote = mangopay.getConversionsApi().getConversionQuote("cvrquote_01HTFARNTMH993KYYNC8MZ2KH8");
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(quote);
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 quoteId = "cvrquote_01J53JS92WDW6D0VY5136YTGJ7";
var viewQuote = await api.Conversions.GetConversionQuote(quoteId);
string prettyPrint = JsonConvert.SerializeObject(viewQuote, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
{
"Id": "cvrquote_01J3G082JEQRQ4WGJPSVF5GPS7",
"CreationDate": 1721745279,
"ExpirationDate": 1721745579,
"Status": "ACTIVE",
"DebitedFunds": {
"Currency": "GBP",
"Amount": 1000
},
"CreditedFunds": {
"Currency": "USD",
"Amount": 1163
},
"Fees": {
"Currency": "GBP",
"Amount": 100
},
"ConversionRateResponse": {
"ClientRate": 1.2793195,
"MarketRate": 1.29172
},
"Tag": "Created using the Mangopay API Postman collection"
}
{
"Id": "cvrquote_01J3G082JEQRQ4WGJPSVF5GPS7",
"CreationDate": 1721745279,
"ExpirationDate": 1721745579,
"Status": "EXPIRED",
"DebitedFunds": {
"Currency": "GBP",
"Amount": 1000
},
"CreditedFunds": {
"Currency": "USD",
"Amount": 1163
},
"Fees": {
"Currency": "GBP",
"Amount": 100
},
"ConversionRateResponse": {
"ClientRate": 1.2793195,
"MarketRate": 1.29172
},
"Tag": "Created using the Mangopay API Postman collection"
}
Quotes
View a Quote
GET
/
v2.01
/
{ClientId}
/
conversions
/
quote
/
{QuoteId}
<?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->GetConversionQuote("cvrquote_01JE9135DQRED1CX6FNXDNVSDD");
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.entities.ConversionQuote;
public class ViewQuote {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
ConversionQuote quote = mangopay.getConversionsApi().getConversionQuote("cvrquote_01HTFARNTMH993KYYNC8MZ2KH8");
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(quote);
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 quoteId = "cvrquote_01J53JS92WDW6D0VY5136YTGJ7";
var viewQuote = await api.Conversions.GetConversionQuote(quoteId);
string prettyPrint = JsonConvert.SerializeObject(viewQuote, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
{
"Id": "cvrquote_01J3G082JEQRQ4WGJPSVF5GPS7",
"CreationDate": 1721745279,
"ExpirationDate": 1721745579,
"Status": "ACTIVE",
"DebitedFunds": {
"Currency": "GBP",
"Amount": 1000
},
"CreditedFunds": {
"Currency": "USD",
"Amount": 1163
},
"Fees": {
"Currency": "GBP",
"Amount": 100
},
"ConversionRateResponse": {
"ClientRate": 1.2793195,
"MarketRate": 1.29172
},
"Tag": "Created using the Mangopay API Postman collection"
}
{
"Id": "cvrquote_01J3G082JEQRQ4WGJPSVF5GPS7",
"CreationDate": 1721745279,
"ExpirationDate": 1721745579,
"Status": "EXPIRED",
"DebitedFunds": {
"Currency": "GBP",
"Amount": 1000
},
"CreditedFunds": {
"Currency": "USD",
"Amount": 1163
},
"Fees": {
"Currency": "GBP",
"Amount": 100
},
"ConversionRateResponse": {
"ClientRate": 1.2793195,
"MarketRate": 1.29172
},
"Tag": "Created using the Mangopay API Postman collection"
}
Responses
200 - Active
200 - Active
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
Unix timestamp
The date and time at which the object was created.
Unix timestamp
The date and time at which the quote expires and can no longer be used.
string
Returned values:
ACTIVE, EXPIREDThe status of the quote:ACTIVE– The quote can be used to execute a quoted conversion.EXPIRED– The quote can’t be used because theExpirationDateis passed.
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
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.
200 - Expired
200 - Expired
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
Unix timestamp
The date and time at which the object was created.
Unix timestamp
The date and time at which the quote expires and can no longer be used.
string
Returned values:
ACTIVE, EXPIREDThe status of the quote:ACTIVE– The quote can be used to execute a quoted conversion.EXPIRED– The quote can’t be used because theExpirationDateis passed.
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
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": "cvrquote_01J3G082JEQRQ4WGJPSVF5GPS7",
"CreationDate": 1721745279,
"ExpirationDate": 1721745579,
"Status": "ACTIVE",
"DebitedFunds": {
"Currency": "GBP",
"Amount": 1000
},
"CreditedFunds": {
"Currency": "USD",
"Amount": 1163
},
"Fees": {
"Currency": "GBP",
"Amount": 100
},
"ConversionRateResponse": {
"ClientRate": 1.2793195,
"MarketRate": 1.29172
},
"Tag": "Created using the Mangopay API Postman collection"
}
{
"Id": "cvrquote_01J3G082JEQRQ4WGJPSVF5GPS7",
"CreationDate": 1721745279,
"ExpirationDate": 1721745579,
"Status": "EXPIRED",
"DebitedFunds": {
"Currency": "GBP",
"Amount": 1000
},
"CreditedFunds": {
"Currency": "USD",
"Amount": 1163
},
"Fees": {
"Currency": "GBP",
"Amount": 100
},
"ConversionRateResponse": {
"ClientRate": 1.2793195,
"MarketRate": 1.29172
},
"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->GetConversionQuote("cvrquote_01JE9135DQRED1CX6FNXDNVSDD");
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.entities.ConversionQuote;
public class ViewQuote {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
ConversionQuote quote = mangopay.getConversionsApi().getConversionQuote("cvrquote_01HTFARNTMH993KYYNC8MZ2KH8");
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(quote);
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 quoteId = "cvrquote_01J53JS92WDW6D0VY5136YTGJ7";
var viewQuote = await api.Conversions.GetConversionQuote(quoteId);
string prettyPrint = JsonConvert.SerializeObject(viewQuote, Formatting.Indented);
Console.WriteLine(prettyPrint);
}
}
Was this page helpful?
⌘I