post
https://{store}/api/rest/sales2/orders/bill/pay
| Param | Notes |
|---|---|
bill_id | The internal ID of the bill being paid. |
data | The BillConfigData object. |
BillConfigData
| Param | Notes |
|---|---|
saved_payment | An id from List Saved Payments, e.g. cim:11 or cryozonic_achpayments:pm_bank_1. It must belong to the invoice's account. |
send_email | Flag used to trigger email send. Value can be 1 or 0. |
shipmentData | (Boolean or ShipmentData) If set to true then the shipment will be created at the time of the request. If set to false it will configure the shipment to be created when the bill is paid and the invoice is created. (Default: false). Can use ShipmentData object to configure specifically. Ignored when amount is provided. |
comment_customer_notify | Should the comment text be added to the email. Value should be 1 or 0. Ignored when amount is provided (use comments instead). |
comment_text | The comment to be added to the invoice. Value should be a string. Ignored when amount is provided (use comments instead). |
is_visible_on_front | Can the comment be visible on the storefront by the customer. Value can be 1 or 0. Ignored when amount is provided (use comments instead). |
capture_case | "online" to capture an authorization or "offline" to make an offline payment. Must be "offline" (or omitted) when amount is provided. |
amount | (Optional) Amount to pay toward the bill, in the store's base currency. Must be greater than 0 and no more than the bill's remaining balance. When provided, a partial payment is recorded against the bill instead of paying it in full. The invoice is created automatically once the remaining balance reaches 0. Only offline payments are supported. |
is_percentage | (Optional) If set to 1, amount is treated as a percentage (0–100) of the bill's remaining balance. Value can be 1 or 0. (Default: 0) |
method_code | (Optional) Offline payment method code to record on the payment (ex. checkmo, purchaseorder, banktransfer, cashondelivery). Only used when amount is provided. |
method_code_comment | (Optional) Note to go with method_code, such as a check or reference number. Value should be a string. Only used when amount is provided. |
comments | (Optional) Array of comment strings or PaymentCommentData objects to add to the payment. Only used when amount is provided. |
created_at | (Optional) Date/time to record as the payment date (ex. 2026-09-24 14:30:00). Defaults to the current time. Only used when amount is provided. |
Response
-
When
amountis provided: the increment ID of the payment that was created. -
When
amountis not provided: the increment ID of the invoice that was created (unchanged).
PaymentCommentData
| Param | Notes |
|---|---|
text | The comment text. Value should be a string. |
is_customer_notified | Should the comment be included in the payment email to the customer. Value can be 1 or 0. |
is_visible_on_front | Can the comment be visible on the storefront by the customer. Value can be 1 or 0. |
ShipmentData
| Param | Notes |
|---|---|
do_shipment | Should ship at the time the invoice is created. Value can be 1 or 0. |
ship_items | Object key is itemId and the value is qty. (ex. { "311": "2", "312": "1" } Would ship 2 of order item 311 and 1 of order item 312) The Order Item ID that is used will always be the Parent ID in the event of a Configurable/Grouped/Bundled product. (Optional, will use all items/quantities that are being invoiced if not provided.) |
tracking | Array of TrackingData |
TrackingData
| Param | Notes |
|---|---|
carrier_code | Code for the shipment carrier used for tracking. A list is available using the Get Carriers method. |
number | Tracking Number |
title | Tracking Carrier title |
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
