alt

Important information

Updates to Visa secure data field mandate: Read more about the mandatory changes.

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 for 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"
  }
}
ParameterTypeDescription
amount (required)floatThe payout amount (for example, 12.23)
currency (required)stringThe payout currency, in the ISO 4217 alpha-3 format (for example, EUR)
typeId (required)stringThe 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 parameterDescription
isSuccessThe payout call was executed successfully.
isPendingThe payout cannot enter the pending state.
isErrorAn error occurred. The message.merchant contains more information about the problem.
ParameterTypeDescription
idstringThe authorization’s unique ID.
isSuccessbooleanIf the transaction was successful, the value is set to true.
isPendingbooleanIf the transaction is pending, the value is set to true. This is not possible for payouts, so this flag is always set to false.
isErrorbooleanIf an error occurs, this value is set to true.
messageobject
message.codestringA 9-digit code returned with every API call.
message.customerstringResponse message for your customer translated into the customer language.
message.merchantstringResponse message for you. This message always appears in English.
amountstringThe amount to be paid out on the specified account. The amount is rounded depending on the respective currency.
currencystring(3)ISO currency code.
paymentReferencestringThe description of the transaction.
datedateTimestamp of this transaction.
resourcesobject
resources.customerIdstringCustomer ID used for this transaction.
resource.basketIdstringThe basket ID used for this transaction.
resource.metadataIdstringThe metadata ID used for this transaction.
resources.paymentIdstringID of the payment.
resources.traceIdstringThe unique traceId of the transaction. Used for internal API purposes.
resources.typeIdstringID of the types Resource that is to be used for this transaction.
processingobject
processing.uniqueIdstringUnique ID of the payment system used.
processing.shortIdstringUser-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.