#sougata_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/1232908832376885290
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi
I am getting the following response -
id: "cs_test_a1cgrngj5345bXnC7uFTzPcBYFMOGK21lAEinVe6Oy1a8zSRXunZN9qJsL"
object: "checkout.session"
after_expiration: null
allow_promotion_codes: null
amount_subtotal: 50000
amount_total: 50000
automatic_tax:
Stripe
StripeObject {#2165 ▶}
billing_address_collection: null
cancel_url: "http://ssc.sb/companies/payment-cancel?session_id={CHECKOUT_SESSION_ID}"
client_reference_id: null
client_secret: null
consent: null
consent_collection: null
created: 1714018494
currency: "usd"
currency_conversion: null
custom_fields: []
custom_text:
Stripe
StripeObject {#2551 ▶}
customer: "cus_PzIIyVgsu6nihN"
customer_creation: "always"
customer_details:
Stripe
StripeObject {#2545 ▶}
customer_email: "sougata@nottinghillmedia.com"
expires_at: 1714104894
invoice: "in_1P9JiKFR7e1DFwTs4u9K5Txj"
invoice_creation: null
livemode: false
locale: null
metadata:
Stripe
StripeObject {#2541 ▶}
mode: "subscription"
payment_intent: null
payment_link: null
payment_method_collection: "always"
payment_method_configuration_details: null
payment_method_options:
Stripe
StripeObject {#2536 ▶}
payment_method_types: array:1 [▶]
payment_status: "paid"
phone_number_collection:
Stripe
StripeObject {#2529 ▶}
recovered_from: null
saved_payment_method_options:
Stripe
StripeObject {#2524 ▶}
setup_intent: null
shipping_address_collection: null
shipping_cost: null
shipping_details: null
shipping_options: []
status: "complete"
submit_type: null
subscription: "sub_1P9JiKFR7e1DFwTsdQl1EhSQ"
success_url: "http://ssc.sb/companies/payment-success?session_id={CHECKOUT_SESSION_ID}"
total_details:
Stripe
StripeObject {#2517 ▶}
ui_mode: "hosted"
url: null
After Checkout Session is completed, a checkout.session.completed event will be sent if your system set up a Webhook: https://dashboard.stripe.com/test/events/evt_1P9JiPFR7e1DFwTsbWBD5AIH
In the checkout.session.completed event, Subscription ID (sub_xxx) can be found in subscription field, which an additional Subscription Retrieval request with expanding default_payment_method object can be made. You will find the payment method details under default_payment_method hash:
- Expand an object: https://docs.stripe.com/api/expanding_objects
- Subscription Retrieval: https://docs.stripe.com/api/subscriptions/retrieve
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
We can not use webhook for this as we are generating our invoice where we need to show last 4 digit.
WHen the mode is payment I am getting payment intent and with that I am able to retrieve the card details
But with mode subscription it is NULL|
Yes! This is expected. For Subscription, you should look for subscription field in the Checkout Session, then make an additional request to expand the payment method details under default_payment_method of a subscription as explained earlier
Ok. Let me check
Thanks for the info. That worked.