naftiko: 1.0.0-alpha2 info: label: Stripe Invoice API — Upcoming description: 'Stripe Invoice API — Upcoming. 2 operations. Lead operation: Stripe Get Invoices Upcoming. Self-contained Naftiko capability covering one Stripe business surface.' tags: - Stripe - Upcoming created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: STRIPE_API_KEY: STRIPE_API_KEY capability: consumes: - type: http namespace: invoice-upcoming baseUri: https://api.stripe.com description: Stripe Invoice API — Upcoming business capability. Self-contained, no shared references. resources: - name: v1-invoices-upcoming path: /v1/invoices/upcoming operations: - name: getinvoicesupcoming method: GET description: Stripe Get Invoices Upcoming outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: automatic_tax in: query type: object description: Settings for automatic tax lookup for this invoice preview. - name: coupon in: query type: string description: The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription wi - name: currency in: query type: string description: The currency to preview this invoice in. Defaults to that of `customer` if not specified. - name: customer in: query type: string description: The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscri - name: customer_details in: query type: object description: 'Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, ' - name: discounts in: query type: string description: The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for cou - name: expand in: query type: array description: Specifies which fields in the response should be expanded. - name: invoice_items in: query type: array description: List of invoice items to add or update in the upcoming invoice preview. - name: schedule in: query type: string description: The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. - name: subscription in: query type: string description: The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will prev - name: subscription_billing_cycle_anchor in: query type: string description: For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to det - name: subscription_cancel_at in: query type: string description: A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enable - name: subscription_cancel_at_period_end in: query type: boolean description: Boolean indicating whether this subscription should cancel at the end of the current period. - name: subscription_cancel_now in: query type: boolean description: This simulates the subscription being canceled or expired immediately. - name: subscription_default_tax_rates in: query type: string description: If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line it - name: subscription_items in: query type: array description: A list of up to 20 subscription items, each with an attached price. - name: subscription_proration_behavior in: query type: string description: Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans - name: subscription_proration_date in: query type: integer description: If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was don - name: subscription_resume_at in: query type: string description: For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. - name: subscription_start_date in: query type: integer description: Date a subscription is intended to start (can be future or past). - name: subscription_trial_end in: query type: string description: If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is - name: subscription_trial_from_plan in: query type: boolean description: Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaul - name: body in: body type: object description: Request body (JSON). required: false - name: v1-invoices-upcoming-lines path: /v1/invoices/upcoming/lines operations: - name: getinvoicesupcominglines method: GET description: Stripe Get Invoices Upcoming Lines outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: automatic_tax in: query type: object description: Settings for automatic tax lookup for this invoice preview. - name: coupon in: query type: string description: The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription wi - name: currency in: query type: string description: The currency to preview this invoice in. Defaults to that of `customer` if not specified. - name: customer in: query type: string description: The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscri - name: customer_details in: query type: object description: 'Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, ' - name: discounts in: query type: string description: The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for cou - name: ending_before in: query type: string description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 ob - name: expand in: query type: array description: Specifies which fields in the response should be expanded. - name: invoice_items in: query type: array description: List of invoice items to add or update in the upcoming invoice preview. - name: limit in: query type: integer description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. - name: schedule in: query type: string description: The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. - name: starting_after in: query type: string description: A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 o - name: subscription in: query type: string description: The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will prev - name: subscription_billing_cycle_anchor in: query type: string description: For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to det - name: subscription_cancel_at in: query type: string description: A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enable - name: subscription_cancel_at_period_end in: query type: boolean description: Boolean indicating whether this subscription should cancel at the end of the current period. - name: subscription_cancel_now in: query type: boolean description: This simulates the subscription being canceled or expired immediately. - name: subscription_default_tax_rates in: query type: string description: If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line it - name: subscription_items in: query type: array description: A list of up to 20 subscription items, each with an attached price. - name: subscription_proration_behavior in: query type: string description: Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans - name: subscription_proration_date in: query type: integer description: If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was don - name: subscription_resume_at in: query type: string description: For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. - name: subscription_start_date in: query type: integer description: Date a subscription is intended to start (can be future or past). - name: subscription_trial_end in: query type: string description: If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is - name: subscription_trial_from_plan in: query type: boolean description: Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaul - name: body in: body type: object description: Request body (JSON). required: false authentication: type: bearer token: '{{env.STRIPE_API_KEY}}' exposes: - type: rest namespace: invoice-upcoming-rest port: 8080 description: REST adapter for Stripe Invoice API — Upcoming. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/v1/invoices/upcoming name: v1-invoices-upcoming description: REST surface for v1-invoices-upcoming. operations: - method: GET name: getinvoicesupcoming description: Stripe Get Invoices Upcoming call: invoice-upcoming.getinvoicesupcoming with: automatic_tax: rest.automatic_tax coupon: rest.coupon currency: rest.currency customer: rest.customer customer_details: rest.customer_details discounts: rest.discounts expand: rest.expand invoice_items: rest.invoice_items schedule: rest.schedule subscription: rest.subscription subscription_billing_cycle_anchor: rest.subscription_billing_cycle_anchor subscription_cancel_at: rest.subscription_cancel_at subscription_cancel_at_period_end: rest.subscription_cancel_at_period_end subscription_cancel_now: rest.subscription_cancel_now subscription_default_tax_rates: rest.subscription_default_tax_rates subscription_items: rest.subscription_items subscription_proration_behavior: rest.subscription_proration_behavior subscription_proration_date: rest.subscription_proration_date subscription_resume_at: rest.subscription_resume_at subscription_start_date: rest.subscription_start_date subscription_trial_end: rest.subscription_trial_end subscription_trial_from_plan: rest.subscription_trial_from_plan body: rest.body outputParameters: - type: object mapping: $. - path: /v1/v1/invoices/upcoming/lines name: v1-invoices-upcoming-lines description: REST surface for v1-invoices-upcoming-lines. operations: - method: GET name: getinvoicesupcominglines description: Stripe Get Invoices Upcoming Lines call: invoice-upcoming.getinvoicesupcominglines with: automatic_tax: rest.automatic_tax coupon: rest.coupon currency: rest.currency customer: rest.customer customer_details: rest.customer_details discounts: rest.discounts ending_before: rest.ending_before expand: rest.expand invoice_items: rest.invoice_items limit: rest.limit schedule: rest.schedule starting_after: rest.starting_after subscription: rest.subscription subscription_billing_cycle_anchor: rest.subscription_billing_cycle_anchor subscription_cancel_at: rest.subscription_cancel_at subscription_cancel_at_period_end: rest.subscription_cancel_at_period_end subscription_cancel_now: rest.subscription_cancel_now subscription_default_tax_rates: rest.subscription_default_tax_rates subscription_items: rest.subscription_items subscription_proration_behavior: rest.subscription_proration_behavior subscription_proration_date: rest.subscription_proration_date subscription_resume_at: rest.subscription_resume_at subscription_start_date: rest.subscription_start_date subscription_trial_end: rest.subscription_trial_end subscription_trial_from_plan: rest.subscription_trial_from_plan body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: invoice-upcoming-mcp port: 9090 transport: http description: MCP adapter for Stripe Invoice API — Upcoming. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: stripe-get-invoices-upcoming description: Stripe Get Invoices Upcoming hints: readOnly: true destructive: false idempotent: true call: invoice-upcoming.getinvoicesupcoming with: automatic_tax: tools.automatic_tax coupon: tools.coupon currency: tools.currency customer: tools.customer customer_details: tools.customer_details discounts: tools.discounts expand: tools.expand invoice_items: tools.invoice_items schedule: tools.schedule subscription: tools.subscription subscription_billing_cycle_anchor: tools.subscription_billing_cycle_anchor subscription_cancel_at: tools.subscription_cancel_at subscription_cancel_at_period_end: tools.subscription_cancel_at_period_end subscription_cancel_now: tools.subscription_cancel_now subscription_default_tax_rates: tools.subscription_default_tax_rates subscription_items: tools.subscription_items subscription_proration_behavior: tools.subscription_proration_behavior subscription_proration_date: tools.subscription_proration_date subscription_resume_at: tools.subscription_resume_at subscription_start_date: tools.subscription_start_date subscription_trial_end: tools.subscription_trial_end subscription_trial_from_plan: tools.subscription_trial_from_plan body: tools.body outputParameters: - type: object mapping: $. - name: stripe-get-invoices-upcoming-lines description: Stripe Get Invoices Upcoming Lines hints: readOnly: true destructive: false idempotent: true call: invoice-upcoming.getinvoicesupcominglines with: automatic_tax: tools.automatic_tax coupon: tools.coupon currency: tools.currency customer: tools.customer customer_details: tools.customer_details discounts: tools.discounts ending_before: tools.ending_before expand: tools.expand invoice_items: tools.invoice_items limit: tools.limit schedule: tools.schedule starting_after: tools.starting_after subscription: tools.subscription subscription_billing_cycle_anchor: tools.subscription_billing_cycle_anchor subscription_cancel_at: tools.subscription_cancel_at subscription_cancel_at_period_end: tools.subscription_cancel_at_period_end subscription_cancel_now: tools.subscription_cancel_now subscription_default_tax_rates: tools.subscription_default_tax_rates subscription_items: tools.subscription_items subscription_proration_behavior: tools.subscription_proration_behavior subscription_proration_date: tools.subscription_proration_date subscription_resume_at: tools.subscription_resume_at subscription_start_date: tools.subscription_start_date subscription_trial_end: tools.subscription_trial_end subscription_trial_from_plan: tools.subscription_trial_from_plan body: tools.body outputParameters: - type: object mapping: $.