Update an order
/orders/{order_id}Orders come from checkout sessions and payment links, so only metadata and shipped_at change. Set shipped_at when you ship an order's items, or null to undo it. Pay.com sends order.updated.
Headers
AuthorizationstringRequiredPath parameters
order_idstringRequiredThe order's ID (ord_).
Parameters
metadataobjectYour key-value pairs. Up to 50 keys of 40 characters, with string values of up to 500 characters.
shipped_atstring or nullWhen the items shipped. It can't be in the future or before the order was paid.
Returns
The order.
idstringresourcestringnumberstringThe order number customers see, in your series, for example CL-10478.
statusstringdisputedbooleanWhether a dispute is open on its charge.
currencystringThree-letter ISO currency code, in lowercase.
amount_subtotalintegeramount_shippingintegerShow 23 more attributesShow fewer attributes
amount_taxintegeramount_totalintegeramount_refundedintegerline_itemsarray of objectsShow 12 child attributesHide child attributes
idstringThe line item (oli_ on orders, csli_ on sessions).
productstring or nullnull for the line made from amount and description.
pricestring or nullprice_versioninteger or nullnamestringquantityintegerunit_amountintegeramount_subtotalintegeramount_taxintegeramount_totalintegershippablebooleanquantity_refundedintegershipping_detailsobject or nullShow 2 child attributesHide child attributes
Option 1objectShow 4 child attributesHide child attributes
namestringphonestring or nulladdressobjectShow 6 child attributesHide child attributes
line1stringline2string or nullcitystringstatestring or nullpostal_codestringcountrystringTwo-letter country code (ISO 3166-1 alpha-2).
rateobjectShow 4 child attributesHide child attributes
idstring or nullThe rate (shr_), or null for one sent inline.
display_namestringamountintegerdelivery_estimateobjectShow 2 child attributesHide child attributes
minimumobjectShow 2 child attributesHide child attributes
unitstringvalueintegermaximumobjectShow 2 child attributesHide child attributes
unitstringvalueintegerOption 2nullshipped_atstring or nullWhen you marked the order shipped, from the Commerce tab or with PATCH /v1/orders/{order_id}. null until then, and for an order with nothing that ships.
customer_detailsobjectShow 5 child attributesHide child attributes
emailstring or nullnamestring or nullphonestring or nulladdressobject or nullThe billing address, at the level collected.
Show 2 child attributesHide child attributes
Option 1objectShow 6 child attributesHide child attributes
line1stringline2string or nullcitystringstatestring or nullpostal_codestringcountrystringTwo-letter country code (ISO 3166-1 alpha-2).
Option 2nulltax_idsarray of objectsShow 3 child attributesHide child attributes
typestringvaluestringverificationstringtaxobjectShow 5 child attributesHide child attributes
sourcestringmerchant for your own figures, pay_com for Pay.com's calculation (on your tax setup when you sell, and Pay.com's own when it sells), or none.
amountintegerbreakdownarray of objectsBy jurisdiction, in the shape tax quotes return.
merchant_amountinteger or nullWhen Pay.com sells and you sent your own figures with this order or invoice: what they came to. Kept beside Pay.com's figures and never charged. Otherwise null.
merchant_breakdownarray of objects or nullThe breakdown you sent, kept beside Pay.com's. Set with merchant_amount.
seller_of_recordobjectWho sells: you, or Pay.com as merchant of record. Fixed when the customer pays, and never changed on renewal.
Show 2 child attributesHide child attributes
typestringpay_com comes with merchant of record.
entitystringThe selling legal entity (ent_).
customerstringcustomer_reference_idstringchargestringpayment_method_detailsobjectHow the order was paid, from its charge.
Show 3 child attributesHide child attributes
typestringThe payment method type, as on the main API's charge.
cardobject or nullFor a card, including one in a wallet.
Show 4 child attributesHide child attributes
brandstringlast4stringexp_monthintegerexp_yearintegerwalletstring or nullThe wallet the card was in, or null.
checkout_sessionstring or nullpayment_linkstring or nullinvoicestring or nullsubscriptionstring or nullThe subscription the order started.
refundsarray of stringsThe refunds (rfnd_), oldest first.
receipt_urlstring or nullThe order's receipt page on the hosted checkout: its checkout session's url, which shows the order as paid once the session is complete. The receipt email's View receipt opens it. null for an order without a checkout session.
referencestring or nullmetadataobjectYour key-value pairs. Up to 50 keys of 40 characters, with string values of up to 500 characters.
createdstringWhen the order was paid.
test_modebooleanErrors
400401403404422amount_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.