Skip to Content
Paycose Docs
Subscriptions

Subscriptions

The subscription_update_preview object

What updating a subscription would charge, worked out without changing anything.

Attributes

  • objectstringRequired

    String naming the object's type.

  • preview_availablebooleanRequired

    false when a provider bills the subscription: the amounts are then 0, and the difference is charged on the next invoice.

  • currencystringRequired

    Three-letter ISO 4217 currency code, in lowercase.

  • proration_behaviorstringRequired

    How the change is prorated: create_prorations or none.

  • proration_itemsarray of objectsRequired

    The proration lines the update would add.

    Show child attributes
    • proration_items.descriptionstringRequired

      What the line is for, as it would appear on the invoice.

    • proration_items.unit_amountintegerRequired

      Prorated amount per unit, in the smallest currency unit; negative for a credit.

    • proration_items.quantityintegerRequired

      Quantity the line charges or credits.

    • proration_items.amountintegerRequired

      The line's total, unit_amount × quantity, in the smallest currency unit; negative for a credit.

    • proration_items.product_idstringRequired

      ID of the product the line is for.

    • proration_items.product_price_idstringRequired

      ID of the price the line is for.

    • proration_items.period_starttimestampRequired

      Unix timestamp in seconds.

    • proration_items.period_endtimestampRequired

      Unix timestamp in seconds.

    • proration_items.currencystringRequired

      Three-letter ISO 4217 currency code, in lowercase.

  • amount_due_nowintegerRequired

    Net of the proration lines, in the smallest currency unit. Negative means a credit, applied to the next invoice rather than refunded.

  • next_invoice_subtotalintegerRequired

    Recurring cost of the new items for a full period, in the smallest currency unit, before taxes and fees.

  • next_billing_datetimestampNullable

    Unix timestamp in seconds.

  • current_period_starttimestampRequired

    Unix timestamp in seconds.

  • current_period_endtimestampRequired

    Unix timestamp in seconds.

  • next_invoiceobject (invoice)Nullable

    The next period's invoice with the change applied, priced as renewals bill it; omitted when a provider bills the subscription.