Authorize a Payout Request
Learn how to use the Payabli API to create payout transactions
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.
This guide explains how to authorize payout transactions with the Payabli API. The first step in processing payouts is to authorize a payout transaction. When the payout is authorized, use the returned referenceId
to capture the transaction.
Payout considerations
When working with payouts, keep these points in mind.
- You can include multiple invoices on a payout request, provided that the invoices are for the same vendor.
- At this time, payouts can be made to US and Canadian vendors only. Only paper check payments are available for Canadian vendors currently.
- Payout processing supports ASCII characters only. Don’t send non-ASCII characters in any fields related to payout processing.
Build the request
First, choose an endpoint. If you’re testing, use the Sandbox endpoint..
Authenticate
Authenticate by sending your API token in the request header with the key requestToken
:
--header 'requestToken: API TOKEN'
Path parameters
These are optional path parameters.
When true
, the request creates a new customer record, regardless of whether the customer data matches an existing customer.
When true
, the authorization bypasses the requirement for unique bills, identified by vendor invoice number. This allows you to make more than one payout authorization for a bill, like a split payment.
When true
, Payabli won’t create an associated bill for this payout transaction. You don’t have to use Payabli’s bill engine to make payouts, but Payabli automatically creates a bill for a payout request if this parameter is null or false
.
Body parameter
These are the required and recommended body parameters. See the API reference for all available parameters. To authorize the request, be sure to pass your API token as requestToken
in the request header.
Send bill image with payout authorization
For the smoothest payout experience, Payabli recommends always sending an image of a vendor bill. 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 in the payout authorization request:
- Base64-encoded string
- A publicly-accessible fURL where the file is hosted
In payout authorization requests, how these options work depends on whether the doNotCreateBills
is true or false. If you have a public link for the bill’s file, pass the file’s URL (furl
) in the request, and set doNotCreateBills
to true
. Payabli will send the link to the payout processor.
If you don’t have a public link for the bill image file, you can include the file as Base64-encoded content. Payabli saves the file and send a link to the processor. In this situation, you must set doNotCreateBills
to false
or Payabli won’t save the file or send it to the payout processor.
Method | doNotCreateBills is true | doNotCreateBills is false |
---|---|---|
Base64-encoded | Payabli doesn’t save a file for the base64-encoded content because doNotCreateBills is true . During the money out capture process, Payabli sends out the capture to the payout processor without any file information. | Payabli stores base64-encoded content as a file when doNotCreateBills is false . During the capture process, Payabli generates a publicly accessible URL for the file and sends it to the payout processor. |
fURL | If you have the file hosted publicly, you can send the file’s URL as the fURL instead. When doNotCreateBills is true , Payabli doesn’t save the file. During the capture process, Payabli passes the URL you sent with the request to the payout processor. | If you have the file hosted publicly, you can send the file’s URL instead. Since doNotCreateBills is false , Payabli uses the URL from the request to save the file. During the capture process, Payabli generates a publicly accessible URL for the file and sends it to the payout processor. |
Example request
This example authorizes a payout from the “test” entrypoint. The amount is $47, the vendor number is 7895433, and the only invoice being paid is 54323-7.
Example response
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
.
Was this page helpful?