Authorize and capture transactions

Learn how to authorize and capture payments for settlement using the API
View as MarkdownOpen in Claude
Applies to:Developers

For some businesses, it makes sense to authorize a transaction first and then capture later. When you authorize, you verify that the customer has sufficient funds, and you place a hold on that amount without actually processing the transaction and taking the money. Authorizing a transaction gives merchants time to verify inventory, prepare shipments, or complete services before finalizing the charge. Capturing the transaction is what puts the transaction in a batch for settlement and starts the process of moving the funds from the customer to the merchant account.

Capturing an authorized transaction later also allows merchants to capture part of the authorized amount if the final total ends up being less than expected, avoiding the need for refunds.

This guide covers how to authorize and capture transactions through the API. To authorize and capture a payment in one step, use the Make a transaction endpoint instead.

Considerations

Keep these considerations in mind when working with transactions:

  • Authorizing a transaction reserves funds for the merchant but doesn’t move them.
  • You must capture an authorized transaction to complete it and move the funds.
  • You can capture an amount equal to or less than the original authorization, but not less than 85% of the original authorized amount.
  • If you need to capture less than 85% of the authorized amount or more than the authorized amount, then void the authorization and create a new sale transaction.
  • Service fees can be adjusted proportionally when capturing partial amounts, and can vary based on your service fee configuration. See Pass-through fees for more information.
  • Authorized transactions aren’t flagged for settlement until they’re captured.
  • If an authorized transaction isn’t captured within 10 days, Payabli voids the transaction. If you try to capture the voided transaction, the capture will fail.

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.

Authorize a transaction

Send a POST request to the Authorize endpoint to authorize a payment transaction. This action reserves funds and returns an authorization code.

This example authorizes a card transaction for $100, with no service fee, for entrypoint f743aed24a. The customer ID is 4440.

POST
/api/v2/MoneyIn/authorize
1curl -X POST https://api-sandbox.payabli.com/api/v2/MoneyIn/authorize \
2 -H "requestToken: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "paymentDetails": {
6 "totalAmount": 100,
7 "serviceFee": 0
8 },
9 "paymentMethod": {
10 "cardcvv": "999",
11 "cardexp": "02/27",
12 "cardHolder": "John Cassian",
13 "cardnumber": "4111111111111111",
14 "cardzip": "12345",
15 "initiator": "payor",
16 "method": "card"
17 },
18 "customerData": {
19 "customerId": 4440
20 },
21 "entryPoint": "8cfec329267",
22 "ipaddress": "255.255.255.255"
23}'

A successful request returns a 201 response with a JSON body containing a paymentTransId you’ll need for the capture operation.

