Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Charging a % of sales using Billing API

Solved

Charging a % of sales using Billing API

barup
Shopify Partner
3 0 0

The usage charge portion of the Billing API seems to indicate the price field is an integer, though Shopify has told me that it is possible to directly charge a % of sales via their API.

 

Does anyone have experience using the API in this way?

Accepted Solution (1)

KarlOffenberger
Shopify Partner
1873 184 903

This is an accepted solution.

Hello,

 

After creating a recurring application charge that's required for usage charge recurring_application_charge_id (and/or capped charge amounts) you can create usage charges as a percentage of sales. The price field on UsageCharge is not an integer as suggested in the property doc of the API i.e. you can use fractional amounts as with any other price / money fields.

 

Hope this helps!

View solution in original post

Replies 2 (2)

KarlOffenberger
Shopify Partner
1873 184 903

This is an accepted solution.

Hello,

 

After creating a recurring application charge that's required for usage charge recurring_application_charge_id (and/or capped charge amounts) you can create usage charges as a percentage of sales. The price field on UsageCharge is not an integer as suggested in the property doc of the API i.e. you can use fractional amounts as with any other price / money fields.

 

Hope this helps!

barup
Shopify Partner
3 0 0

Boy, two words about this in the documentation sure would have saved me a lot of trouble and delay. Thanks so much Karl!