Skip to content

Authorizes a transaction

Request

POST {{baseURL}}/pay-api/v1/transactions/auth

This endpoint authorizes a payment transaction.

This verifies that the customer's payment method is valid and that sufficient funds or credit are available.

See Also:
To create a transaction, see POST /pay-api/v1/transactions/sale.
To capture a transaction, see POST /pay-api/v1/transactions/capture.
To void a transaction, see POST /pay-api/v1/transactions/void.
To retrieve a transaction by ID, see GET /pay-api/v1/transactions/{transactionId}.
To verify a card without charging it, see POST /pay-api/v1/transactions/card-verification.

Security
Bearer
Bodyapplication/json
amountnumber, (double)required

Specifies the amount of the transaction.

Example: 29.99

Example:29.99
accountNumberstring

Specifies the card number used for the transaction.

This field may contain a token issued against a card number. This is de-tokenized by TransIT to process the transaction.

Example: 4111111111111111

Example:"4111111111111111"
currencyIdinteger, (int32)required

Specifies the Flute currency identifier.

The valid value is:

ValueMeaning
1USD

Example: 1

Example:1
expirationMonthinteger, (int32)required

Specifies the expiration month of the card.

Example: 7

Example:7
expirationYearinteger, (int32)required

Specifies the expiration year of the card.

Example: 2032

Example:2032
paymentMethodIdstring or null, (uuid)

Specifies the customer payment method identifier.

We recommend using paymentMethodId instead of accountNumber.

Example: b4c48037-4c5d-4e6f-7a8b-9c0d1e2f3a69

Example:"b4c48037-4c5d-4e6f-7a8b-9c0d1e2f3a69"
cardDataSourceinteger, (int32)

Specifies the card data source.

Valid values are:

ValueNameDescription
1InternetVirtual Terminal, ISV API
2SwipeTrack1, Track2
3NFCEMV Tags, Track2
4EMVEMV Tags
5EMVContactlessEMV Tags
6FallbackSwipeTrack 2
7ManualCard present keyed transaction

Example: 2

Example:2
deviceIdstring or null, (uuid)

Specifies the device when using the Flute mobile app.

If this value is included, the user is linked to that device. This stores their name as the transaction creator createdBy.

Example: a30f9b66-b2f0-4b18-a03a-b861b00afa8b

Example:"a30f9b66-b2f0-4b18-a03a-b861b00afa8b"
paymentProcessorIdstring or null, (uuid)

Specifies the payment processor identifier.

A list of available payment processers can be found with GET {{baseURL}}/pay-api/v1/configurations/payments. See response availablePaymentProcessors.id.
If omitted, the merchant's default payment processor will be used.

Example: 37bd9ccb-2c9d-45cf-a65f-c9a224bdeaeb

Example:"37bd9ccb-2c9d-45cf-a65f-c9a224bdeaeb"
customerIdstring or null, (uuid)

Specifies the customer identifier.

This is used when saving the payment method.
If this value is provided, the payment method is saved to the specified customer.
If this value is not provided, a new customer record is created.

Example: fd9198a4-eb6f-4620-9603-4f4638289de5

Example:"fd9198a4-eb6f-4620-9603-4f4638289de5"
tipAmountnumber or null, (double), decimal places <= 2

Specifies the absolute amount (in USD) of the tip to be added.

This amount adds to the number included in the field amount earlier. For example if amount is $100 and this tipAmount is $10, the authorize amount is $110.

No additional tip amount or tip rate is required to be added, such as from POST {{baseURL}}/pay-api/v1/transactions/tip-adjustment

Values for `tipAmount` and `tipRate` are mutually exclusive. Care must be taken to include one or the other but not both.

Example: 14.50 (for $14.50)

Example:14.5
tipRatenumber or null, (double)

Specifies the tip rate as a percentage of the base amount to be added.

This amount adds to the number included in the field amount earlier. For example if amount is $100 and this tipRate is 10, the authorize amount is $110.

No additional tip amount or tip rate is required to be added, such as from POST {{baseURL}}/pay-api/v1/transactions/tip-adjustment

Values for `tipAmount` and `tipRate` are mutually exclusive. Care must be taken to include one or the other but not both.

Example: 15 (as 15%)

Example:15
percentageOffRatenumber or null, (double)

The percent of the base amount to be discounted.

Example:
8.25 (as 8.25%)
12 (as 12%)

Example:12
surchargeRatenumber or null, (double)

The percent of transaction amount to be added to the amount after percentageOffRate is applied.

Example:
8.25 (as 8.25%)
12 (as 12%)

Example:12
useCardPriceboolean or null

Parameter is mandatory when merchant has ZeroCostProcessingOption == Dual Pricing.

Parameter must be null when merchant has other ZeroCostProcessingOption.

For Dual Pricing, amount should be the card price and useCardPrice should be true, or amount should be the cash price and useCardPrice should be false.

appVersionstring or null

Specifies the version of the mobile app.

