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.
The customer’s IP address. This field isn’t required, but is strongly recommended. Payabli uses this data to perform risk analysis and prevent fraudulent transactions.
Information about the payment method. Pass a storedMethodId here to use a saved payment method token for the transaction.
See paymentMethod Object Model for a complete reference.
Information about the customer. See customerData Object Model for a complete reference. Which fields are required depends on the paypoint’s identifier settings.
You can find these in the web app at Settings > Custom Fields, or by calling /api/Paypoint/settings/{entry}. If you don’t have identifiers configured, the CustomerId is required.
For a full list of available parameters, see the API reference for this endpoint.
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.
curl--request POST \--url'https://api-sandbox.payabli.com/api/MoneyIn/getpaid?forceCustomerCreation=false'\--header'accept: application/json'\--header'content-type: application/*+json'\--header'requestToken: API TOKEN'{"entryPoint":"f743aed24a","ipaddress":"255.255.255.255""paymentMethod":{"method":"card","cardnumber":"4293189100000008","cardexp":"0924","cardcvv":"345","cardzip":"34234","cardHolder":"John Smith"},"paymentDetails":{"totalAmount":20,"serviceFee":0.00},"customerData":{"customerId":224,"customerNumber":"888","billingAddress1":"5127 Linkwood ave"}}
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.
{"responseText":"Success","isSuccess":true,"pageIdentifier":null,"responseData":{"authCode":"123456","referenceId":"10-1a770d8a-27ad-4b8b-ab61-267c60d25b74","resultCode":1,"resultText":"Approved","avsResponseText":"No address or ZIP match only","cvvResponseText":"CVV2/CVC2 no match","customerId":224}}
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