Hi,
I want to do metered billing for my merchants. However, I am stuck at 3 places:
I try to get current subscription details using GET /v3/apps/{aId}/merchants/{mId}/billing_info. However, even though I have all possible read, modify permissions for my app, I get not authorized error with no response body
I want to use POST /v3/apps/{aId}/merchants/{mId}/metereds/{meteredId} to bill merchants for going above the allowed limit of free actions by passing the count of extra actions performed during the billing cycle. Do I post this API at the end of the billing cycle? Or do I post on every action beyond the free limit?
If the former in the above question, then if a merchant changes his/her subscription plan in between the billing cycle, then should I charge for all extra actions above free limit at the time of subscription change and start a new billing cycle for the new plan? Or should I include the extra actions from previous plan in the new plan's free limit? eg. 20 free actions for $25 and 50 free actions for $55 If merchant has 30 actions for $25 plan and changes to $55 plan before end of billing cycle, should I a. start new billing cycle and charge $25 + 10 extra or b. start new billing cycle but charge only $25 and assume the $55 plan now has 10 actions already