This value is stored on the transaction. It is visible in the transaction details. The appVersion value takes priority over the sdkVersion if both are present.

Example: 10.413.01

Example:"10.413.01"
sdkVersionstring or null

Specifies the version of the Flute SDK.

This value is stored on the transaction. It is visible in the transaction details. The appVersion value takes priority over the sdkVersion if both are present.

Example: 8.61.01

Example:"8.61.01"
billingAddressobject

Specifies an object defining the address.

shippingAddressobject

Specifies an object defining the address.

contactInfoobject

This group contains the customer's contact details.

securityCodestring or null

The three or four digit security code on the credit card.

track1string or null

The card data from track 1 of the magnetic stripe.

track2string or null

Information stored on the magnetic stripe of a credit or debit card, including the card number, expiration date, and cardholder's name.

emvTagsArray of strings or null

Each tag corresponds to a particular piece of data stored on the card.

emvPaymentAppVersionstring or null

The version number of the payment application in use.

pinstring or null

Specifies the encrypted PIN for the terminal.

pinKsnstring or null

Specifies the KSN for DUKPT PIN encryption.

Required only if the PIN is encrypted using DUKPT.

emvFallbackConditioninteger, (int32)

Specifies the EMV fallback condition.

Valid values are:

ValueNameDescription
0ICCTerminalErrorThe chip could not be read because of a chip or terminal error. The card was swiped instead.
1NoCandidateListThe chip and the terminal have no payment application in common. The card was swiped instead.

Example: 1

Example:1
emvFallbackLastChipReadinteger, (int32)

Specifies the result of the last EMV chip read.

Valid values are:

ValueName
0Successful
1Failed
2NotAChipTransaction
3Unknown

Example: 1

Example:1
referenceIdstring or null

Specifies an external transaction identifier for client-side tracking.

Also used in duplicate control validation. A unique value allows similar transactions to process as distinct, bypassing duplicate blocking when needed.

l2object

Specifies the Level 2 card data for the transaction.

l3object

Specifies the Level 3 card data for the transaction.

customerInitiatedTransactionboolean

Customer Initiated Transaction if true Merchant Initiated Transaction if false Default value - false.

Authorizes $123.45 on a Visa card entered online.

cardDataSource is 1 (Internet).

The billing address and security code are sent for address and CVV checks.

POST /pay-api/v1/transactions/auth HTTP/1.1
Host: sandbox.api.flute.com
Authorization: Bearer <YOUR_JWT_HERE>
Accept: application/json
Content-Type: application/json

{
  "paymentProcessorId": "64aa4643-2c62-45fa-9554-3a69833114e9",
  "amount": 123.45,
  "currencyId": 1,
  "accountNumber": "4111111111111111",
  "securityCode": "123",
  "expirationMonth": 12,
  "expirationYear": 2030,
  "cardDataSource": 1,
  "billingAddress": {
    "line1": "7429 Desert Mirage Lane",
    "line2": "Suite 7",
    "city": "Phoenix",
    "stateName": "Arizona",
    "stateId": 4,
    "postalCode": "85099",
    "countryId": 1
  },
  "shippingAddress": {
    "line1": "7429 Desert Mirage Lane",
    "line2": "Suite 7",
    "city": "Phoenix",
    "stateName": "Arizona",
    "stateId": 4,
    "postalCode": "85099",
    "countryId": 1
  },
  "contactInfo": {
    "companyName": "Peppared Street Cafe",
    "firstName": "Greg",
    "lastName": "Black",
    "email": "greg.black@example.com",
    "mobilePhoneNumber": "+14155558787",
    "smsNotification": false
  },
  "referenceId": "ORD-20261020-1001",
  "customerInitiatedTransaction": true
}

Responses

OK

Bodyapplication/json
transactionIdstring, (uuid)

Identifies the transaction identifier.

Example: c7c15dd0-03e7-4e55-917c-54bedafba5e7

Example:"c7c15dd0-03e7-4e55-917c-54bedafba5e7"
transactionDateTimestring, (date-time)

Specifies the date and time (in an ISO 8601 date-time UTC format) of the transaction execution.

Examples: 2026-02-19T20:24:52.934Z

Example:"2026-02-19T20:24:52.934Z"
typeIdinteger, (int32)

Indicates the transaction type identifier.

The value depends on the endpoint.

Valid values are:

IdTypeDescription
1AuthorizationHolds funds on the card. The funds move only after a capture.
2SaleAuthorizes and captures the funds in one request.
7RefundWORefReturns funds to a card without a reference to an original transaction.

Example: 1

Example:1
typestring or null

Indicates the transaction type name.

The name matches the typeId value.

Valid values are:

TypeIdDescription
Authorization1Holds funds on the card. The funds move only after a capture.
Sale2Authorizes and captures the funds in one request.
RefundWORef7Returns funds to a card without a reference to an original transaction.

Example: Authorization

Example:"Authorization"
statusIdinteger, (int32)

Indicates the status identifier of the transaction.

