PUT /v2/invoices/{invoice_id}
Updates an invoice by modifying fields, clearing fields, or both. For most updates, you can use a sparse
Invoice
object to add fields or change values and use the fields_to_clear
field to specify fields to clear.
However, some restrictions apply. For example, you cannot change the order_id
or location_id
field and you
must provide the complete custom_fields
list to update a custom field. Published invoices have additional restrictions.
Servers
- https://connect.squareup.com
Path parameters
Name | Type | Required | Description |
---|---|---|---|
invoice_id |
String | Yes |
The ID of the invoice to update. |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
invoice |
Object | Yes |
Stores information about an invoice. You use the Invoices API to create and manage invoices. For more information, see Manage Invoices Using the Invoices API. |
invoice.description |
String | No |
The description of the invoice. This is visible to the customer receiving the invoice. |
invoice.public_url |
String | No |
The URL of the Square-hosted invoice page.
After you publish the invoice using the |
invoice.status |
String | No |
The status of the invoice. |
invoice.updated_at |
String | No |
The timestamp when the invoice was last updated, in RFC 3339 format. |
invoice.id |
String | No |
The Square-assigned ID of the invoice. |
invoice.location_id |
String | No |
The ID of the location that this invoice is associated with. If specified in a |
invoice.timezone |
String | No |
The time zone used to interpret calendar dates on the invoice, such as For example, a payment |
invoice.order_id |
String | No |
The ID of the order for which the invoice is created.
This field is required when creating an invoice, and the order must be in the To view the line items and other information for the associated order, call the RetrieveOrder endpoint using the order ID. |
invoice.invoice_number |
String | No |
A user-friendly invoice number. The value is unique within a location. If not provided when creating an invoice, Square assigns a value. It increments from 1 and padded with zeros making it 7 characters long (for example, 0000001 and 0000002). |
invoice.scheduled_at |
String | No |
The timestamp when the invoice is scheduled for processing, in RFC 3339 format. After the invoice is published, Square processes the invoice on the specified date, according to the delivery method and payment request settings. If the field is not set, Square processes the invoice immediately after it is published. |
invoice.next_payment_amount_money |
Object | No |
Represents an amount of money. |
invoice.next_payment_amount_money.amount |
Integer | No |
The amount of money, in the smallest denomination of the currency
indicated by |
invoice.next_payment_amount_money.currency |
String | No |
The type of currency, in ISO 4217 format. For example, the currency
code for US dollars is See Currency for possible values. |
invoice.version |
Integer | No |
The Square-assigned version number, which is incremented each time an update is committed to the invoice. |
invoice.title |
String | No |
The title of the invoice. |
invoice.delivery_method |
No | ||
invoice.payment_requests[] |
Array | No |
The payment schedule for the invoice, represented by one or more payment requests that define payment settings, such as amount due and due date. An invoice supports the following payment request combinations:
This field is required when creating an invoice. It must contain at least one payment request. All payment requests for the invoice must equal the total order amount. For more information, see Payment requests. Adding |
invoice.payment_requests[].rounding_adjustment_included_money |
Object | No |
Represents an amount of money. |
invoice.payment_requests[].rounding_adjustment_included_money.amount |
Integer | No |
The amount of money, in the smallest denomination of the currency
indicated by |
invoice.payment_requests[].rounding_adjustment_included_money.currency |
String | No |
The type of currency, in ISO 4217 format. For example, the currency
code for US dollars is See Currency for possible values. |
invoice.payment_requests[].uid |
String | No |
The Square-generated ID of the payment request in an invoice. |
invoice.payment_requests[].percentage_requested |
String | No |
Specifies the amount for the payment request in percentage:
You cannot specify this when the payment |
invoice.payment_requests[].fixed_amount_requested_money |
Object | No |
Represents an amount of money. |
invoice.payment_requests[].fixed_amount_requested_money.amount |
Integer | No |
The amount of money, in the smallest denomination of the currency
indicated by |
invoice.payment_requests[].fixed_amount_requested_money.currency |
String | No |
The type of currency, in ISO 4217 format. For example, the currency
code for US dollars is See Currency for possible values. |
invoice.payment_requests[].request_type |
String | No |
Identifies the payment request type. This type defines how the payment request amount is determined. This field is required to create a payment request. |
invoice.payment_requests[].automatic_payment_source |
String | No |
The payment method for an automatic payment. The default value is |
invoice.payment_requests[].computed_amount_money |
Object | No |
Represents an amount of money. |
invoice.payment_requests[].computed_amount_money.amount |
Integer | No |
The amount of money, in the smallest denomination of the currency
indicated by |
invoice.payment_requests[].computed_amount_money.currency |
String | No |
The type of currency, in ISO 4217 format. For example, the currency
code for US dollars is See Currency for possible values. |
invoice.payment_requests[].tipping_enabled |
Boolean | No |
If set to true, the Square-hosted invoice page (the This field is allowed only on the final payment request |
invoice.payment_requests[].reminders[] |
Array | No |
A list of one or more reminders to send for the payment request. |
invoice.payment_requests[].reminders[].uid |
String | No |
A Square-assigned ID that uniquely identifies the reminder within the
|
invoice.payment_requests[].reminders[].sent_at |
String | No |
If sent, the timestamp when the reminder was sent, in RFC 3339 format. |
invoice.payment_requests[].reminders[].message |
String | No |
The reminder message. |
invoice.payment_requests[].reminders[].status |
String | No |
The status of the reminder. |
invoice.payment_requests[].reminders[].relative_scheduled_days |
Integer | No |
The number of days before (a negative number) or after (a positive number)
the payment request |
invoice.payment_requests[].card_id |
String | No |
The ID of the credit or debit card on file to charge for the payment request. To get the cards on file for a customer,
call ListCards and include the |
invoice.payment_requests[].request_method |
String | No |
Indicates how Square processes the payment request. DEPRECATED at version 2021-01-21. Replaced by the
One of the following is required when creating an invoice:
|
invoice.payment_requests[].total_completed_amount_money |
Object | No |
Represents an amount of money. |
invoice.payment_requests[].total_completed_amount_money.amount |
Integer | No |
The amount of money, in the smallest denomination of the currency
indicated by |
invoice.payment_requests[].total_completed_amount_money.currency |
String | No |
The type of currency, in ISO 4217 format. For example, the currency
code for US dollars is See Currency for possible values. |
invoice.payment_requests[].due_date |
String | No |
The due date (in the invoice's time zone) for the payment request, in After this date, the invoice becomes overdue. For example, a payment |
invoice.accepted_payment_methods |
Object | No |
The payment methods that customers can use to pay an invoice on the Square-hosted invoice page. |
invoice.accepted_payment_methods.square_gift_card |
Boolean | No |
Indicates whether Square gift card payments are accepted. The default value is |
invoice.accepted_payment_methods.bank_account |
Boolean | No |
Indicates whether bank transfer payments are accepted. The default value is This option is allowed only for invoices that have a single payment request of type |
invoice.accepted_payment_methods.card |
Boolean | No |
Indicates whether credit card or debit card payments are accepted. The default value is |
invoice.created_at |
String | No |
The timestamp when the invoice was created, in RFC 3339 format. |
invoice.custom_fields[] |
Array | No |
Additional seller-defined fields to render on the invoice. These fields are visible to sellers and buyers on the Square-hosted invoice page and in emailed or PDF copies of invoices. For more information, see Custom fields. Adding custom fields to an invoice requires an Invoices Plus subscription. Max: 2 custom fields |
invoice.custom_fields[].placement |
String | No |
The location of the custom field on the invoice. This field is required for a custom field. |
invoice.custom_fields[].label |
String | No |
The label or title of the custom field. This field is required for a custom field. |
invoice.custom_fields[].value |
String | No |
The text of the custom field. If omitted, only the label is rendered. |
invoice.primary_recipient |
Object | No |
Provides customer data that Square uses to deliver an invoice. |
invoice.primary_recipient.family_name |
String | No |
The recipient's family (that is, last) name. |
invoice.primary_recipient.customer_id |
String | No |
The ID of the customer. This is the customer profile ID that you provide when creating a draft invoice. |
invoice.primary_recipient.given_name |
String | No |
The recipient's given (that is, first) name. |
invoice.primary_recipient.email_address |
String | No |
The recipient's email address. |
invoice.primary_recipient.company_name |
String | No |
The name of the recipient's company. |
invoice.primary_recipient.address |
Object | No |
Represents a postal address in a country. The address format is based
on an open-source library from Google. For more information,
see AddressValidationMetadata.
This format has dedicated fields for four address components: postal code,
locality (city), administrative district (state, prefecture, or province), and
sublocality (town or village). These components have dedicated fields in the
For the remaining address components, the Note that, in the current implementation, all other When it comes to localization, the seller's language preferences (see Language preferences) are ignored for addresses. Even though Square products (such as Square Point of Sale and the Seller Dashboard) mostly use a seller's language preference in communication, when it comes to addresses, they will use English for a US address, Japanese for an address in Japan, and so on. |
invoice.primary_recipient.address.address_line_3 |
String | No |
The third line of the address, if any. |
invoice.primary_recipient.address.first_name |
String | No |
Optional first name when it's representing recipient. |
invoice.primary_recipient.address.postal_code |
String | No |
The address's postal code. |
invoice.primary_recipient.address.organization |
String | No |
Optional organization name when it's representing recipient. |
invoice.primary_recipient.address.address_line_2 |
String | No |
The second line of the address, if any. |
invoice.primary_recipient.address.address_line_1 |
String | No |
The first line of the address. Fields that start with |
invoice.primary_recipient.address.administrative_district_level_3 |
String | No |
A civil entity within the address's |
invoice.primary_recipient.address.sublocality_2 |
String | No |
A civil region within the address's |
invoice.primary_recipient.address.administrative_district_level_2 |
String | No |
A civil entity within the address's |
invoice.primary_recipient.address.locality |
String | No |
The city or town of the address. |
invoice.primary_recipient.address.sublocality |
String | No |
A civil region within the address's |
invoice.primary_recipient.address.last_name |
String | No |
Optional last name when it's representing recipient. |
invoice.primary_recipient.address.administrative_district_level_1 |
String | No |
A civil entity within the address's country. In the US, this is the state. |
invoice.primary_recipient.address.sublocality_3 |
String | No |
A civil region within the address's |
invoice.primary_recipient.address.country |
String | No |
The address's country, in ISO 3166-1-alpha-2 format. |
invoice.primary_recipient.phone_number |
String | No |
The recipient's phone number. |
invoice.subscription_id |
String | No |
The ID of the subscription associated with the invoice. This field is present only on subscription billing invoices. |
fields_to_clear[] |
Array | No |
The list of fields to clear. For examples, see Update an invoice. |
idempotency_key |
String | No |
A unique string that identifies the For more information, see Idempotency. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.