Response
1{
2 "code": "A0002",
3 "reason": "Authorized",
4 "explanation": "Transaction authorized",
5 "action": "No action required.",
6 "data": {
7 "parentOrgName": "Mrinal's Pet Supplies",
8 "paypointDbaname": "Mrinal's Pet Shop North",
9 "paypointLegalname": "Mrinal's Pet Shop North",
10 "paypointEntryname": "495147f647",
11 "paymentTransId": "3040-96dfa9a7c4ed4f82a3dd4a4a12ad28ae",
12 "connectorName": "gp",
13 "externalProcessorInformation": "",
14 "gatewayTransId": "TRN_Ih68D6UZdip7OEQ2QFXat1yQSLF2nB",
15 "orderId": null,
16 "method": "card",
17 "batchNumber": "3040_combined_20251201_3a50747d-6b5c-40ef-9f69-93a9cc7fcb49",
18 "batchAmount": 420,
19 "payorId": 4440,
20 "paymentData": {
21 "maskedAccount": "4XXXXXXXXXXX5439",
22 "accountType": "visa",
23 "accountExp": "12/25",
24 "holderName": "John Cassian",
25 "storedId": null,
26 "initiator": null,
27 "storedMethodUsageType": null,
28 "sequence": null,
29 "orderDescription": "",
30 "accountId": null,
31 "signatureData": null,
32 "binData": {
33 "binMatchedLength": "6",
34 "binCardBrand": "VISA",
35 "binCardType": "CREDIT",
36 "binCardCategory": "CLASSIC",
37 "binCardIssuer": "",
38 "binCardIssuerCountry": "RUSSIAN FEDERATION",
39 "binCardIssuerCountryCodeA2": "RU",
40 "binCardIssuerCountryNumber": "643",
41 "binCardIsRegulated": "",
42 "binCardUseCategory": "",
43 "binCardIssuerCountryCodeA3": ""
44 },
45 "paymentDetails": {
46 "totalAmount": 105,
47 "serviceFee": 5,
48 "checkNumber": null,
49 "checkUniqueId": "",
50 "currency": "USD",
51 "orderDescription": null,
52 "orderId": null,
53 "orderIdAlternative": null,
54 "paymentDescription": null,
55 "groupNumber": null,
56 "source": null,
57 "payabliTransId": null,
58 "categories": [],
59 "splitFunding": [],
60 "checkImage": null,
61 "unbundled": null
62 }
63 },
64 "transStatus": 11,
65 "paypointId": 3040,
66 "totalAmount": 105,
67 "netAmount": 100,
68 "feeAmount": 5,
69 "settlementStatus": 0,
70 "operation": "Sale",
71 "responseData": {
72 "resultCode": "A0000",
73 "resultCodeText": "Approved",
74 "response": null,
75 "responsetext": "CAPTURED",
76 "authcode": "AXS425",
77 "transactionid": "TRN_Xo4dpKfmx3OxSc9svd2ccI6OOnyB2I",
78 "avsresponse": "N",
79 "avsresponse_text": "No Match, No address or ZIP match",
80 "cvvresponse": "M",
81 "cvvresponse_text": "CVV2/CVC2 match",
82 "orderid": null,
83 "response_code": "100",
84 "response_code_text": "Operation successful",
85 "customer_vault_id": null,
86 "emv_auth_response_data": null,
87 "type": null
88 },
89 "source": "api",
90 "scheduleReference": 0,
91 "orgId": 123,
92 "refundId": 0,
93 "returnedId": 0,
94 "chargebackId": 0,
95 "retrievalId": 0,
96 "invoiceData": {
97 "invoiceNumber": null,
98 "invoiceDate": null,
99 "invoiceDueDate": null,
100 "invoiceEndDate": null,
101 "invoiceStatus": null,
102 "invoiceType": null,
103 "frequency": null,
104 "paymentTerms": null,
105 "termsConditions": null,
106 "notes": null,
107 "tax": null,
108 "discount": null,
109 "invoiceAmount": null,
110 "freightAmount": null,
111 "dutyAmount": null,
112 "purchaseOrder": null,
113 "firstName": null,
114 "lastName": null,
115 "company": null,
116 "shippingAddress1": null,
117 "shippingAddress2": null,
118 "shippingCity": null,
119 "shippingState": null,
120 "shippingZip": null,
121 "shippingCountry": null,
122 "shippingEmail": null,
123 "shippingPhone": null,
124 "shippingFromZip": null,
125 "summaryCommodityCode": null,
126 "items": null,
127 "attachments": null,
128 "additionalData": null
129 },
130 "entrypageId": 0,
131 "externalPaypointID": "",
132 "isValidatedACH": false,
133 "transactionTime": "2025-12-01T09:50:03.559",
134 "customer": {
135 "identifiers": null,
136 "firstName": "David",
137 "lastName": "Beckham",
138 "companyName": "Driving School LLC",
139 "billingAddress1": "Home Address",
140 "billingAddress2": "",
141 "billingCity": "",
142 "billingState": "",
143 "billingZip": "45157",
144 "billingCountry": "US",
145 "billingPhone": "+15555555555",
146 "billingEmail": "example@payabli.com",
147 "customerNumber": "C-90010",
148 "shippingAddress1": "Home Address",
149 "shippingAddress2": "",
150 "shippingCity": "",
151 "shippingState": "",
152 "shippingZip": "45157",
153 "shippingCountry": "US",
154 "customerId": 4440,
155 "customerStatus": 0,
156 "additionalData": null
157 },
158 "splitFundingInstructions": null,
159 "cfeeTransactions": [
160 {
161 "cFeeTransid": "3040-96dfa9a7c4ed4f82a3dd4a4a12ad28ae",
162 "feeAmount": 5,
163 "operation": "Sale",
164 "refundId": 0,
165 "responseData": {},
166 "settlementStatus": 0,
167 "transactionTime": "2025-12-01T09:50:03.559",
168 "transStatus": 1
169 }
170 ],
171 "transactionEvents": [
172 {
173 "transEvent": "Created",
174 "eventData": "0HNHD68HATSUC:00000001",
175 "eventTime": "2025-12-01T09:50:02.558651"
176 },
177 {
178 "transEvent": "Approved",
179 "eventData": "0HNHD68HATSUC:00000001",
180 "eventTime": "2025-12-01T09:50:03.609111"
181 }
182 ],
183 "riskStatus": "PASSED",
184 "riskReason": "",
185 "riskAction": "",
186 "deviceId": "",
187 "achSecCode": "",
188 "achHolderType": "personal",
189 "ipAddress": "255.255.255.255",
190 "isSameDayACH": false,
191 "walletType": null,
192 "pendingFeeAmount": 0,
193 "riskFlagged": false,
194 "riskFlaggedOn": "2025-12-01T09:50:02.5474568",
195 "riskActionCode": 0,
196 "transAdditionalData": null
197 },
198 "token": null
199}

