Make a sale transaction
Learn how to authorize and capture a sales transaction in one step using the API
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.
To make a sale transaction, send a POST request to /api/MoneyIn/getpaid
. This endpoint is used to process payments for all payment methods, including credit cards, ACH, stored methods, cash, check, and cloud payments.
The request requires several parameters, which can depend on the payment method used. The following are required for all payment methods:
entryPoint
The ID of the paypoint making the salepaymentMethod
: Information about the payment methodpaymentDetails
Information about the payment itselfcustomerData
Information about the customer
Although not required, we strongly recommend passing the ipaddress
parameter. This is used for risk analysis and fraud prevention.
For a full list of available parameters, see the API reference for this endpoint.
Examples
Each of these examples runs a transaction for $100, with no service fee, for entrypoint f743aed24a
and customer ID is 4440
.The only difference in each example is the payment method used.
ACH
Stored Method
A successful request returns a 200 response with a JSON body. The transaction ID is returned as referenceId
, this is used as the transId
in other endpoints.
If the payment is declined, the responseText
reads Declined
, and resultText
contains the reason for the decline.
Next steps
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