#readcoop-dev_api
1 messages · Page 1 of 1 (latest)
👋 Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1400373513512026155
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Specific Questions:
• Can we access PayPal mandate IDs via the API?
• Is there a recommended way to avoid multiple mandates being created unnecessarily?
• Does using on-session payments without setup_future_usage after a mandate has been created affect Stripe’s ability to use that mandate for future off-session payments?
Can we access PayPal mandate IDs via the API?
I believe this is only possible if you are saving PayPal for future usage using SetupIntent: https://docs.stripe.com/api/setup_intents/object#setup_intent_object-mandate
- Is there a recommended way to avoid multiple mandates being created unnecessarily?*
When a Paypal payment method is already saved, future PaymentIntent using the saved payment method shouldn't need to passsetup_future_usageanymore. Doing so will trigger multiple mandates to get created
Does using on-session payments without setup_future_usage after a mandate has been created affect Stripe’s ability to use that mandate for future off-session payments?
You cannot save a payment method and use it for off-session usage withoutsetup_future_usage
Thank you for the clarification! This confirms our implementation approach perfectly.
Based on your answers, we're implementing the following solution:
Mandate ID Access: We'll extract the mandate ID from SetupIntent.MandateId (not PaymentIntent) when setup_future_usage=off_session is used.
Avoiding Multiple Mandates: We're implementing a boolean flag HasValidPaypalMandate on our Customer entity. Our logic will be:
If HasValidPaypalMandate == false: Use setup_future_usage=off_session (creates mandate)
If HasValidPaypalMandate == true: Omit setup_future_usage (no new mandate created)
Off-session Usage: We understand that we cannot save a payment method for off-session usage without setup_future_usage. Our workflow ensures the mandate is created during the first payment with setup_future_usage=off_session, then subsequent on-session payments omit this parameter to avoid creating additional mandates.
Implementation Flow:
First payment: setup_future_usage=off_session → Creates mandate, save SetupIntent.MandateId
Subsequent on-session payments: No setup_future_usage → Uses existing payment method, no new mandate
Off-session renewals: Use saved MandateId → Works with existing mandate
This approach should solve our issue of multiple mandates being created while maintaining off-session payment capability. Does this implementation align with Stripe's best practices?
Yup this make sense to me. Be sure to also log the mandate ID in your database for future look up if needed. Retrieving a saved Paypal payment method will not return the mandate ID