After authorizing a transaction, you can capture the transaction to complete it and move the funds from the customer to the merchant account.

Capture a transaction

To capture an authorized transaction and start the settlement process, send a POST request to the Capture endpoint. This endpoint allows you to capture the full authorized amount or a partial amount (minimum 85% of the original authorization) with flexible service fee adjustments.

When capturing a transaction, the following rules apply:

  • Full capture: Capture the exact authorized amount with the original or adjusted service fee
  • Partial capture: Capture less than the authorized amount (minimum 85% of original total)
  • Service fee adjustment: Adjust the service fee proportionally or as needed when capturing partial amounts
  • Out-of-range captures: If you need to capture less than 85% or more than the authorized amount, you must void the original authorization and create a new sale transaction with the correct amount.

Each example captures a $100 card transaction for the transaction 10-7d9cd67d-2d5d-4cd7-a1b7-72b8b201ec13.

This example captures the full authorized amount of $100.00 with a service fee of $5.00.

POST
/api/v2/MoneyIn/capture/:transId
1curl -X POST https://api-sandbox.payabli.com/api/v2/MoneyIn/capture/10-7d9cd67d-2d5d-4cd7-a1b7-72b8b201ec13 \
2 -H "requestToken: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "paymentDetails": {
6 "totalAmount": 105,
7 "serviceFee": 5
8 }
9}'

A successful capture request returns a 201 response with a JSON body containing the transaction details.

