Overview
The Conversions API allows you to convert funds between wallets of different currencies. You can perform instant conversions at the current market rate or create quoted conversions with a guaranteed rate. Mangopay supports conversions between user wallets as well as client wallets (fees and credit wallets).Methods
GetConversionRate
Get a real-time indicative market rate for a specific currency pair.The sell currency – the currency of the wallet to be debited (e.g., “EUR”, “USD”)
The buy currency – the currency of the wallet to be credited (e.g., “GBP”, “USD”)
ConversionRate - The conversion rate object with real-time market rate
Example:
CreateInstantConversion
Create an instant conversion at the current market rate between user wallets.The instant conversion object containing conversion details
Conversion - The created conversion object
Example:
CreateClientWalletsInstantConversion
Create an instant conversion at the market rate between client wallets (fees/credit).The instant conversion object for client wallets
Conversion - The created conversion object
Example:
CreateQuotedConversion
Create a conversion at a rate guaranteed by a quote.The quoted conversion object linked to a ConversionQuote
Conversion - The created conversion object
Example:
CreateClientWalletsQuotedConversion
Create a quoted conversion between client wallets.The quoted conversion object for client wallets. Must be linked to a quote.
Conversion - The created conversion object
GetConversion
Retrieve details of a specific conversion.The unique identifier of the conversion
Conversion - The conversion object
Example:
CreateConversionQuote
Create a quote to guarantee a conversion rate.The quote object specifying debited and credited funds
ConversionQuote - The created quote with guaranteed rate
Example:
GetConversionQuote
Retrieve details of a specific conversion quote.The unique identifier of the quote
ConversionQuote - The quote object
Example:
Conversion Entity
TheConversion entity represents a currency conversion:
The unique identifier of the conversion
Unix timestamp of when the conversion was created
Custom data that you can add to this item
The unique identifier of the quote that guaranteed the rate. Null for instant conversions.
The type of transaction. See
TransactionType.The nature of the transaction. See
TransactionNature.The status of the transaction:
CREATED, SUCCEEDED, FAILED. See TransactionStatus.The unique identifier of the user at the source of the transaction
The unique identifier of the debited wallet
The unique identifier of the credited wallet
The sell funds (amount and currency)
The buy funds (amount and currency)
Platform fees for this transaction. Null for instant conversions between client wallets.
The requested fees
The code indicating the result of the operation
The explanation of the result code
Unix timestamp when the status changed to SUCCEEDED. Null for CREATED and FAILED statuses.
Real time market rate information
Information about margins applied
ConversionRate Entity
The rate applied to the conversion
The current market rate
ConversionQuote Entity
The unique identifier of the quote
Unix timestamp of when the quote was created
Unix timestamp when the quote expires
The status of the quote:
ACTIVE, EXPIRED, CONSUMEDThe sell funds
The buy funds
The guaranteed conversion rate