The PayOut object

A PayOut Bank wire is a request to withdraw money from a wallet to a bank account. You need to setup Bank Account before processing a PayOut Bank wire.

There is a KYC limit on Pay-Outs in order to fight fraud, money laundering and financing of terrorism. You have to send some documents through the API. Please check the rules to go over the limits

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, GBP, PLN, CHF, NOK, SEK, DKK, USD (beta), CAD (beta), AUD (beta), 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, GBP, PLN, CHF, NOK, SEK, DKK, USD (beta), CAD (beta), AUD (beta), 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, GBP, PLN, CHF, NOK, SEK, DKK, USD (beta), CAD (beta), AUD (beta), 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

BankAccountId
string

string:

Maximum length is 255 characters

An ID of a Bank Account

BankWireRef
string

string:

Maximum length is 255 characters

A custom reference you wish to appear on the user’s bank statement (your Client Name is already shown). This reference can contain max 12 characters

PaymentType
PayOutPaymentType

PayOutPaymentType:

BANK_WIRE

The payment type of the payout

The type of Pay out

{
"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",
"BankAccountId": "14213351",
"BankWireRef": "invoice 7282",
"PaymentType": "BANK_WIRE"
}

Create a PayOut

A few important things to note regarding payouts:

  • In the production environment BankWire PayOuts will have a "CREATED" Status until they are treated by our compliance team (which happens several times a day)
  • In the sandbox environment BankWire PayOuts will be processed automatically (you must contact us if you need to test a FAILED payout)
  • When you created the production ClientId you filled the field Name which will be used on your users bank statements
  • A Bankwire could fail after it’s passed to "SUCCEEDED" – in this case, a refund of the PayOut will be made. More info is available here under "Payout error codes"
  • In the production environment, if you payout is stuck in "CREATED", this might be because you uploaded a KYC document for this user and it is pending processing
  • If a user does not have the sufficient KYC level for this payout, it will automatically pass to "FAILED" after processing on our side - more info - this is normally within a few seconds, but can be longer due to the amount or supplementary fraud checks etc we may need to do
POST .../v2.01/ClientId

The ID of your client account

/payouts/bankwire/

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

DebitedFunds
Money

Money:

View Sub-parameters

required

Information about the funds that are being debited

DebitedFunds.Currency
CurrencyIso

CurrencyIso:

EUR, GBP, PLN, CHF, NOK, SEK, DKK, USD (beta), CAD (beta), AUD (beta), 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, GBP, PLN, CHF, NOK, SEK, DKK, USD (beta), CAD (beta), AUD (beta), 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)

BankAccountId
string

string:

Maximum length is 255 characters

required

An ID of a Bank Account

DebitedWalletId
string

string:

Maximum length is 255 characters

required

The ID of the wallet that was debited

BankWireRef
string

string:

Maximum length is 255 characters

optional

A custom reference you wish to appear on the user’s bank statement (your Client Name is already shown). This reference can contain max 12 characters

  • View
  • Code
    A code sample is not available
  • Run
  • View
  • Code
    A code sample is not available
  • Run
POST .../payouts/bankwire/ HTTP/1.1
Body Parameters :
{
"Tag": "custom meta",
"AuthorId": "8494514",
"DebitedFunds": {
"Currency": "EUR",
"Amount": 12
},
"Fees": {
"Currency": "EUR",
"Amount": 12
},
"BankAccountId": "14213351",
"DebitedWalletId": "8519987",
"BankWireRef": "invoice 7282"
}
POST .../payouts/bankwire/ HTTP/1.1
Body Parameters :
{
"Tag": "",
"AuthorId": "",
"DebitedFunds": {
"Currency": "",
"Amount":
},
"Fees": {
"Currency": "",
"Amount":
},
"BankAccountId": "",
"DebitedWalletId": "",
"BankWireRef": ""
}

View a PayOut

GET .../v2.01/ClientId

The ID of your client account

/payouts/PayOutId

The ID of a pay out

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

try {

$PayOutId = 12639373;

$PayOut = $Api->PayOuts->Get($PayOutId);

} 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 .../payouts// HTTP/1.1