Response
1{
2 "code": "A0000",
3 "reason": "Approved",
4 "explanation": "Approved by card network or card issuer.",
5 "action": "No action required.",
6 "data": {
7 "parentOrgName": "Mrinal's Pet Supplies",
8 "paypointDbaname": "Mrinal's Pet Shop North",
9 "paypointLegalname": "Mrinal's Pet Shop North",
10 "paypointEntryname": "495147f647",
11 "paymentTransId": "3040-96dfa9a7c4ed4f82a3dd4a4a12ad28ae",
12 "connectorName": "gp",
13 "externalProcessorInformation": "",
14 "gatewayTransId": "TRN_Ih68D6UZdip7OEQ2QFXat1yQSLF2nB",
15 "orderId": null,
16 "method": "card",
17 "batchNumber": "3040_combined_20251201_3a50747d-6b5c-40ef-9f69-93a9cc7fcb49",
18 "batchAmount": 420,
19 "payorId": 4440,
20 "paymentData": {
21 "maskedAccount": "4XXXXXXXXXXX5439",
22 "accountType": "visa",
23 "accountExp": "12/25",
24 "holderName": "John Cassian",
25 "storedId": null,
26 "initiator": null,
27 "storedMethodUsageType": null,
28 "sequence": null,
29 "orderDescription": "",
30 "accountId": null,
31 "signatureData": null,
32 "binData": {
33 "binMatchedLength": "6",
34 "binCardBrand": "VISA",
35 "binCardType": "CREDIT",
36 "binCardCategory": "CLASSIC",
37 "binCardIssuer": "",
38 "binCardIssuerCountry": "RUSSIAN FEDERATION",
39 "binCardIssuerCountryCodeA2": "RU",
40 "binCardIssuerCountryNumber": "643",
41 "binCardIsRegulated": "",
42 "binCardUseCategory": "",
43 "binCardIssuerCountryCodeA3": ""
44 },
45 "paymentDetails": {
46 "totalAmount": 105,
47 "serviceFee": 5,
48 "checkNumber": null,
49 "checkUniqueId": "",
50 "currency": "USD",
51 "orderDescription": null,
52 "orderId": null,
53 "orderIdAlternative": null,
54 "paymentDescription": null,
55 "groupNumber": null,
56 "source": null,
57 "payabliTransId": null,
58 "categories": [],
59 "splitFunding": [],
60 "checkImage": null,
61 "unbundled": null
62 }
63 },
64 "transStatus": 1,
65 "paypointId": 3040,
66 "totalAmount": 105,
67 "netAmount": 100,
68 "feeAmount": 5,
69 "settlementStatus": 0,
70 "operation": "Sale",
71 "responseData": {
72 "resultCode": "A0000",
73 "resultCodeText": "Approved",
74 "response": null,
75 "responsetext": "CAPTURED",
76 "authcode": "AXS425",
77 "transactionid": "TRN_Xo4dpKfmx3OxSc9svd2ccI6OOnyB2I",
78 "avsresponse": "N",
79 "avsresponse_text": "No Match, No address or ZIP match",
80 "cvvresponse": "M",
81 "cvvresponse_text": "CVV2/CVC2 match",
82 "orderid": null,
83 "response_code": "100",
84 "response_code_text": "Operation successful",
85 "customer_vault_id": null,
86 "emv_auth_response_data": null,
87 "type": null
88 },
89 "source": "api",
90 "scheduleReference": 0,
91 "orgId": 123,
92 "refundId": 0,
93 "returnedId": 0,
94 "chargebackId": 0,
95 "retrievalId": 0,
96 "invoiceData": {
97 "invoiceNumber": null,
98 "invoiceDate": null,
99 "invoiceDueDate": null,
100 "invoiceEndDate": null,
101 "invoiceStatus": null,
102 "invoiceType": null,
103 "frequency": null,
104 "paymentTerms": null,
105 "termsConditions": null,
106 "notes": null,
107 "tax": null,
108 "discount": null,
109 "invoiceAmount": null,
110 "freightAmount": null,
111 "dutyAmount": null,
112 "purchaseOrder": null,
113 "firstName": null,
114 "lastName": null,
115 "company": null,
116 "shippingAddress1": null,
117 "shippingAddress2": null,
118 "shippingCity": null,
119 "shippingState": null,
120 "shippingZip": null,
121 "shippingCountry": null,
122 "shippingEmail": null,
123 "shippingPhone": null,
124 "shippingFromZip": null,
125 "summaryCommodityCode": null,
126 "items": null,
127 "attachments": null,
128 "additionalData": null
129 },
130 "entrypageId": 0,
131 "externalPaypointID": "",
132 "isValidatedACH": false,
133 "transactionTime": "2025-12-01T09:50:03.559",
134 "customer": {
135 "identifiers": null,
136 "firstName": "David",
137 "lastName": "Beckham",
138 "companyName": "Driving School LLC",
139 "billingAddress1": "Home Address",
140 "billingAddress2": "",
141 "billingCity": "",
142 "billingState": "",
143 "billingZip": "45157",
144 "billingCountry": "US",
145 "billingPhone": "+15555555555",
146 "billingEmail": "example@payabli.com",
147 "customerNumber": "C-90010",
148 "shippingAddress1": "Home Address",
149 "shippingAddress2": "",
150 "shippingCity": "",
151 "shippingState": "",
152 "shippingZip": "45157",
153 "shippingCountry": "US",
154 "customerId": 4440,
155 "customerStatus": 0,
156 "additionalData": null
157 },
158 "splitFundingInstructions": null,
159 "cfeeTransactions": [
160 {
161 "cFeeTransid": "3040-96dfa9a7c4ed4f82a3dd4a4a12ad28ae",
162 "feeAmount": 5,
163 "operation": "Sale",
164 "refundId": 0,
165 "responseData": {},
166 "settlementStatus": 0,
167 "transactionTime": "2025-12-01T09:50:03.559",
168 "transStatus": 1
169 }
170 ],
171 "transactionEvents": [
172 {
173 "transEvent": "Created",
174 "eventData": "0HNHD68HATSUC:00000001",
175 "eventTime": "2025-12-01T09:50:02.558651"
176 },
177 {
178 "transEvent": "Approved",
179 "eventData": "0HNHD68HATSUC:00000001",
180 "eventTime": "2025-12-01T09:50:03.609111"
181 }
182 ],
183 "riskStatus": "PASSED",
184 "riskReason": "",
185 "riskAction": "",
186 "deviceId": "",
187 "achSecCode": "",
188 "achHolderType": "personal",
189 "ipAddress": "255.255.255.255",
190 "isSameDayACH": false,
191 "walletType": null,
192 "pendingFeeAmount": 0,
193 "riskFlagged": false,
194 "riskFlaggedOn": "2025-12-01T09:50:02.5474568",
195 "riskActionCode": 0,
196 "transAdditionalData": null
197 },
198 "token": null
199}

