# Submits an invoice for processing

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}.

Endpoint: POST /pay-int-api/invoices/{id}/submit
Version: V1
Security: Bearer

## Security:

  - `Bearer` (unknown)
    http bearer JWT

## Path parameters:

  - `invoiceId` (string, required)
    Specifies the identifier of the invoice to submit.

## Header parameters:

  - `x-api-version` (string)
    Specifies the API version to use for the request.

Example: 1.0

## Request body:

  - `application/json` (unknown)
    Specifies the request containing the details for invoice submission.

## Request fields (application/json):

  - `totalAmount` (number)
    Specifies the transaction's total amount.

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

Example: 3219.45
    Example: 3219.45

  - `accountNumber` (string)
    Specifies the payment target's bank account number.

Example: 5413591081013511
    Example: 5413591081013511

  - `expirationMonth` (integer)
    Specifies the expiration month of the card.

Example: 7
    Example: 7

  - `expirationYear` (integer)
    Specifies the expiration year of the card.

Example: 2032
    Example: 2032

  - `securityCode` (string)
    Specifies the card's security code (CVV).

Example: 123
    Example: 123

  - `billingCountryId` (integer)
    Specifies the Flute country identifier.
Example: 1
    Example: 1

  - `billingPostalCode` (string)
    Specifies the billing postal or ZIP code.
Examples:
60612
60612-0001
    Example: 60612

  - `savePaymentMethod` (boolean)
    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

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `success` (boolean)
    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

  - `paymentMethodCreated` (boolean)
    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

  - `customerInfoSaved` (boolean)
    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 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Validation failed: -- Email: 'Email' is not a valid email address. Severity: Error
    Example: Validation failed: -- Email: 'Email' is not a valid email address. Severity: Error

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.

Example: FluteOpsDeveloper.MSG322
    Example: FluteOpsDeveloper.MSG322

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
Example:
null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

  - `errors` (object)
    Indicates the collection of validation errors, keyed by field name.
Example:
{ "Email": ["'Email' is not a valid email address."] }

## Response 404:

  - `404` (unknown)
    Resource not found

## Response 404 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Entity with ID 'aa6cfcd0-0295-4a4c-b074-8c901f114fef' was not found.
    Example: Entity with ID 'aa6cfcd0-0295-4a4c-b074-8c901f114fef' was not found.

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.

Example: FluteOpsDeveloper.MSG322
    Example: FluteOpsDeveloper.MSG322

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: System.Collections.Generic.KeyNotFoundException
    Example: System.Collections.Generic.KeyNotFoundException

  - `correlationId` (string)
    Indicates the correlation identifier.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
Example:
null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

## Response 500:

  - `500` (unknown)
    Internal Error

## Response 500 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: An unexpected error occurred while processing the request.
    Example: An unexpected error occurred while processing the request.

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: (Service)

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: System.Exception
    Example: System.Exception

  - `correlationId` (string)
    Indicates the correlation identifier.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
Example:
null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

