#suraj-patidar_webhooks
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/1410229983452069960
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- suraj-patidar_webhooks, 1 hour ago, 9 messages
- suraj-patidar_webhooks, 2 hours ago, 14 messages
๐ happy to help
hii
would you mind sharing the event ID?
which paramater i need to add in session checkout so payment method can add customer
yes
evt_1S0gpTPgTxOM0XysnsCf3SVr
Payment Method ID: pm_1S0heIPgTxOM0XysTI9Fbz5e
that event does have the customer ID on it
in payment method object
customer found as null
django-1 | payment_intent {
django-1 | "allow_redisplay": "limited",
django-1 | "billing_details": {
django-1 | "address": {
django-1 | "city": null,
django-1 | "country": "IN",
django-1 | "line1": null,
django-1 | "line2": null,
django-1 | "postal_code": null,
django-1 | "state": null
django-1 | },
django-1 | "email": "bhoomi+admin@pysquad.com",
django-1 | "name": "Suraj Patidar",
django-1 | "phone": null,
django-1 | "tax_id": null
django-1 | },
django-1 | "card": {
django-1 | "brand": "visa",
django-1 | "checks": {
django-1 | "address_line1_check": null,
django-1 | "address_postal_code_check": null,
django-1 | "cvc_check": "pass"
django-1 | },
django-1 | "country": "US",
django-1 | "display_brand": "visa",
django-1 | "exp_month": 6,
django-1 | "exp_year": 2045,
django-1 | "fingerprint": "RyMh0vf1ut604tHN",
django-1 | "funding": "credit",
django-1 | "generated_from": null,
django-1 | "last4": "4242",
django-1 | "networks": {
django-1 | "available": [
django-1 | "visa"
django-1 | ],
django-1 | "preferred": null
django-1 | },
django-1 | "regulated_status": "unregulated",
django-1 | "three_d_secure_usage": {
django-1 | "supported": true
django-1 | },
django-1 | "wallet": null
django-1 | },
django-1 | "created": 1756294578,
django-1 | "customer": null,
django-1 | "id": "pm_1S0heIPgTxOM0XysTI9Fbz5e",
django-1 | "livemode": false,
django-1 | "metadata": {},
django-1 | "object": "payment_method",
django-1 | "type": "card"
django-1 | }
because the Checkout Session doesn't set setup_future_usage https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage which attaches the PM to the customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so this PM will only be used once
okay
payment_intent_data={"setup_future_usage": "off_session"},
this is right for because i want to save it and after that i want to use this card for automcatilly charge
session = stripe.checkout.Session.create(
expires_at=int(time.time())
+ settings.STRIPE_CHECKOUT_SESSION_EXPIRE,
payment_method_types=["card"],
customer=stripe_customer.id,
line_items=[
{"price": settings.CARD_VERIFICATION_FEES_ID, "quantity": 1},
],
metadata={
"subscription_new_id": f"{subscription_obj_new.id}",
"subscription_old_id": f"{subscription_obj_old.id}",
"marina_master_id": f"{marina.id}",
"invoice_id": f"{invoice_obj.id}",
"type": "subscription",
},
payment_intent_data={"setup_future_usage": "off_session"},
mode="payment",
success_url=f"{prefix}{settings.NEXT_PUBLIC_MARINA_ADMIN}/payment/success",
cancel_url=f"{prefix}{settings.NEXT_PUBLIC_MARINA_ADMIN}/payment/failed",
)
yes that's correct