This guide explains how to make a sale (a money in payment transaction) with the Payabli API. This method authorizes and captures a payment in one step, so when a transaction is submitted, it’s immediately captured for settlement.

If aren’t using a stored payment method provided by an embedded component to run transactions, you must secure cardholder, bank account data, and customer IP address because your PCI scope is expanded.

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'

Query parameters

This request has optional query parameters that you can use to enable validation and control customer creation.

achValidation
boolean
default:
"false"

When true, enables real-time validation of ACH account. This is an add-on feature. Contact Payabli for more information.

forceCustomerCreation
boolean
default:
"false"

When true, the request creates a new customer record, regardless of whether the customer data matches an existing customer.

Body parameter

The body requires several properties.

body
object

For a full list of available parameters, see the API reference for this endpoint.

Example request

Each example runs a transaction for $20, with no service fee, for entrypoint f743aed24a. The customer ID is 224, the customer number is 888, and the billing address is 5127 Linkwood Ave. The only difference in each example is the payment method used.

Responses

A successful request returns a 200 response with a JSON body. If the payment is declined, the responseText reads Declined. The transaction ID is returned as referenceId in the response. This value is used as the transId in other MoneyIn endpoints.

You can use the DeclinedPayment notification to get alerts for declined transactions, including both declined credit cards and declined ACH transactions. See Notifications and Webhooks Overview for more.

You can view transactions in the UI in your PayHub or PartnerHub account, or you can get lists of transactions via the API for paypoints or organizations