Real-world example

This example illustrates a homeowner reserving a clubhouse for an event with a $200 deposit for cleaning and damages, plus a 3% service fee. After the event, the clubhouse admin calculates the actual charges and charges the homeowner for the final amount.

Initial authorization: $200.00 + $6.00 (3% fee) = $206.00 total

In this case, the homeowner left the clubhouse in good condition, resulting in lower cleaning fees. The final charges are within the 85% threshold of the original authorization.

Final charges: $180.00 + $5.40 (3% fee) = $185.40

Because $185.40 is greater than 85% of $206.00 ($175.10), you can use the capture endpoint:

1 POST /api/v2/MoneyIn/capture/{transId}
2 {
3 "paymentDetails": {
4 "totalAmount": 185.40,
5 "serviceFee": 5.40
6 }
7 }

In this case, the homeowner left the clubhouse in excellent condition. Their cleaning fee was significantly reduced, leading to final charges below the 85% threshold of the original authorization. Final charges: $60.00 + $1.80 (3% fee) = $61.80

Because $61.80 is less than 85% of $206.00 ($175.10), you must:

  1. Void the original $206.00 authorization
  2. Create a new sale transaction for $61.80

In this case the homeowner incurred additional costs for damages, leading to final charges exceeding the initial authorization.

Final charges: $300.00 + $9.00 (3% fee) = $309.00

Because this exceeds the original authorization, you must:

  1. Void the original $206.00 authorization
  2. Create a new sale transaction for $309.00

See these related resources to help you get the most out of Payabli.