The Transfer object

A Transfer is a request to relocate e-money from one wallet to another wallet.

Parameters

Id
string

string:

Maximum length is 255 characters

The item's ID

CreationDate
timestamp

timestamp

When the item was created

Tag
string

string:

Maximum length is 255 characters

Custom data that you can add to this item

DebitedFunds
Money

Money:

View Sub-parameters

Information about the funds that are being debited

DebitedFunds.Currency
CurrencyIso

CurrencyIso:

EUR, USD, GBP, PLN, CHF, NOK, SEK, DKK, CAD, ZAR, XXX

ISO 4217 format

The currency - should be ISO_4217 format

DebitedFunds.Amount
int

int

An amount of money in the smallest sub-division of the currency, e.g. 12.60 EUR would be represented as 1260 whereas 12 JPY would be represented as just 12)

CreditedFunds
Money

Money:

View Sub-parameters

Details about the funds that are being credited (DebitedFunds – Fees = CreditedFunds)

CreditedFunds.Currency
CurrencyIso

CurrencyIso:

EUR, USD, GBP, PLN, CHF, NOK, SEK, DKK, CAD, ZAR, XXX

ISO 4217 format

The currency - should be ISO_4217 format

CreditedFunds.Amount
int

int

An amount of money in the smallest sub-division of the currency, e.g. 12.60 EUR would be represented as 1260 whereas 12 JPY would be represented as just 12)

Fees
Money

Money:

View Sub-parameters

Information about the fees that were taken by the client for this transaction (and were hence transferred to the Client's platform wallet)

Fees.Currency
CurrencyIso

CurrencyIso:

EUR, USD, GBP, PLN, CHF, NOK, SEK, DKK, CAD, ZAR, XXX

ISO 4217 format

The currency - should be ISO_4217 format

Fees.Amount
int

int

An amount of money in the smallest sub-division of the currency, e.g. 12.60 EUR would be represented as 1260 whereas 12 JPY would be represented as just 12)

DebitedWalletId
string

string:

Maximum length is 255 characters

The ID of the wallet that was debited

CreditedWalletId
string

string:

Maximum length is 255 characters

The ID of the wallet where money will be credited

AuthorId
string

string:

Maximum length is 255 characters

A user's ID

CreditedUserId
string

string:

Maximum length is 255 characters

The user ID who is credited (defaults to the owner of the wallet)

Nature
TransactionNature

TransactionNature:

REGULAR, REPUDIATION, REFUND, SETTLEMENT

The nature of the transaction

Status
TransactionStatus

TransactionStatus:

CREATED, SUCCEEDED, FAILED

The status of the transaction

ExecutionDate
timestamp

timestamp

When the transaction happened

ResultCode
string

string:

Maximum length is 255 characters

The result code

ResultMessage
string

string:

Maximum length is 255 characters

A verbal explanation of the ResultCode

Type
TransactionType

TransactionType:

PAYIN, TRANSFER, PAYOUT

The type of the transaction

{
"Id": "8494514",
"CreationDate": 12926321,
"Tag": "custom meta",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 12
},
"CreditedFunds": {
"Currency": "EUR",
"Amount": 12
},
"Fees": {
"Currency": "EUR",
"Amount": 12
},
"DebitedWalletId": "8519987",
"CreditedWalletId": "8494559",
"AuthorId": "8494514",
"CreditedUserId": "8494514",
"Nature": "REGULAR",
"Status": "SUCCEEDED",
"ExecutionDate": 1463496101,
"ResultCode": "000000",
"ResultMessage": "The transaction was successful",
"Type": "PAYIN"
}

Create a Transfer

POST .../v2.01/ClientId

The ID of your client account

/transfers/

Parameters

Tag
string

string:

Maximum length is 255 characters

optional

Custom data that you can add to this item

AuthorId
string

string:

Maximum length is 255 characters

required

A user's ID

CreditedUserId
string

string:

Maximum length is 255 characters

optional

The user ID who is credited (defaults to the owner of the wallet)

DebitedFunds
Money

Money:

View Sub-parameters

required

Information about the funds that are being debited

DebitedFunds.Currency
CurrencyIso

CurrencyIso:

EUR, USD, GBP, PLN, CHF, NOK, SEK, DKK, CAD, ZAR, XXX

ISO 4217 format

required

The currency - should be ISO_4217 format

DebitedFunds.Amount
int

int

required

An amount of money in the smallest sub-division of the currency, e.g. 12.60 EUR would be represented as 1260 whereas 12 JPY would be represented as just 12)

Fees
Money

Money:

View Sub-parameters

required

Information about the fees that were taken by the client for this transaction (and were hence transferred to the Client's platform wallet)

Fees.Currency
CurrencyIso

CurrencyIso:

EUR, USD, GBP, PLN, CHF, NOK, SEK, DKK, CAD, ZAR, XXX

ISO 4217 format

required

The currency - should be ISO_4217 format

Fees.Amount
int

int

required

An amount of money in the smallest sub-division of the currency, e.g. 12.60 EUR would be represented as 1260 whereas 12 JPY would be represented as just 12)

DebitedWalletId
string

string:

Maximum length is 255 characters

required

The ID of the wallet that was debited

CreditedWalletId
string

string:

Maximum length is 255 characters

required

The ID of the wallet where money will be credited

  • View
  • Code
  • Run
  • View
  • Code
  • Run
POST .../transfers/ HTTP/1.1
Body Parameters :
{
"Tag": "custom meta",
"AuthorId": "8494514",
"CreditedUserId": "8494514",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 12
},
"Fees": {
"Currency": "EUR",
"Amount": 12
},
"DebitedWalletId": "8519987",
"CreditedWalletId": "8494559"
}
require_once("mangopay.php");

try {


$Transfer = new \MangoPay\Transfer();
$Transfer->Tag = "custom meta";
$Transfer->AuthorId = "8494514";
$Transfer->CreditedUserId = "8494514";
$Transfer->DebitedFunds = new \MangoPay\Money();
$Transfer->DebitedFunds->Currency = "EUR";
$Transfer->DebitedFunds->Amount = 12;
$Transfer->Fees = new \MangoPay\Money();
$Transfer->Fees->Currency = "EUR";
$Transfer->Fees->Amount = 12;
$Transfer->DebitedWalletId = "8519987";
$Transfer->CreditedWalletId = "8494559";

$Result = $Api->Transfers->Create($Transfer);

} catch(MangoPay\Libraries\ResponseException $e) {
// handle/log the response exception with code $e->GetCode(), message $e->GetMessage() and error(s) $e->GetErrorDetails()

} catch(MangoPay\Libraries\Exception $e) {
// handle/log the exception $e->GetMessage()

}
POST .../transfers/ HTTP/1.1
Body Parameters :
{
"Tag": "",
"AuthorId": "",
"CreditedUserId": "",
"DebitedFunds": {
"Currency": "",
"Amount":
},
"Fees": {
"Currency": "",
"Amount":
},
"DebitedWalletId": "",
"CreditedWalletId": ""
}

View a Transfer

GET .../v2.01/ClientId

The ID of your client account

/transfers/TransferId

The ID of a transfer

/
  • View
  • Code
  • Run
  • View
  • Code
  • Run
GET .../transfers/:TransferId/ HTTP/1.1
require_once("mangopay.php");

try {

$TransferId = 12639390;

$Transfer = $Api->Transfers->Get($TransferId);

} catch(MangoPay\Libraries\ResponseException $e) {
// handle/log the response exception with code $e->GetCode(), message $e->GetMessage() and error(s) $e->GetErrorDetails()

} catch(MangoPay\Libraries\Exception $e) {
// handle/log the exception $e->GetMessage()

}
GET .../transfers// HTTP/1.1