Skip to content

Creates a subscription

Request

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)
Security
Bearer
Bodyapplication/json

Request parameters

amountnumber, (double)required

Specifies the total amount due (in USD) of the transaction.

Example: 43.99

Example:43.99
transactionTypeinteger, (int32)required

Specifies the transaction type.

Possible values:

IdTypeNotes
1Authorization
2SaleThe field secCode must also be omitted or set to null.
11AchDebitThe field secCode must also be set to a valid value.

Example: 11

Example:11
currencyIdinteger, (int32)required

Specifies the Flute currency identifier.

Always set to 1.

Example: 1

Example:1
paymentProcessorIdstring, (uuid)required

Specifies the payment processor identifier.

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

Example:"8ebb41c8-e1b0-4777-8f8e-1402e756ee7d"
paymentMethodIdstring, (uuid)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"

paymentFrequencyUnitinteger, (int32)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:

IDLabel
1Daily
2Weekly
3Monthly

Example: 3

Example:3
paymentFrequencyinteger, (int32)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
numberOfPaymentsinteger, (int32)required

Specifies the number of payments for the subscription.

Example: 60

Example:60
customerIdstring, (uuid)required

Specifies the customer identifier of the subscription.

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

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

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

Default:false
Example:false
useCardPriceboolean

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
secCodeinteger, (int32)


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 IDEntry TypeDescription
1WebInternet-initiated/mobile entries.
2PPDPrearranged payment and deposit entries.
3CCDCorporate credit or debit.
4TelephoneTelephone-initiated entries.

Example: 1

Default:1
Example:1
percentageOffRatenumber or null, (double)

Specifies the percent of the base amount to be discounted.

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

Example:12
surchargeRatenumber or null, (double)

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
paymentStartDateTimestring or null, (date-time)

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"
curl -i -X POST \
  https://developer.flute.com/_mock/api-reference/sub-api/v1/subscriptions \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "amount": 43.99,
    "transactionType": 11,
    "currencyId": 1,
    "paymentProcessorId": "8ebb41c8-e1b0-4777-8f8e-1402e756ee7d",
    "paymentMethodId": "b6df8625-cd25-4123-b345-638aa7b5d011",
    "paymentFrequencyUnit": 3,
    "paymentFrequency": 2,
    "numberOfPayments": 60,
    "customerId": "d368cf28-4390-4f6d-b363-ce8d112e8517",
    "isFasterProcessing": false,
    "useCardPrice": true,
    "secCode": 1,
    "percentageOffRate": 12,
    "surchargeRate": 1.5,
    "paymentStartDateTime": "2026-02-19T20:24:52.934Z"
  }'

Responses

OK

Bodyapplication/json
idstring, (uuid)

Subscription Id

payNowSuccessboolean or null

True if PayNow was executed successfully, otherwise false.

transactionIdstring or null, (uuid)

Transaction Id if PayNowSuccess was True.

payNowResponsestring or null

Payment response if PayNowSucess was False.

Response
{ "id": "5dd66afe-481a-4718-ad82-3d330a9735c6", "payNowSuccess": true, "transactionId": "798c3112-54c3-4ba9-b2aa-832d1f724024", "payNowResponse": null }