Service Fee

Affiliates have the option of adding service fees to each of their stores. These can take the form of percentages or flat fees. They can either be applied to all orders, or a minimum amount can be set for the service fee to kick in. There can be multiple service fees, each applying to different order totals.

Service Fees are tied to the Affiliate's AffiliateCredential.

You can retrieve a store's service fees via the v9 endpoint.

What you need:

  • API Token (32 character token)
  • API Secret (40 character secret)
  • Path/Params (GET to /v9/settings/service_fees)

Name Type Description
id Integer Unique identifier for service_fee.
credential_id Integer AffiliateCredential the service_fee is tied to.
type String Form of the fee; can be PercentageServiceFee or FlatServiceFee.
label String Label for the service fee.
range_minimum Decimal The minimum order amount for service fee to apply.
amount Decimal Amount to be added to order total.

cURL example request:

curl -i \
-X GET \
-H "X-Signature: Zy3Xff8m85XGtp8zSZk3Moo9qdPff34HU3uq1MhnP4U=" \
-H "X-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
--url 'http://api.lvh.me:3000/v9/settings/service_fees?'

Example response:

{  
  "settings":[  
    {  
      "id":11185,
      "type":"PercentageServiceFee",
      "range_minimum":"0.0",
      "label":"First Service Fee",
      "amount":"4.0",
      "updated_at":"2017-05-26T22:30:08Z"
    },
    {  
      "id":11187,
      "type":"PercentageServiceFee",
      "range_minimum":"2.0",
      "label":"Second Service Fee",
      "amount":"2.0",
      "updated_at":"2017-05-26T22:33:31Z"
    }
  ]
}

results matching ""

    No results matching ""