Manage payouts with the API
Use Payabli’s payout functions to authorize, capture, and cancel vendor payment transactions. This guide covers the complete payout lifecycle through the API.
Considerations
Keep these considerations in mind when working with payouts:
- Payouts follow a two-step process: authorize then capture.
- You can include multiple invoices on a payout request, provided that the invoices are for the same vendor.
- At this time, you can make payouts to US and Canadian vendors only. Only paper check payments are available for Canadian vendors.
- Payout processing supports ASCII characters only. Don’t send non-ASCII characters in any fields related to payout processing.
Authorize a payout request
A payout request starts the process for paying vendors. Creating a payout request authorizes it immediately, but the transaction isn’t flagged for batch processing until it’s captured.
Send a POST request to /api/MoneyOut/authorize
to create a new payout authorization. See the API reference for full documentation.
Simple payout authorization
Payout authorization with stored ACH
A successful request returns a JSON response. You need the referenceId from the response to capture the transaction. In this example, the ID is 129-219.
Send bill image with payout authorization
For the smoothest payout experience, Payabli recommends to always attach an image of a bill in the invoiceData
object. For example:
If you use Payabli’s bill engine, you can add the bill image when you create the bill. If not, you can include a bill image with your payout authorization request.
You have two options for attaching the image:
- Base64-encoded string
- A publicly accessible fURL where the file is hosted
How you attached the image affects how Payabli handles the file. The table below summarizes the differences between the two methods.
Payouts with saved ACH payment methods
Vendors can have many stored ACH accounts, and you can send payouts to any of their accounts using storedMethodId
in the payout request. How the process works depends on whether the vendor already exists in the system and how many ACH payment methods they have stored.
Vendor already exists
Case 1: Vendor has exactly one ACH method stored
If the vendor already exists and has exactly one ACH method stored, the system automatically uses that stored method. storedMethodId
is not required.
Case 2: Vendor has multiple ACH methods stored
If the vendor has multiple ACH methods stored, you must specify storedMethodId
to indicate which account to use.
New vendor or vendor doesn't have any ACH method stored
If the vendor doesn’t exist or doesn’t have any ACH method stored, billingData
is used to:
- Create a new ACH stored method in the vault
- Use that method for the payment
In this case, billingData
is required and if you don’t include it, you’ll get an error.
In future requests for this vendor, you can use the stored method without needing to include billingData
again. Payabli automatically saves the ACH account details as a stored method in the vault.
Capture a payout transaction
Send a POST request to /api/MoneyOut/capture/{referenceId}
to capture an authorized payout transaction. See the API reference for full documentation.
This example captures the authorized payout transaction with ID 129-219
.
A successful request returns a JSON response.
Cancel a payout transaction
Send a POST request to /api/MoneyOut/cancel/{referenceId}
to cancel a payout transaction. See the API reference for full documentation.
You can cancel an authorized payout at any time, because it hasn’t started processing. After a payout is captured, you have a small window in which you can cancel it. When the payment status has changed to processed
, you must contact Payabli support to cancel the payout.
This example cancels the authorized payout transaction with ID 129-219
.
A successful request returns a 200 response with a JSON body.