NAME

Net::API::Stripe::Billing::Invoice::BalanceSettings - A Stripe Customer Invoice Balance Transaction Upon Voiding

SYNOPSIS

my $obj = $sub->invoice_customer_balance_settings({
    # Boolean
    consume_applied_balance_on_void => 1,
});

VERSION

v0.100.0

DESCRIPTION

This is instantiated by method invoice_customer_balance_settings from Net::API::Stripe::Billing::Subscription

CONSTRUCTOR

new( %ARG )

Creates a new Net::API::Stripe::Billing::Invoice::BalanceSettings object. It may also take an hash like arguments, that also are method of the same name.

METHODS

consume_applied_balance_on_void

Controls whether a customer balance applied to this invoice should be consumed and not credited or debited back to the customer if voided.

Stripe support explained me: "One can void invoices only when they are in either the open or the uncollectible status but never when they are paid status. So voiding an invoice does not result in issuing a credit.

When an invoice generated by the subscription is voided, the invoice is treated as zero-value and the customer balance isn't be applied."

API SAMPLE

{
  "id": "sub_fake124567890",
  "object": "subscription",
  "application_fee_percent": null,
  "billing_cycle_anchor": 1572739659,
  "billing_thresholds": null,
  "cancel_at_period_end": false,
  "canceled_at": null,
  "collection_method": "charge_automatically",
  "created": 1572739659,
  "current_period_end": 1575331659,
  "current_period_start": 1572739659,
  "customer": "cus_fake124567890",
  "days_until_due": null,
  "default_payment_method": null,
  "default_source": null,
  "default_tax_rates": [

  ],
  "discount": null,
  "ended_at": null,
  "invoice_customer_balance_settings": {
    "consume_applied_balance_on_void": true
  },
  "items": {
    "object": "list",
    "data": [
      {
        "id": "si_fake124567890",
        "object": "subscription_item",
        "billing_thresholds": null,
        "created": 1572739659,
        "metadata": {
        },
        "plan": {
          "id": "plan_fake124567890",
          "object": "plan",
          "active": true,
          "aggregate_usage": null,
          "amount": 999,
          "amount_decimal": "999",
          "billing_scheme": "per_unit",
          "created": 1572736765,
          "currency": "usd",
          "interval": "month",
          "interval_count": 1,
          "livemode": false,
          "metadata": {
          },
          "nickname": null,
          "product": "prod_fake124567890",
          "tiers": null,
          "tiers_mode": null,
          "transform_usage": null,
          "trial_period_days": null,
          "usage_type": "licensed"
        },
        "quantity": 1,
        "subscription": "sub_fake124567890",
        "tax_rates": [

        ]
      }
    ],
    "has_more": false,
    "url": "/v1/subscription_items?subscription=sub_fake124567890"
  },
  "latest_invoice": null,
  "livemode": false,
  "metadata": {
  },
  "next_pending_invoice_item_invoice": null,
  "pending_invoice_item_interval": null,
  "pending_setup_intent": null,
  "plan": {
    "id": "plan_fake124567890",
    "object": "plan",
    "active": true,
    "aggregate_usage": null,
    "amount": 999,
    "amount_decimal": "999",
    "billing_scheme": "per_unit",
    "created": 1572736765,
    "currency": "usd",
    "interval": "month",
    "interval_count": 1,
    "livemode": false,
    "metadata": {
    },
    "nickname": null,
    "product": "prod_fake124567890",
    "tiers": null,
    "tiers_mode": null,
    "transform_usage": null,
    "trial_period_days": null,
    "usage_type": "licensed"
  },
  "quantity": 1,
  "start_date": 1572739659,
  "status": "active",
  "tax_percent": null,
  "trial_end": null,
  "trial_start": null
}

HISTORY

v0.1

Initial version

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

Stripe API documentation:

https://stripe.com/docs/api/subscriptions/object?lang=node#subscription_object-invoice_customer_balance_settings, https://stripe.com/docs/billing/invoices/workflow#void, https://stripe.com/docs/billing/customer/balance#customer-balance

COPYRIGHT & LICENSE

Copyright (c) 2019-2020 DEGUEST Pte. Ltd.

You can use, copy, modify and redistribute this package and associated files under the same terms as Perl itself.