alt

Important information

The API reference is now available here.
The deprecated API reference is available here.

Unzer

Create a payout

Send money to your customer for payout transactions.

Overview

You can use payout to send money to your customer without any reference to previous transactions. Possible use cases for this transaction could be paying out sellers on your marketplace, online gaming, lottery wins, and so on.

Money flow
Payout triggers a payment transaction from you to the customer.

This transaction is possible for selected payment methods only. Please check Payment methods page for details.

Example

A payout is triggered by calling the /payments/payouts after you have created your preferred payment type with an amount, a currency, transactions’ description and a reference to a payment type.

POST https://api.unzer.com/v1/payments/payouts
{
  "amount" : "100",
  "currency" : "EUR",
  "returnUrl": "https://www.unzer.com",
  "resources" : {
    "typeId" : "s-crd-fm7tifzkqewy"
  }
}
Parameter Type Description
amount (required) float The payout amount (for example, 12.23)
currency (required) string The payout currency, in the ISO 4217 alpha-3 format (for example, EUR)
typeId (required) string The ID of the payment type resource to be used (for example, s-crd-fm7tifzkqewy)

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

{
    "id": "s-out-1",
    "isSuccess": true,
    "isPending": false,
    "isError": false,
    "message": {
        "code": "COR.000.100.112",
        "merchant": "Request successfully processed in 'Merchant in Connector Test Mode'",
        "customer": "Your payments have been successfully processed in sandbox 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": "",
        "traceId": "bf4ce634575d479eaaac4e6ad436d95d",
        "typeId": "s-crd-fm7tifzkqewy"
    },
    "processing": {
        "uniqueId": "31HA07BC8179DC97ADB61081D525202A",
        "shortId": "4008.0043.6848"
    }
}

The parameters isSuccess, isPending, or isError indicate the result of the transaction. 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 An error occurred. The message.merchant contains more information about the problem.
Parameter Type Description
id string The authorization’s unique ID.
isSuccess boolean If the transaction was successful, the value is set to true.
isPending boolean If the transaction is pending, the value is set to true. This is not possible for payouts, so this flag is always set to false.
isError boolean If an error occurs, this value is set to true.
message object
message.code string A 9-digit code returned with every API call.
message.customer string Response message for your customer translated into the customer language.
message.merchant string Response message for you. This message always appears in English.
amount string The amount to be paid out on the specified account. The amount is rounded depending on the respective currency.
currency string(3) ISO currency code.
paymentReference string The description of the transaction.
date date Timestamp of this transaction.
resources object
resources.customerId string Customer ID used for this transaction.
resource.basketId string The basket ID used for this transaction.
resource.metadataId string The metadata ID used for this transaction.
resources.paymentId string ID of the payment.
resources.traceId string The unique traceId of the transaction. Used for internal API purposes.
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.

Returned amounts

When fetching the payout resource (s-out-…), transaction value will be positive, for example 100. But when fetching the payment resource (of which payout is part of), transaction value will be negative (respectively: -100).

Payment response for payouts

"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"
        }
    ]
}

For a full description of the Payouts call, go to the API reference.