# Creates a subscription

POST {{baseURL}}/sub-api/v1/subscriptions
This endpoint creates a subscription.
A subscription is a recurring payment.
The client authorizes a transaction at regular intervals, such as weekly, monthly, or annually.
Payments represent:
* **Recurring billing**. The transaction happens automatically on a set schedule without the client having to re-enter payment details.
* **Pre-authorization**. The customer approves transactions for future charges.
* **Fixed or variable amounts**. The transaction can be the same every cycle, such as for a streaming service or vary based on usage, such as a utility bill)

See Also:
To list a merchant's subscriptions, see GET /sub-api/v1/subscriptions.
To retrieve a subscription by ID, see GET /sub-api/v1/subscriptions/{subscriptionId}.
To retrieve a subscription's payment history, see GET /sub-api/v1/subscriptions/{subscriptionId}/payments.
To terminate a subscription, see PUT /sub-api/v1/subscriptions/{subscriptionId}/terminate.

Endpoint: POST /sub-api/v1/subscriptions
Version: V1
Security: Bearer

## Security:

  - `Bearer` (unknown)
    http bearer JWT

## Request body:

  - `application/json` (unknown)
    Request parameters

## Request fields (application/json):

  - `amount` (number, required)
    Specifies the total amount due (in USD) of the transaction.
Example: 43.99 (for $43.99)
    Example: 43.99

  - `transactionType` (integer, required)
    Specifies the transaction type.
Possible values:
| Id | Type | Notes |
|  --- | --- | --- |
| 1 | Authorization |  |
| 2 | Sale | The field `secCode` must also be omitted or set to null. |
| 11 | AchDebit | The field `secCode` must also be set to a valid value. |

Example: 11
    Example: 11

  - `currencyId` (integer, required)
    Specifies the Flute currency identifier.
Always set to *1*.
Example: 1
    Example: 1

  - `paymentProcessorId` (string, required)
    Specifies the payment processor identifier.

Example: 8ebb41c8-e1b0-4777-8f8e-1402e756ee7d
    Example: 8ebb41c8-e1b0-4777-8f8e-1402e756ee7d

  - `paymentMethodId` (string, required)
    Specifies the payment method identifier.

Must be added and active before subscription creation.

Example: 7ef038b0-d612-4d10-9e2c-80e791b54632
example: "7ef038b0-d612-4d10-9e2c-80e791b54632"

  - `paymentFrequencyUnit` (integer, required)
    Indicates the payment frequency unit.
As examples:
With a `paymentFrequencyUnit` of `Weekly`, and `paymentFrequency` of `1`, payments are made once a week.
With a `paymentFrequencyUnit` of `Weekly`, and `paymentFrequency` of `2`, payments are made twice a week
Possible values:
| ID | Label |
|  --- | --- |
| 1 | Daily |
| 2 | Weekly |
| 3 | Monthly |

Example: 3
    Example: 3

  - `paymentFrequency` (integer, required)
    Specifies the frequency of the payment value.
As examples:
With a `paymentFrequencyUnit` of `Weekly`, and `paymentFrequency` of `1`, payments are made once a week.
With a `paymentFrequencyUnit` of `Weekly`, and `paymentFrequency` of `2`, payments are made twice a week.
Example: 2
    Example: 2

  - `numberOfPayments` (integer, required)
    Specifies the number of payments for the subscription.

Example: 60
    Example: 60

  - `customerId` (string, required)
    Specifies the customer identifier of the subscription.

Example: d368cf28-4390-4f6d-b363-ce8d112e8517
    Example: d368cf28-4390-4f6d-b363-ce8d112e8517

  - `isFasterProcessing` (boolean, required)
    Specifies ACH (automated clearing house) transaction has same day processing enabled.
Must be empty or null for card subscriptions.
If `true`, same day processing is enabled.
If `false`, same day processing is not enabled.
Example: false
    Example: false

  - `useCardPrice` (boolean)
    Specifies appling the card-based pricing instead of the cash-based pricing.
The card price is typically higher because of processing fees.
This fee is embedded in the price and not added as a line item.
If `true`, use card-based pricing.
If `false`, use cash-based pricing.

This value is required when the merchant `ZeroCostProcessingOption` is `DualPricing`.

This value must be null when the merchant `ZeroCostProcessingOption` is other than `DualPricing`.

Example: true
    Example: true

  - `secCode` (integer)
    Specifies the SEC (standard entry class) code for the payment method.

  This value is required if `transactionType` is 11 (AchDebit).
This value must be omitted or null if `transactionType` is 2 (Sale).

Allowed values:
| secCode ID | Entry Type | Description |
|  --- | --- | --- |
| 1 | Web | Internet-initiated/mobile entries. |
| 2 | PPD | Prearranged payment and deposit entries. |
| 3 | CCD | Corporate credit or debit. |
| 4 | Telephone | Telephone-initiated entries. |

Example: 1
    Example: 1

  - `percentageOffRate` (number)
    Specifies the percent of the base amount to be discounted.
Example:
8.25 (as 8.25%)
12 (as 12%)
    Example: 12

  - `surchargeRate` (number)
    Specifies the surcharge percentage.
This is a surcharge on the base amount.
This value is surcharge percentage rate.
This surcharge percentage calculates the surcharge amount for `surchargeAmount`.
Example: 1.5 (as 1.5%)
    Example: 1.5

  - `paymentStartDateTime` (string)
    Specifies the date-time (in an ISO 8601 date-time UTC format) of the subscription's first payment date.

If omitted or null, it indicates immediate payment(PayNow).

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

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `id` (string)
    Subscription Id

  - `payNowSuccess` (boolean)
    True if PayNow was executed successfully, otherwise false.

  - `transactionId` (string)
    Transaction Id if PayNowSuccess was True.

  - `payNowResponse` (string)
    Payment response if PayNowSucess was False.

## 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

