Overview
The Mangopay PHP SDK provides powerful currency conversion capabilities, allowing you to convert funds between wallets in different currencies. You can perform instant conversions at market rates or use quoted conversions with guaranteed rates.Getting Conversion Rates
Check real-time market rates before performing conversions:Instant Conversions
Perform immediate conversions at the current market rate:Quoted Conversions
Use conversion quotes to guarantee exchange rates:Step 1: Create a Conversion Quote
Step 2: Execute Quoted Conversion
Client Wallets Conversions
Convert between client fee and credit wallets:Instant Client Wallet Conversion
Quoted Client Wallet Conversion
Getting Conversion Details
Retrieve information about a completed conversion:Getting Quote Details
Retrieve details of a conversion quote:Understanding Fees
Add custom fees to conversions:Conversion Response Details
All conversion responses include detailed margin information:Complete Workflow Example
Best Practices
Use Quotes for Large Amounts
Use quoted conversions for larger amounts to protect against rate fluctuations.
Monitor Quote Expiration
Quotes have a limited duration - execute conversions before they expire.
Check Wallet Currencies
Ensure source and destination wallets have the correct currencies.
Handle Errors Gracefully
Always wrap conversion calls in try-catch blocks to handle API errors.
Conversion Statuses
SUCCEEDED- Conversion completed successfullyFAILED- Conversion failed
Quote Statuses
ACTIVE- Quote is valid and can be usedEXECUTED- Quote has been used for a conversionEXPIRED- Quote has expired and cannot be used
Related Resources
Wallets
Learn about creating and managing wallets
Transactions
View conversion transactions