---
title: "Create a subscription"
method: POST
path: "/subscription/v3"
tags: ["Subscriptions"]
---

# Create a subscription

`POST /subscription/v3`

<!-- theme: warning -->
> 🛑 Important
> 
> Nexio does not currently recommend using the Subscription service for a 3DS flow. For other options, see [Getting started with subscriptions](https://docs.nexiopay.com/docs/getting-started-with-subscriptions) in Guides.
> 

Creates a recurring payment as a subscription or payment plan. For guides to using this endpoint, see the [Recurring billing overview](https://docs.nexiopay.com/docs/recurring-billing-overview) topic.

A successful request to this endpoint processes an initial transaction using a saved card token and schedules recurring transactions. All transactions are processed with the values provided in the `payment` object or the [data saved in the card token](https://docs.nexiopay.com/docs/what-data-is-saved-with-tokens). The scheduled transaction runs according to the values provided in the `schedule` object.

Also, in order to have a customer skip a month for an existing subscription or payment plan, you need to delete the current one and then recreate it to start with an `initialBillingAmount` of `0` and have the `dateInitialBillingEnd` happen a month before the next scheduled payment.

<!-- theme: info -->
> 📘 Note
> 
> If the initial transaction is declined, the subscription or payment plan will not be created. It must be re-created with a new card token.
>
> After the subscription or payment plan is created, if a subsequent transaction gets declined or has an error, the system retries the transaction up to three times, one minute apart. On the third failure, the system stops trying for that installment, the subscription or payment plan remains active, and the system tries again at the next scheduled payment date. In this instance, the merchant would need to contact the customer about the missed payment or transaction. Also, if you have webhooks configured, you will receive a webhook for each of the failures. For additional information about this, see the [Creating a Nexio-scheduled card subscription](https://docs.nexiopay.com/docs/creating-a-subscription) or [Creating a Nexio-scheduled card payment plan](https://docs.nexiopay.com/docs/creating-a-pay-plan) tutorial.
> 
> However, with [Decline recovery](https://docs.nexiopay.com/docs/decline-recovery-overview) and when the subscription or payment plan was created with the `retryOnSoftDecline` parameter, instead of doing the three retries at a minute apart, the system retries according to the recommendation received from the Decline recovery system.

<!-- theme: warning -->
> 🛑 Important
> 
> When needing to use a 3DS flow to create a subscription, you must first run a customer-facing transaction where the customer proceeds through the 3DS flow (see the [Using 3DS to run transactions](https://docs.nexiopay.com/docs/using-3ds-to-run-transactions) tutorial). Make sure you use a `paymentType` of `initialScheduled` and also save the card token as part of the process. 
> 
> Then, use this endpoint to create the subscription with that saved card token and a `paymentType` of `scheduled`.
> 

<!-- theme: warning -->
> ⚠️ Try It
> 
> To use the Try It feature for this endpoint, you can use the credentials for your [Sandbox API user](https://docs.nexiopay.com/docs/sandbox-environments).<br/><br/>You can also use the following test account. Copy the value and paste it into the appropriate space in the Try It section to the right.
> username: `docs@nexiopay.com`
> password: `JZdzoXpdDeH6VA`<br/><br/>Include at least a saved card token in the `tokenex.token` parameter, the amount and currency for the transaction, the payment type, and a customer reference number. You can also include the appropriate subscription parameters.

<div style="display:none;">

## Request parameters
- payment
- payment.tokenex
- payment.tokenex.token
- payment.tokenex.firstSix
- payment.tokenex.lastFour
- payment.isAuthOnly
- payment.shouldUpdateCard
- payment.processingOptions
- payment.processingOptions.saveCardToken
- payment.processingOptions.retryOnSoftDecline
- payment.processingOptions.checkFraud
- payment.processingOptions.shouldUseFingerprint
- payment.processingOptions.check3ds
- payment.processingOptions.verboseResponse
- payment.processingOptions.paymentType
- payment.processingOptions.paymentOptionTag
- payment.processingOptions.merchantId
- payment.processingOptions.customerRedirectUrl
- payment.data
- payment.data.amount
- payment.data.currency
- payment.data.settlementCurrency
- payment.data.customer
- payment.data.customer.customerRef
- payment.data.customer.invoice
- payment.data.customer.orderNumber
- payment.data.customer.orderDate
- payment.data.customer.birthDate
- payment.data.customer.nationalIdentificationNumber
- payment.data.customer.companyName
- payment.data.customer.firstName
- payment.data.customer.lastName
- payment.data.customer.email
- payment.data.customer.phone
- payment.data.customer.billToAddressOne
- payment.data.customer.billToAddressTwo
- payment.data.customer.billToCity
- payment.data.customer.billToState
- payment.data.customer.billToPostal
- payment.data.customer.billToCountry
- payment.data.customer.billToPhone
- payment.data.customer.shipToAddressOne
- payment.data.customer.shipToAddressTwo
- payment.data.customer.shipToCity
- payment.data.customer.shipToState
- payment.data.customer.shipToPostal
- payment.data.customer.shipToCountry
- payment.data.customer.shipToPhone
- payment.data.customer.createdAtDate
- schedule
- schedule.interval
- schedule.intervalCount
- schedule.balance
- schedule.duration
- schedule.dateInitialBillingEnd
- schedule.intialBillingAmount
- schedule.dateCancelAfter

## Response parameters
- customerRef
- active
- accountId
- id
- payment
- payment.tokenex
- payment.tokenex.token
- payment.tokenex.firstSix
- payment.tokenex.lastFour
- payment.shouldUpdateCard
- payment.isAuthOnly
- payment.processingOptions
- payment.processingOptions.saveCardToken
- payment.processingOptions.retryOnSoftDecline
- payment.processingOptions.checkFraud
- payment.processingOptions.shouldUseFingerprint
- payment.processingOptions.check3ds
- payment.processingOptions.verboseResponse
- payment.processingOptions.paymentType
- payment.processingOptions.paymentOptionTag
- payment.processingOptions.merchantId
- payment.processingOptions.customerRedirectUrl
- payment.data
- payment.data.amount
- payment.data.currency
- payment.data.settlementCurrency
- payment.data.customer
- payment.data.customer.customerRef
- payment.data.customer.invoice
- payment.data.customer.orderNumber
- payment.data.customer.orderDate
- payment.data.customer.birthDate
- payment.data.customer.nationalIdentificationNumber
- payment.data.customer.companyName
- payment.data.customer.firstName
- payment.data.customer.lastName
- payment.data.customer.email
- payment.data.customer.phone
- payment.data.customer.billToAddressOne
- payment.data.customer.billToAddressTwo
- payment.data.customer.billToCity
- payment.data.customer.billToState
- payment.data.customer.billToPostal
- payment.data.customer.billToCountry
- payment.data.customer.billToPhone
- payment.data.customer.shipToAddressOne
- payment.data.customer.shipToAddressTwo
- payment.data.customer.shipToCity
- payment.data.customer.shipToState
- payment.data.customer.shipToPostal
- payment.data.customer.shipToCountry
- payment.data.customer.shipToPhone
- payment.data.customer.createdAtDate
- schedule
- schedule.interval
- schedule.intervalCount
- schedule.initialBalance
- schedule.balance
- schedule.duration
- schedule.dateInitialBillingEnd
- schedule.intialBillingAmount
- schedule.dateCancelAfter
- schedule.scheduleType
- userName
- dateCreated
- dateLastModified
- dateLastRun
- dateNextRun
- paymentResult
- paymentResult.amount
- paymentResult.authCode
- paymentResult.transactionStatus
- paymentResult.transactionDate
- paymentResult.transactionType
- paymentResult.merchantId
- paymentResult.currency
- paymentResult.id
- paymentResult.asyncTraceId
- paymentResult.redirectUrl
- paymentResult.message
- paymentResult.status
- paymentResult.gatewayResponse
- paymentResult.gatewayResponse.gatewayName
- paymentResult.gatewayResponse.refNumber
- paymentResult.data
- paymentResult.data.amount
- paymentResult.data.currency
- paymentResult.data.settlementCurrency
- paymentResult.data.customer
- paymentResult.data.customer.customerRef
- paymentResult.data.customer.orderNumber
- paymentResult.data.customer.orderDate
- paymentResult.data.customer.invoice
- paymentResult.data.customer.birthDate
- paymentResult.data.customer.nationalIdentificationNumber
- paymentResult.data.customer.companyName
- paymentResult.data.customer.firstName
- paymentResult.data.customer.lastName
- paymentResult.data.customer.email
- paymentResult.data.customer.phone
- paymentResult.data.customer.billToAddressOne
- paymentResult.data.customer.billToAddressTwo
- paymentResult.data.customer.billToCity
- paymentResult.data.customer.billToState
- paymentResult.data.customer.billToPostal
- paymentResult.data.customer.billToCountry
- paymentResult.data.customer.billToPhone
- paymentResult.data.customer.shipToAddressOne
- paymentResult.data.customer.shipToAddressTwo
- paymentResult.data.customer.shipToCity
- paymentResult.data.customer.shipToState
- paymentResult.data.customer.shipToPostal
- paymentResult.data.customer.shipToCountry
- paymentResult.data.customer.shipToPhone
- paymentResult.data.customer.createdAt
- paymentResult.card
- paymentResult.card.cardHolder
- paymentResult.card.cardNumber
- paymentResult.card.expirationMonth
- paymentResult.card.expirationYear
- paymentResult.token
- paymentResult.token.firstSix
- paymentResult.token.lastFour
- paymentResult.token.token
- paymentResult.kountResponse
- paymentResult.kountResponse.status
- paymentResult.kountResponse.rules
- lastPaymentStatus
- lastSuccessfulPaymentDate
- exp

</div>

## Request body

- union
  - object — To create a subscription for Nexio to automatically run payments on a schedule, include at least an amount, currency, saved card token, payment type, and customer reference number.
    - `payment` object, required — Payment information for the initial transaction and for recurring (scheduled) transactions.
      - `tokenex` object, required — A previously saved [card token](https://docs.nexiopay.com/reference/savecardtoken). Card tokens can be used to process through any MID on your account. They are not restricted to a specific merchant account or currency.
        - `token` Token, required — unresolved $ref
        - `firstSix` FirstSix — unresolved $ref
        - `lastFour` LastFour — unresolved $ref
      - `data` object, required — Transaction and customer data.
        - `amount` number, required — The transaction amount to charge during the initial and each recurring transaction. The maximum value has 16 digits total, including up to two of those digits after the decimal point.
        - `currency` string, required — The [three-character ISO code](https://en.wikipedia.org/wiki/ISO_4217) for the currency used in the transaction. This value cannot later be changed for an existing subscription or payment plan.
        - `customer` object, required — Customer information for checking fraud or for use of the processing gateway, when applicable.
          - `customerRef` string, required — Customer identifier. You must use this field to pass a customer ID to manage user subscriptions. This value cannot later be changed for an existing subscription or payment plan.
          - `orderNumber` OrderNumber — unresolved $ref
          - `orderDate` OrderDate — unresolved $ref
          - `invoice` Invoice — unresolved $ref
          - `firstName` FirstName — unresolved $ref
          - `lastName` LastName — unresolved $ref
          - `birthDate` BirthDate — unresolved $ref
          - `nationalIdentificationNumber` NationalIdentificationNumber — unresolved $ref
          - `email` Email — unresolved $ref
          - `phone` Phone — unresolved $ref
          - `companyName` CompanyName — unresolved $ref
          - `billToAddressOne` BillToAddressOne — unresolved $ref
          - `billToAddressTwo` BillToAddressTwo — unresolved $ref
          - `billToCity` BillToCity — unresolved $ref
          - `billToState` BillToState — unresolved $ref
          - `billToPostal` BillToPostal — unresolved $ref
          - `billToCountry` BillToCountry — unresolved $ref
          - `billToPhone` BillToPhone — unresolved $ref
          - `shipToAddressOne` ShipToAddressOne — unresolved $ref
          - `shipToAddressTwo` ShipToAddressTwo — unresolved $ref
          - `shipToCity` ShipToCity — unresolved $ref
          - `shipToState` ShipToState — unresolved $ref
          - `shipToPostal` ShipToPostal — unresolved $ref
          - `shipToCountry` ShipToCountry — unresolved $ref
          - `shipToPhone` ShipToPhone — unresolved $ref
          - `createdAtDate` CreatedAtDate — unresolved $ref
        - `settlementCurrency` SettlementCurrency — unresolved $ref
      - `processingOptions` ProcessingOptions, required — unresolved $ref
      - `isAuthOnly` boolean — Set to true to run an auth only transaction. (This applies to the initial transaction and scheduled transactions.)<br/> <!-- theme:info --> > #### Note > Auth only transactions must be captured in your own code base. To authorize and capture scheduled transactions set this value to `false`, or update it to `false` after the initial transaction has been processed
      - `shouldUpdateCard` ShouldUpdateCard — unresolved $ref
    - `schedule` object — The schedule for recurring transactions.
      - `interval` 'day' | 'week' | 'month' | 'year' — **Conditionally required**. The schedule's time period. If not specified in the request, the system uses `month` as the default.
      - `intervalCount` integer — **Conditionally required**. The number of times the `interval` will pass between transactions. The maximum schedule interval length is one year. An `intervalCount` of `0` means that only one transaction runs. This value must be greater than or equal to 0. If not specified in the request, the system defaults to `0`. See the [subscription schedule examples table](https://docs.nexiopay.com/docs/getting-started-with-subscriptions#subscription-schedule-examples-table) for examples of how the interval and interval count create the subscription schedule.
      - `duration` integer — The anticipated number of transactions that may run for the subscription. This value is for information purposes because the system does not automatically end the subscription after the given number of transactions. Instead, use the `dateCancelAfter` parameter to end the subscription automatically. If not included in the request, this value is not returned and the subscription runs indefinitely until the date indicated by `dateCancelAfter`, if a payment gets declined more than once, or manually ended.
      - `dateCancelAfter` DateCancelAfter — unresolved $ref
      - `initialBillingAmount` InitialBillingAmount — unresolved $ref
      - `dateInitialBillingEnd` DateInitialBillingEnd — unresolved $ref
  - object — Payment plans set recurring transactions to run until the pre-specified balance is paid in full. To create a payment plan, include at least a currency, saved card token, payment type, customer reference number, balance, interval, and interval count. If you don't have an amount, you must include a duration (number of payments); if you don't have a duration, you must include an amount.
    - `payment` object, required — Payment information for the initial transaction and for recurring (scheduled) payment plan transactions.
      - `tokenex` Tokenex, required — unresolved $ref
      - `data` object, required — Transaction and customer data for a payment plan.
        - `currency` Currency, required — unresolved $ref
        - `customer` Customer, required — unresolved $ref
        - `amount` number — **Conditionally required**. The transaction amount to charge during the initial and each recurring transaction for the payment plan. Either this parameter or `schedule.duration` is required. When not included, the system calculates the amount by dividing the `schedule.balance` by the `schedule.duration`. When this is included and the `schedule.duration` is not, the system calculates the duration by dividing the `schedule.balance` by `payment.data.amount`. The maximum value has 16 digits total, including up to two of those digits after the decimal point.
        - `settlementCurrency` SettlementCurrency — unresolved $ref
      - `processingOptions` ProcessingOptions, required — unresolved $ref
      - `isAuthOnly` IsAuthOnly — unresolved $ref
      - `shouldUpdateCard` ShouldUpdateCard — unresolved $ref
    - `schedule` object, required — The schedule for payment plan transactions. The schedule cannot later be changed for an existing payment plan.
      - `interval` 'day' | 'week' | 'month' | 'year', required — The schedule's time period.
      - `intervalCount` integer, required — The number of times the `interval` will pass between transactions. The maximum payment plan interval length is one year. An `intervalCount` of `0` means that only one transaction runs. This value must be greater than or equal to 0. See the [subscription schedule examples table](https://docs.nexiopay.com/docs/getting-started-with-subscriptions#subscription-schedule-examples-table) for examples of how the interval and interval count create the payment plan schedule.
      - `balance` integer, required — The total amount to be charged over the course of the pay plan.
      - `duration` integer — **Conditionally required**. The anticipated duration of the pay plan. This is the number of transactions that you plan to run before the pay plan terminates. Either this parameter or `payment.data.amount` is required. When not included, the system calculates the duration by dividing the `schedule.balance` by `payment.data.amount`. When this is included and the `payment.data.amount` is not, the system calculates the amount by dividing the `schedule.balance` by the `schedule.duration`. This value is for information purposes or to determine the amount for each transaction. The balance and payment amount actually determine the total number of transactions that run. **Note:** It is possible for the `dateCancelAfter` date to stop the payment plan before the payment plan completes, leaving a balance. Therefore, you should be careful when including it.
      - `dateCancelAfter` DateCancelAfter — unresolved $ref
      - `initialBillingAmount` InitialBillingAmount — unresolved $ref
      - `dateInitialBillingEnd` DateInitialBillingEnd — unresolved $ref

## Response `200`

Success

- object — Details on the subscription schedule
  - `customerRef` string — Customer identifier. This value cannot later be changed for an existing subscription or payment plan.
  - `active` boolean — Indicates whether the subscription or payment plan is currently active. When `false`, this indicates that the system will not attempt another transaction.
  - `accountId` string — The Nexio account number of the user who created the subscription or payment plan. You can also get this value from the response for the [Who am I](https://docs.nexiopay.com/reference/whoami) endpoint.
  - `id` string — The unique subscription identifier. You may want to save this value to your system for future tracking and management purposes.
  - `payment` object — Payment information for future payments. To update this information, send a request to the [Update Subscription](https://docs.nexiopay.com/reference/updatesubscription) endpoint
    - `tokenex` object — Card or echeck token information. Card or echeck tokens can be used to process through any MID on your account. They are not restricted to a specific merchant account or currency.
      - `token` string — The card token that was used to process the initial transaction and that will be used for future transactions.
      - `firstSix` string — The first six digits of the card number.
      - `lastFour` string — The last four digits of the card number.
    - `data` object — Transaction and customer data.
      - `amount` Amount — unresolved $ref
      - `currency` Currency — unresolved $ref
      - `settlementCurrency` SettlementCurrency — unresolved $ref
      - `customer` object — Customer information returned when checking fraud or from the processing gateway, when applicable.
        - `customerRef` CustomerRef — unresolved $ref
        - `orderNumber` OrderNumber — unresolved $ref
        - `orderDate` OrderDate — unresolved $ref
        - `invoice` Invoice — unresolved $ref
        - `firstName` FirstName — unresolved $ref
        - `lastName` LastName — unresolved $ref
        - `birthDate` string — The customer's date of birth. The format returned matches the format used in the request that [created the subscription](https://docs.nexiopay.com/reference/createsubscription).
        - `nationalIdentificationNumber` string — The identification number issued by a national authority to the individual person, such as social security number. The following list provides information about potential identification sources: - **Brazil:** CPF or CNPJ. - **Chile:** RUN for individual users and RUT for companies - **Colombia:** For individual users CC (Cédula de ciudadanía), CE (Cédula de Extranjería) and TI (Targeta de Identidad) and for companies NIT - **Mexico:** RFC and CURP (individual user) and RFC (legal entity/company)
        - `email` string — The customer's email address.
        - `phone` string — The customer's phone number.
        - `companyName` string — The name of the company associated with the customer account, if applicable.
        - `billToAddressOne` BillToAddressOne — unresolved $ref
        - `billToAddressTwo` BillToAddressTwo — unresolved $ref
        - `billToCity` BillToCity — unresolved $ref
        - `billToState` BillToState — unresolved $ref
        - `billToPostal` BillToPostal — unresolved $ref
        - `billToCountry` BillToCountry — unresolved $ref
        - `billToPhone` BillToPhone — unresolved $ref
        - `shipToAddressOne` ShipToAddressOne — unresolved $ref
        - `shipToAddressTwo` ShipToAddressTwo — unresolved $ref
        - `shipToCity` ShipToCity — unresolved $ref
        - `shipToState` ShipToState — unresolved $ref
        - `shipToPostal` ShipToPostal — unresolved $ref
        - `shipToCountry` ShipToCountry — unresolved $ref
        - `shipToPhone` ShipToPhone — unresolved $ref
        - `createdAtDate` string — The date the customer was created in your system. The format returned matches the format used in the request.
    - `shouldUpdateCard` boolean — The card's account updater [enrollment tag](https://docs.nexiopay.com/docs/checking-a-cards-enrollment-tag).
    - `isAuthOnly` boolean — Will be `true` if the current and future transactions are set to authorize only. Will be `false` if they are set to authorize and capture.
    - `processingOptions` object — Processing options used in the current and for future transactions.
      - `paymentType` 'initialScheduled' | 'initialUnscheduled' | 'scheduled' | 'unscheduledCit' | 'unscheduledMit' | 'initialMoto' — Indicates the type of transaction that was processed. The value is used to flag initial and subsequent transactions, especially for [3D Secure transactions](https://docs.nexiopay.com/docs/3d-secure-1). For more information about this parameter and what the values mean, see the [Payment type (paymentType) reference table](https://docs.nexiopay.com/docs/constant-transaction-values#payment-type-paymenttype) in Guides.
      - `paymentOptionTag` string — Indicates the custom value used to route transactions to a specific gateway or merchant account.
      - `saveCardToken` boolean — Indicates whether the system saves a card token when each transaction runs.
      - `retryOnSoftDecline` boolean — Displays whether the transaction is enabled or disabled for [decline recovery](https://docs.nexiopay.com/docs/recover). When the value is `true`, the transaction is enabled for decline recovery. Eligible declined transactions are automatically scheduled for retry according to the recommendation engine.
      - `checkFraud` boolean — Indicates whether the transaction was sent to Kount for fraud prevention. For additional information about fraud prevention, see [Kount verification](https://docs.nexiopay.com/docs/kount-verification).
      - `shouldUseFingerprint` boolean — Indicates whether a [device fingerprint](https://docs.nexiopay.com/docs/device-fingerprinting) was created while saving a card token as part of the request.
      - `check3ds` boolean — Indicates whether your system is equipped to handle a 3DS (three-domain secure) redirect flow being returned from the request.
      - `customerRedirectUrl` string — The URL to which the customer will be redirected after completing a [3D Secure](https://docs.nexiopay.com/docs/using-3ds-to-run-transactions) authentication. The customer will be sent here whether the transaction succeeds or fails.
      - `merchantId` MerchantId — unresolved $ref
      - `verboseResponse` boolean — Indicates whether additional information is included in the response.
  - `schedule` object — The schedule for recurring transactions.
    - `scheduleType` integer — Type of schedule, given as an integer for whether the schedule is for a subscription (10) or a payment plan (20). For more information on how recurring billing works, see the [Recurring billing overview](https://docs.nexiopay.com/docs/recurring-billing-overview) in Guides.
    - `interval` 'day' | 'week' | 'month' | 'year' — The schedule's time period. For subscriptions, will be `month` if not specified in the request.
    - `intervalCount` integer — The number of times the `interval` will pass between transactions. An `intervalCount` of `0` means that only one transaction runs. See the [subscription schedule examples table](https://docs.nexiopay.com/docs/getting-started-with-subscriptions#subscription-schedule-examples-table) for examples of how the interval and interval count create the subscription schedule.
    - `duration` integer — The anticipated number of transactions that may run for the subscription or pay plan, as defined when it was created. For a subscription, if returned, this value is informational because the system does not automatically end the subscription after the given number of transactions. Instead, the system uses the `dateCancelAfter` parameter to end the subsription automatically. If not included in the request to create a subscription, this value is not returned and the subscription may run indefinitely. For a payment plan, when this parameter is included in the request and the `payment.data.amount` is not, the system calculates the amount by dividing the `schedule.balance` by the `schedule.duration`. When this parameter and amount are both included, then the system ignores it unless the payment plan cannot be completed with the given balance, duration, and scheduled payment amount, in which case the API returns an error. if not included in the request, this value is calculated by dividing the `schedule.balance` by `payment.data.amount`. For the subscription or payment plan this returned value is for information purposes. Any of the following actually determine the total number of transactons that run: - The date indicated in the `dateCancelAfter` parameter happens if it was included in the request to create the subscription or payment plan. - When a payment gets declined more than once for a subscription or payment plan. - If the subscription or payment plan gets canceled manually. - For a payment plan, the balance and payment amount bring the balance to zero (0).
    - `dateCancelAfter` string, date — The date the subscription or pay plan ends. If the `dateNextRun` parameter (from the response) occurs after the `dateCancelAfter` date, the subscription is set to be inactive (`active` is set to `false`). The value is returned as a four-digit year, two-digit month and day, separated with hyphens: YYYY-MM-DD. For example, `2024-08-26`. If not included in the request, this value is not returned.
    - `initialBalance` number — The starting balance of the pay plan. For subscription plans, the system returns `null` as the value.
    - `balance` number — The current balance of the pay plan. For subscription plans, the system returns `null` as the value.
    - `initialBillingAmount` number — The transaction amount during the initial billing period. This indicates a discounted amount from the regular subscription (such as a trial period). This amount gets used for any transactions that occur before the `dateInitialBillingEnd`. After that date, the value from `payment.data.amount` gets used for transactions. If not included in the request, the system returns `null`.
    - `dateInitialBillingEnd` string, date — The date at which the initial billing period ends. This indicates a discounted amount from the regular subscription (such as a trial period). Transactions prior to this date use the value from the `initialBillingAmount`. Transactions after this date use the value from `payment.data.amount`. If this parameter is set to the current date or earlier, future payments run using the `payment.data.amount` value. The value is returned as a four-digit year, two-digit month and day, separated with hyphens: YYYY-MM-DD. For example, `2024-08-26`. If not included in the request, this value is not returned.
  - `userName` string — The username of the account through which the subscription was created.
  - `dateCreated` string — The date and time the subscription or payment plan was created, formatted as an [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html) date expressed in UTC.
  - `dateLastModified` string — The date and time the subscription or payment plan was last modified, formatted as an [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html) date expressed in UTC.
  - `dateLastRun` string — The date and time a payment in this subscription or payment plan was last run, formatted as an [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html) date expressed in UTC.
  - `dateNextRun` string — The date a payment in this subscription is next scheduled to run, formatted as YYYY-MM-DD.
  - `paymentResult` object — The response from a successful payment. In the case of a subscription, this is the response of the initial transaction.
    - `id` Id — unresolved $ref
    - `merchantId` MerchantId — unresolved $ref
    - `authCode` AuthCode — unresolved $ref
    - `amount` Amount — unresolved $ref
    - `currency` Currency — unresolved $ref
    - `transactionDate` TransactionDate — unresolved $ref
    - `transactionType` TransactionType — unresolved $ref
    - `transactionStatus` TransactionStatus — unresolved $ref
    - `card` object — Card information from the transaction.
      - `cardHolder` CardHolderName — unresolved $ref
      - `cardNumber` CardNumber — unresolved $ref
      - `expirationMonth` ExpirationMonth — unresolved $ref
      - `expirationYear` ExpirationYear — unresolved $ref
    - `token` Token — unresolved $ref
    - `data` Data — unresolved $ref
    - `kountResponse` KountResponse — unresolved $ref
    - `gatewayResponse` GatewayResponse — unresolved $ref
    - `asyncTraceId` AsyncTraceId — unresolved $ref
    - `status` Status — unresolved $ref
    - `message` Message — unresolved $ref
    - `redirectUrl` RedirectUrl — unresolved $ref
    - `random` RandomNnnn — unresolved $ref
  - `lastPaymentStatus` string — Will be either `success` or `failure` to indicate whether the last attempted transaction for the subscription or payment plan was successful.
  - `lastSuccessfulPaymentDate` string — The date and time a payment in this subscription or payment plan was last successfully run, formatted as an [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html) date expressed in UTC.
  - `exp` integer — This parameter is for Nexio internal use only. It is only returned in requests made in the Sandbox environment.
  - `random` RandomNnnn — unresolved $ref

## Other responses

- `401` — Unauthorized. For help with this error and other error codes, see [Common errors](https://docs.nexiopay.com/docs/common-errors) in the Guides area.

---

[API](https://skmtc.dev/nexiopay/apis/payments-api-reference.md) · [All operations](https://skmtc.dev/nexiopay/apis/payments-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nexiopay/payments-api-reference/revisions/b414b73979e5/schema)
