Update payment method
Update invoice payment method
Changes the payment method selected for the still-open invoice :id — e.g. switching between Lightning wallets or to cash — and recomputes the payment destination and crypto amount for the new method.
This replaces the deprecated PATCH /v1/invoice/pm, which took the invoice id in the body.
Auth
x-api-key header with Merchant.invoice.patch. Also accepts JWT user and POS JWT.
Path params
id(required): the invoice id.
Body (application/json)
paymentMethodId— the target payment method (aPaymentMethodsLikevalue, e.g.BTC_StrikeLike,CASH).
Errors
- 400
Cannot update payment method on a closed or expired invoice.— the invoice is not inNewstatus. - 400
The selected payment method is not available for this store.— the method is not enabled for the store (this is also what you get if you omitpaymentMethodId). - 400
Payment method data not found in the invoice.— the invoice carries no crypto data for that method.
Notas: Handler: updatepmService.updateInvoicePaymentType({ invoiceId: <path id>, paymentMethodId }). paymentMethodId is declared @IsOptional in UpdatePMBodyDto, so validation lets it through, but omitting it always ends in a 400 — treat it as required. Emits a PAYMENT_METHOD_UPDATED invoice event.
Authentication
Path parameters
Headers
Scope the request to a specific store / account instead of the one resolved from the API key. Aliases: the x-account-id header, or the application_account_id / account_id query parameter.
