Authorize a Transaction
Learn how to authorize and capture payments for settlement using the Payabli API
This guide explains how to authorize a payment transaction with the Payabli API. Authorizing a transaction returns an authorization code and reserves funds for the merchant.
This method returns an authorization code and reserves funds for the merchant. Authorized transactions aren’t flagged for settlement until they are captured.
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'
Body parameter
The body requires several fields. For a full list of available fields, see the API reference for this endpoint.
Example request
This example authorizes a card transaction for $100, with no service fee, for entrypoint f743aed24a
. The customer ID is 224
.
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
.
You can view transactions in the UI in your PayHub or PartnerHub account.
Next, capture the transaction to complete the transaction and move funds from the customer to merchant account.
Was this page helpful?