Set up payment fees
To add payment fees for your payment method, find it in REST API and update its details with a PUT request.
Step 1. Find payment method ID with API call
Make a GET call to /profile/paymentOptions:
GET
https://app.ecwid.com/api/v3/{storeId}/profile/paymentOptions?responseFields=id,appClientId
In response, you’ll see a JSON with payment options:
Parse the response and find the one, where the appClientId
value matches with your app’s client_id.
Step 2. Update fees for the payment method with API call
After getting the ID, use it in a second PUT call that adds a fee to the payment method. The fee has two settings: type
that defines if the fee is added as a percent of the order total (PERCENT
) or a flat value ( ABSOLUTE
) and the value itself (value
field).
Request example:
In response, you’ll see 200 OK
HTTP status with the response body:
This means that you’ve successfully added a fee to the payment method.
Last updated
Was this helpful?