Update a SuperPay payment amount
POST/orders/:guid/payments/superpay/update-amount
Changes the amount, per vehicle. List every vehicle on the order; the active amounts must
sum to amount. Set is_active: false to exclude a vehicle from the payment; an excluded
vehicle still needs an amount field, send 0. Excluding a vehicle deactivates it on the
order as well.
Until collection starts, the amount can go up or down. From then on it cannot exceed the amount being or last collected; lowering is always allowed and comes back to you as a refund once funds are in. Once the payment record exists, this endpoint is the only way to change what the order pays: price edits through the Orders API are rejected.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 410
- 429
The updated payment
VALIDATION_ERROR: amount or a vehicle field is missing or negative. WRONG_INPUT_ERROR: a value has the wrong type, for example a vehicle guid that is not a UUID.
Not authenticated
Forbidden
ORDER_NOT_FOUND: no such order, or the order is not yours.
The payment state does not allow an amount change. Codes include:
PAYMENT_NOT_INITIALIZED: there is no payment record yet.PAYMENT_ALREADY_PAID: the carrier is already paid.PAYMENT_CANCELED: the payment is canceled.PAYOUT_ALREADY_STARTED: funds are moving to the carrier; a failed payout no longer counts.AMOUNT_EXCEEDS_CHARGED: the amount cannot go above what is being or was last collected.AMOUNT_VEHICLES_MISMATCH: vehicle amounts do not sum toamount, or the list does not match the order's vehicles.
ORDER_IS_DELETED: the order is deleted
CONCURRENT_REQUEST: another write on this order is in flight. Retry after a few seconds.