API Calls
The Subscribe Pro extension makes several API calls to our platform as customers browse your store so that it can provide information about products that are available for subscription, existing subscriptions for the current customer, and saved credit cards, among other things, as well as allowing customers to create new subscriptions and manage their existing ones. Some of the information received from the platform via the API is cached to reduce the resource consumption on each page load. Below is a table that lists and explains each API call, at what location and under what conditions it is called, and whether or not it is cached.
Where | Location / Event | Conditions | Cached? | Details |
---|---|---|---|---|
Admin | Edit Customer Page - Saved Credit Cards Tab | Admin user has Manage Credit Cards permissions | No | Customer's cards are fetched and stored to platform. |
Admin | On Individual Product Save under Manage Products | If the product has "Subscription Enabled" attribute set to Yes | No | |
Admin | Create New Order - Product line items | If the product has "Subscription Enabled" attribute set to Yes | Yes | Subscribe Pro caches product information and configuration details from the platform. |
Admin | Create New Order - Payment Methods Step | If subscriptions are present in order OR if Subscribe Pro Vault payment method is enabled for non-subscription orders | No | Customer's available cards are fetched from platform. JSONP or server POST is used to store new cards to platform. |
Admin | Create New Order - On Place Order - Payment | If Subscribe Pro Vault payment method is used on order | No | Payment card is saved, payment transaction is run through platform |
Admin | Create New Order - After Order Created Successfully - Create New Subscription | If subscriptions are present in order | Yes | Subscribe Pro caches product information and configuration details from the platform. API calls are still necessary to create new subscription, regardless of cache servers other calls. |
Frontend | Product Details Page | Only if Subscription Enabled product attribute is true | Yes | Multiple layers of caching: Magento's frontend block and full page caches. Subscribe Pro caches product information and configuration details from the platform. |
Frontend | On Add to Cart | If the product has "Subscription Enabled" attribute set to Yes | Yes | Subscribe Pro caches product information and configuration details from the platform. |
Frontend | Cart Page | |||
Frontend | Checkout - Payment Methods Step | If subscriptions are present in order OR if Subscribe Pro Vault payment method is enabled for non-subscription orders | No | Customer's available cards are fetched from platform. JSONP or server POST is used to store new cards to platform. |
Frontend | On Place Order - Payment | If Subscribe Pro Vault payment method is used on order | No | Payment card is saved, payment transaction is run through platform |
Frontend | After Order Created Successfully - Create New Subscription | If subscriptions are present in order | Yes | Subscribe Pro caches product information and configuration details from the platform. API calls are still necessary to create new subscription, regardless of cache servers other calls. |