Capture a Transaction
Learn how to capture payments for settlement using the Payabli API
This guide explains how to capture a payment transaction with the Payabli API. Authorizing a transaction returns an authorization code and reserves funds for the merchant. You must then capture a transaction to complete the transaction and move funds from the customer to merchant account.
Build the request
First, choose an endpoint. If you’re testing, use the Sandbox endpoint. for your target environment.
Authenticate
Authenticate by sending your API token in the request header with the key requestToken
:
--header 'requestToken: API TOKEN'
Path parameters
This request has two required path parameters that tell Payabli which transaction to capture, and how much of the original authorization amount to capture.
ID for the transaction. This is returned in the authorization response as ReferenceId
.
Amount to capture. The amount provided can’t be more than the original total amount of the transaction. An amount equal to zero captures the total amount authorized in the transaction.
Example request
Each example captures a card transaction for the transaction 10-7d9cd67d-2d5d-4cd7-a1b7-72b8b201ec13
. The first example captures the total authorized amount. The second example captures $99.86 of the authorized amount.
Response
A successful request returns a 200 response with a JSON body with a referenceId
of 10-7d9cd67d-2d5d-4cd7-a1b7-72b8b201ec13
. If the payment is declined, the responseText
reads Declined
.
Capturing transactions in the web app
You can view transactions in the UI in your PayHub or PartnerHub account. You can also capture a transaction in the web app by clicking the Actions menu for the transaction and selecting Capture.
Was this page helpful?