Valid values are:

IdStatusDescription
1AuthorizedThe full amount is approved and held. It can be captured or voided.
2CapturedThe sale or return is approved. It is included in the next settlement batch.
7PartiallyAuthorizedOnly part of the amount is approved. processedAmount holds the approved amount.
91DeclinedThe issuer denied the transaction. No funds move.
92FailedThe transaction failed because of a processing error. No funds move.

Example: 1

Example:1
statusstring or null

Indicates the status name of the transaction.

The name matches the statusId value.

Valid values are:

StatusIdDescription
Authorized1The full amount is approved and held. It can be captured or voided.
Captured2The sale or return is approved. It is included in the next settlement batch.
PartiallyAuthorized7Only part of the amount is approved. processedAmount holds the approved amount.
Declined91The issuer denied the transaction. No funds move.
Failed92The transaction failed because of a processing error. No funds move.

Example: Authorized

Example:"Authorized"
detailsobject

Indicates additional processor-level response details for the transaction.

transactionReceiptobject or null


Indicates an object describing the transaction receipt. The transaction receipt will be null or empty before the transaction is completed. After the completed transaction, it will be filled out.

processedAmountnumber, (double)

Indicates which amount is authorized. The amount may differ from the amount in the request.

avsResponseobject

Indicates the Address Verification Service (AVS) response.

Response

The issuer approves the full $123.45.

status is Authorized, and the funds are held until capture.

The address check passed, so avsResponse is populated.

{ "transactionId": "7d3a91c4-5e28-4b6f-a0d1-3c9e8f2b4a17", "transactionDateTime": "2026-10-20T14:05:12.4081694Z", "typeId": 1, "type": "Authorization", "statusId": 1, "status": "Authorized", "details": { "hostResponseCode": "00", "hostResponseMessage": "APPROVAL", "hostResponseDefinition": "Approved and completed", "code": "Approve", "message": "Success", "processorResponseCode": "00", "authCode": "A82731", "maskedPan": "411111******1111" }, "transactionReceipt": { "transactionId": "7d3a91c4-5e28-4b6f-a0d1-3c9e8f2b4a17", "transactionDateTime": "2026-10-20T14:05:12.4081694Z", "amount": { "baseAmount": 123.45, "percentageOffAmount": 0, "percentageOffRate": 0, "cashDiscountAmount": 0, "cashDiscountRate": 0, "surchargeAmount": 0, "surchargeRate": 0, "tipAmount": 0, "tipRate": 0, "totalAmount": 123.45 }, "currencyId": 1, "currency": "USD", "processorId": "64aa4643-2c62-45fa-9554-3a69833114e9", "processor": "Primary card processor", "operationTypeId": 1, "operationType": "PayNow", "paymentMethodTypeId": 1, "paymentMethodType": "Card", "transactionTypeId": 1, "transactionType": "Authorization", "customerId": null, "customerPan": "411111******1111", "cardTokenType": 1, "statusId": 1, "status": "Authorized", "merchantName": "Peppared Street Cafe", "merchantAddress": "7429 Desert Mirage Lane, Suite 7, Phoenix, AZ 85099", "merchantPhoneNumber": "+14155558787", "merchantEmailAddress": "billing@pepparedstreetcafe.example.com", "merchantWebsite": "https://pepparedstreetcafe.example.com", "authCode": "A82731", "source": { "typeId": 2, "type": "ApiToken", "id": "3c1f7a92-5d4e-4b8a-9f06-2e7d1b4c8a53", "name": "Store checkout API" }, "cardholderAuthenticationMethodId": 0, "cardholderAuthenticationMethod": "NotAuthenticated", "cvmResultMsg": null, "cardDataSourceId": 1, "cardDataSource": "Internet", "responseCode": "00", "responseDescription": "Approved and completed", "cardProcessingDetails": { "authCode": "A82731", "mid": "887000003193", "tid": "75021674", "cardCreditDebitTypeId": 1, "cardCreditDebitType": "Credit", "processCreditDebitTypeId": 1, "processCreditDebitType": "Credit", "rrn": "629314700981", "cardTypeId": 1, "cardType": "Visa" }, "achProcessingDetails": null, "availableOperations": [ { "typeId": 3, "type": "Capture", "availableAmount": 123.45, "suggestedTips": null }, { "typeId": 4, "type": "Void", "availableAmount": 123.45, "suggestedTips": null } ], "avsResponse": { "actionId": 1, "action": "Allow", "responseCode": "Y", "groupId": 5, "group": "ValidGroup", "resultId": 1, "result": "Passed", "codeDescription": "The street address and ZIP Code match the information on file." }, "emvTags": null, "orderNumber": "ORD-20261020-1001" }, "processedAmount": 123.45, "avsResponse": { "actionId": 1, "action": "Allow", "responseCode": "Y", "groupId": 5, "group": "ValidGroup", "resultId": 1, "result": "Passed", "codeDescription": "The street address and ZIP Code match the information on file." } }