{
"DebitedFunds": {
"Currency": "GBP",
"Amount": 1000
},
"CreditedFunds": {
"Currency": "EUR"
},
"Duration": 300,
"Fees": {
"Type": "PERCENTAGE",
"Value": 700,
"Currency": "GBP"
},
"UserMargin":{
"Type": "PERCENTAGE",
"Value": 1.5,
"Currency": "GBP"
},
"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;
use MangoPay\Money;
$api = new MangoPayApi();
$api->Config->ClientId = 'client-id';
$api->Config->ClientPassword = 'api-key';
$api->Config->TemporaryFolder = '../tmp/';
$api->Config->DebugMode = false;
try {
$Quote = new \MangoPay\ConversionQuote();
$Quote->DebitedFunds = new Money();
$Quote->DebitedFunds->Currency = "GBP";
$Quote->CreditedFunds = new Money();
$Quote->CreditedFunds->Currency = "EUR";
$Quote->CreditedFunds->Amount = 10;
$Quote->Duration = 300;
$Quote->Tag = "Created using the Mangopay PHP SDK";
$response = $api->Conversions->CreateConversionQuote($Quote);
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: "client-id",
clientApiKey: "api-key"
})
let myQuote = {
DebitedFunds: {
Currency: 'EUR',
Amount: 1000,
},
CreditedFunds: {
Currency: 'USD',
Amount: null
},
Fees: {
Currency: 'EUR',
Amount: 50,
},
Duration: 300,
Tag: "Created using the Mangopay NodeJS SDK"
}
const createQuote = async (quote) => {
return await mangopay.Conversions.createQuote(quote)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
createQuote(myQuote)
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.core.Money;
import com.mangopay.core.enumerations.CurrencyIso;
import com.mangopay.entities.ConversionQuote;
import com.mangopay.entities.CreateConversionQuote;
public class CreateQuote {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
CreateConversionQuote quote = new CreateConversionQuote();
Money debitedFunds = new Money();
debitedFunds.setCurrency(CurrencyIso.GBP);
Money creditedFunds = new Money();
creditedFunds.setCurrency(CurrencyIso.USD);
creditedFunds.setAmount(1000);
quote.setDebitedFunds(debitedFunds);
quote.setCreditedFunds(creditedFunds);
quote.setDuration(300);
quote.setTag("Created using the Mangopay Java SDK");
ConversionQuote createQuote = mangopay.getConversionsApi().createConversionQuote(quote, null);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(createQuote);
System.out.println(prettyJson);
}
}
{
"Id": "cvrquote_01KH3J69K96FXNMQ875PTDJ13A",
"CreationDate": 1770720011,
"ExpirationDate": 1770720311,
"Status": "ACTIVE",
"DebitedFunds": {
"Currency": "GBP",
"Amount": 1000
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 1067
},
"Fees": {
"Currency": "GBP",
"Amount": 70
},
"RequestedFees": {
"Type": "PERCENTAGE",
"Value": 700,
"Currency": "GBP"
},
"ConversionRateResponse": {
"ClientRate": 1.1360925,
"MarketRate": 1.1471047,
"FinalRate": 1.1190511
},
"MarginsResponse": {
"Mangopay": {
"Type": "PERCENTAGE",
"Value": 0.96,
"Amount": 10
},
"User": {
"Type": "PERCENTAGE",
"Value": 1.5,
"Amount": 16
}
},
"Tag": "Created using the Mangopay API Postman collection"
}
Quotes
Create a Quote
POST
/
v2.01
/
{ClientId}
/
conversions
/
quote
{
"DebitedFunds": {
"Currency": "GBP",
"Amount": 1000
},
"CreditedFunds": {
"Currency": "EUR"
},
"Duration": 300,
"Fees": {
"Type": "PERCENTAGE",
"Value": 700,
"Currency": "GBP"
},
"UserMargin":{
"Type": "PERCENTAGE",
"Value": 1.5,
"Currency": "GBP"
},
"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;
use MangoPay\Money;
$api = new MangoPayApi();
$api->Config->ClientId = 'client-id';
$api->Config->ClientPassword = 'api-key';
$api->Config->TemporaryFolder = '../tmp/';
$api->Config->DebugMode = false;
try {
$Quote = new \MangoPay\ConversionQuote();
$Quote->DebitedFunds = new Money();
$Quote->DebitedFunds->Currency = "GBP";
$Quote->CreditedFunds = new Money();
$Quote->CreditedFunds->Currency = "EUR";
$Quote->CreditedFunds->Amount = 10;
$Quote->Duration = 300;
$Quote->Tag = "Created using the Mangopay PHP SDK";
$response = $api->Conversions->CreateConversionQuote($Quote);
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: "client-id",
clientApiKey: "api-key"
})
let myQuote = {
DebitedFunds: {
Currency: 'EUR',
Amount: 1000,
},
CreditedFunds: {
Currency: 'USD',
Amount: null
},
Fees: {
Currency: 'EUR',
Amount: 50,
},
Duration: 300,
Tag: "Created using the Mangopay NodeJS SDK"
}
const createQuote = async (quote) => {
return await mangopay.Conversions.createQuote(quote)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
createQuote(myQuote)
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.core.Money;
import com.mangopay.core.enumerations.CurrencyIso;
import com.mangopay.entities.ConversionQuote;
import com.mangopay.entities.CreateConversionQuote;
public class CreateQuote {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
CreateConversionQuote quote = new CreateConversionQuote();
Money debitedFunds = new Money();
debitedFunds.setCurrency(CurrencyIso.GBP);
Money creditedFunds = new Money();
creditedFunds.setCurrency(CurrencyIso.USD);
creditedFunds.setAmount(1000);
quote.setDebitedFunds(debitedFunds);
quote.setCreditedFunds(creditedFunds);
quote.setDuration(300);
quote.setTag("Created using the Mangopay Java SDK");
ConversionQuote createQuote = mangopay.getConversionsApi().createConversionQuote(quote, null);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(createQuote);
System.out.println(prettyJson);
}
}
{
"Id": "cvrquote_01KH3J69K96FXNMQ875PTDJ13A",
"CreationDate": 1770720011,
"ExpirationDate": 1770720311,
"Status": "ACTIVE",
"DebitedFunds": {
"Currency": "GBP",
"Amount": 1000
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 1067
},
"Fees": {
"Currency": "GBP",
"Amount": 70
},
"RequestedFees": {
"Type": "PERCENTAGE",
"Value": 700,
"Currency": "GBP"
},
"ConversionRateResponse": {
"ClientRate": 1.1360925,
"MarketRate": 1.1471047,
"FinalRate": 1.1190511
},
"MarginsResponse": {
"Mangopay": {
"Type": "PERCENTAGE",
"Value": 0.96,
"Amount": 10
},
"User": {
"Type": "PERCENTAGE",
"Value": 1.5,
"Amount": 16
}
},
"Tag": "Created using the Mangopay API Postman collection"
}
This call guarantees a conversion rate for a quoted conversion.
If the quote is for a client wallet conversion then the quote:
- Can’t include
Fees– the conversion attempt will return a 400 error if itsQuoteIdincludes fees - Shouldn’t include
UserMargin– the conversion attempt will not be blocked butUserMarginis disregarded – in theConversionRateResponse(the user’sFinalRateis the same as the platform’sClientRate)
Body parameters
- Quote for User Wallets
- Quote for Client Wallets
object
required
Information about the debited funds.
Show properties
Show properties
string
required
Allowed 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
Required if
CreditedFunds.Amount is nullAn 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
required
Information about the credited funds.
Show properties
Show properties
string
required
Allowed 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
Required if
DebitedFunds.Amount is nullAn 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 fees taken by the platform for this transaction (and hence transferred to the Fees Wallet).
Show properties
Show properties
string | null
Allowed values:
PERCENTAGE, FIXEDDefault value: FIXEDThe type of the Value.integer
required
The value to be used for the
Type:PERCENTAGE– In quantities of 0.1% (e.g.150equals 1.5%), the percentage ofDebitedFunds.Amountdeducted as fees.FIXED– The amount deducted fromDebitedFunds.Amountas fees, as an amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as1260whereas JPY 12 would be represented as just12).
string
required
Allowed 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, which must match the debited currency.
integer
deprecated
For backwards compatibility, the
Amount is accepted if sent instead of the Value.object
Information about an indicative margin your platform can calculate and charge to the user after conversion. These values are used to calculate the
ConversionRateResponse.FinalRate and the MarginsResponse.User in the API response.Show properties
Show properties
string
required
Allowed values:
PERCENTAGE, PIPThe type of the Value.float
required
The value of the
Type:- PERCENTAGE
- PIP
Max. value:
10.0 (10%); max. 16 decimal placesThe quantities of 1% used to calculate the user margin.Max value:
1000.0The quantities of 0.0001 (one pip) used to calculate the user margin.string
required
Allowed 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, which must match the debited currency.
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.
integer
required
Allowed values:
300, 3600The time in seconds during which the quote is active and can be used for conversions.By default, quotes are available for a duration of 5 or 60 minutes, as agreed between Mangopay and the platform.object
required
Information about the debited funds.
Show properties
Show properties
string
required
Allowed 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
Required if
CreditedFunds.Amount is nullAn 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
required
Information about the credited funds.
Show properties
Show properties
string
required
Allowed 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
Required if
DebitedFunds.Amount is nullAn 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 an indicative margin your platform can calculate and charge to the user after conversion. These values are used to calculate the
ConversionRateResponse.FinalRate and the MarginsResponse.User in the API response.Show properties
Show properties
string
required
Allowed values:
PERCENTAGE, PIPThe type of the Value.float
required
The value of the
Type:- PERCENTAGE
- PIP
Max. value:
10.0 (10%); max. 16 decimal placesThe quantities of 1% used to calculate the user margin.Max value:
1000.0The quantities of 0.0001 (one pip) used to calculate the user margin.string
required
Allowed 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, which must match the debited currency.
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.
integer
required
Allowed values:
300, 3600The time in seconds during which the quote is active and can be used for conversions.By default, quotes are available for a duration of 5 or 60 minutes, as agreed between Mangopay and the platform.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
Fees sent in the request.Show properties
Show properties
string
Allowed values:
PERCENTAGE, FIXEDDefault value: FIXEDThe type of the Value.integer
The value to be used for the
Type:PERCENTAGE– In quantities of 0.1% (e.g.150equals 1.5%), the percentage ofDebitedFunds.Amountdeducted as fees.FIXED– The amount deducted fromDebitedFunds.Amountas fees, as an amount of money in the smallest sub-division of the currency (e.g., EUR 12.60 would be represented as1260whereas JPY 12 would be represented as just12).
string
Allowed 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, which must match the debited currency.
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.object
Information about the margins calculated for the transaction.
Show properties
Show properties
object
The margin used by Mangopay to bill your platform (which is defined during contracting).
Show properties
Show properties
string
Response value:
PERCENTAGEThe type of the Value, which for Mangopay is always PERCENTAGE.float
The value to be used for the
Type.Mangopay’s markup is expressed as a percentage (to convert to decimal, divide by 100).integer
The amount of debited currency that Mangopay will charge your platform for the transaction during the billing cycle.
object | null
The margin your platform could use to bill the user, as calculated by
UserMargin in the request or quote (otherwise null if not set).Show properties
Show properties
string
Response values:
PERCENTAGE, PIPThe type of the Value.float
The value to be used for the
Type:PERCENTAGE- The quantities of 1% used to calculate the user margin.PIP- The quantities of0.0001(one pip) used to calculate the user margin.
integer
The amount of debited currency that your platform could bill to the user for the transaction.
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.
403 - Duration not allowed
403 - Duration not allowed
{
"Message": "Duration 90 is not in the allowed list: 300, 3600",
"Type": "forbidden_ressource",
"Id": "3af49cbd-d68c-403c-8a37-b1ef40c224a6",
"Date": 1707299786,
"errors": null
}
403 - Currency not activated
403 - Currency not activated
{
"Message": "The currency JPY is not enabled for Forex. Contact your support to activate this feature.",
"Type": "forbidden_ressource",
"Id": "0dbb7cbc-da22-4b67-8685-b1aea8c4551e",
"Date": 1707315388,
"errors": null
}
403 - Quoted conversion feature not activated
403 - Quoted conversion feature not activated
{
"Message": "Quoted conversion is not enabled. Contact your support to activate this feature.",
"Type": "forbidden_ressource",
"Id": "cb1a7c79-4ece-4930-9996-9c43b35df3b7",
"Date": 1707315678,
"errors": null
}
400 - Amount not sent in either DebitedFunds or CreditedFunds
400 - Amount not sent in either DebitedFunds or CreditedFunds
{
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Id": "c1407e47-9146-486d-81b0-54cf9142f2c3",
"Date": 1720793416.0,
"errors": {
"Quote.Amount": "Debited amount or credited amount is required"
}
}
400 - Amount sent in both DebitedFunds CreditedFunds
400 - Amount sent in both DebitedFunds CreditedFunds
{
"Message": "One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.",
"Type": "param_error",
"Id": "bd657a7e-7250-4d35-a49b-eddd24126e7b",
"Date": 1720793433.0,
"errors": {
"Quote.Amount": "Only one of these fields is required: debited amount or credited amount"
}
}
{
"Id": "cvrquote_01KH3J69K96FXNMQ875PTDJ13A",
"CreationDate": 1770720011,
"ExpirationDate": 1770720311,
"Status": "ACTIVE",
"DebitedFunds": {
"Currency": "GBP",
"Amount": 1000
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 1067
},
"Fees": {
"Currency": "GBP",
"Amount": 70
},
"RequestedFees": {
"Type": "PERCENTAGE",
"Value": 700,
"Currency": "GBP"
},
"ConversionRateResponse": {
"ClientRate": 1.1360925,
"MarketRate": 1.1471047,
"FinalRate": 1.1190511
},
"MarginsResponse": {
"Mangopay": {
"Type": "PERCENTAGE",
"Value": 0.96,
"Amount": 10
},
"User": {
"Type": "PERCENTAGE",
"Value": 1.5,
"Amount": 16
}
},
"Tag": "Created using the Mangopay API Postman collection"
}
{
"DebitedFunds": {
"Currency": "GBP",
"Amount": 1000
},
"CreditedFunds": {
"Currency": "EUR"
},
"Duration": 300,
"Fees": {
"Type": "PERCENTAGE",
"Value": 700,
"Currency": "GBP"
},
"UserMargin":{
"Type": "PERCENTAGE",
"Value": 1.5,
"Currency": "GBP"
},
"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;
use MangoPay\Money;
$api = new MangoPayApi();
$api->Config->ClientId = 'client-id';
$api->Config->ClientPassword = 'api-key';
$api->Config->TemporaryFolder = '../tmp/';
$api->Config->DebugMode = false;
try {
$Quote = new \MangoPay\ConversionQuote();
$Quote->DebitedFunds = new Money();
$Quote->DebitedFunds->Currency = "GBP";
$Quote->CreditedFunds = new Money();
$Quote->CreditedFunds->Currency = "EUR";
$Quote->CreditedFunds->Amount = 10;
$Quote->Duration = 300;
$Quote->Tag = "Created using the Mangopay PHP SDK";
$response = $api->Conversions->CreateConversionQuote($Quote);
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: "client-id",
clientApiKey: "api-key"
})
let myQuote = {
DebitedFunds: {
Currency: 'EUR',
Amount: 1000,
},
CreditedFunds: {
Currency: 'USD',
Amount: null
},
Fees: {
Currency: 'EUR',
Amount: 50,
},
Duration: 300,
Tag: "Created using the Mangopay NodeJS SDK"
}
const createQuote = async (quote) => {
return await mangopay.Conversions.createQuote(quote)
.then((response) => {
console.info(response)
return response
})
.catch((err) => {
console.log(err)
return false
})
}
createQuote(myQuote)
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mangopay.MangoPayApi;
import com.mangopay.core.Money;
import com.mangopay.core.enumerations.CurrencyIso;
import com.mangopay.entities.ConversionQuote;
import com.mangopay.entities.CreateConversionQuote;
public class CreateQuote {
public static void main(String[] args) throws Exception {
MangoPayApi mangopay = new MangoPayApi();
mangopay.getConfig().setClientId("your-client-id");
mangopay.getConfig().setClientPassword("your-api-key");
CreateConversionQuote quote = new CreateConversionQuote();
Money debitedFunds = new Money();
debitedFunds.setCurrency(CurrencyIso.GBP);
Money creditedFunds = new Money();
creditedFunds.setCurrency(CurrencyIso.USD);
creditedFunds.setAmount(1000);
quote.setDebitedFunds(debitedFunds);
quote.setCreditedFunds(creditedFunds);
quote.setDuration(300);
quote.setTag("Created using the Mangopay Java SDK");
ConversionQuote createQuote = mangopay.getConversionsApi().createConversionQuote(quote, null);
Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
String prettyJson = prettyPrint.toJson(createQuote);
System.out.println(prettyJson);
}
}
Was this page helpful?
⌘I