Skip to content

Creates a transaction

Request

POST {{baseURL}}/v2/transactions

This endpoint creates a transaction.

See Also:
To list transactions, see GET /v2/transactions.
To capture a transaction, see POST /v2/transactions/{transactionId}/capture.
To calculate a transaction amount, see POST /v2/transactions/calculate-amount.

Security
Bearer
Bodyapplication/json

Specifies details about the transaction request with payment method and transaction type.

paymentProcessorIdstring or null, (uuid)required

Identifies the payment processor.

Defaults to merchant's default processor.

Example: 76215e54-a85b-4d42-9553-163fe393cb02

Example:"76215e54-a85b-4d42-9553-163fe393cb02"
baseAmountnumber, (double), decimal places <= 2required

Specifies the base transaction amount before adjustments.

Examples:
125
125.5
125.50

Example:125.5
currencyCodestring or null

Identifies the transaction's currency code (in uppercase ISO 4217 currency code).

Example: USD

Default:"USD"
Example:"USD"
referenceIdstring or null, [ 0 .. 36 ] characters

Specifies a reference identifier provided by the merchant.

This is included in the duplicate-check key. It allows the same card and amount combination to be charged multiple times when the reference identifiers are different.

Example: REF-EXT-12345

Example:"REF-EXT-12345"
isCustomerInitiatedTransactionboolean

Specifies a transaction is initiated by a customer or a merchant.

If true, the transaction is initiated by customer.
If false, the transaction is initiated by a merchant.

Example: true

Default:false
Example:true
pricingTypestring or null

Identifies the type of pricing.

This value is required only when Dual Pricing is enabled.

Valid values are:

StatusExplanation
CardThe transaction uses the card price, which may include a surcharge.
CashThe transaction uses the cash price, which may include a cash discount.

Example: Card

Enum:"Card""Cash"
Example:"Card"
extraAmountsobject or null

Identifies the extra amounts for the transaction.

To accept tips, the merchant is required to have tips enabled and tip-adjustment disabled. If tip collection is enabled and committed at creation time, the tip gets prompted to the customer directly on the device.

transactionEnhancedDataobject or null

Specifies a combined Level 2 and Level 3 enhanced data for card transactions. Used for commercial card processing with additional transaction details.

billingAddressobject or null

Identifies the address information.

shippingAddressobject or null

Identifies the address information.

contactInfoobject or null

Contact information.

transactionDetailsobjectrequired
deviceIdstring or null, (uuid)

Specifies a device identifier from mobile app.

If included and the device has a linked user profile, the transaction is attributed to that user.
If null or omitted, no attribution is made.

example: 088642a8-9082-4496-be63-8120765c5ad3

Example:"088642a8-9082-4496-be63-8120765c5ad3"
platformstring or null

Specifies the platform of the mobile phone.

Valid values are:

ItemExplanation
AndroidMobile operating system by Google.
iOSMobile operating system by Apple.

Example: iOS

Enum:"iOS""Android"
Example:"iOS"
appVersionstring or null

Specifies the version of the mobile app used to process the transaction.

Example: 1.4.2

Example:"1.4.2"
sdkVersionstring or null

Specifies the version of the SDK used to process the transaction.

Example: 2.0.1

Example:"2.0.1"
curl -i -X POST \
  https://sandbox.api.flute.com/v2/transactions \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "paymentProcessorId": "a2f2c2e7-0b23-4682-8f99-ab7707205461",
    "baseAmount": 100,
    "currencyCode": "USD",
    "referenceId": "REF-CARD-SAVED-001",
    "isCustomerInitiatedTransaction": true,
    "pricingType": "Card",
    "extraAmounts": null,
    "transactionEnhancedData": null,
    "billingAddress": null,
    "shippingAddress": null,
    "contactInfo": null,
    "transactionDetails": {
      "cardData": {
        "captureMethod": "Auto",
        "paymentMethodId": "e397e367-bc4a-4b69-bd78-32e3e12327c2",
        "paymentMethodDetails": null
      },
      "achData": null
    },
    "deviceId": null,
    "platform": null,
    "appVersion": null,
    "sdkVersion": null
  }'

Responses

OK

Bodyapplication/json
itemsArray of objects or null
pageInfoobject

Indicates an object describing the pagination status.

If additional pages to review are needed, repeat the exact same search but include a new pageIndex value. Typically, this will increment the current pageIndex by one. However, any valid value may be used. Value restrictions include:

  • A value less than zero is not permitted.
  • Values equal to or greater than totalPages end successfully but will not return any items.
Response
{ "transactionId": "90d084d6-55b8-4fb8-b658-861534d07f9a", "transactionStatus": "Pending", "processedAmount": 100, "currencyCode": "USD", "amountDetails": { "baseAmount": 100, "tipAmount": 0, "tipRate": 0, "surchargeAmount": 0, "discountAmount": 0, "discountRate": 0 }, "processorResponse": { "processorName": "TSYS", "responseCode": "00", "responseMessage": "Approved", "responseDefinition": "Approved and completed" }, "responseDetails": null, "addressVerificationServiceResponse": { "action": "Allow", "responseCode": "Y", "description": "Address and ZIP match" }, "receipt": null }