If a user has purchased a subscription or in-app product on your web funnel with the paywall and Stripe integration service, and then downloads your app, you can check the availability of their subscription or product to provide them with premium features. Follow these steps:
1.Ask the User to Log In during the Onboarding in iOS app
Prompt the user to log in by entering the email they used in the Stripe checkout
2.Send Endpoints to Check Stripe Availability
Endpoint 1: Get Stripe Active Subscriptions for Customer
Request:
POST http://api.onboarding.online/paywall-service/v1/stripe-customers-active-subscriptions
Headers:
Content-Type: application/json
X-API-Key: your_project_id*
X-Stripe-PKey: your_stripe_publishable_key**
Body:
{ "email": "your_customer_email***",
"environment": "sandbox / production****" }
Explanation:
*your_project_id: Get your project ID from the Project Overview menu option in Onboarding Online service.
**your_stripe_publishable_key: Insert your Test or Live Publishable key (depending on whether you want to check test or live purchases). For details on how to get the Publishable keys, refer to the relevant article.
***your_customer_email: Send the customer email that they used in the Stripe checkout session. We recommend adding authorization after Stripe checkout so the user creates an account and can just log in to your mobile app.
****environment: Send 'sandbox' or 'production' based on the type of purchase you are querying (test or live).
Endpoint 2: Get Stripe Active Products for Customer
Request:
POST http://api.onboarding.online/paywall-service/v1/stripe-customers-active-products
Headers:
Content-Type: application/json
X-API-Key: your_project_id
X-Stripe-PKey: your_stripe_public_key
Body:
{ "email": "your_customer_email",
"environment": "sandbox / production" }
Explanation:
*your_project_id: Get your project ID from the Project Overview menu option in Onboarding Online service.
**your_stripe_publishable_key: Insert your Test or Live Publishable key (depending on whether you want to check test or live purchases). For details on how to get the Publishable keys, refer to the relevant article.
***your_customer_email: Send the customer email that they used in the Stripe checkout session. We recommend adding authorization after Stripe checkout so the user creates an account and can just log in to your mobile app.
****environment: Send 'sandbox' or 'production' based on the type of purchase you are querying (test or live).