Skip to Content
Docs
Commerce settings

Update commerce settings

PATCH/commerce_settings

Applies to orders, invoices and credit notes from then on. Documents already issued keep the details they were issued with.

Headers

AuthorizationstringRequired
HTTP Basic auth: your API key as the password, with an empty username. See Authentication.

Parameters

invoicingobject
Show 6 child parametersHide child parameters
enabledboolean
number_prefixstring
next_numberinteger

Can't be a number the series has used: the request returns 422 with number_in_use.

credit_note_prefixstring
next_credit_note_numberinteger
footerstring or null
sellerobject
Show 4 child parametersHide child parameters
legal_namestring
addressobject
Show 6 child parametersHide child parameters
line1string
line2string or null
citystring
statestring or null
postal_codestring
countrystring

Two-letter country code (ISO 3166-1 alpha-2).

tax_idstring or null
emailstring

Returns

The updated settings.

resourcestring
invoicingobject
Show 6 child attributesHide child attributes
enabledboolean

Whether orders get an invoice unless a session's invoice_creation says otherwise.

number_prefixstring

The invoice series' prefix. The number follows it.

next_numberinteger
credit_note_prefixstring
next_credit_note_numberinteger
footerstring or null

Printed at the foot of every invoice and credit note.

sellerobject

The seller details on your invoices and credit notes. Until you set them, they're your legal entity's.

Show 4 child attributesHide child attributes
legal_namestring
addressobject or null

null when you haven't set one and your legal entity has none.

Show 2 child attributesHide child attributes
Option 1object
Show 6 child attributesHide child attributes
line1string
line2string or null
citystring
statestring or null
postal_codestring
countrystring

Two-letter country code (ISO 3166-1 alpha-2).

Option 2null
tax_idstring or null
emailstring or null

Where buyers' replies to invoice emails go. null when you haven't set one and your legal entity has none.

test_modeboolean
updatedstring or null

null until the first update.

Errors

400
The request is invalid.
401
The API key is missing or wrong.
403
The key's permissions don't allow this route.
422
The request is valid but can't be done. Codes include: - amount_mismatch: amount doesn't equal the line items' total. - price_inactive, product_inactive: an item can't be sold. - currency_mismatch: the items or rates use different currencies. - no_shipping_rate: an item ships and no active rate covers the session's currency. - checkout_not_open: the session is completed or expired. - order_not_refundable: the order is fully refunded, or under a dispute. - amount_exceeds_refundable: more than what's left to refund. - quantity_exceeds_refundable: more of an item than was sold and not yet refunded. - order_not_shippable: shipped_at was sent for an order with nothing that ships. - shipping_rate_inactive: a rate in shipping_options is archived. - tax_exceeds_amount: inclusive tax figures are more than an item's amount. - refund_failed: the payment method refused the refund. Nothing was refunded. - custom_css_not_approved: the draft's changed custom CSS isn't approved yet. - default_profile: your default design profile can't be archived. - profile_not_published: the design profile has nothing published yet, so sessions and links can't use it and it can't be your default. - profile_archived: the design profile is archived, so new sessions and links can't use it and it can't be your default. - display_name_required: the draft to publish has no display_name. - low_contrast: white text on colors.accent, or colors.text on colors.background, is under 4.5:1. - number_in_use: the next number is one the series has already used. - tax_rate_required: a subscription sent with your own tax figures has a tax_breakdown entry without a percentage_decimal or a flat_amount, so it can't be applied to renewals. - seller_engine_conflict: the request names an external engine for a sale that can resolve to Pay.com as seller. - engine_not_allowed_for_seller: the engine can't run a subscription this seller sells. - processor_not_allowed_for_seller: Pay.com sells only on accounts it controls, and the processor isn't one of them. - engine_capability_missing: the engine or its connection can't do what the request needs. - connection_not_ready: the engine's connection isn't connected, or needs action. - product_refused: a product failed review for merchant of record, and you can't sell it yourself in this request. Subscription and seller refusals come at creation, never at renewal.
Was this page helpful?