A few questions about billing per store

Hi,

we are doing testing on the billing integration and want to set up billing per store. Our use case is to give different functionality and put some limits (or remove them) based on the number of stores business have that installed us.

We have set up plans and test app as described by docs, but have some unclear points we cannot verify in our testing at the moment.

Doc link: here

Given:

A plan with scope “STORE”, named “FREE”, plan id “PLAN_ID_FREE”
A plan with scope “STORE”, named “STANDARD”, plan id “PLAN_ID_STANDARD”
A merchant with two stores - Store A and Store B

When:

We install on store A (STORE_ID_A) and call subscriptions from billing.poynt-net:

curl -X GET https://billing.poynt.net/apps/urn:aid:b326335b-ce7c-4482-80d4-109e0fe6f9d9/subscriptions?businessId=db4a4f0d-d467-472d-a85b-2d08a61b57fa

We receive a response exactly like in your documentation with one additional field - storeId:

{
   "list":[
      {
         ...
         "storeId": "<STORE_ID_A>",     <-- storeId where we installed
         "planId":"<PLAN_ID_STANDARD>", <-- plan ID for the STANDARD plan
         ...
         "status":"ACTIVE"
      }
    ]
    ...

Question I:

If we install on Store B on STANDARD plan, this should return now two objects, with a second subscription with the same planId, but with different storeId - the one for the second store?

Question II:

Is it possible to install on Store B on a different plan? So Store B will be on FREE and Store A will be on STANDARD Plan?

Question III:

We cannot uninstall from the device, so to test we can install on a second plan we removed the app from the test terminal using adb.
Then we went to the app store, found our app and installed again, this time on the other plan - “FREE”.

From this moment a call to billing.poynt.net/ … /subscriptions will return now TWO objects - business is now subscribed for BOTH plans for the same store:

{
   "list":[
      {
         ...
         "storeId": "<STORE_ID_A>",     <-- storeId where we installed
         "planId":"<PLAN_ID_STANDARD>", <-- plan ID for the STANDARD plan
         ...
         "status":"ACTIVE"
      }, 
      {
   "list":[
      {
         ...
         "storeId": "<STORE_ID_A>", <-- storeId where we installed
         "planId":"<PLAN_ID_FREE>", <-- plan ID for the FREE plan
         ...
         "status":"ACTIVE"
      }
    ]
    ...
    ]
    ...

This is puzzling. Both plans are active for the same store and business. We see something similar in the example given in your docs, where there are multiple active subscriptions to the same plan for the same business. So what is the reason for that (adb usage?) and is this possible in regular app workflow?

Hi Kostadin,

  1. correct
  2. yes
  3. merchants would uninstall by going to Poynt Store > Account tab > UNSUBSCRIBE. When the subscription is canceled it will remain ACTIVE until the next billing cycle, however it will now have an end date, e.g.:
    "endAt":"2018-02-01T00:00:00Z"
1 Like

Thank you for your quick and on point answer, it helped us a lot to figure things out.

It looks like when on test account we cannot fully test two subscriptions for the same merchant/store.
When we Uninstall from UNSUBSCRIBE the Poynt backend will immediately return only the remaining one.

If this was a real production merchant we will have an endAt, but for test it is not set and plan is removed immediately instead?