Payouts

Send money to your customer.

Payout

A payout is triggered by calling /payments/payouts after you have created your preferred payment type with an amount, a currency, transactions' description and a reference to a payment type. Find all of the details in the API reference.

Payout will directly credit a customer’s account without any reference to other transactions.

Payment types supporting payout

Not every payment type supports payout. Check the following table to see which do:

Payment method Supports payout
/types/card yes
/types/sepa-direct-debit yes
/types/sepa-direct-debit-secured yes
Sandbox key
If your API key is in sandbox mode, customer’s account will not actually be credited, and merchant’s account is not actually debited.

Request / Response

Payout transactions are described in the API reference.

{
    "id": "s-out-1",
    "isSuccess": true,
    "isPending": false,
    "isError": false,
    "message": {
        "code": "COR.000.100.112",
        "customer": "Request successfully processed in 'Merchant in Connector Test Mode'"
    },
    "amount": "100.0000",
    "currency": "EUR",
    "returnUrl": "https://www.unzer.com",
    "paymentReference": "Test payout transaction",
    "date": "2018-09-13 21:27:16",
    "resources": {
        "customerId": "",
        "paymentId": "s-pay-2",
        "basketId": "",
        "metadataId": "",
        "typeId": "s-crd-fm7tifzkqewy"
    },
    "processing": {
        "uniqueId": "31HA07BC8179DC97ADB61081D525202A",
        "shortId": "4008.0043.6848"
    }
}

A payout call returns a payment ID and the payout ID 1, since only one payout per payment is possible.

The parameters isSuccess, isPending, isError indicate the result of the payment. Only one of these three can be true.

Status parameter Description
isSuccess The payout call was executed successfully.
isPending The payout cannot enter the pending state.
isError Something went wrong. You’ll also find a news section that describes in more detail what the trouble was.
Name Format Description
id string ID of this payout transaction
isSuccess string If the transaction was successful the value is set to true.
isPending string If the transaction is pending, the value is set to true. This is not possible for payouts, so this flag is always false.
isError string If an error occurs, this value is set to true.
message object
message.code string Every error returns a unique id.
message.customer string Error message for your customer translated into the customer language.
message.merchant string Error message for the merchant. This message always appears in English.
amount string The amount to be payed out on the specified account. The amount is rounded depending on the respective currency.
currency string(3) ISO currency code: For a list of possible codes, see: Amounts and Currencies
returnUrl string Some payment methods require the customer to leave the merchant application. This URL is used to bring the customer back to your application.
paymentReference string Transaction description.
date date Timestamp of this transaction.
resources **object **
resources.customerId string Customer id used for this transaction.
resource.basketId string Basket ID used for this transaction.
resource.metadataId string Meta data ID used for this transaction.
resources.paymentId string ID of the payment.
resources.typeId string ID of the types Resource that is to be used for this transaction.
processing object
processing.uniqueId string Unique id of the payment system used.
processing.shortId string User-friendly reference id of the payment system.
processing.iban string Iban of the merchant for prepayment or invoice. In the case of a direct debit, this value contains the customer IBAN.
processing.bic string Bic of the merchant for prepayment or invoice. In the case of a direct debit, this value contains the customer BIC.
processing.identification string This value returns the descriptor for invoice and prepayment.
processing.creatorId string This value returns your creditor id.

Returned amounts

When you get a payout payment, you are going to receive a negative amount, however the transaction has the same absolute value but with a positive sign:

GET payment response for payouts

{
    "id": "s-pay-4359",
    "state": {
        "id": 1,
        "name": "completed"
    },
    "amount": {
        "total": "-100.0000"
    },
    "currency": "EUR",
    "orderId": "payment-order-1558960457819-278",
    "resources": {
        "customerId": "",
        "paymentId": "s-pay-4359",
        "basketId": "",
        "metadataId": "",
        "payPageId": "",
        "typeId": "s-crd-fnqkgcfb2a72"
    },
    "transactions": [
        {
            "date": "2019-05-27 12:34:18",
            "type": "payout",
            "url": "https://dev-api.unzer.com/v1/payments/s-pay-4359/payouts/s-out-1",
            "amount": "100.0000"
        }
    ]
}