Skip to content

Submits an invoice for processing

Request

POST {{baseURL}}/pay-int-api/invoices/{{invoiceId}}/submit

This endpoint submits an invoice for only card payments processing.

Submitting an invoice charges a card directly against its total, without waiting for the customer to visit a hosted payment page. The request carries the card number, expiration month and year, and security code, along with the cardholder's billing country and postal code.

It can also save the payment method to the customer's record when savePaymentMethod is true.

The response confirms the payment succeeded, a new payment method was created, and the customer's info was saved.

A separate endpoint, POST /pay-int-api/invoices/{invoiceId}/ach/submit, submits an invoice for ACH payment instead.

See Also:
To create an invoice, see POST /pay-int-api/invoices.
To publish an invoice, see POST /pay-int-api/invoices/publish.
To submit an ACH invoice for processing, see POST /pay-int-api/invoices/{invoiceId}/ach/submit.
To retrieve an invoice by ID, see GET /pay-int-api/invoices/{invoiceId}.

Security
Bearer
Path
invoiceIdstring, (uuid)required

Specifies the identifier of the invoice to submit.

Example:9be2f3a4-5b6c-4d7e-8f9a-0b1c2d3e4f70
Headers
x-api-versionstring

Specifies the API version to use for the request.

Example: 1.0

Example:1.0
Bodyapplication/json

Specifies the request containing the details for invoice submission.

totalAmountnumber, (double)

Specifies the transaction's total amount.

This includes the base amount, tips, taxes, shipping, discounts, and other charges.

Example: 3219.45

Example:3219.45
accountNumberstring or null

Specifies the payment target's bank account number.

Example: 5413591081013511

Example:"5413591081013511"
expirationMonthinteger, (int32)

Specifies the expiration month of the card.

Example: 7

Example:7
expirationYearinteger, (int32)

Specifies the expiration year of the card.

Example: 2032

Example:2032
securityCodestring or null

Specifies the card's security code (CVV).

Example: 123

Example:"123"
billingCountryIdinteger, (int32)

Example: 1

Example:1
billingPostalCodestring or null

Specifies the billing postal or ZIP code.

Examples:
60612
60612-0001

Example:"60612"
savePaymentMethodboolean

Specifies the payment method is saved to the customer's record.

If true, the payment method is saved.
If false, the payment method is not saved.

Example: true

Example:true
curl -i -X POST \
  'https://developer.flute.com/_mock/api-reference/pay-int-api/invoices/{id}/submit' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'x-api-version: 1.0' \
  -d '{
    "totalAmount": 3219.45,
    "accountNumber": "5413591081013511",
    "expirationMonth": 7,
    "expirationYear": 2032,
    "securityCode": "123",
    "billingCountryId": 1,
    "billingPostalCode": "60612",
    "savePaymentMethod": true
  }'

Responses

OK

Bodyapplication/json
successboolean

Indicates the payment was successfully submitted.

If true, the payment was successfully submitted.
If false, the payment was not successfully submitted.

Example: true

Example:true
paymentMethodCreatedboolean

Indicates the payment method was created.

If true, the payment method was created.
If false, the payment method was not created.

Example: true

Example:true
customerInfoSavedboolean

Indicates the customer info was saved.

If true, the customer info was saved.
If false, the customer info was not saved.

Example: true

Example:true
Response
{ "success": true, "paymentMethodCreated": true, "customerInfoSaved": true }