Reputation: 905
I want to use stripe android sdk pre build UI payment sheet for recurring payment (Subscription) in my android app. I see payment sheet example for non recurring payment on stripe document but i didn't found document for subscription in android. I have spend lot of time to find example of same but i didn't get any solution.
If anyone help me then it's save my day.
Upvotes: 0
Views: 701
Reputation: 46
You must use the subscription creation endpoint. This can be done both from the mobile application and from your server.
POST request to https://api.stripe.com/v1/subscriptions
with:
From the response, you can get a payment intent, which can be used to pay for a subscription through a payment sheet.
However, it is recommended to transfer the logic of working with the secret key to the server side
Upvotes: 0
Reputation: 1971
You are correct that Stripe doesn't have a dedicated Doc for Subscription + PaymentSheet.
However you should be able to follow their general Subscription integration guide, but in step 6 of "Collect payment information", simply use the PaymentSheet instead, with the Subscription's latest_invoice.payment_intent.client_secret
property. The implementation in Android should be the same.
Upvotes: 1