Request to charge a shop a recurring fee (every 30 days) by issuing this call with the name the charge should appear under (on the shop owner’s invoice), the price your application is charging, and a return_url to where Shopify will redirect the shop owner to after they have accepted or declined the charge.
Setting the test flag to true will set the RecurringApplicationCharge to not actually charge the credit card it otherwise would.
After this request returns, an RecurringApplicationCharge has been created, but is held in a pending state until the shop owner has accepted or declined it.
Proceed by redirecting the shop owner to the confirmation_url set in the response where they may accept or decline the charge.
After the charge has been accepted or declined, Shopify redirects the shop owner to the return_url set in the request, and appends a parameter accepted set to true when the charge is accepted and false when declined. Retrieving the RecurringApplicationCharge will also show that its status will have updated to be active
Updating
Each shop may have only one recurring charge per application.
When a new RecurringApplicationCharge is created for a shop that already has a recurring charge for that application, the existing recurring charge will be cancelled and pro-rated for the duration it has been active for. The new recurring charge will then activate.
This means that upgrading and downgrading a user’s recurring charge or plan is straightforward; just change their plan, have them accept, and Shopify takes care of the rest.