Skip to main content

Update fees

In case you need to update the fee after you've submitted it to Rootline, you can do so by using the PATCH /payments/{id} method. Some scenarios that can be solved:

  • a fee needs to be lowered or removed because of a full or partial refund;
  • a fee needs to be added because an extra service was used.
Important

There is a time limit to updating the payment. You can do so by updating the payment up to 7 hours after the payment is authorized.

PATCH the payment to update the fee(s)

Provide the split payment_id with the fees array, and:

  • add a fee object to charge a(nother) fee;
  • provide the fee_id of a fee that you want to increase, decrease or set to € 0.00.
PATCH /payments/pmt_pFJdPDzn97ASbwJQnydJQ
curl 'http://payment-api.staging.rootline.com/v1/payments' \
--request PATCH \
--header 'content-type: application/json' \
--header 'x-api-key: [paste-your-api-key]' \
--header 'rootline-version: 2024-04-23' \
--data '{
"reference": "your-reference",
"splits": [
{
"id": "pmt_pFJdPDzn97ASbwJQnydJR",
"fees": [
{
"flat_rate": {
"amount": {
"quantity": "0.50",
"currency": "EUR"
}
}
}
]
}
]
}'