# Make a sale transaction with the API
> Process sales transactions instantly with Payabli's GetPaid endpoint. Accept card, ACH, stored methods, cloud devices, cash, and check payments with immediate authorization and capture in a single API call
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 the getpaid endpoint (`api/v2/MoneyIn/getpaid` or `/api/MoneyIn/getpaid`). These endpoints are used to process payments for all payment methods, including credit cards, ACH, stored methods, cash, check, and cloud payments.
See [Pay In transaction APIs v2](/developers/api-reference/moneyIn/v2) for more information about v1 versus v2 of the transaction APIs.
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 sale
* `paymentMethod`: Information about the payment method
* `paymentDetails` Information about the payment itself
* `customerData` 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 references](/guides/pay-in-developer-transactions-create#related-resources).
## 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.
### V2 API
If you're using the v2 API, here are examples for making a sale transaction with different payment methods:
The Card payment method is used for credit and debit card payments.
The ACH payment method is used for ACH payments made with a bank account.
The Stored Method payment method is used for payments made with stored methods, either tokenized credit card or tokenized ACH account.
The Cloud payment method is used for payments made with Cloud devices (payment terminals).
The response from a successful transaction includes a standard response structure with details about the transaction. See [Unified Response Codes](/guides/pay-in-unified-response-codes-reference) for a complete list of possible responses.
Example card success response
Example ACH success response
Example Stored Method success response
Example Cloud success response
To see decline and error responses, see the [Make a transaction API (v2)](/developers/api-reference/moneyinV2/make-a-transaction) reference.
### V1 API
If you're using the v1 API, here are examples for making a sale transaction with different payment methods:
The Card payment method is used for credit and debit card payments.
The ACH payment method is used for ACH payments made with a bank account.
The Stored Method payment method is used for payments made with stored methods, either tokenized credit card or tokenized ACH account.
The Cloud payment method is used for payments made with Cloud devices (payment terminals).
This example shows how to include additional details in the response by setting the `includeDetails` parameter to `true`. This works with any payment method.
```json
curl -X POST https://api-sandbox.payabli.com/api/MoneyIn/getpaid?includeDetails=true \
-H "requestToken: " \
-H "Content-Type: application/json" \
-d '{
"paymentDetails": {
"totalAmount": 100,
"serviceFee": 0
},
"paymentMethod": {
"initiator": "payor",
"method": "card",
"storedMethodId": "1ec55af9-7b5a-4ff0-81ed-c12d2f95e135-4440",
"storedMethodUsageType": "unscheduled"
},
"customerData": {
"customerId": 4440
},
"entryPoint": "f743aed24a",
"ipaddress": "255.255.255.255"
}'
```
The response from a successful transaction includes a `isSuccess` boolean, a `responseData` object, and a `responseText` string. The `responseData` object contains additional information about the transaction, including the `referenceId`, which is the transaction ID.
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 `includeDetails` is set to `true`, the response includes additional details about the transaction, which are returned in the `transactionDetails` object within `responseData`. This includes information about the customer, payment method, fees, and transaction events.
```json IncludeDetails example {6}
{
"responseText": "Success",
"isSuccess": true,
"pageIdentifier": null,
"responseData": {
"transactionDetails": {
"parentOrgName": "Mountain View Properties",
"paypointDbaname": "Riverside Apartments",
"paypointLegalname": "Riverside Apartments LLC",
"paypointEntryname": "entry399",
"paymentTransId": "399-27260fccd280436790115892634be7c4",
"connectorName": "gp",
"externalProcessorInformation": "",
"gatewayTransId": "TRN_i4wWjg6iNO6HMyo1MqtRC7krpmduvR",
"orderId": "",
"method": "card",
"batchNumber": "399_combined_20251002_ec32a12d-baee-41e2-94dd-b0b2c6d932c4",
"batchAmount": 42573.28,
"payorId": 4119,
"paymentData": {
"maskedAccount": "5XXXXXXXXXXX4415",
"accountType": "mastercard",
"accountExp": "12/25",
"holderName": "Sarah Johnson",
"storedId": null,
"initiator": null,
"storedMethodUsageType": null,
"sequence": null,
"orderDescription": "Monthly rent payment - Unit 204",
"accountId": null,
"signatureData": null,
"binData": {
"binMatchedLength": "9",
"binCardBrand": "MASTERCARD",
"binCardType": "CREDIT",
"binCardCategory": "MIXED PRODUCT",
"binCardIssuer": "ALLIED IRISH BANKS, PLC",
"binCardIssuerCountry": "IRELAND",
"binCardIssuerCountryCodeA2": "IE",
"binCardIssuerCountryNumber": "372",
"binCardIsRegulated": "",
"binCardUseCategory": "",
"binCardIssuerCountryCodeA3": ""
},
"paymentDetails": {
"totalAmount": 1850.00,
"serviceFee": 55.50,
"checkNumber": null,
"checkImage": null,
"checkUniqueId": "",
"currency": "USD",
"orderDescription": null,
"orderId": null,
"orderIdAlternative": null,
"paymentDescription": null,
"groupNumber": null,
"source": null,
"payabliTransId": null,
"unbundled": null,
"categories": [],
"splitFunding": []
}
},
"transStatus": 1,
"paypointId": 399,
"totalAmount": 1850.00,
"netAmount": 1794.50,
"feeAmount": 55.50,
"settlementStatus": 0,
"operation": "Sale",
"responseData": {
"resultCode": "A0000", // New unified response code
"resultCodeText": "Approved", // New unified response code text
"response": null,
"responsetext": "CAPTURED",
"authcode": "VTLMC1",
"transactionid": "TRN_i4wWjg6iNO6HMyo1MqtRC7krpmduvR",
"avsresponse": "N",
"avsresponse_text": "No Match, No address or ZIP match",
"cvvresponse": "M",
"cvvresponse_text": "CVV2/CVC2 match",
"orderid": null,
"type": null,
"response_code": "100",
"response_code_text": "Operation successful.",
"customer_vault_id": null,
"emv_auth_response_data": null
},
"source": "api",
"scheduleReference": 0,
"orgId": 39,
"refundId": 0,
"returnedId": 0,
"chargebackId": 0,
"retrievalId": 0,
"transAdditionalData": null,
"invoiceData": {
"invoiceNumber": null,
"invoiceDate": null,
"invoiceDueDate": null,
"invoiceEndDate": null,
"invoiceStatus": null,
"invoiceType": null,
"frequency": null,
"paymentTerms": null,
"termsConditions": null,
"notes": null,
"tax": null,
"discount": null,
"invoiceAmount": null,
"freightAmount": null,
"dutyAmount": null,
"purchaseOrder": null,
"firstName": null,
"lastName": null,
"company": null,
"shippingAddress1": null,
"shippingAddress2": null,
"shippingCity": null,
"shippingState": null,
"shippingZip": null,
"shippingCountry": null,
"shippingEmail": null,
"shippingPhone": null,
"shippingFromZip": null,
"summaryCommodityCode": null,
"items": null,
"attachments": null,
"additionalData": null
},
"entrypageId": 0,
"externalPaypointID": "39990",
"isValidatedACH": false,
"transactionTime": "2025-10-02T20:51:03.261",
"customer": {
"identifiers": null,
"firstName": "Sarah",
"lastName": "Johnson",
"companyName": "Johnson Enterprises",
"billingAddress1": "425 Riverside Drive",
"billingAddress2": "Unit 204",
"billingCity": "Portland",
"billingState": "OR",
"billingZip": "97201",
"billingCountry": "US",
"billingPhone": "15035551234",
"billingEmail": "sarah.johnson@example.com",
"customerNumber": "CUST-1234",
"shippingAddress1": "425 Riverside Drive",
"shippingAddress2": "Unit 204",
"shippingCity": "Portland",
"shippingState": "OR",
"shippingZip": "97201",
"shippingCountry": "US",
"customerId": 4119,
"customerStatus": 1,
"additionalData": {
"clientId": "",
"customParent": "",
"customerId": "",
"customParent222": "",
"customerId222": "",
"customParent1111": "",
"customParent111": "",
"another": "",
"xyz": "",
"test12": "",
"customerID": ""
}
},
"splitFundingInstructions": null,
"cfeeTransactions": [
{
"cFeeTransId": "399-27260fccd280436790115892634be7c4",
"transStatus": 1,
"feeAmount": 55.50,
"settlementStatus": 0,
"operation": "Sale",
"responseData": {
"response": null,
"responsetext": null,
"authcode": null,
"transactionid": null,
"avsresponse": null,
"avsresponse_text": null,
"cvvresponse": null,
"cvvresponse_text": null,
"orderid": null,
"type": null,
"response_code": null,
"response_code_text": null,
"customer_vault_id": null,
"emv_auth_response_data": null,
"additional_response_text": null,
"processor_batch_id": null
},
"refundId": 0,
"transactionTime": "2025-10-02T20:51:03.261",
"gatewayTransId": null,
"transactionEvents": [
{
"transEvent": "Approved",
"eventData": null,
"eventTime": "2025-10-02T20:51:03.3289869"
}
]
}
],
"transactionEvents": [
{
"transEvent": "Created",
"eventData": "0HNG14G6KL5LG:00000001",
"eventTime": "2025-10-02T20:50:59.848292"
},
{
"transEvent": "Approved",
"eventData": "0HNG14G6KL5LG:00000001",
"eventTime": "2025-10-02T20:51:03.32107"
}
],
"pendingFeeAmount": 166.50,
"riskFlagged": false,
"riskFlaggedOn": "2025-10-02T20:50:59.8361551",
"riskStatus": "PASSED",
"riskReason": "",
"riskAction": "",
"riskActionCode": 0,
"deviceId": "",
"achSecCode": "",
"achHolderType": "",
"ipAddress": "47.195.66.238",
"isSameDayACH": false,
"walletType": null
},
"authCode": "VTLMC1",
"referenceId": "399-27260fccd280436790115892634be7c4",
"resultCode": 1,
"resultText": "Approved",
"avsResponseText": "No Match, No address or ZIP match",
"cvvResponseText": "CVV2/CVC2 match",
"customerId": 4119,
"methodReferenceId": null
}
}
```
If the payment is declined, the `responseText` reads `Declined`, and `resultText` contains the reason for the decline.
```json Decline example {10,12}
{
"isSuccess": false,
"responseData": {
"AuthCode": "null",
"avsResponseText": "No address or ZIP match only",
"CustomerId": 4440,
"cvvResponseText": "CVV2/CVC2 no match",
"ReferenceId": "45-erre-324",
"ResultCode": 1,
"ResultText": "200: Transaction was declined by processor.. DECLINE"
},
"responseText": "Declined"
}
```
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](/guides/pay-ops-notifications-webhooks-overview)
for more.
## 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](/developers/api-reference/query/get-list-of-transactions-for-an-entrypoint) or [organizations](/developers/api-reference/query/get-list-of-transactions-for-an-organization)
## Related resources
See these related resources to help you get the most out of Payabli.
* **[Pay In schemas](/guides/pay-in-schemas-overview)** - Learn about Pay In (money in) transaction schemas
* **[Pay In statuses](/guides/pay-in-status-reference)** - Learn about Pay In (money in) statuses
* **[Pay In transaction APIs v2](/developers/api-reference/moneyIn/v2)** - Learn about v1 versus v2 of the Pay In transaction APIs
* **[Make a transaction API (v2)](/developers/api-reference/moneyinV2/make-a-transaction)** - API reference for v2 of the make a transaction endpoint
* **[Pay In transaction APIs (v1)](/developers/api-reference/moneyin/make-a-transaction)** - API reference for v1 of the make a transaction endpoint