Making payments with Payouts
Introduction
This guide will take you through the end-to-end process of making a payment with Payouts. This guide will follow our Sandbox process. Before you start, you will need the following:
- An account with Lean with the
financial controller
user role. - Accepted the terms and conditions for Payouts
- Added a destination for web hooks to be received and consumed by your system
Referencing accounts
When using Payouts a number of items will be set up in your account by your account manager, you will need the reference IDs for the account(s) you want to instruct payments to be sent from. This can be found in the Payouts tab of the Application Dashboard by clicking on the connected "Source". Throughout this guide this ID will be referred to as the Source Account ID
![Click the Source button in the top left](https://files.readme.io/c97c44581039387e72631a0540e796706d58c888888c241e9fd41b3d57278aad-image.png)
Click the Source button in the top right
![Copy the account ID value](https://files.readme.io/a340f309a66033aa49df224c460d6bedb9a1fc282ce54f6d92cd14cbdbfbee5a-image.png)
Copy the account ID value
Create a Destination to send your first Payout to
- Use the Create Payout Destination API to create a new destination.
- Upon successful creation of a Destination you will receive a
payment_source.beneficiary.created
webhook. This indicates that all necessary set up of the Destination with the bank has been completed. Do not attempt to process a Payout before receiving this webhook
{
"payload": {
"id": String<uuid>,
"customer_id": String<uuid>,
"payment_source_id": String<uuid>,
"payment_destination_id": String<uuid> // this is the value to save,
"status": "ACTIVE",
"end_user_id": String<uuid>,
"payment_source_bank_identifier": "ALINMA_SME_DC_SAU"
},
"type": "payment_source.beneficiary.created",
"message": "A beneficiary was added for a payment source."
"timestamp": String<datetime>,
"event_id": String<uuid>
}
- Make a record of the
payment_destination_id
Create a Payout
- Use the Create Payout API to create a new Payout using the
Source Account ID
andPayment Destination ID
to specify where the money is going from and to respectively. - If
authorise_payment
is set totrue
the payment will be automatically processed once the request has been submitted. If it is set tofalse
it will appear in the Payouts dashboard for manual authorization. - Upon successful submission of a Payout a
payment_intent.created
webhook will be returned for each payment within the Payout. - Once a payment has been successfully submitted, either manually or automatically a
payment.created
webhook will be sent with the status of the payment.
Updated 2 months ago