Endpoint Update an Invoice Item
Name
update_invoice_item
Description
Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed. [API reference]
Parameters
| Parameter | Required | Options | ||||||
|---|---|---|---|---|---|---|---|---|
|
Name:
Label: Invoice Item Id Update an invoice item. |
YES | |||||||
|
Name:
Label: Amount The integer amount in cents of the charge to be applied to the upcoming invoice. Passing in a negative amount will reduce the amount_due on the invoice. |
||||||||
|
Name:
Label: Description An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. |
||||||||
|
Name:
Label: Period Start The start of the period. |
||||||||
|
Name:
Label: Period End The end of the period, which must be greater than or equal to the start. |
||||||||
|
Name:
Label: Price Id The Id of the price object. |
||||||||
|
Name:
Label: Discountable |
|
|||||||
|
Name:
Label: Discounts Coupon Id |
||||||||
|
Name:
Label: Discounts Discount Id |
||||||||
|
Name:
Label: Price Data Currency Three-letter ISO currency code, in lowercase. |
||||||||
|
Name:
Label: Price Data Product The Id of the product that this price will belong to. |
||||||||
|
Name:
Label: Price Data Unit Amount Decimal Same as unit_amount, but accepts a decimal value in cents with at most 12 decimal places. Only one of unit_amount and unit_amount_decimal can be set. |
||||||||
|
Name:
Label: Price Data Unit Amount A positive integer in cents (or 0 for a free price) representing how much to charge. Only one of unit_amount and unit_amount_decimal can be set. |
||||||||
|
Name:
Label: Quantity Non-negative integer. The quantity of units for the invoice item. |
||||||||
|
Name:
Label: Tax Rates The tax rates which apply to the invoice item. When set, the default_tax_rates on the invoice do not apply to this invoice item. |
||||||||
|
Name:
Label: Unit Amount Decimal Same as unit_amount, but accepts a decimal value in cents with at most 12 decimal places. Only one of unit_amount and unit_amount_decimal can be set. |
||||||||
|
Name:
Label: Unit Amount The integer unit amount in cents of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. Passing in a negative unit_amount will reduce the amount_due on the invoice. |
Output Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
|---|---|---|---|---|
| Id |
DT_WSTR
|
nvarchar(255)
|
255 | |
| Object |
DT_WSTR
|
nvarchar(100)
|
100 | |
| AccountCountry |
DT_WSTR
|
nvarchar(100)
|
100 | |
| AccountName |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| AccountTaxId |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| AmountDue |
DT_I8
|
bigint
|
||
| AmountPaid |
DT_I8
|
bigint
|
||
| AmountRemaining |
DT_I8
|
bigint
|
||
| ApplicationFeeAmount |
DT_I8
|
bigint
|
||
| AttemptCount |
DT_I8
|
bigint
|
||
| Attempted |
DT_BOOL
|
bit
|
||
| AutoAdvance |
DT_BOOL
|
bit
|
||
| BillingReason |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| Charge |
DT_WSTR
|
nvarchar(255)
|
255 | |
| CollectionMethod |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| Created |
DT_DBTIMESTAMP
|
datetime
|
||
| Currency |
DT_WSTR
|
nvarchar(100)
|
100 | |
| CustomFields |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| CustomerId |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| CustomerAddressCity |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| CustomerAddressCountry |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| CustomerAddressLine1 |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| CustomerAddressLine2 |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| CustomerAddressPostalCode |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| CustomerAddressState |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| CustomerEmail |
DT_WSTR
|
nvarchar(100)
|
100 | |
| CustomerName |
DT_WSTR
|
nvarchar(100)
|
100 | |
| CustomerPhone |
DT_WSTR
|
nvarchar(100)
|
100 | |
| CustomerShippingAddressCity |
DT_WSTR
|
nvarchar(100)
|
100 | |
| CustomerShippingAddressCountry |
DT_WSTR
|
nvarchar(100)
|
100 | |
| CustomerShippingAddressLine1 |
DT_WSTR
|
nvarchar(100)
|
100 | |
| CustomerShippingAddressLine2 |
DT_WSTR
|
nvarchar(100)
|
100 | |
| CustomerShippingAddressPostalCode |
DT_WSTR
|
nvarchar(100)
|
100 | |
| CustomerShippingAddressState |
DT_WSTR
|
nvarchar(100)
|
100 | |
| CustomerShippingName |
DT_WSTR
|
nvarchar(100)
|
100 | |
| CustomerShippingPhone |
DT_WSTR
|
nvarchar(100)
|
100 | |
| TaxExempt |
DT_WSTR
|
nvarchar(100)
|
100 | |
| TaxIDs |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| DefaultPaymentMethod |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| DefaultSource |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| DefaultTaxRates |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| Description |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| Discount |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| Discounts |
DT_WSTR
|
nvarchar(100)
|
100 | |
| DueDate |
DT_DBTIMESTAMP
|
datetime
|
||
| EndingBalance |
DT_I8
|
bigint
|
||
| Footer |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| HostedInvoiceURL |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| InvoicePDF |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| LastFinalizationError |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| LinesObject |
DT_WSTR
|
nvarchar(100)
|
100 | |
| LinesData |
DT_NTEXT
|
nvarchar(MAX)
|
||
| LinesHasMore |
DT_BOOL
|
bit
|
||
| LinesTotalCount |
DT_I8
|
bigint
|
||
| LinesUrl |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| LiveMode |
DT_BOOL
|
bit
|
||
| NextPaymentAttempt |
DT_DBTIMESTAMP
|
datetime
|
||
| Number |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| Paid |
DT_BOOL
|
bit
|
||
| PaymentIntent |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| PeriodEnd |
DT_DBTIMESTAMP
|
datetime
|
||
| PeriodStart |
DT_DBTIMESTAMP
|
datetime
|
||
| PostPaymentCreditNotesAmount |
DT_I8
|
bigint
|
||
| PrepaymentCreditNotesAmount |
DT_I8
|
bigint
|
||
| ReceiptNumber |
DT_WSTR
|
nvarchar(255)
|
255 | |
| StartingBalance |
DT_I8
|
bigint
|
||
| StatementDesctiption |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| Status |
DT_WSTR
|
nvarchar(100)
|
100 | |
| StatusTransitionsFinalizedAt |
DT_DBTIMESTAMP
|
datetime
|
||
| StatusTransitionsMarkedUncollectibleAt |
DT_DBTIMESTAMP
|
datetime
|
||
| StatusTransitionsPaidAt |
DT_DBTIMESTAMP
|
datetime
|
||
| StatusTransitionsVoidedAt |
DT_DBTIMESTAMP
|
datetime
|
||
| SubscriptionId |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| Subtotal |
DT_I8
|
bigint
|
||
| Tax |
DT_I8
|
bigint
|
||
| Total |
DT_I8
|
bigint
|
||
| TotalDiscountAmounts |
DT_WSTR
|
nvarchar(100)
|
100 | |
| TotalTaxAmounts |
DT_WSTR
|
nvarchar(100)
|
100 | |
| TransferData |
DT_WSTR
|
nvarchar(1020)
|
1020 | |
| WebhooksDeliveredAt |
DT_DBTIMESTAMP
|
datetime
|
Input Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
|---|---|---|---|---|
| Id |
DT_WSTR
|
nvarchar(4000)
|
4000 |
Examples
SSIS
Use Stripe Connector in API Source or in API Destination SSIS Data Flow components to read or write data.
API Source
| Required Parameters | |
|---|---|
| Invoice Item Id | Fill-in the parameter... |
| Optional Parameters | |
| Amount | |
| Description | |
| Period Start | |
| Period End | |
| Price Id | |
| Discountable | |
| Discounts Coupon Id | |
| Discounts Discount Id | |
| Price Data Currency | |
| Price Data Product | |
| Price Data Unit Amount Decimal | |
| Price Data Unit Amount | |
| Quantity | |
| Tax Rates | |
| Unit Amount Decimal | |
| Unit Amount | |
API Destination
| Required Parameters | |
|---|---|
| Invoice Item Id | Fill-in the parameter... |
| Optional Parameters | |
| Amount | |
| Description | |
| Period Start | |
| Period End | |
| Price Id | |
| Discountable | |
| Discounts Coupon Id | |
| Discounts Discount Id | |
| Price Data Currency | |
| Price Data Product | |
| Price Data Unit Amount Decimal | |
| Price Data Unit Amount | |
| Quantity | |
| Tax Rates | |
| Unit Amount Decimal | |
| Unit Amount | |
ODBC application
Use these SQL queries in your ODBC application data source:
Update an invoice item
SELECT * FROM update_invoice_item
WHERE Id = 'abcd-1234-id'
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Update an invoice item
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM update_invoice_item
WHERE Id = ''abcd-1234-id''';
EXEC (@MyQuery) AT [LS_TO_STRIPE_IN_GATEWAY];