Skip to main content
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);
}
{
    "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"
}  
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

ConversionId
string
The unique identifier of the conversion.

Responses

Id
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
QuoteId
string
The unique identifier of the active quote which guaranteed the rate for the conversion.Returned null in the case of an instant conversion.
Type
string
The type of transaction.
Nature
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.
CreationDate
Unix timestamp
The date and time at which the object was created.
Status
string
Returned values: CREATED, SUCCEEDED, FAILEDThe status of the transaction.
AuthorId
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.
DebitedWalletId
string
The unique identifier of the debited wallet (in the sell currency).
CreditedWalletId
string
The unique identifier of the credited wallet (in the buy currency).
DebitedFunds
object
Information about the debited funds.
CreditedFunds
object
Information about the credited funds.
Fees
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.
ResultCode
string
The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes.
ResultMessage
string
The explanation of the result code.
ExecutionDate
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.
ConversionRateResponse
object
Information about the conversion rate used during the transaction.
Tag
string
Max. length: 255 charactersCustom data that you can add to this object.
Id
string
Max length: 128 characters (see data formats for details)The unique identifier of the object.
QuoteId
string
The unique identifier of the active quote which guaranteed the rate for the conversion.Returned null in the case of an instant conversion.
Type
string
The type of transaction.
Nature
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.
CreationDate
Unix timestamp
The date and time at which the object was created.
Status
string
Returned values: CREATED, SUCCEEDED, FAILEDThe status of the transaction.
AuthorId
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.
DebitedWalletId
string
The unique identifier of the debited wallet (in the sell currency).
CreditedWalletId
string
The unique identifier of the credited wallet (in the buy currency).
DebitedFunds
object
Information about the debited funds.
CreditedFunds
object
Information about the credited funds.
Fees
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.
ResultCode
string
The code indicating the result of the operation. This information is mostly used to handle errors or for filtering purposes.
ResultMessage
string
The explanation of the result code.
ExecutionDate
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.
ConversionRateResponse
object
Information about the conversion rate used during the transaction.
Tag
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.
{
    "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"
}  
<?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);
}
I