Update Merchant Fee Schedule

This endpoint allows you to update the fee schedule for an existing merchant in the system. By providing a merchant ID and a new fee schedule ID, you can modify the fee structure associated with a specific merchant account.

HTTP Method and URL

PATCHhttps://<PayEngine-host>/merchant/:merchant_id/fee-schedule

Path Parameters

You need to specify the following path parameter in the request URL:

Name
Type
Required
Description

merchant_id

string

Yes

The unique identifier for the merchant whose fee schedule is to be updated.

Request Parameters

Include the following parameter in your request body to specify which fee schedule to apply to the merchant:

Name
Type
Required
Description

fee_schedule_id

string

Yes

The identifier of the new fee schedule to apply to the specified merchant. This ID should correspond to a fee schedule that is already defined in the system.

Responses

The server can return the following responses:

  • 200 OK: The response body contains a message "merchant updated". This status code indicates that the fee schedule has been successfully updated for the merchant.

  • Error response: If the update cannot be completed due to an issue, such as an invalid merchant ID or fee schedule ID, the server will respond with an appropriate error message and status code. This may include 400 Bad Request if the request is malformed, 404 Not Found if the merchant or fee schedule ID does not exist, or other codes depending on the nature of the error.

Name
Type
Description

message

string

Merchant updated

data

boolean

true | false

Example

Here is an example of a successful request and response using cURL:

Request

curl -X POST "https://<PayEngine-host>/api/v2/merchant/802db58e-9f7e-4825-af6d-a2779f08038d/fee-schedule/update" \
     -H "Content-Type: application/json" \
     -d '{"fee_schedule_id": "new_fee_schedule_id"}'

Successful Response

{
  "message": "merchant updated"
}

Please ensure that you replace <PayEngine-host> with the actual host address of the PayEngine API, and substitute real values for 802db58e-9f7e-4825-af6d-a2779f08038d (merchant ID) and new_fee_schedule_id (new fee schedule ID).

This endpoint is crucial for maintaining up-to-date fee schedules for your merchants, allowing for flexibility and adaptation to new pricing strategies or adjustments in your business model.

Last updated