Create a payout
Send money to your customers.
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.
The payout transaction is currently available for the following payment types:
- Card
- Direct Debit secured
Payout triggers a payment transaction from the merchant to the customer.
This transaction is possible for selected payment methods only. Please check Payment methods page for details.
The payout transaction is currently available for the following payment types:
- Card
- Direct Debit secured
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.
Request
Unzer unzer = new Unzer('s-priv-xxxxxxxxxx');
Payout payout = unzer.payout(BigDecimal.valueOf(100.00), Currency.getInstance("EUR"), "s-crd-9wmri5mdlqps", "https://your.return.url");
Payout transaction using a payment type object is not currently supported.
Response
A payout
call returns a payment ID and the payout ID 1, because only one payout per payment is possible.
The status
indicate the result of the transaction. Possible values: SUCCESS
, PENDING
or ERROR
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).
amount = payment.getAmountTotal() // 100