Skip to main content
PATCH
Update a pending payment order

Authorizations

x-api-key
string
header
required

API key for authentication (required)

x-merchant-id
string
header
required

Merchant ID for identifying the merchant (required)

Path Parameters

id
string
required

Payment order unique identifier or external ID

Minimum string length: 1

Body

application/json

Request body for updating a payment order. Only allowed while the order is in PENDING status. All fields are optional, but at least one must be provided. Any omitted field is left unchanged.

amount
integer

New order amount (positive integer, in the smallest currency unit). Since a pending order carries no surcharge yet, the subtotal is set to the same value.

Required range: x > 0
Example:

25000

currency
string

Three-letter currency code (ISO 4217)

Required string length: 3
Example:

"MXN"

description
string

Payment order description

Maximum string length: 500
Example:

"Updated payment for order #12345"

invoiceNumber
string | null

Merchant-provided invoice number; shown to customers instead of orderNumber when present

Maximum string length: 64
Example:

"INV-2026-001"

merchantReference
string

Merchant's own reference for the order

Maximum string length: 255
Example:

"REF-12345"

metadata
object | null

Arbitrary JSON metadata to store with the payment order

Example:
lineItems
object[] | null

Replaces the order's line items in full. When provided, all existing line items are removed and recreated.

Minimum array length: 1
dueDate
string<date-time> | null

Due date for the payment order. Used for payment reminders. Must be an ISO 8601 date-time string; pass null to clear it.

Example:

"2026-04-15T00:00:00.000Z"

customerId
string

ID of an existing customer to link to the order. When provided, it is assigned to the order as-is.

Minimum string length: 1
Example:

"123e4567-e89b-12d3-a456-426614174000"

Response

Payment order updated successfully

id
string
required

Unique payment order ID

Example:

"856b4a29-a7e5-4726-87d4-77e55d5ecfbf"

externalId
string
required

External payment order ID from merchant system

Example:

"ORDER-123"

refundedAmount
number
required

Total refunded amount across all payments (in cents)

Example:

0

amount
number
required

Payment amount

Example:

100.5

currency
string
required

Three-letter currency code (ISO 4217)

Example:

"USD"

status
enum<string>
required

Payment order status

Available options:
PENDING,
PROCESSING,
REFERENCE_GENERATED,
AUTHORIZED,
PARTIALLY_AUTHORIZED,
ACTION_REQUIRED,
COMPLETED,
PARTIALLY_PAID,
CANCELLATION_REQUESTED,
CANCELLED,
FAILED,
REFUND_PROCESSING,
PARTIALLY_REFUNDED,
REFUNDED
payments
object[]
required

List of payments for a payment order, Note: this information is only available on the order details endpoint

subtotalAmount
number | null

Pre-surcharge subtotal in minor units. Equals amount when no surcharge applies. Null on legacy orders predating subtotal tracking.

Example:

100000

surchargeAmount
number | null

Surcharge component of amount in minor units, or null when none. On split-tender orders this grows as each partial's surcharge lands and shrinks on refund.

Example:

5000

surchargeRate
number | null

Snapshot of the merchant's surcharge rate (percent) captured at order creation, or null when no surcharge applies.

Example:

5

amountPaid
number

Cumulative sum of captured amounts across this order's Payments (in minor units). Historical ledger — on re-activable orders that get partially refunded and re-paid, this can exceed amount. Use amountPending for live balance.

Example:

50000

amountPending
number

Outstanding amount left to cover net of refunds (in minor units). Computed as max(0, amount - (amountPaid - amountRefunded)). Reaches 0 when the order is fully paid net of any refunds — the only live-balance field on the snapshot.

Example:

55000

allowPartials
boolean

True when the order accepts multiple Payments via POST /v2/payment-orders/{id}/payments. Set at creation time.

Example:

false

invoiceType
enum<string> | null

CFDI invoice type derived from the flow. PUE for legacy 1:1 orders (single CFDI). PPD for split-tender orders (parent + REP per capture + credit note per refund). Null when the order is not fiscal.

Available options:
PUE,
PPD
Example:

"PUE"

invoiceStatus
enum<string> | null

Overall CFDI status. For PPD this reflects the parent CFDI; use invoiceSummary for per-REP / per-credit-note granularity.

Available options:
PENDING,
INVOICED,
FAILED
Example:

"INVOICED"

fiscalUuid
string | null

SAT UUID (folio fiscal) of the parent CFDI. Present once invoiceStatus = INVOICED.

Example:

"b1c2d3e4-f5g6-h7i8-j9k0-l1m2n3o4p5q6"

complements
object[]

PPD-only: emitted REP complements (Recibos Electrónicos de Pago). One row per successfully-stamped Payment. Always present as an array (empty [] for PUE / non-fiscal orders).

creditNotes
object[]

PPD-only: emitted Notas de Crédito. One row per successfully-stamped refund event. Always present as an array (empty [] for PUE / non-fiscal orders).

invoiceSummary
object

PPD-only: aggregated stamping progress. Undefined for PUE and non-fiscal orders — the UI should treat its absence as 'not a PPD order'.

orderNumber
string

Unique order number generated by the system

Example:

"C25123101"

invoiceNumber
string | null

Merchant-provided invoice number; shown to customers instead of orderNumber when present

Maximum string length: 64
Example:

"INV-2026-001"

description
string

Payment description

Example:

"Payment for order #123"

metadata
object | null

Arbitrary JSON metadata stored with the payment order

Example:
billingAddressLine
string

Billing address line

Example:

"123 Main St"

billingCity
string

Billing city

Example:

"New York"

billingState
string

Billing state

Example:

"NY"

billingPostalCode
string

Billing postal code

Example:

"10001"

billingCountry
string

Billing country code

Example:

"US"

customer
object
dueDate
string<date-time> | null

Due date for the payment order. Used for payment reminder notifications.

Example:

"2026-04-15T00:00:00.000Z"

createdAt
string<date-time>

Payment order creation timestamp

Example:

"2024-03-20T10:00:00Z"

updatedAt
string<date-time>

Payment order last update timestamp

Example:

"2024-03-20T10:00:00Z"

paymentMethod
object