#dev-help
1 messages · Page 112 of 1
@meager oasis Yeah, there's stuff like _wpemojiSettings in the response.
Alright, now I’m thoroughly confused
@meager oasis This is the command I'm using: curl -v https://crestonvalleyfoodactioncoalition.ca
Does the domain resolve in a browser for you?
Yeah it’s weird cause curling it works fine, but it doesn’t resolve in any browser
@meager oasis Yep, works in a browser just fine.
I’m starting to think that I just have the bad parts cached
@meager oasis Yeah, sounds like a DNS cache issue.
@meager oasis Or a browser cache issue. Try incognito/private browsing.
Yeah Incognito gives me a DNS error
I think you’re right on the DNS Cache issue
Out of curiousity, what browser are you using?
Safari?
@meager oasis I used Chrome, Firefox, and Safari before, but most recently I used Chrome.
Hi, I have a question, when a customer pays using stripe cardElement, which email address will be available on the stripe webhooks I config?
@pastel hemlock Hello! The Stripe Card Element doesn't collect or have anything to do with an email address directly. Can you tell me more about what you're trying to do?
I wanna make an application where the user pays a monthly fee (using stripe subscription api), the idea is when the user pays the first parcel, we send him the login information via email. Is it possible to add an email form, and add it to the stripe request sent from my front-end so there will be an email on the webhooks?
@pastel hemlock Yeah, there are several approaches you can take. You can use Customer objects in Stripe, which have an email field, and associate the payments with those Customers: https://stripe.com/docs/api/customers
Another approach would be to add the email address to the metadata on the Payment Intent (or whichever other object you want): https://stripe.com/docs/api/metadata
@pastel hemlock If you use Checkout, it'll collect email and attach it to the Customer
thanks, gonna read it right now
will this checkout be an external page or could it be inside of my application?
It'll be external. https://stripe.com/docs/payments/checkout
The quickest way to build conversion-optimized payment forms, hosted on Stripe.
I was trying to make something like this:
so I'll try Rubeus suggestions first, but thanks m8
I am building an application for gig work and I need to payout to freelancers, these freelancers could be located anywhere in the world. My understanding is this is possible with custom connect accounts (since people will be located outside of the supported countries for express), can anyone confirm this? And if yes, what is the workflow for this? I find the actual API documentation fantastic for Stripe, but the documentation on what you need to accomplish everything very confusing. Thanks in advance if anyone can help.
Sorry if this question to too "support-like"
@harsh finch I'm not 100% certain what exactly you're trying to confirm. Is it country availability for Custom connected accounts?
That is a portion of it, yes. And my main concern
After some more digging on the issue, it looks like Shaw, the local ISP, is just not responding to the DNS changes, and no Shaw customer is able to access the site
But only Shaw customers
@harsh finch As far as I know country availability for Express and Custom is the same: the account holder must be in one of the countries listed on this page:
@harsh finch See the Express Account Availability box here: https://stripe.com/docs/connect/accounts#express-accounts
@harsh finch And see the Custom Account Availability box here: https://stripe.com/docs/connect/accounts#custom-accounts
@meager oasis Fun!
Okay, that was my understanding of it too, thanks. Support had originally told I could do payouts to any country.. interesting then. So I am assuming there is no way to do payouts worldwide regardless of the country then.
@harsh finch That's correct as far as I know, yeah.
@harsh finch What exactly did support tell you?
@harsh finch You can accept payments from almost any country, but paying out to a connected account can only happen in countries where we support account creation.
This was a response
Please know that you can have Stripe Connect with your suppliers or Connected account from other country like South Africa.
I confirmed like 3 times in the exchange because it did not seem possible to me.
@harsh finch I'm really sorry about that. I'll see what I can do to make sure that doesn't happen again.
Appreciate it, not a big deal, I just wanted confirmation, so I appreciate you giving me that
@mighty hill Can I ask you.. is there another product that Stripe has that could replace the payout feature internationally? I'd like to go back with a solution to my boss and not just a problem. If not, that's fine, I can search for alternatives
@harsh finch Rubeus is offline, let me catch up with the conversation.
@harsh finch if your platform is in US, you could use Stripe Cross-border payouts to pay out to the supported countries.
See the list here https://stripe.com/docs/connect/cross-border-payouts
@harsh finch here is the doc on how to enable cross border payout https://stripe.com/docs/connect/service-agreement-types#recipient
unfortunately, that won't work as this would be to unsupported countries. I appreciate you trying to help though, I will look for other solutions, thanks.
Hey guys does anyone know the limit time for refund period? For example, if I make an appointment next year, and I ask the refund after a year, can this refund successfully processed?
@steep mist the normal recommend time is to refund within 90 days. Outside of that, the failure rate will be higher and there is no guarantee the refund will be successful.
Okaay, thank you
hey- we're looking to do custom accounts for connected accounts. If a member already has an account with stripe, is there a way we can integrate with their existing account as opposed to setting them up again?
@red gyro assume your member is a standalone Stripe account? In that case, you will have to connect the account as Standard Connect account using OAuth https://stripe.com/docs/connect/oauth-standard-accounts
and this would be possible despite every other member being a custom account?
@red gyro yes. as long as you enable it in your dashboard https://dashboard.stripe.com/settings/connect
That's not currently possible, no. You'd need to use Express for them to have that option.
Express and Standard currently have the ability to re-use KYC information from existing accounts. Custom does not
@red gyro assume your account wants to connect to your platform is a standard account.
as basta said
hi this is eric , i just use stripe to receive payment , but when receive one payment , after than i can't inflation to our bank account , could you help me to fix the problem
:question: Have an account question, @trim cloak?
While we're sorry to disappoint, this Discord is intended for technical questions and developer chat—we're not able to help with account specific questions. For help with your account please reach out to Stripe support directly at https://support.stripe.com/contact
@trim cloak you will reach out to support on account specific ask. But in general, when you receive money. It lands in your account balance. You cannot immediately cash it out due to payout schedule
i try twice time, but still said the t inflation have problem , and i can't find your customer service to ask how to fix this problem 😩
You will have to https://support.stripe.com/contact, it requires you to login to your account. And you can chat with our support specialist there. They will have access to your account and figure out the root cause
thank you
thank you
Hello there. We have a customer who just connected their Stripe Account to their debit card. On the dashboard, everything is showing as enabled; however, the latest webhook for account.updated event is showing that the request to our endpoint has the properties "charges_enabled" and "payouts_enabled" showing as disabled (but it is enabled on our Stripe dashboard). Do you have any insights to this discrepancy?
What's the account ID?
I'm not sure if the webhook is sending wrong data, or if the webhook never fired when the said properties are enabled.
acct_1J5hTTRd4Zv54l79
The account is indeed fully enabled. Give me a minute to look at the webhooks
I'm seeing the event evt_1J5hYVRd4Zv54l79hi8HZIym delivered to your webhook at 2021-06-24 01:40:35 UTC, which changed the account to charges_enabled: true and payouts_enabled: true
Your server returned {"received":true}
Okay, thanks for validating the data, that helps narrow things down for us. @fast mantle
As a note: you can "view dashboard as" for the connected account (the option is under the meatball menu on the upper right of the connect account detail page in your dashboard) and visit Developers > Events to see the events for that account
@fast mantle 1 more related question
I see the event evt_1J5hYKRd4Zv54l79fRaagUSU for the same user that was fired at the same time, but seems to be more recent than the event you pointed out evt_1J5hYVRd4Zv54l79hi8HZIym
That event id evt_1J5hYKRd4Zv54l79fRaagUSU is the one showing disabled for the fields in question.
We actually started to deliver them in the correct order (in parallel), but it looks like your server completed responding to them in the opposite order. The created property on the webhook payload defines the canonical ordering.
I'd suggest doing one of two things:
- Atomically storing the "last webhook" timestamp for the most recent event in your database (this can be tricky depending on your database)
- Lock the object you store the data on (e.g., using transactions, like
SELECT ... FOR UPDATEin postgres) and fetch the most recent data from the API while processing the event
#2 is probably the easiest/best given the circumstances. One webhook handler would lock first and block on the second, and fetch the most recent canonical source of truth from the API. The second would wait until the first completed, and would check the API again and get the same (or newer) information
@fast mantle That's helpful, so it boils down to race condition. Thank you so much for looking into this.
We'll need to code something up to safeguard against this for all of our endpoint, it seems.
fwiw the timestamp doesn't necessarily indicate ordering; it's possible they're the same second. There's no order guarantee for webhooks so you need to build your system to be able to handle them in any order. basta's #2 is likely the best way to approach this - that or an idempotent 'upsert' action.
Yeah, I'd say in general if you use webhooks as a signal and then fetch the latest directly from the API (versus using the webhook payload) you'll always have the most up-to-date data and this won't be a concern. For accounts (especially if you use Connect Onboarding) this will yield the best result
Perfect, we may have to make an extra call to Stripe API to always have the most up to date data.
I Keep receiving error: Unable to process this payment, please try again or use alternative method.
however test mode works
@wintry basin do you have a request id that I can check ?
req_TRtaABH7xetJBn
@wintry basin there is account specific reason that your account is unable to process live charges. can you reach out to our support and the specialist could help you there
:question: Have an account question, {1}?
While we're sorry to disappoint, this Discord is intended for technical questions and developer chat—we're not able to help with account specific questions. For help with your account please reach out to Stripe support directly at https://support.stripe.com/contact
thank you
Hello, I am Jessica from Malaysia and I recently made a payment to your merchant and realized they're running a scam. However I have already made payment and I am not getting any replies from them regarding my purchase.
@golden wave you can write to support@stripe.com, but the most direct way to get your money back is to get in touch with your bank and run a chargeback
I have called my bank but they said that since I authorised the payment, there's nothing much they can do but they proceeded with a report and thats really about it. I have sent an email to the support team. Thank you very much.
debit card. are they able to retrieve my debit card info?
with custom integration, If our platform is collecting KYC data for different countries across the globe, is there any way stripe outlines the data we need to collect to build forms at all? or do we specifically have to seek out some third party app that does that?
@red gyro you can make use of Stripe's hosted onboarding (KYC) so that Stripe will collect required data automatically for you
if you want to do it via API by building your own form to collect user info, here is the required information https://stripe.com/docs/connect/required-verification-information
@golden wave gotcha - you should get in touch with support@stripe.com then
Hi guys, after some guidance. I am looking to implement a fitness app. The content is digital. User will download app, subscribe to one of 3 duration options and then access the app. Am I bound to IAP with Google and Apple or is there a service for Stripe?
If I was to sell PT sessions (sessions with a Trainer that took place outside of app) or physical products (bags, gear, etc) could I use Stripe in app for those transactions?
Thanks
That's a question definitely suited for google developer support, as they're the one's who make the rulings, however, for services such as Personal Training and physical products, you can definitely use stripe. The grey area lies within the content, and if apple will consider it a reader app
Hi, here I have an implementation with asyncronous webhooks and client side that is confirming payment directly to Stripe:. How can I prevent that it is possible to pay multiple time a same order. What I mean is there is a time where the payment is confirmed by Stripe to the client but the server didn't receive yet the webhook. To go deeper in explanation, let's say my server doesn't receive the webhook confirmation or it takes some time, how can I prevent other payment in the meatime about the same order? Technically I'm currently doing confirmCardPayment from the front, then I receive the success callback from Stripe. Then I wait the webhook on my server to change the status of my order based on the event.
Thanks for your feedback. I'll jump over into support - sorry, new user!
No problem! Google's just a little vague with their policies
Just a little!!
@pure crane if you're using payment intents, stripe verifies that the same payment intent can't be confirmed more than once
as long as you only generate a single payment intent, you're fine
The issue is as soon as the customer land on the checkout page, I generate a new intent and send to the client the secret. Is it not recommended workflow?
sorry, tbc - are you starting already with some record/order in your application that you're trying to get a payment for, or the flow starts when the customer lands on the checkout page?
When the customer land on the checkout page he has a cart. The flow to convert the cart to a paid order start. The server create an intent and associate it with an order (but it is just a metadata stored in the intent object). It then give back the secret to the client. Then the client proceed the payment to Stripe api.
to guard against that case, your server should not allow there to be >1 pending payment intent for the same order
Ok i see, before creating a new intent for a given order, I should like query Stripe to retrieve the list of pending intent associated with the customer and check the order I would have associated with. Does that makes sense?
I'd probably add a last_payment_intent column to your db's order table, then try to cancel that payment intent before you create a new one
that avoids a data race
(also, listing payment intents from stripe will be very slow, because there isn't a fast way to filter to just payment intents for the order you're interested in)
Ok so I should more store the intent id in my own database and then query this id to Stripe to get the latest status of the intent?
Could you please confirm that if I want to be able to retrieve the intent server side, I should store the client_secret and not just the id of the intent?
Hi all Stripe-heroes!
We are in the middle of the process migrating from Braintree to Stripe.
- Anyone did this before? Any typicaly obstacles we should be aware of?
- Will 3D Secure be a problem when setting up new subscriptions?
@vocal wagon have you engaged with Stripe team that help with the migrations? They will work closely with you on importing all the data from other processor
Hello, any example here about implementing Afterpay on GatsbyJS?
I have! We are in the process with them but we are running out of time so could use some quick answers if possible 🙂 Appreciate it!
@vocal wagon they are the expert on migrations I am afraid. especially for the first question.
For the second question, for 3DS, the worst scenario where 3DS is required could be properly handled following this https://stripe.com/docs/billing/subscriptions/overview#requires-action
@pure crane to retrieve the payment intent with a secret key, you just need the ID
hola
Thanks @lucid raft. Just feels dumb to have to reactivate customers that already agreed to a subscription before. Hoping that Stripe support can shine some light on this.
Me he puesto en contacto con vosotros mediante el correo support@stripe.com y estoy esperando urgentemente que me contesten
que puedo hacer
@vocal wagon totally agree. The migration team might have some magic of importing the 3DS authentication from another processor. but I am not quite sure myself.
@vocal wagon I google translate your question. Can you type in English if you don't mind. What question do you have? This channel can help you with developer integration questions. If it is account specific like unable to login, payout missing etc., you can follow up with the support email you sent with our Support Specialist.
I NEED TO KNOW IF I CAN USE STRIPE AS A PAYMENT GATEWAY AND THEY WILL NOT ANSWER ME IN THE MAIL. I WOULD LIKE TO KNOW WHAT I HAVE TO DO. THANK YOU
Reason: Capital letters
Hello, how do I redirect the customer to the plans page shown here ? https://stripe.com/fr/billing Thanks
https://t.co/9ktFTpDECg?amp=1 I have been watching this. I have a GatsbyJS setup and at the start CJ is talking about the endpoints for publishable keys, etc and it doesn't exist in my setup.. any alternative on how I can implement this ? Thanks so much
In this episode, you'll learn how to confirm an Afterpay / Clearpay payment with a React client. Afterpay / Clearpay is a payment method available through St...
@languid dew Hey! Which part are you referring to specifically?
That one
@halcyon raptor Hey! These are endpoints configured in the server component for that sample. See here for Node.js: https://github.com/stripe-samples/accept-a-payment/blob/21e979e1406d9451b214bb0701826157d54caabe/custom-payment-flow/server/node/server.js#L34-L38
@languid dew Ah, ok. That's not a hosted Stripe solution, just an example of how you could construct your plans page with data from our APIs
It says "no code required"
@languid dew That's more of an overarching statement for Billing as a product, rather than for that specific UI element. Most of invoicing/subscriptions can be managed from the Dashboard without any code (Payment Links, etc)
So there's no way to use Stripe to generate a page like this automatically ?
@languid dew The only hosted solutions for Billing currently are Checkout, Payment Links, Customer Portal. There's no pre-built solutions for plan pages like that currently, no
Well, this is really misleading. My boss is expecting me to find a redirect URL to that "page" in the next minute 😅
Thanks, @hollow prairie, but I'm really confused. Is this code required? Do you have any examples on how I can make it work for a GatsbyJS setup?
@halcyon raptor What specifically about Gatsby are you trying to utilise? Our React examples will work with Gatsby
just trying out the exact same form CJ did in that video on a fresh install GatsbyJS setup 😩
@halcyon raptor Are you seeing a specific error or issue? Gatsby is a React framework, so the React code for that specific example you're referring to should work
@hollow prairie first of all is the setup, I'm quite a beginner and I think CJ did some advanced coding in there that I don't know where to put this file (https://github.com/stripe-samples/accept-a-payment/blob/21e979e1406d9451b214bb0701826157d54caabe/custom-payment-flow/server/node/server.js#L34-L38) in my Gatsby setup..
Hello, I just want to be sure. My language (polish, pl) is not supported in emails (https://support.stripe.com/questions/language-options-for-customer-emails) and in invoices (https://support.stripe.com/questions/language-recognition-for-invoices-with-stripe-billing). There is no other way to provide translations to the emails and invoices? I should handle this by myself via webhooks?
@gentle thicket Hey! Sorry there's no Polish localisation available currently. You'd need to handle this yourself. This doc is a good starting point: https://stripe.com/docs/invoicing/sending#custom-emails
What is exactly the format of customer.preferred_locales ?
@hollow prairie No problem, thanks for the link. I will handle this. Have a nice day 😄
@halcyon raptor Ok, so that specific file/code is a part of the server side component (Node.js is server-side JavaScript language). The majority of Stripe payment flows require both client (Gatsby/React) and server-side components to work
In the case of Gatsby, you could look at using their new functions (https://www.gatsbyjs.com/products/cloud/functions/) feature, or host a Node.js app elsewhere like Heroku and make API calls to that sever from Gatsby
Hello developers
i need a help
@languid dew It's [String]. For example: ['en', 'de']
@exotic rain Hey! How can I help?
Okay that's a start.. I'm currently hosting my site in Netlify though..
@halcyon raptor They have their own functions (sever-side) product you could use: https://www.netlify.com/products/functions/
I have a requirement that when a user switch subscription, i need that the new subscription starts after the current subscription ends but now its starts immediately after the switching.
@exotic rain You mean you want the subscription changes to apply at the end of the current billing cycle, rather than immediately?
Yes, but now i also charge user immediately on swicthing.
@exotic rain Got it. You should look at using Subscription Schedules. You can schedule the price change to happen on a specific date, as opposed to immediately: https://stripe.com/docs/billing/subscriptions/subscription-schedules
Learn about the Subscription Schedules object and how to use it.
Hi all. How can I write the curl request for added a created.gte for example ?
@warm ocean Hey! Are you working with a specific endpoint? You want to used the created.gte parameter when listing objects, right?
with the transfer listhttps://stripe.com/docs/api/transfers/list?lang=curl#list_transfers-created-gt
@warm ocean Should do it:
curl https://api.stripe.com/v1/transfers \
-u sk_test_xxx: \
-d created[gt]=123 \
-G
Hello,
I would like to know if it is possible to put an existing account of one of my clients under my account? I would like to do this for several clients in order to keep track of the payments made.
Thank you for your feedback,
Cathy
Hey all - is this discord channel replacing the freenode chan?
I've a couple of questions I'm hoping I can be pointed in the right direction.
1, Is there an easy way to cancel/expire a Stripe elements session .. I really want to use Elements for booking room availability but only want the session to be able to complete whilst that room is locked (for 10 minutes) and after that remove the possibility.
2, Is there an easy way to instantly refund a successful payment. I'm currently watching for a webhook on CheckoutSessionCompleted and want the option that if a payment does come through for some reason and the room is unexpectedly unavailable that I can trigger an instant refund and separately I'll send an email explaining the issue.
Thank you
You can just get admin access.. with your email address
@vocal wagon Hey! Can I please ask you to write into support? They're better at answering account related questions like this: https://support.stripe.com/contact
@hollow prairie Oups I think I know why. I write it but I have this message "no matches found: created[lte]=1622505600". But I think I understood, it's a unix timestamp. And it's not unix timestamp that I need. Correct?
@zinc imp and @hollow prairie thank you very much!
@warm ocean It needs to be a timestamp, yep: https://stripe.com/docs/api/transfers/object#transfer_object-created
Yes but it's unix (from 01/01/70) or epoch time ?
@warm ocean Unix
@zinc imp Hey!
- Not sure what you mean by an Elements session? Elements are just UI components for capturing payment information. Do you mean Checkout?
- You'd need to handle that logic yourself to determine when to refund, but you can call the Refunds API passing the PaymentIntent ID field from that
checkout.session.completedevent as a parameter: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_intent & https://stripe.com/docs/api/refunds/create#create_refund-payment_intent
Let me know if that doesn't make sense!
So I dont understand the error message "no matches found: created[gte]=1622505600"
@warm ocean Can you share a specific request ID where you're seeing that error? https://support.stripe.com/questions/finding-the-id-for-an-api-request
so the steps to create a subscription schedule would be:
- Create a payment methdo and attach it to the customer
- Create a subscription schedule and attach the payment method to it with expand=['latest_invoice.payment_intent']
- If paid is false then pass ['payment_intent']['client_secret'] to the user and finalise the payment from their end
Am I correct?
What would happen if the customer already existed and had a default payment method? Because from the docs, it seems their default payment method would get automatically charged, and that is by no means what we want to happen... Should I always explicity declare the payment method id?
Hey @hollow prairie sorry bit rusty with Stripe so sorry for the badly formed question - 2, super helpful thanks for confirming.
1, I'm creating a Checkout Session() which I'm then passing to elements - so is there a way to invalidate the checkout session? For example if they are on the elements payment page and the session becomes invalid do they automatically get directed away to my stated failed page?
sorry.. im not using elements
@zinc imp By Elements do you mean redirectToCheckout?
@zinc imp We've all been there 🙂
Friday somewhere right?
@rigid ridge
it seems their default payment method would get automatically charged
yep, it would
you could set https://stripe.com/docs/api/subscription_schedules/create#create_subscription_schedule-default_settings-default_payment_method to a different payment method, which would override the customer level default
the rest of what you say all makes sense
@zinc imp Right now there's no way to expire a Checkout Session manually I'm afraid. Default behaviour is for them to expire 24 hours after creation. If you attempt to redirect to an expired Checkout Session, the hosted UI conveys that
@zinc imp Are you tied to using Checkout?
I'm not - but it was a preference
I'd be better going back to self hosting it and using elements?
ok, thanks! 🙂
Does this still work: "When a Checkout Session is created it has a Payment Intent associated with it. You can cancel that Payment Intent when you release the reservation, which will prevent the customer from paying."
I guess a bit of a work around but sensible enough
@zinc imp I wouldn't really recommend anything like that, it's kind of a hack. Also there won't always be a PaymentIntent (for example, if you use Checkout to create a subscription instead of a one-time payment) so it's a flaky solution.
sure but your business might expand in future and then you'll have to revisit all this.
Right now I'd just accept that there is no way to explicitly control the expiration of the Session unfortunately, it's not part of how the product is designed , though it's feedback we're very aware of.
if you need this level of control you might want to build a more custom integration using PaymentIntents directly where you control the complete payment form.
Does anyone know how to construct a test for merchant disputes? (Not send a fixed test from the webhook)
(It's a reservation booking) so subscriptions would never be considered.. but i think youre right I should go another direction
a shame as checkout is super quick to work with
Is offering an instant refund to a successful checkout bad practise ?
@lapis canyon if you create a charge using the test cards at https://stripe.com/docs/testing#disputes those payments will have test mode disputes generated
Its still fairly fringe case as I'm setting an association on the reservation for 20 minutes so it'd be fairly unlikely to be handledas arefund
@meager hawkOk let me see
Hello guys, I have problems with 3D secure auth on connected accounts, I want to avoid them. I create the customers + setupIntent to attach PM on my platform. It triggers 3D secure as expected. BUT any time I create a PI for connected accounts it asks for 3D secure again. I tested with the card : 4000002500003155 (no further authentication is needed) here is an example : pi_1J5oxpAfijtFgEVeJw9OsJGu What is wrong please ? thanks
@zinc imp well two issues. It's confusing to the customer to do that since Checkout really presents the payment as completely successful. Plus, you don't get the Stripe fee back when refunding a payment so you lose money on the transaction(though you could use https://stripe.com/docs/payments/capture-later (via https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-capture_method) instead and then refund the authorised payment/just don't capture it, since the fee is only taken when capturing a payment)
Legend - thank you
if I was going to do anything and had to use Checkout I'd probably use auth-and-capture like that, and have the page that the customer gets redirected to after Checkout very clearly explain what's happening. I'd still be worried about customer confusion so messaging would be important.
@glossy osprey hi, looking..
@glossy osprey you have to pass off_session:true when creating the PaymentIntent (https://stripe.com/docs/api/payment_intents/create#create_payment_intent-off_session) . That test card only simulates getting an exemption for off session payments(https://stripe.com/docs/payments/save-during-payment?platform=web#web-create-payment-intent-off-session) , it's fully expected that on session payments still require 3D Secure regardless of how the card is set up.
It's simulating a "merchant-initiated transaction" exemption from 3D Secure(https://stripe.com/ie/guides/strong-customer-authentication#merchant-initiated-transactions-including-variable-subscriptions) and off_session is how you flag the payment attempt as being merchant-initiated.
@meager hawk thanks I will check this right now
@meager hawk looks fine 🙂 Thanks a lot.
great!
Hi, when my customer is on the checkout, he might update its cart, leave the checkout and come back. Considering the payment intent, what are the pro/cons to update the payment intent over deleting and create a new one?
👋 Hey, I got a technical question. I need to display the reference number of the mandate for customers with a SEPA Debit payment method. This works very well with users completed the Stripe checkout. But the problem I got now is that my client got imported customers with existing mandates. I don't know how to retrieve the reference number for these stored mandates? With the customers from Stripe checkout I can retrieve the SetupIntents of the customers but for the imported one there are no SetupIntents... Can someone help me?
Hello. I don't know why, but I think that the curl request with subparam doesn't work because my previous request that I 'm used to doesn't work anymore. I have the following error message zsh: no matches found:
for example, I try to add a metadata zsh: no matches found: metadata[test]=true
@pure crane Hey! Updating a PI is actually a pretty common flow. We see people creating their PaymentIntents on initial page load, and updating whenever there's a cart change (quantity, etc). There's a couple of things to consider here:
- Only specific fields can be updated on a pre-existing PI depending on its state (i.e. confirmed or not).
- You may need to re-confirm the PI after updating.
@warm ocean Hey, that's not a Stripe error but a shell error (zsh is a shell). Depending on the curl library you're using your request syntax might be invalid
What about fr ?
@stuck grove Hello! Where the existing mandates also imported? Can you share a specific customer ID you're seeing this on? To be clear mandates are associated to a PaymentMethod, not a Customer object directly
@languid dew Sure, as I understand it those values aren't validated by us at all. It's just a reference for you to use as you need
So if the user requests French to my API, then I send French to yours, you won't make the UI display in French ?
Hey, yes the mandates should have been imported too. They also currently work. For example: cus_JZN9pRJpA7tpoe
@languid dew Which UI specifically?
Checkout Session & Customer Portal
(also they are validated, they're standard IETF codes https://en.wikipedia.org/wiki/IETF_language_tag so like fr or fr-CA according to https://datatracker.ietf.org/doc/html/rfc5646 )
@languid dew You need to pass the locale parameter when creating a Checkout Session: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-locale
@languid dew There's no way to localise the Customer Portal currently
@stuck grove Nice! Out of interest, what solved it?
OK but when I try with REST client, I have something like "Invalid request (check that your POST content type is application/x-www-form-urlencoded)". No more possible to make a POST with a json body ?
@warm ocean I'm afraid not, payload must be of type application/x-www-form-urlencoded. Have you tried out client libraries? They mask most of this: https://stripe.com/docs/libraries#server-side-libraries
@languid dew Sorry, I should clarify. Both Checkout and Customer Portal sessions will default to the user's browser locale setting. You can override that for Checkout (with the locale parameter), but not with Customer Portal currently
I see. Is an override for Customer Portal planned ?
@languid dew We have nothing to share at this time, but I'll relay your feedback!
Thanks !
And, that one, is it real ?
@languid dew That's just a graphic showing the Billing flow for that particular use case
I was retrieving the paymentMethod object for a source id and I thought if it works thats all there is. But when I retrieve the source object I get the mandate. 👍
Currently, the user, when visiting the Customer Portal, can reduce the quantity of his subscription below its used seat count...
Hello,
Is there a way to receive BIN, the initial six numbers that appear on a card with API, or any other way?
@languid dew I'm not sure I understand?
@dense bluff Hey! I'm afraid we don't surface the card BIN, no. Only the last 4 digits
When subscribing for the first time, the customer selects the product quantity on our UI, so we don't let him select less seats than he's using.
But, when visiting Customer Portal, the customer can decrease the product quantity, below the number of seats that he's using.
How can I prevent that ?
@languid dew Hmm, I'm not sure. I know you can disable subscription quantity updates when creating the Portal session (https://stripe.com/docs/api/customer_portal/configurations/create#create_portal_configuration-features-subscription_update-default_allowed_updates), but I don't think you can specify the quantity range that the user can change to
Is that feature planned ?
@languid dew I'm not sure, would be a nice feature! I'll relay your feedback
Thanks !
We have Stripe Tax enabled for EU VAT now.
However, when the customer is in the EU, and has entered his valid VAT ID, the tax isn't removed from the price, how do I fix this ?
Thanks
@languid dew I'm not sure what you mean by "removed from the price", can you elaborate?
you might be referring to tax exemption or reverse-tax (https://stripe.com/docs/billing/taxes/tax-rates#tax-exempt-and-reverse-charge ), hard to say.
That's it, I guess, but it must only be enabled automatically when a valid VAT ID is entered
I'm not sure I follow unfortunately, without a clear description of what you're doing, what you expect to see and what you see instead.
Hi everyone/anyone - If I want to take a payment for a specific product/price via the API, should I still setup a payment Intent? and if so, how do I define the price/product id within that intent?
@lapis heron hi! Well right now, PaymentIntents don't accept Price objects, they're lower level and require passing the raw amount and currency instead
so you have a few ways of taking the one time payment, as described on https://stripe.com/docs/payments/accept-a-payment. For example you could use Checkout, that accept a Price ID (as described at https://stripe.com/docs/billing/prices-guide#checkout ) .
ah ok, thanks @meager hawk for responding. with Checkout though we have to direct them away from our site to the Stripe checkout though correct?
yes
you can use PaymentIntents and our Elements form elements(the 'custom payment form' option at that first link) instead if you want to keep the experience on your own page
and there you simply pass the exact amount you want to charge the customer to the PaymentIntent without using Prices at the moment.
I might be better off just doing the PaymentIntents without product IDs for now then. no problem, thanks for clarifying! Thanks again @meager hawk
Hi there
ynnoj sorry to bother you however i need help
could you please contact me and i will share with you my issue with button checkout
im really lamer with IT and I would like that profesionalist could help me with it.
Hey - when creating a Stripe::Session I have the option to pass a customer => id OR a customer_email => email
However if I pass the customer_id it doesn't prefill the email field on the Checkout screen - is this a bug? or is my syntax wrong maybe?
@zinc imp let me test this, I think it should pre-fill but I'm not sure
yeah it says it prefills for customer_email
I cant get that to work either actually
think my syntax is correct it just accepts a string
it should just be working as far as I know. Like this works for me.
let customer = await stripe.customers.create({
email: "test@example.com"
});
const session = await stripe.checkout.sessions.create({
payment_method_types: {
0: "card"
},
locale: "auto",
cancel_url: "https://example.com",
success_url: "https://example.com",
billing_address_collection: "auto",
customer:customer.id,
line_items: {
0: {
amount: "6000",
currency: "EUR",
name: "T-shirt",
quantity: "1"
}
},
});
Hi, how can i set locale translation for Klarna.Payments {locale: 'de-DE'}. want to translate the drop in. using .js
@rustic yoke hi. hmm, good question.
so you're using Klarna with the custom widget (https://stripe.com/docs/sources/klarna#customer-action) and want to localise the contents of Klarna's widget?
right
hmm. I don't know off the top of my head because it's actually part of Klarna's SDK, but let me try to figure out how you would do it
nice thank you
My mistake thanks @meager hawk I had an old test stripe customer_id which was from another stripe account .. stupidly
Hi guys, have you experienced any issues configuring SSO between Azure and Stripe? I'm getting always the same error but checking on Azure I see a successful SAML response
Single sign-on couldn't be authenticated. Error: Missing role for team member in assertion. Each assertion must contain at least one role mapping for one of your accounts
@glacial schooner I'd suggest writing to https://support.stripe.com/email with that, SSO integrations are a beta right now and I don't know much about them but if you write to support we can get the right people to look into it!
Hi! 👋 We're developing our integration with Stripe right now where we will use SetupIntents to save cards for easy 1-click payments. For context we're a hyper-local online grocery service that expect our customers to shop a couple of times per week. We want subsequent payments to be super smooth, with as little verification as possible, and would rather have some more friction the first time a card is registered than every time it's used. With that said, I'm wondering what the recommendations are for values for usage = on_session / off_session (payments will always happen online in the app) and confirm = true / false? Thanks!
Hi guys, I am testing this card 4000002760003184 (requires authentication on all transactions). Customer and attached PM are created on our plateform, and PI is made for a connected account. PI creation returns "authentication_required". On the client side we stripe.confirmCardPayment passing the clientSecret and the payment_method_id but it raises an error "No Such PaymentMethod" eg : pi_1J5rclAfijtFgEVe4gg1dwcH . What is wrong 😦 ? Thanks
@vocal wagon hi! well if the customer is only ever going to pay directly through the app and you will never charge them directly yourself(like a recurring charge for their service, or a one-off charge for some administrative reason), then you can use usage=on_session . That results in less chance that the initial set up requires 3D Secure but if you do do an off-session payment later, you might have to bring them back/send a push notification for them to do it then.
Sounds to me more like you want to use usage=off_session though. That introduces more chance of the setup requiring 3D Secure(so more friction at the start) but it lets off-session payments be more likely to succeed. If it helps, usage=off_session also implies usage_on_sesion , it's like a superset.
On session payments require authentication always regardless of how you set things up, unless the bank decides to grant an exemption(https://stripe.com/ie/guides/strong-customer-authentication#exemptions-to-strong-customer-authentication) . By processing an off-session payment you are claiming a specific exemption https://stripe.com/ie/guides/strong-customer-authentication#merchant-initiated-transactions-including-variable-subscriptions
@glossy osprey you have to pass the connected account ID to stripe.js : https://stripe.com/docs/connect/authentication#adding-the-connected-account-id-to-a-client-side-application
Great, thank you @meager hawk - makes sense! What about the confirm parameter, is that something we want to set to true also for more friction up front and less later, or is it not needed with usage=off_session?
I'm pretty sure it's done, I'll check again
note that you might want to initialise Stripe twice on the page since you might want one instance to create the PaymentMethod and another to call confirmCardPayment
var platformStripe = Stripe(key);
var connectedAccountStripe = Stripe(key, {stripeAccount:"acct_xxx"});
The payment method is created upfront (SetupIntent) on our platform without connectAccounts
ok, then you can't do anything with that on a connected account, right?
since the object exists on the platform.
if you want to charge it with a PaymentIntent on the connected account you'd have to clone it first (https://stripe.com/docs/payments/payment-methods/connect#cloning-payment-methods) , not sure if you're doing that.
@meager hawk Yes we are cloning it, here is the bad request : request-id: req_6esE6VMxdlFfmR
Nevermind, my boss was mistaken. ^^
@vocal wagon well it's not really directly related. You have to confirm the SetupIntent at some point, that's the action that actually does the setup. You can pass confirm=true on the backend when creating it to attempt it at that time. If the set up requires 3D Secure, then you have to go to the frontend and call https://stripe.com/docs/js/setup_intents/confirm_card_setup#stripe_confirm_card_setup-attached
But usually you just create the SetupIntent on the backend without confirming it, then you pass to the frontend and call https://stripe.com/docs/js/setup_intents/confirm_card_setup#stripe_confirm_card_setup-with_element and it handles everything.
@glossy osprey you can see you're passing a PaymentIntent Id pi_xxx to the payment_method parameter which is the problem
you should be passing pm_1J5rlmAfijtFgEVeGbO5htvy , the payment method you just cloned
Thank you very much 🙂
@vocal wagon you pass it to klarna[locale] when creating the Source I believe
let result = await stripe.createSource({
type: 'klarna',
amount: 816,
currency: 'eur',
klarna: {
product: 'payments',
purchase_country: 'de',
locale: 'de-DE',
first_name: 'John',
last_name: 'Doe'
},
owner:{
...
...
ok thanks i will check ist
mornin folks
Hi guys, still having trouble with testing cards. I have this error : " "message": "The provided PaymentMethod was previously used with a PaymentIntent without Customer attachment, shared with a connected account without Customer attachment, or was detached from a Customer. It may not be used again. To use a PaymentMethod multiple times, you must attach it to a Customer first." Here is the request-id: req_2RbaE4uZiRMn2b It happens with the card that requires authentication on all transactions
@glossy osprey that sounds expected. What part of this is unexpected to you?
The customer and attached PM are created on my platform. I clone the PM (pass customerId + ConnectedAccount) and creating a PI with connectedAccounts + the cloned PM. It asks for authentication and on the client side I pass the clientSecret + PM to confirmCardPayment and I get this error
Hi There
I want to confirmCardPayment
I have a question regarding the subscription model
when we are getting the webhook event for invoice.created ..for subscription cycle ..I am observing many property is coming as null which was there when invoice created happened first time with subscription created ..like paymentIntent ,apllication_fee,invoice_url .. If I would use Invoice.paid webhook event then should I will get these fields ?
Hi guys! Does anyone know we have some of webhook to check when the subscription status has changed from "incomplete" to "incomplete expired"?
@glossy osprey Sure, so when you did this as an off-session payment authentication was required and the payment was declined. Now you're trying to supply the same PM again but you already consumed it.
@glossy osprey the clone PM you created on the connected account isnt attached to a customer so its one time use only
@glossy osprey You should attach to a customer if you intend to use it multiple times, or re-clone from your platform. The authentication can happen, and you said you used the "always require auth" card so... this is expected. You cannot pay with that card off-session. You should use the 3155 card if you want to test your setup flow.
@glossy osprey if you're specifically trying to test the auth/decline flow, then you've successfully hit it 🙂
@granite basin hey there! when the invoice is first created it is a draft, so those things may not exist yet. Once finalized these should all exist.
@quick shadow I would expect customer.subscription.updated to cover this. Do you have an example subscription id?
@daring lodge I want to attach a card to a customer, and then use that PM for any further transaction. I expect the authentication on all transactions but not the decline. If I understand correctly, the primary PM is attached to the customer but the cloned one is not. How do we manage PI for connected accounts with the primary attached PM ?
Hello, i want to change my bank account but i cannot delete the connected one or modify. Both accounts are EUR
@glossy osprey The cloned PM is a new PM so the same rules apply. You need to attach it to a customer on the connected account. Why do you expect the authentication but not the decline here? You're using a test card that explicitly always requires auth. Auth is required. You've indicated the payment is off-session, so the customer is not available to authenticate, and the payment is declined. If you mean to be able to action the auth for your customer, because you do in fact have them available, then you should not use off-session. Off sessions means the customer is not present on your app/site.
@quartz drum Unless you're asking about doing this as a developer for a platform you're building, we can't help with that here and you need to contact support.
:question: Have an account question, @quartz drum?
While we're sorry to disappoint, this Discord is intended for technical questions and developer chat—we're not able to help with account specific questions. For help with your account please reach out to Stripe support directly at https://support.stripe.com/contact
Hi all, looking for a little advice when someone has the time. We are currently developing a platform with connected accounts, we were initially going to choose a custom approach but after reviewing the complexity decided express was a better fit, however we currently had an approach that we would store some basic details, like name, address, email etc in our db locally and use this both for prefill on connected account creation and update it using webhooks when the user updates this info on stripe. However I have just realised that there appears to be no access to the persons api for standard and express to fetch this data, and it is not returned on account retrieve. Can anyone propose a solution to this problem? essentially we want the users not to update the same information in 2 places if for example and individuals address changes. Many thanks in advance
Hi guys, I need help, I'm getting issue You can not pass payment_intent_data in subscription mode.
so ,I should capture customer.subscription.updated webhook event to capture all subscription cycle
How do I pass payment_intent_data for subscription checkout session create
Hey! We're using Stripe as a gateway (via Chargebee), and have a bunch of transactions that are failing with do_not_honor. Currently we're only optionally asking for name on card. Is it likely that making that compulsory will improve conversion? Generally, in terms of asking for more fields, is there a good method to optimise what we prompt the user for to increase successful transaction rate, without putting people off paying even more?
I want to pass setup_future_usage attribute
that fall under payment_intent_data
which working great for one time payment
but not for subscription
@granite basin This example sub appears to be active, so i wouldnt expect you'd ever get such an event. Incomplete/expired only happens at the start if you dont complete the first payment.
@twin cairn You can't, that's only supported in payment mode. What are you trying to do?
@twin cairn For what purpose? The payment method should already get attached to your customer for future use with the subscription.
can someone help me with checkout button
and provide me how to do it ??
thanks in advance
i have problem with it. i trully belived that i did properly in dashboard howerver last time didnt work
@fierce sigil You can prefill such information with Express before sending them for onboarding, but the information is explicitly not available to you after that. If you need to have certain information here you would need to re-collect it or otherwise continue using custom to sync the data.
@fierce barn hello! can you say more? What do you need help with?
Thanks that's what I thought would be the case, just wanted to check I hadn't missed something obvious
i created product in stripe dashboard and i wanted to sniped to my website. i creat one code with test api and other with life. person who creat my web put life api code however still was showing that is test mode checkout button. if some can provide me how to creat product and implement to website i would appricietie it
it might be someone has tutorial for begginers
my website has been made in wordpress
@fierce barn How are you trying to add this to your site? Is it a single product/subscription?
i tried to use payment link however i cannot redirect client to download page to download files after payment
its a signel product
https://mwhealthsolution.com/service/programs-packages/ healthy start product
please have a look
at the moment he impelemnt payment link however i would like to have checkout button
@fierce barn ah, yes, Payment Links doesn't offer that just yet, so you'd need to mange this with a checkout session or using a webhook to email your customer
with the same futures like promo code and billing address
@fierce barn You can put the payment link on a checkout button, that's fine, but it doesn't support directing or a digital download
@fierce barn Yes, Checkout supports those 🙂 Try out the options here: https://checkout.stripe.dev/
exacly this one i want to have
and when i creat product and sent to designer he implement this however still was test mode insted of life api
@fierce barn You can also explore our partners that offer WordPress plugins for digital product delivery: https://stripe.com/en-ca/partners/apps-and-extensions?q=digital
which was is easer and faster ??
i belive checkout sesion without plugin work for me but i would like to know how i can fix the problem and do it properly
is there any tutorial ??
thanks
@fierce barn The docs for building with Checkout are here: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=checkout#add-checkout-button
I dont know about using any of the plugins - you'd need to review their sites to see what is supported and what you have to do
if you could confirm if im understand prperly. when i creat product in the dashboard than when i get in to the product with section price there is option "get checkout code snippet" i belive that this iss all what i need to impelemt in the website and checkout button will be working ??
or is anything else what i need to have ??
@fierce barn What youre refering to is a deprecated "client only" version of checkout from before Payment Links -- it is not recommended, and does not support features like Promo codes
If you want Promo codes you'll need to integrate Checkout with some server-side operations. Are you able to build that out? If not, the plugin might be your best option if Payment Links doesnt meet your needs.
im not person with IT background and im looking for someone who can do it this for me
however not many people want and know how to do it
i tried few times and no respond or people said that its to complicated
does stripe support dealing with small task ?? like this ??
and can help me remotly ??
how much time do you need to build that ??
from your experience ??
It really depends on the particulars of your business needs, there are many ways this could be done. Given what you describe I would suggest looking again at the plugin options for a way to get going quickly.
Alternatively, you can contact some of Stripe's expert service partners to investigate custom development:
https://stripe.com/partners/expert-services
synthrider can i speak with you on priviet please just one question
@fierce barn Please keep the discussion here -- we should be able to discuss any general issues publicly. For account specific support you'll need to reach our to our support team.
I have a question regarding the subscription model
when we are getting the webhook event for invoice.created ..for subscription cycle ..I am observing many property is coming as null which was there when invoice created happened first time with subscription created ..like paymentIntent ,apllication_fee,invoice_url .. If I would use Invoice.paid webhook event then should I will get these fields ? or please suggest what should I do to capture all the payments for a subscription.
@granite basin hello
Hello @bold basalt
@granite basin yes on invoice.created, the Invoice is still in draft, it won't have all the fields as the payment associated with the Invoice hasn't completed. But for non-zero Invoices once they are paid, after the invoice.paid event you should see the payment_intent field on the Invoice as a payment has occurred
invoice_url ,aplication_fee as well ?
@granite basin yes
great thanks @bold basalt
@daring lodge any thoughts / suggestions on this? I looked for documentation about it, but couldn't find any!
@north scaffold hello, one sec
hello there. We are using Stripe and would like to know how we can apply billing address verification for credit card approvals
@jade sierra hello! what Stripe product are you using? Elements? Checkout?
@north scaffold you ideally want to collect cvc and zip/postal code for the card. Declines can still happen though, depends on a number of factors really, there's no one consistent way to optimize against them
Thanks! Would be lovely if Stripe could write more detailed articles about this. e.g. graphs of typical failure rates in different countries based on information provided etc.
@bold basalt Well I believe what we have is the Stripe Gateway and it is the checkout experience that I am referencing. During checkout, it seems they can enter any billing address and it will be approved but I'd like to have some point of verification
@jade sierra verification would be through Radar Rules. When you make a payment, banks can verify if the billing details match but sometimes even if they don't, they can accept the charge. Using a Radar Rule, you can have your integration block such charges that don't have the billing details match (or were not checked).
@north scaffold there is this which I think you might have already seen? https://stripe.com/docs/declines
@bold basalt ok thank you. I will review the information provided
Hi all,
We've got a custom checkout flow where we store cards and create a subscription later.
I'm using a setupIntent to go through 3D secure and go through 3D secure.
After that a subscription is created, which creates a paymentIntent.
When I want to pay that subscription using the paymentIntents.confirm API call (with off_session set), I need to 3D secure again.
I'm using the card with this description Requires authentication for the initial purchase, but succeeds for subsequent payments (including off-session ones) as long as the card is setup with setup_future_usage.
And setup_future_usages is set.
What do I need to do to not go through the second 3d secure flow?
@bold vine hello! reading over...
@bold vine so that is expected behavior, I question why you're creating a SetupIntent first, then a Subscription.
Why not create a Subscription, which creates a PaymentIntent under the hood, and then confirm that? That way you do authentication on the first Subscription payment.
@bold vine there is a way to get your approach working too but just wondering if I can guide you differently
Basically the app allows for stored payment methods without having an active subscription. So in that scenario we have a previously stored card and the user can choose to then create a subscription.
@bold vine ah gotcha, yeah so that card that you're using only does not require authentication for off_session payments. When you create a Subscription, that payment is by default on_session, it assumes the Customer is on your payment flow. So there are no off_session exemptions claimed for that card as the customer is in the payment flow, selecting the card to pay with.
@bold vine for a complete answer, if you create that Subscription by sending the off_session: true param, then the initial payment would succeed. But that parameter signifies that it is a merchant initiated request and the customer is no longer on the payment page.
Hello I had a quick question about decline codes. Do these typically come back on creation of payment intent, capture of payment intent or both?
@robust meteor hello, a decline happens when a PaymentIntent is confirmed and attempts a payment. So not on creation alone (unless you're also confirming on creation with a payment_method) and not on capture, but the step in between those.
Ok will try that, thank you !
Good morning! Would someone be able to tell me if transfers automatically retry? If a transfer fails dues to insufficient funds, will those transfers keep trying until there is funds?
Thanks for your response. So if a payment intent was confirmed, then the card used was reported fraudulent/stolen (as an example) before it was captured. There would be no decline code when attempting to capture?
@vestal trench hello, do you mean Transfer like one created from a Platform to a Connect acct? Or do you mean a "Payout" ?
a transfer from platform to connect account
@robust meteor that is an interesting case, I'm not sure if that capture would fail or not. Since there were funds already held during the original confirm. A bit of an edge case, not sure I have an answer for that. Capture's typically aren't expected to fail but sometimes they do
@vestal trench gotcha, thanks for clarifying, there is no automatic retry behavior there.
@bold basalt thanks
is there anyway to bypass the 90 day wait when your funds are being held? it don't even make sense why my money is being held how is it my fault i gained alot of income in a short period of time and im being penalized for it. Even with all the proof and validation lol this is crazy man
@upper abyss hello, I don't really know much about Account Balance and wait timelines, would recommend asking Stripe Support at https://support.stripe.com/contact. They can help with account related questions.
ty
Hi guys, I am using the Stripe connect feature to pay out people. Is there a way to have the stripe fee to not come out of the application fee and instead be given to the customer?
@feral tiger hello
@feral tiger not sure that is do-able, as whatever you charge the customer, the Stripe fee is a proportion of the total amount charged.
@bold basalt Let's say there is a $30 charge and my application fee takes $5. Rather than having the stripe fee come out directly from the $5, is there a way to have it take from the $30 immediately?
Then the application fee ($5) is removed?
@feral tiger what fund flow are you using? Direct Charges, or Destination?
Hello guys i need some advice incorporating stripe api into a hotel-booking mobile app and with stripe we have the stripe.customers.create method that creates a customer in my application we already do user registration .Is it possible to save payment data in my database or can stripe interact with my database ?
amount=str(ticket_price),
currency="cad",
payment_method_types=["card"],
capture_method="manual",
transfer_data={"destination": ticket.office.stripe_id},
application_fee_amount=str(stripe_intent_application_fee),
)```
Using these features. So would be destination.
@feral tiger yep Destination, it is expected that it takes funds form the application fee. Not sure there's a way to take the fee from the Charge itself, not without changing the entire fundflow fundamentally
@ionic dagger hello, reading one sec
@bold basalt what's the alternative?
@feral tiger you'd need to add the amount you expect the stripe fee to be to the application fee
@ionic dagger
Is it possible to save payment data in my database
yes, to clarify, this is expected of your integration to do, you create payments, listen to Stripe webhook events and then update your database records
@bold basalt thanks for the feedback so for instance i am using mongodb for my db i had created a payments schema that has fields of the user, room reservation, paymentStatus and transactionId.Therefore if i am to get you right with stripe webhooks i can store that information in my payments schema?
@ionic dagger yes, that would work. I would try it out in test mode, create and confirm payments, see the events you get sent to your webhook event endpoint and look at the fields you want to store to your db
cool @bold basalt thanks a lot👍
Hi, I have a question. When I use the <CardElement /> subscription approach available on github (inside subscription with fixed price), can I modify the handle payment function and just add the customer email this way: ```js
const handleSubmit = async (e) => {
e.preventDefault();
// Get a reference to a mounted CardElement. Elements knows how
// to find your CardElement because there can only ever be one of
// each type of element.
const cardElement = elements.getElement(CardElement);
// Use card Element to tokenize payment details
let { error, paymentIntent } = await stripe.confirmCardPayment(
clientSecret,
{
payment_method: {
card: cardElement,
customer: {
email: email,
},
},
}
);
if (error) {
// show error and collect new card details.
setMessage(error.message);
return;
}
setPaymentIntent(paymentIntent);
};
Is this a valid approach or do I need to create a user with "stripe.customers.create({userdata})"?
@pastel hemlock It's not possible to set payment_method.customer.email like that, but you can set payment_method.billing_details.email if you want (without creating a Customer): https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details-email
nice, thanks. I'd like to avoid creating it
i have installed @stripe/stripe-react-native but i am using expo as the framework when i add the plugins in the app.json file and i try to run the project i get should NOT have additional property 'plugins'.
@ionic dagger Unfortunately I know very little about Expo and React, but maybe someone else here might know?
Hello developers
i need a help
I have a requirement where if the user switches from current subscription to another subscription then i can charge immediately for the subscription and this subscription will start after the current subscription ends.
Hey guys, very awesome of you to throw up a disc chat, super excited to hopefully do some development and be able to reach right out to you guys and ask some questions
@exotic rain Hello! Thats possible with proration: https://stripe.com/docs/billing/subscriptions/prorations
@wary spade Hello and welcome! 🙂
Can anyone verify that the NuGet package supplied for .Net still available and maintained?
@wary spade Which one are you referring to specifically? This is our official .NET library: https://github.com/stripe/stripe-dotnet/
That's the one 🙂
@wary spade Yep, it was updated eight days ago. 🙂
Awesome. We have a 'payment gateway' with our code base where we allow clients to choose different payment processors during their set-up process. After speaking with a Stripe associate he mention two other implementation options which involved client side js libraries and embedding an iframe. Before we verify with our client who wants to add Stripe as a processor I wanted to make sure this was still a very supported method of connectivity.
hello @mighty hill thanks for helping but i don't think proration will help to charge user immediately upon switching the subscription and start this subscription in the future basically after the current subscription ends.
@wary spade Yep, it is. Sounds like they're talking about Stripe Elements: https://stripe.com/docs/stripe-js
Yeah that sounds familair.
I found this blog that I think illustrates exactly what we're looking to do but I did see it was a year old and I wanted to make sure I wasn't barking down a trail that would end in an API with an EOS date right around the corner.
@exotic rain Why not? Can you provide more details about what's blocking you?
Here is the blog I'm referring too if you have a moment to take a quick look:
https://tudip.com/blog-post/stripe-payment-in-asp-net-mvc/
@exotic rain Specifically, would setting proration_behavior to always_invoice work for your use case? https://stripe.com/docs/api/subscriptions/update#update_subscription-proration_behavior
@wary spade That blog post is using our older APIs to create Tokens and Cards. We no longer recommend those APIs as we have newer Payment Intents and Payment Methods APIs that replace them: https://stripe.com/docs/payments/payment-intents/migration/charges
Great, thank you very much for your time Rubeus. Have a great day.
Rubeus, quick question about the Payments Intent's API and refunds. Am I understanding correctly in that I should be using the pi_* id to send refunds? Almost as if the payment_intent_id is acting like a normally tokenized cc token?
@wary spade Yeah, you would create a Refund and specify the Payment Intent ID.
@mighty hill i got it
Now let me tell to you my way what i am doing in switching subscription opearation
First i am cancelling the current subscription
Second then creating the new subscription
then invoicing the user with the new subscription.
please correct me if it is not the correct way of doing on switching the subscriptions
@exotic rain Why are you doing that instead of modifying the existing Subscription?
okay so it is not the correct way of doing it?
@exotic rain It's not recommended unless you have very specific needs, no. See here: https://stripe.com/docs/billing/subscriptions/change
Learn how to change existing subscriptions.
so i can achieve the switching by just updating the subscription with new price object?
@exotic rain Yep, basically. The documentation linked above provides specific details about how to do it.
Thanks @mighty hill
Hello, I'm having a problem processing payments after connecting a different bank account. I have updated keys and put in all the proper information. The code coming up says
NO SUCH SOURCE: 'SRC_1I772BLFIHOJJHALVDIFXBFC'; A SIMILAR OBJECT EXISTS IN TEST MODE, BUT A LIVE MODE KEY WAS USED TO MAKE THIS REQUEST.
You're using your live mode API keys to retrieve an object created with your test mode API keys. You need to use live mode or test mode in both instances.
hello - I am receiving invoice_payment_intent_requires_action even though when I call confirmCardSetup() in JS I click 'Confirm'
What's the request or event id?
req_7H83AUaMci6paD
my issue is that I am running:
try
{
$stripe->invoices->pay(
$invoice->id
);
}
on the backend
but even though I catch all errors listed here: https://stripe.com/docs/api/errors/handling
I am not alerted to a failed payment
this only happens for cards that require authentication
The test card you're using will require authentication on every single transaction. You instead want to use the card ending in 3155 on https://stripe.com/docs/testing#regulatory-cards
Both my live keys are updated on my website, but I am still not able to process payment. The same code is coming up. Is it a bank problem?
You have to create the Source in live mode to begin with. You used your test mode keys when you created the Source.
@sick talon thank you that worked. but I still think I have a problem
yes, these are all test mode payments
but shouldn't the try/catch alert me that a payment failed?
It should throw \Stripe\Exception\ApiErrorException per https://github.com/stripe/stripe-php/blob/master/lib/Invoice.php#L198 -- what error class are you seeing? Are you using the latest version of stripe-php as well?
I am catching that exception but no, it does not register
hang on i'll check my Stripe version
I updated to the latest version, I am using catch(\Stripe\Exception\ApiErrorException $e), but it still did not catch the error
Sorry, I am just a bit confused. How do I create the source in live mode?
Hello there, I am using invoices.finalizeInvoice(id) api to charge my customer. I am planning to use Stripe webhooks on the invoice events. Can someone tell me what is the difference between the event invoice.paid vs invoice.payment_succeeded ? II want to register an Endpoint which can be called if we were able to charge the customer's credit card without any issues.
You'd use your live mode API keys when creating it the same way that you originally created SRC_1I772BLFIHOJJHALVDIFXBFC
(you used your test mode keys when creating that one)
invoice.payment_succeeded only happens for actual payments made through Stripe. invoice.paid will always happen for payments through Stripe as well, but it will also happen if you mark an Invoice as paid out of band (meaning it was paid, but not through Stripe)
Aah okay! so in our case we are generating the invoice via invoices.create and charging the customer's credit card which is already set up for future use via invoices.finalizeInvoice(id) . We are not planning to mark them paid via API or dashboard. So should we use invoice.payment_succeeded just to be sure that the payment did go through successfully?
You can use invoice.paid or invoice.payment_succeeded as they both are sent when an Invoice is paid through Stripe. Either one works for your use case.
Alright sure!
Also is there a way I can test invoice.payment_failed event? Stripe is not accepting the expired credit cards or incorrect card numbers. How do I test this scenario?
Use the card ending in 0341 on https://stripe.com/docs/testing#cards-responses (attaches to a Customer but payments will fail)
(you don't even need to set it up for future usage)
You can also use the card on https://stripe.com/docs/testing#regulatory-cards that can be set up successfully but fails for insufficient funds
Thank you so much!
@sick talon are you sure that the error thrown from a failed invoice payment is \Stripe\Exception\ApiErrorException? Is there a different one I should try?
What's the actual error type if you print it out in the "catch all" under ... } catch (Exception $e) { // Something else happened, completely unrelated to Stripe }
nothing. I get no error message at all
Hi! Does maxNetworkRetries on the nodejs library work if you hit Stripe rate limit? (So it will retry with exponential backoff in the case you are hitting the rate limit)
Nope, it's documented and mentioned in https://stripe.com/docs/rate-limits#object-lock-timeouts
But unlike rate limiting errors, the automatic retry mechanisms built into Stripe’s client libraries will retry 429s caused by lock timeouts
Got it - so we'll need to build out our own rate limit error handling to retry
Strange, so it's not throwing an error at all and you can continue with your code? The catch part never fires at all for any of the branches?
Good afternoon guys, I have a question about API development without the use of client side libraries or web-hooks. We have an in-house developed 'payment gateway' which is basically a .Net interface where some simple charge/refund functionality is exposed. As things currently work we take in CC information (we're PCI compliant and certified), tokenize, and perform transactions; all of this happens in a standard request / response design. We would rather not have to incorporate webhooks into our projects flow if you don't absolutely need to.
We also don't have the option to expose any HTML or client-script because this API is already being consumed by a good amount of our clients in a completely headless methodology where no HTML is ever served up. I was directed to look at the Payment Intents API but I'm seeing client scripts being used.
Is what I'm looking to do possible? Is there a different API I should be looking at?
Correct. You can view my implementation here: https://gist.github.com/bobwurtz/135f00d1242b4ce80ad8cce67b2b944f
(Sorry for the huge question I see you guys are right in the middle of a back and forth)
no worries! we're all here for help
Are there any arguments that can be passed to the customer list endpoint (https://stripe.com/docs/api/customers/list) to filter out all customers who have a discount applied?
You can skip webhooks using https://stripe.com/docs/payments/accept-a-payment-synchronously (but you also likely want to poll the API for any incomplete payments periodically to make sure you don't miss anything)
Awesome
ok so to confirm, in your code, $succees is true if you print it out right after you set it in the try branch?
correct
nope, you'd filter the list locally after retrieving the Customers
actually wait - this is weird
my code does not reach resetting the $success variable in the try block
but it doesn't throw an error either
I'd put print out statements in each of the catch parts and see which one is happening
hmm okay. When we generate invoices we want to make sure that any customers without a coupon have one applied before invoice generation. I guess I will have to rethink my approach. I would like to avoid requesting information from Stripe about each user though. But if that's what we have to do, I guess we can do it.
that's what the dd() is in each of them - I just added one to the end of the try block and it did not reach that point
I'm even more confused now
it's behaving like it's throwing an error, but nothing is being caught
Is there one in catch(\Stripe\Exception\CardException $e)?
thank you!
now I have to figure out why calling return doesn't stop all the code execution
that call is supposed to display an error message
and stop the function
which return? The one in catch(\Stripe\Exception\CardException $e) ?
yes
It's been a while since I've coded much in PHP but https://stackoverflow.com/questions/18963053/return-inside-or-outside-try-catch might help
thanks for that. something strange is going on but I don't think it's related to Stripe so I'll get out of the way
thanks again for your help!
Any time!
Does anyone know why direct charges aren't recommended for Express accounts? We're looking at an approach that would implement that pattern, and it's hinted in the docs that we shouldn't, but it's unclear why
There are many reasons. What is your reason for wanting to do Direct with Express?
If the card is already set up for future use and we are trying to charge customer via invoices.finalizeInvoice . In case payment fails, does Stripe performs automatic retries?
If you pass https://stripe.com/docs/api/invoices/finalize#finalize_invoice-auto_advance it will
So passing auto_advance will not affect the payment in any way except that if payment fails, Stripe will automatically retry charging the payment method. Is that correct?
correct, auto advance just means we'll keep moving forward trying to complete the Invoice payment cycle
got it!
Is there a way I can also request Stripe to send the receipt of the successful payment as a result of invoice being finalized? I mean is there any API call I can make to Stripe and they can trigger the email receipt to customer's email address?
We host a platform where our users offer a subscription service (that they choose the price for) and we take 10% of the subscription fee. At low price points this can lead to a situation where we end up owing money, so we'd prefer to offload all the fees onto the user in order to avoid the situation where we get a significant number of users creating a lot of cheap, unused subscriptions that add up to a large monthly fee for us
Meaning a finalized one where the payment fails?
Rather that using Direct+Express, I'd recommend that you calculate the 10% differently if the total is below a certain amount (and change your application fee accordingly)
@wispy star What do you mean by "cheap, unused subscriptions"
If a user makes a subscription that costs $1.00/month and only has 1 subscriber, then they get .90 and we get .10 and owe ~.30 in fees, plus an extra ~$2 monthly
As the platform, you create the Subscriptions, so you'd just want to make sure either a minimum amount is reached or you charge fees accordingly.
Gotcha. You'll want to calculate the percentage that you take to include the cost of processing. So you'll say 0.10 + 2.9% + 0.30 = 0.43
The account fee ($2/mo) is going to happen regardless of whether the charges are direct or not
To avoid the account fee losing you money, you can use Standard accounts, or require a minimum amount to be set on subscriptions until the user reaches a certain threshold
How do we avoid paying out until the user reaches a certain threshold? Isn't the money divided up at the time of the sale (so immediately 90% would go in the user's account and 10% in ours)?
Or be set aside for those accounts, rather
You can set a manual payout schedule on the account, and then trigger the payout from your end using the /v1/payouts api
Gotcha, interesting! We'll look into that. Thanks!
Hello, I have installed stripe checkout on my site to sell subscriptions. I have a pricing page on my site where users can click a tier 1, tier 2, or tier 3 subscription plan that redirects to stripe checkout. I would like to add an optional one-time setup fee/product to all tiers, so, when the user clicks on any one of the subscription plans and is redirected to checkout, they have the option to add a one-time setup fee to their order at checkout. Is the way to do this to install the stripe-cli and modify my checkout pages that way? If I modify my checkout page template through stripe-cli, where do the changes get saved? I've seen this video on how to actually do it: https://www.youtube.com/watch?v=9aw24Tdy40A I just need some direction on how to start. Thanks so much.
Hello everyone, guys I have a question, so I made two products for subscription silver and gold, but I want the customer to be able to activate either one or the second, but in the manage cabinet he can activate two at once, how to fix this problem?
Off the top of my head, you can add a subscription item for the setup fee, then remove the subscription item without proration after the first invoice succeeds
Where are you starting from?
The video seems like it covers a lot of the process
@fast mantle Thank you! Yeah, what I was hoping to avoid was haivng too many subscription options...bascially what I have on my pricing page are six different subscription options: Tier 1, Tier 2, Tier 3 and then Tier 1 with SSO, Tier 2 with SSO and Tier 3 with SSO...
Do you mean the customer portal?
yeah
@deft bough I don't think that's something you can control to that level in the billing portal, but let look as well
@deft bough Can you clarify exactly what you're seeing - I'm testing this out on my end, and I don't see the ability to activate two new plans at once
@dim hearth
@deft bough Thanks for sending a screenshot (I deleted it since it had an email in there and wanted to be safe)
@deft bough Give me a minute to look a bit more
@deft bough Okay - so here's what I see happening. You have a customer that subscribed to two different prices (in two separate subscriptions) by going through Checkout twice. When you visit the billing portal for that customer, they are now able to change both plans. If you want to restrict your customer to only one active subscription, that would be something you build into your code and is separate from the billing portal (the billing portal doesn't have any functionality related to the creation of new subscriptions, it only handles updating existing ones).
@rapid stag Something that may be helpful are adjustable line items in checkout (https://stripe.com/docs/payments/checkout/adjustable-quantity) so that your customer could choose to remove the one-time fee if they aren't interested in adding it
@dim hearth Thanks! I hadn't thought about doing it this way...but I'm going to check it out. TY!
@dim hearth even if I somehow stoped the previous one in the code when buying a new subscription, he will still have the right to go into the biling portal and see the canceling subscription and then click on activate, and as a result there will be 2 actin subscriptions again at the same time 😦
@dim hearth Can I somehow remove this subscription altogether, even from the list, so that it would be visible only in history?
I don't believe we show cancelled subscription in the billing portal at all, so this shouldn't be an issue
@deft bough That's because the subscription is set to cancel at the end of the billing period, but is still active. If you set the subscription to cancel immediately it shouldn't show.
@dim hearth got it, btw, how i can do it imidiately via code? i found just 1 case in api docs how change subs of customer, this link : https://stripe.com/docs/api/customer_portal/configurations/update, is it true?
You can use this (https://stripe.com/docs/api/subscriptions/cancel)
@dim hearth but it will cancel for all customers isn't it?
@deft bough No, when you make a request to cancel a subscription you pass in the subscription ID so only that one subscription is cancelled
@dim hearth oh i got, id is unique for each customer yeah?
@deft bough ID will be unique for every subscription, not just unique across each customer
@dim hearth got it thx a lot for help
Is there a way to make an accountLink without sending a return_url? We are planning on setting up deep links in the future but don't want anything for the return url right now.
Unfortunately, that's a required parameter when creating an account link but you can always use something like https://example.com/return just while testing
Is it possible to generate a single client secret so every customer can pay using it?
No, that isn't possible
do I need to generate them on server-side or can they be generated right on my client?
Client secrets are generated during the creation of a Payment Intent, and those requests can only be made server-side
thanks
I actually designed this API! The return URL is just where the user goes back to after they're done on Stripe. It can be any page on any domain. I'd suggest linking the user to the URL of their dashboard when they log in; it doesn't need to be anything elaborate.
Does invoice object returned from invoices.finalizeInvoice(id) not contain customer metadata that was persisted in Stripe when creating the customer? It returns most of the customer information but not the customer metadata. Am I missing something?
This is metadata that is on the Customer object itself, correct? If so, you need to expand customer when finalizing the Invoice since it isn't included by default. You can read more about expansion here (https://stripe.com/docs/api/expanding_objects)
Thanks basta, that should be an ok default for us to use.
in the docs, there is this "items" param, it says it's required, but any of it's child parameters are not required, how can I create a paymentIntent with this?
Which docs are you look at?
Just to make sure we're on the same page - this is for a request to create a subscription, which will immediately generate an invoice, which in turn is associated/tied to a payment intent that we also create. For items, at a minimum you need to pass in items.price for each subscription item, but if you want to generate prices in-line you would pass in all the required fields found nested under items.price_data (https://stripe.com/docs/api/subscriptions/create?lang=cli#create_subscription-items-price_data)
Is this the correct way of doing so? I am using Node.js and getting error (Error: Stripe: Unknown arguments ([object Object]). Did you mean to pass an options object)
const finalizedInvoice = await stripe.invoices.finalizeInvoice(
invoice.id,
{ auto_advance: true },
{
expand: ["customer"],
}
);
yeas, this is what I'm trying to achieve. I think I got it, just was a bit confused
This is what you want
invoice.id,
{ auto_advance: true ,
expand: ["customer"],
}
);```
but where can I create those products I need to fullfill a this productId param?
@pastel hemlock You can create those in the dashboard or through the API (https://stripe.com/docs/api/products/create)
nope, it still does not return me the metadata for this customer. I can see the metadata on the dashboard but it does not come back with the invoice.
Can you send a customer ID so I can take a look?
cus_JjUnMJGZoZwD8q
Aah! I see in the logs that finalizeInvoice returns the customer metadata. However there is another API call /pay after the invoice is finalized which doesn't return to me the customer metadata. What can I do to get the metdata back?
Ahh perfect, was just about to say that I do see the customer metadata returned from your finalizeInvoice request. If you also want to see it returned in your pay request you'd do the same thing - expand "customer".
yep..I missed that
Hi all - does anyone know if there's a way to move a customer subscription from one stripe account to another?
@dim hearth Actually I asked the incorrect question. I am using Stripe webhooks and on the invoice.paid event I have registered my endpoint. Now when stripe sends me the request, it does not send me the customer metadata. I think I went the wrong way. I don't want to wait for invoices.pay() Is there anything I can do to get the customer metadata back from the above event?
I believe the only way is to simply re-create the subscription on the new account
Gotcha - so webhook events aren't able to be expanded so you won't be able to get this information from the event object, but you can either re-retrieve the Invoice w/ expansion or you can just retrieve the Customer. Another possible alternative is to just update the invoice w/ the necessary metadata so you don't have to check the customer each time
Is it possible to update the invoice after it is finalized?
Once an invoice has been finalized you can still update its metadata (after invoice finalization you can't update any monetary fields, but this doesn't apply to metadata)
okay so something is strange..While creating the invoice, I added the metadata which I can on the dashboard. (Invoice ID: in_1J63MxJ2kHvdWVjopEVahWMp) However when the invoices.paid event is triggered, it sent me the metadata object empty for the invoice.
oops! @dim hearth don't worry about it. It's my service-api not stripe.
All good..I didn't re-deploy my service after code changes.
hi, have anyone here already user localtunnel to test webhooks integration locally?
@pastel hemlock personally I haven't used localtunnel. Most of the folks are using either Stripe CLI to forward the local server or use Ngrok
does stripe send webhooks to http domains?
no, https is required
how do you use ngrok? i though it was http only
nope, it should creates both http and https endpoint, you can simply use the https one see https://ngrok.com/
thanks mate
Hi I have a payment with insufficient_funds, however, when I am replicating in test with insufficient_funds testing card, I couldn't replicate it. Do you know why?
@gritty spindle Cool. There's not really much you can do about that as a merchant other than ask the user to try again with a different card.
I have edited. Please have a look
@gritty spindle You should be able to use the 4000000000009995 card: https://stripe.com/docs/testing#cards-responses
It didn't go through and log it as failed payment as I expected because I would like to retrieve the response.
I did use above card, but what I am trying to say is the Stripe test didn't capture it, which is similar in prod.
What do you mean that it didn't capture it?
The Stripe didn't capture my payment as failure.
Can you share the Payment Intent ID?
I couldn't find the Payment Intent ID
Do you have any details, like a Request ID or whatever?
"requestId": "req_58bRRfZ4YSKypD"
Do you find anything?
Looking now.
You're adding a card to a Customer. It's failing when you're doing that.
I'm not sure what behaviour you're expecting here.
I'm expecting the stripe captures it as failure and display it in a log, but it didn't in test env.
It did. I just saw it. It's also in your dashboard.
When you say 'captures it as a failure and display it in a log,' do you mean in your application?
No I mean in the dashboard
I made couple of payment with card ended with 9995 but none of these appears in Dashboard
That's why I confuse
That request is not a payment, it's an attachment to a Customer.
You'll find it right here: https://dashboard.stripe.com/test/logs/req_58bRRfZ4YSKypD
If that request is not a payment, how did we get this one?
This is the real payment from our customer.
What is the Payment Intent ID of that one?
pi_1J5GR9KscTKNxsxlkqHN2Zjr
That is a payment for an Invoice, but that is also in live mode. There's no way to attach that particular test card to a Customer in test mode - the attachment will always fail with insufficient funds. You need to use the 4000000000000341 test card to do that in testmode. https://stripe.com/docs/testing#cards
There is no way to replicate the fail payment with sufficient funds in test env?
hi, I'm getting this error from Stripe package: Webhook Error: No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe? https://github.com/stripe/stripe-node#webhook-signing I've already logged it into my console the keys and they are there. I'm using ngroks to open the port to stripe, the webhooks are reaching my backend, but my server res are errored as described above, and the error comes from stripe packege
Also, they were working fine when I triggered the webhooks with fixtures locally. Does anyone have a hint on why this is happening?
Sounds like you perhaps aren't passing in the raw request body. Are you using a body parser?
@gritty spindle There is, but not with a card saved on a Customer.
Can you elaborate?
Any card that fails will fail to attach to a Customer except the 0341 card.
Okay
Yes I'm, but I've placed my webhooks router right before my bodyParser middleware
I'm assuming you're using express or some other node router, if you log the request body does it look like JSON or a javascript buffer?
I'll print it out again
that's the signature header, this thing: https://github.com/stripe/stripe-node/blob/master/examples/webhook-signing/node-express/express.js#L20
You'll want to print out the req.body
sry, just a sec
don't paste the exact result, just let me know if it's JSON or a javascript buffer
a javascript buffer
Okay so that's correct, that means you're getting the raw body
next step is to make sure you have the correct signing secret
Make sure the one you're using in your code matches the one you see in your dashboard
It's considered sensitive, don't paste it here
that was the problem, I ware using the stripe cli signing secret, thanks
sry to waste time, I didn't know they were unique to each webhook endpoint
Don't feel bad, it's a common mistake 🙂
hello guys, i need to ask another question about the onboarding flow.
Looking to get some help. I bought a server for a month and the website that sells it uses this company for payments, i got a email from the server company saying my auto payment is coming up, The server website doesnt have a opt. to cancel the auto payment. Can you guys help with cancelling the auto payments?
@round grove No, you'd have to contact the company you bought the server from.
we initially planned to use express accounts with connect onboarding, but we wont be able to get user data from stripe after the user enters/updates this information. we are told we "have to go custom" to sync this data. My question is: Can we use connect onboarding with custom accounts and then be able to sync/fetch the (updated) user data after initial onboarding if it updates? Or please tell me how we keep this simple (use your connect ui) and also have/get all the info about the connected account available?
@vocal wagon What data specifically are you looking to retrieve/store?
Company or individual name (The Seller), Address, Phone, E-mail, Website, VAT Number, company registration number
Country, disctrict, basic information basically
@vocal wagon All of that should be available by just retrieving the Account, whether Express or Custom. https://stripe.com/docs/api/accounts/object
@vocal wagon It's possible I'm wrong and that info will not be available, but none of the info you listed there is sensitive info so it should be available by just retrieving the Account.
@mellow spear our devs already implemented connected accounts onboarding with connect and express accounts and told me that the account does not hold this information. We want to sync basic information of our sellers with our platform. e.g. Connected account changes phone number or e-mail in stripe express dashboard, we want to retrieve this and update our local database.
@vocal wagon You can get all (or almost all) this information when retrieving a Custom account, and then the account.updated webhook would tell you when it changed so you could update your local database.
@mellow spear thank you so much. so we can use connect onboarding (UI like rocket deliveries) and also send the connected account to connect ui for updating information?
@vocal wagon You should be able to, yes. If there are any items that you can't get via retrieving the Account object, you may have to ask for those again, but using the hosted onboarding UI and maybe having to ask for a couple things is arguably much easier on the whole for both you and the user, than doing a bunch of custom work to avoid maybe asking for something twice.
@bleak breach I'm working on Magento 2 and we installed stripe module. Now I enabled apple pay and google pay. But I can't see apple pay button on the checout page. I have check the stripe document https://stripe.com/docs/stripe-js/elements/payment-request-button. Can you please help me.
Google pay working fine
@mellow spear thank you very much. i will forward this. thank you
@vocal wagon You're welcome! 🙂
@inner flame Are you using an iPhone, iPad or Macbook with a card in its Apple Wallet?
Yes, I'm checking using Macbook.
@inner flame Do you see the Apple Pay button here? https://stripe.com/docs/stripe-js/elements/payment-request-button
No, only see google pay button in the google chrome browser.
But can't see the apple button in safari browser.
If you can't see the Apple Pay button on the Stripe website then the issue is with your Apple Pay setup on your Macbook.
You're welcome!
@hollow prairie hi, I need one more help. Can I charge customer a one time payment and also enroll him in two different subscriptions?
The finally figured out the upcoming invoices and thank you again.
@bleak quartz Two different subscriptions, or two different plans?
yeah, plans actually
thanks.
You're welcome!
I'll check this out and let you know.
👍
@mellow spear I am using stripe's java client version:(20.45.0) to interact with stripe. I want to delete a price, but I don't see delete() or remove() method exposed on com.stripe.model.Price. I don't see delete API on Price API documentation as well - https://stripe.com/docs/api/prices/object?lang=curl ,
however I see from the Stripe dashboard I can delete a Price. I also see that it calls API -
"method": "DELETE",
"url": "https://dashboard.stripe.com/v1/prices/price_1J68Y8BuQq6cUmE7UYLyucpI",
Do I need to call the curl command directly? I am hoping to use stripe java library. Or am I using an old version of the library jar?
There's no way to delete a Price as that would cause problems if you for instance had a subscription that relied on that Price. Instead you archive the Price by setting active: false: https://stripe.com/docs/api/prices/update#update_price-active
Incidentally that's what the dashboard does with that call
@bleak breach I understand. But if I am testing out some functionality and create a dummy price in my test bed, and do not associate it to any subscription, I should be allowed to delete it.
That's unfortunately not possible, you can only archive Prices, not delete them
I see a way to delete on the stripe UI dashboard
You can however wipe all your test data via the dashboard, although be careful as it's not reversible
okay, can I do the wipe from an API?
@bleak breach As you can see there is a way to delete from the dashboard. If it's allowed from the dashboard it should be allowed from APIs
@bleak breach FYI
hello guys can someone help me please
You can delete all your test data from the dashboard, but it does wipe everything irrevocably: https://dashboard.stripe.com/test/developers
Hi @tulip geyser, what's up?
Hmm looks like a dashboard only feature I'm afraid. There's no way to delete Prices with the API
@vocal wagonl is there a way to wipe all data calling an API?
after I add my website it is immediately rejected by stripe, don't know why
There isn't, no
:question: Have a question about your account @tulip geyser?
While we're sorry to disappoint, this Discord is intended for technical questions and developer chat—we're not able to help with account specific questions. For help with your account please reach out to Stripe support directly at https://support.stripe.com/contact
oke but cant get in contact with stripe
@tulip geyser You can email them directly at https://support.stripe.com/contact/email
Oke I have try but now answer
I'm afraid you're going to have to wait for an answer from them, there is nothing we can do for you here
When onboarding using custom accounts, and the hosted stripe form via accountLinks, are we responsible for storing and passing bank information? I have tested with accountLinks set to both 'currently_due' and 'eventually_due', but the hosted form never asks for banks details?
Account Links have no authentication associated with them, so bank account details would be collected on your end and included when making the call to create the custom account
@bleak breach where can I raise a feature request for this? https://github.com/stripe/stripe-java ?
Ok do we need to store them locally then? or just send them tokenised when the createAccount fires?
Definitely not the java repo, I'd either pop it in #842671282917998633 or contact support directly to suggest there: https://support.stripe.com/contact
@fierce sigil You'd either create a bank account token via Stripe.js (recommended) https://stripe.com/docs/js/tokens_sources/create_token?type=bank_account and pass that ID when creating the account, or pass the bank details directly when creating the account: https://stripe.com/docs/api/accounts/create#create_account-external_account
Thanks Paul 🙂
Hi. We want to use the Visa and Mastercard network only for payment. Not the 'blue card'. How can I handle it?
Hi there, not sure what you mean by the "blue card", but you have 2 options here.
- Use Radar rules to block payments for anything but Visa and Mastercard https://stripe.com/docs/radar/rules
- Create the PaymentMethod first and check the
brandbefore processing the payment: https://stripe.com/docs/api/payment_methods/object#payment_method_object-card-brand
@bleak breach just another quick question regarding using custom, i assume loginLinks is only express and we would need to implement our own dashboard / payouts view logic in conjunction with the api?
Thank you. I will take a look. I suppose that the only way to check the card network.
Correct, custom is the total whitelabel experience. Your users won't even know they're using Stripe unless you tell them. As such there's no stripped down dashboard for them to use, you'd build that yourself
Hi team.. I have configured my local url with IP address in webhook to receive events .. But webhook is getting failed with internal server error on trying to hit my configured endpoint;
quick question, do you recommend folks to follow the backend path, if they prefer so, when integrating wallets (eg.: Apple Pay, or Google Pay)?: get-wallet-token -> send-to-backend -> create-payment-method-and-intent-from-backend
or rather encourage them to use the client libraries?
Is this specifically for mobile clients or web?
mobile
What's the error you're getting?
I'd probably recommend using the mobile clients as it's simpler to integrate. But sending PaymentMethods to the backend and completing the payment there is fine too. It comes down to personal preference
Understood. For the backend path, I'm struggling to find the endpoint that takes a Google Pay or Apple Pay token to create a payment method (https://stripe.com/docs/api/payment_methods/create)
what am I missing?
However if you intend to also collect card payments I'd stick to client libraries. Wallets are exempt from SCA type regulations since they tend to require some sort of authentication on the native OS level first anyway. If you intend to also do card payments then I'd stick with client libraries so you don't have to build 2 implementations
Not for all cards AFAIK, Apple Pay only uses tokenized cards, but Google Pay also works with PANs that need to be stepped up as usual.
You're not really missing anything, it's not documented since we don't recommend it as an integration path. You'd use the /v1/tokens endpoint to first convert your Apple/Google Pay token into a Stripe token, then use that token to create a PaymentMethod.
got it, thanks a lot Paul
the link seems to be private
but I can take a look myself
oops wrong link, let me see if I can find a different one for you
The curl request would look like this:
curl -u sk_test_123: https://api.stripe.com/v1/tokens \
-d pk_token=<PKPaymentToken.paymentData decoded as JSON> \
-d pk_token_instrument_name=<PKPaymentToken.paymentInstrumentName> \
-d pk_token_payment_network=<PKPaymentToken.paymentNetwork> \
-d pk_token_transaction_id=<PKPaymentToken.transactionIdentifier>
We do something similar in the stripe-ios SDK: https://github.com/stripe/stripe-ios/blob/a05b307c8a9ef6ee6c53726da2392073b5292f19/Stripe/STPAPIClient%2BApplePay.swift#L156-L189
looks good, thank you Paul!
Then when you have the token tok_123 you'd use that to create a PaymentMethod
Hi I've got a question regarding refunds - if I refunded a customer on woomcommerce and also stripe, will there be a double refund issued?
@spark copper No, you can only refund a charge once. If you try to refund the same charge on both platforms you'll probably get an error from whichever one you refund from last
okay, glad there's a failsafe. thank you!
Connection to remote host denied (please contact support@stripe.com)
@junior ivy to be clear, the endpoint you create has to be a public URL(not a private IP for instance), there are tools like http://ngrok.io/ or https://stripe.com/docs/stripe-cli/webhooks that can help. Do you have an event ID evt_xxx where you're running into this issue?
"evt_1J69jiChHNy99f8cs0TBUtk4" -- this is event id.. It throwed error in portal itself wen i gave as localhost but accepted wen i gave IP address. Still failed at stripe webhook with error --- Connection to remote host denied (please contact support@stripe.com)
Hi, I've got a question regarding subscriptions and previously captured setupintents.
I have a card, previously captured through setup intent, and I want to create a subscription using that card.
I create a subscription with off_session set to true, and when thats done I try to confirm the returned paymentIntent using the API. When checking the event logs I see "Payment Failed". And it needs a verification step
Shouldnt I be able to use a card thats setup for off_session payments to make this payment?
@junior ivy looking ...
@bold vine hi! in theory yes but it depends what card you used.
only the 3155 card(https://stripe.com/docs/testing#regulatory-cards) will simulate getting an off session exemption, everything else would just require authentication regardless
Thats exactly the card I'm trying :/
what's the sub_xxxx or pi_xxx involved?
@junior ivy you're using '192.168.225.168' which can't work, that's a local IP address, Stripe's server will never be able to access that.
"pi_1J6AzJBlBCOx9BgEn5qyFI1j" / "sub_JjeH24lT60PV7O"
@junior ivy You should look into things like ngrok or stripe cli as I linked above so you can get a public URL that is suitable for a webhook endpoint
@bold vine thanks, looking..
Hello all !
I try to use Stripe with Symfony 5.2.
I am stucked on using Stripe.js Card Element to create (serverside) a PaymentMethod
How do I do that ?
Is the token the only thing I need to create the PaymentMethod ?
@drifting hatch hi! I'm a little confused. You'd create the PaymentMethod client side, not on the server.
i.e. you just call https://stripe.com/docs/js/payment_methods/create_payment_method . You don't need to create tokens(usually, there is an exception), but I want to understand better what you're trying to accomplish)
@meager hawk I use Stripe-php serverside, and there is a method to create payment methods. That is why I try to use that
I use https://www.codevate.com/blog/how-to-accept-payments-with-stripe-in-symfony-web-apps and try to modify it to make it work with Symfony 5.2.
In this tutorial, it creates a Charge serverside using a token (generated by the Card Element I think)
that's a deprecated integration though, you should never be creating Charges directly(https://stripe.com/docs/payments/charges-api).
that guide is from 2017 so it's out of date(and also predates PaymentMethods even existing) so I wouldn't use it
Ok.
So serverside, there is no way to make a PaymentMethod using Stripe.js Card Element ?
As I do everything serverside, I would like to keep doing this way
@bold vine still loooking, by the way
thanks @meager hawk much appreciated
Thank you..
@drifting hatch you must collect payment information on the frontend using stripe.js, never on the backend, because of PCI concerns : https://stripe.com/docs/security/guide#validating-pci-compliance
@bold vine oh, it's because you need to pass off_session to this call when you confirm latest_invoice.payment_intent : https://dashboard.stripe.com/test/logs/req_gZGHku4Tm6Oc5B
Ok ! So I will do as the Stripe docs says !
Thank you for your help @meager hawk ! 🙂
off-session doesn't persist from what is passed when creating the subscription object, it has to be set when confirming the PaymentIntent each time.
but yeah, this is not terribly well documented, since it's influenced by the new default_incomplete flow, since in that flow the confirmation is happening at a different point than before(when you confirm the PI separately, not during the actual subscription creation). Hmm.
Hi I would like to ask regarding having multiple Card Elements (React Stripe). At the moment I have different layout for a Desktop and Mobile Implementation of Frontend so I must mount the Card Elements for Stripe in different divs, the problem is Stripe is not happy and giving me:
Uncaught IntegrationError: Can only create one Element of type card.
I understand that I can only have one but how do I handle having different layouts with Card Elements?? I was directed by Stripe Support to ask here
Ah yes that worked, thank you @meager hawk .
FYI, I didnt realise the default_incomplete flow was new. It does not seem to be added as a valid payment behavior yet in Stripe.SubscriptionCreateParams.PaymentBehavior, in TS
@noble sonnet hi! Yes, you can only have one instance of the Card Element per usage of the <Elements> component
so you'd need to have two separate hierarchies using <Elements> separately, essentially
Hi Guys I have question in regards to checkout button. One developer ask me to give him accest to main host cpanel and access to wordpress and stripe dashboard. Dose is necessary to give all acces to all portal?
Access- it's been told me that he has to have access to creat checkout button on website
I'm worried if is not too much access to do give him
@bold vine you might need to update your version of stripe-node, it is there (https://github.com/stripe/stripe-node/blob/master/types/2020-08-27/Subscriptions.d.ts#L1017-L1021)
but yep, it's new! It's a definite improvement in general for the on-session creation flow, but yeah, this interaction with off-session creation is interesting, hadn't seen that before
Hi @meager hawk so something like this will work:
<div>
<div id="tablet-payment"> // visible in tablet only
<Elements>
// tablet impl
</Elements>
</div>
<div id="desktop-payment"> // visible in desktop only
<Elements>
// desktop impl
</Elements>
</div>
</div>
@noble sonnet yes, that's my understanding, though I haven't directly tested this
Ok got it I will give it a try thanks for the fast response
I dont want to lose my website so I would like to know your opinion as a experts
@fierce barn I would create a Developer user account for them and let them use that : https://support.stripe.com/questions/user-roles-and-permissions-for-team-members#:~:text=Developer
that should be all the access they need but doesn't let them change everything on your account
Thank you @meager hawk This channel is a treasure
So he should jave access to wordpress as administrator and as developer on stripe account
He requeire from me to give him accesss to cpanel ftp I don't know what is this
If you could confirm karllekko or write which acces and where I should give him to feel safe I don't want to give more access if is not necessary
Or if anyone from here is happy to help me with that I would appreciate
I can't unfortunately, this is a channel about Stripe, not Wordpress or cPanel.
But it might be you know how to do it:)
Is it mandatory to set Signing secret for webhook API ??
@junior ivy it's not mandatory no, but it's generally recommended(it helps your server know that incoming requests are actually coming from Stripe for security reasons)
okay .. thank you
@fierce barn I really don't, I've never been involved in something like that myself. I'd suggest asking your developer directly and working with them, they should be able to explain to you what they need. You'd have to do your own research into how much access they'd have and if you're comfortable with it, I don't feel comfortable advising you.
@meager hawk to be sure, only the createPaymentMethod have to be done clientside, as this is the only thing that contains payment data.
I can create the the subscription serverside (once I have my PaymentMethodId)?
Thanks for your suggestions yesterday Karl I got up and running very quickly and effortlessly because of them
@meager hawk Thanks for your help 🙂
Hi Everyone
Can someone help me on an issue?
I have integrated Stripe in my ASP.net MVC Application. I am trying to make payments using test cards. Each time I try to make payment it gets refunded after successful completion.
Refund Endpoint is being called automatically , since I am not calling that
200 OK
POST
/v1/refunds
2:48:59 PM
200 OK
POST
/v1/payment_intents/pi_1J5zToG8ac4CODZB9EuJ7nOS/confirm
2:48:56 PM
@silk oar looking!
but usually this means you have a webhook endpoint set up which issues refunds and you forgot about it or someone else in your business built it :p
Actually my co workers are not facing this issue on there accounts. They are using code and application
same*
all I can tell you is you are refunding it : https://dashboard.stripe.com/test/logs/req_GX2Fl7bTnmXYlg that link has the IP address of the server doing it. It's using the same version of our library as your other server that creates the PaymentIntent, so seems like it would be your code
there's really nothing else we can say, some server at that IP address, running .NET, and with access to your secret key, is making that API call. That's all Stripe knows; you'd have to investigate more on your end.
the IP address is on the link I shared (in the section in the top left of the page).
I'd suggest investigating on your side — search through your companies codebase for code that creates refunds(like references to RefundCreateOptions or RefundService from our library) and see where it is and how it gets called.
I searched through the code and there is no any reference
then it must be in some other code you haven't looked at. I'm sorry but there's really nothing anyone here can say except some server at that IP address, running .NET, and with access to your secret key, is making that API call. You'd have to investigate on your side and work with your co-workers on it.
okay thanks anyways
Hello everyone, my site has gotten 1st purchase in April. $ is still in stripe. Has not paid out to my account though it has been more than 14days. any advice?
:question: Have a question about your account @plucky anchor?
While we're sorry to disappoint, this Discord is intended for technical questions and developer chat—we're not able to help with account specific questions. For help with your account please reach out to Stripe support directly at https://support.stripe.com/contact
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
ok. thanks
hello guys! well, I know nothing about code, but I really need some help to set up my stripe in integration with WooCommerce. Am I in the right chat?
WooCommerce actually controls their own integration and has their own support over at https://docs.woocommerce.com/document/how-to-get-help/
so most questions when using it are going to be answered by them directly
I need help with my stripe account. Can someone please reach out to me personally. I don't feel comfortable addressing the issue in a public channel.
:question: Have a question about your account @frank kelp?
While we're sorry to disappoint, this Discord is intended for technical questions and developer chat—we're not able to help with account specific questions. For help with your account please reach out to Stripe support directly at https://support.stripe.com/contact
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Followup on a question from yesterday. We host a platform where our users offer a subscription service (that they choose the price for) and we take 10% of the subscription fee. At low price points this can lead to a situation where we end up owing money, so we'd prefer to offload all the fees onto the user in order to avoid the situation where we get a significant number of users creating a lot of cheap, unused subscriptions that add up to a large monthly fee for us (like if a user makes a subscription that costs $1.00/month and only has 1 subscriber, then they get .90 and we get .10 and owe ~.30 in fees, plus an extra ~$2 monthly).
Someone suggested using Standard accounts to avoid the $2 fee, but we have international users and it looks like if the platform is in the US and any of our users are international, they need to have Express accounts? Or am I incorrect about that?
i mean, i think my problem is more about the stripe itself, even though i use woo, 'cause it's already set up. i don't know, tho, what should i do to set Stripe up... I have contacted support, should I just wait 1 day?
Usually you're going to either want the support team directly or WooCommerce's support. I can verify which side you'd want, what is the issue you're facing?
can i send screens on this chat?
Sure, but what are they screens of?
of my error
let me update you
maybe an error due to not setting up cards as a payment method?
Good morning! I had a question about testing responses and the test card numbers. In our payment flow we add a card to a Customer object and then they use that payment method. I specifically wanted to test the response of a customer using a stolen card but I'm unable to even add that card to the customer. I'm assuming this is intended but that made me think about the real world scenario. Do you know if a stolen card is attempted to be added to a customer will it fail to be added? I'm not sure if stripe receives info that the card is stolen before a purchase/payment is made.
Can you copy-paste that error message for me so I can shoot it into a translator / search our error messages for it?
The bank would return an error when attaching the PaymentMethod to a Customer (regardless of the error code) and that would cause an error in the attach call itself.
it says "unfortunately, you can't create billings on this currency with cards from this company"
and i've tried with MasterCard and Visa
Ah ok. That's something you'd want to reach out to Stripe's support team about. It's unrelated to any code you're writing. They're at https://support.stripe.com/contact if you haven't reached out already.
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
i've contacted the support, and asked for help in the whole setup. should i ask for help again, talking about this specific message?
Yeah I'd be specific about what you're looking for help with at each step of the way so that the support team knows what you need at this moment.
alright man. thank you for the support!
Thanks! I also had a question yesterday about decline codes in relation to payment intents. I understand the decline code would be returned when attempting to confirm a payment intent (if applicable). Would the same behavior extend to setup intents?
Hello folks! Does anyone here have experience implementing Alipay payment method? I just implemented it but the Alipay app seems to be asking me to contact the vendor.
Yep, it's in https://stripe.com/docs/api/setup_intents/object#setup_intent_object-last_setup_error-decline_code and would also be in the immediate response
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
What specifically are you being told to contact about?
Nothing. Actually I'm not sure, this is in the Alipay app after scanning the QR Code.
Are you able to select and copy-paste that error message so that I can toss in into a translator?
Hi, can i ask for support with stripe transaction?
:question: Have a question about your account @wintry ledge?
While we're sorry to disappoint, this Discord is intended for technical questions and developer chat—we're not able to help with account specific questions. For help with your account please reach out to Stripe support directly at https://support.stripe.com/contact
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
I'm installing strip and I need to add a webhook secret. Where would I find that on the Stripe site?
See the second paragraph on https://stripe.com/docs/webhooks/signatures
Verify the events that Stripe sends to your webhook endpoints.
does it start with endpoint_secret?
No, it would start with whsec_
It's on the page linked to in that support article
Ok. I see the documentation you kindly directed me to, but where is the live information on my Stripe dashboard?
Click on the endpoint you want the secret for, and then reveal the secret from that page.
Is the webhook secret a required field that I need to fill in on my site?
Thanks. For that error I'd recommend reaching out to the support team as they can look into what's going on with that specific payment. https://support.stripe.com/contact
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
anyone has error message say: payment intent not valid (resource_missing) but i give it
??
Make sure you're using the same account's API keys as well as using (or not) the Stripe-Account header both when creating the Intent and retrieving it. https://stripe.com/docs/connect/authentication
Learn how to add the right information to your API calls so you can make calls for your connected accounts.
i chek api key and they are both correct but i get same error....
What's the id of the PaymentIntent? I can check with keys/account id you need to change on which call.
type: "invalid_request_error", code: "resource_missing", doc_url: "https://stripe.com/docs/error-codes/resource-missing", message: "No such payment_intent: 'pi_xxxxxxxxxxxx'", param: "intent"}
code: "resource_missing"
doc_url: "https://stripe.com/docs/error-codes/resource-missing"
message: "No such payment_intent: 'pi_xxxxxxxxxxxx'"
param: "intent"
type: "invalid_request_error"
Learn more about common error codes and how to resolve them.
Learn more about common error codes and how to resolve them.
Feel free to share the pi_**** id here, they aren't sensitive info.
You passed the Stripe-Account header as acct_1Ir26OJ5hmRptXHM when creating the PaymentIntent. You need to pass that same value when retrieving it. https://stripe.com/docs/connect/authentication
Learn how to add the right information to your API calls so you can make calls for your connected accounts.
ok on server side my code is like this:
StripeConfiguration.ApiKey = "sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
var service = new PaymentIntentService();
var createOptions = new PaymentIntentCreateOptions
{
PaymentMethodTypes = new List<string> {
"card",
},
Amount = (long)prezzopieno,
Currency = "eur",
ApplicationFeeAmount = 100,
};
var requestOptions = new RequestOptions();
requestOptions.StripeAccount = keygestore;
var intent = service.Create(createOptions, requestOptions);
return Json(new { client_secret = intent.ClientSecret });
I miss something ?????
ty
That part is fine. It's the code where you retrieve the PaymentIntent later that you need to also set the header.
That's likely on the frontend when you're using Stripe.js
It's covered in that article I linked
ok but the code that i miss is this:
var accountService = new AccountService();
Account account = accountService.Get("{{CONNECTED_STRIPE_ACCOUNT_ID}}");
where i have to put then accountService?
That doesn't seem related to what you're doing with PaymentIntents. The part you likely need to make sure you're doing is on the frontend in https://stripe.com/docs/connect/authentication#adding-the-connected-account-id-to-a-client-side-application
Learn how to add the right information to your API calls so you can make calls for your connected accounts.
Hi, after receiving a "succeeded"/"requires_capture" intent comming from the confirmCardPayment method, is it possible that I receive a webhook event on my server that would be different than this status?
Can you elaborate on the details of what you're seeing?
I mean once the front end receive from stripe a "validated" intent (for me it would be those status "succeeded"/"requires_capture"). Is it safe to trigger a pre-success action related to my order? The real success action would be anyway driven by the webhook I should receive. What I would like to do with this pre-success action, is locking my order to put it in a ProcessingPayment state and to clear the customer cart.
both "succeeded" and "requires_capture" mean the authorization succeeded, so you'd be safe to handle the payment_intent.updated event on the webhook and treat it as a successful authorization.
Hi there, I am using invoices.finalize() with auto_advance and invoices.pay() to collect the payments. I also have the smart retries option selected in my Dashboard settings. I want to know what will stripe do if all retries have failed? should we register an endpoint so Stripe can inform us after all retries. Currently we are using the webhooks on event invoices.payment_failed but it will call our endpoint on every failure. We would like to be informed after stripe has retried. Is there a way to achieve that?
Thanks
ty a million works now
missing frontend parameters 😄 😄
I can't figure out how to set up my stripe account they keep telling me it's wrong it's just an individual stripe account it's not a business
@glass wind hello, account related questions are answered by Stripe Support at https://support.stripe.com/contact. For context, this channel can help if you have a coding/technical integration related question with Stripe's API.
I guess I don't know what you mean
@glass wind you're setting up a new Stripe account right? and running into issues?
Yes
@glass wind gotcha, so account setup related questions should be asked with the Stripe Support team, at
https://support.stripe.com/contact. This channel can't help with account setup issues.
Hey everyone, I am having an issue setting up apple pay. The payments are processing correctly but it is not creating a customer or passing shipping information.
Does anyone know what I can try to fix this?
@cinder arch hello, can you pls give me more info? what integration is this? Checkout? Stripe Elements?
its a custom checkout that is using the stripe api
@cinder arch ah ok so in that case, it is your integration that has to pass the shipping details returned by Apple Pay on the PaymentIntent. Your integration also has to create a Customer and attach the Apple Pay card to the Customer (as part of the PaymentIntent confirmation), otherwise the PaymentMethod is used without a Customer.
ah awesome that makes sense. Do you know if they have documentation for this?
@cinder arch what integration is this for Apple Pay? iOS apps? or for web (aka PaymentRequest Button?)
its on a domain, apple pay
@cinder arch
1/ Before you create a PaymentIntent, create a Customer: https://stripe.com/docs/api/customers/create. Pass that Customer ID during your PaymentIntent creation call and also pass setup_future_usage: off_session when you create your PaymentIntent.
2/ for shipping details, grab it from the paymentmethod event on your PaymentRequest Button, and pass it under the shipping param on confirmCardPayment(): https://stripe.com/docs/js/payment_intents/confirm_card_payment#stripe_confirm_card_payment-data-shipping
Upon calling confirmCardPayment() on your webpage, you will get a successful PaymentIntent with a shipping address on it, and the Apple Pay PaymentMethod attached to the Customer (the setup_future_usage param attaches the card 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.
Complete reference documentation for the Stripe JavaScript SDK.
@cinder arch for 1/, the customer: cus_123 param for passing Customer ID and setup_future_usage: off_session during PaymentIntent creation: https://stripe.com/docs/api/payment_intents/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I think the problem is that for the apple pay popup to show, we have to create a paymentintent and this is before we receive customer details.
@cinder arch you can create a Customer object in Stripe before you create a PaymentIntent, and after you have customer details from your customer, update that on the Customer object in Stripe.
Also you don't need a PaymentIntent in order to show the Apple Pay popup, you can but you don't have to.
Hello, I have a question about annual subscriptions and coupons. We have a coupon that was setup that is 50% for 1 year, but when setting it up they did 12 months instead of once. Will this still act the same way as a 1 time coupon on an annual subscription?
@gleaming urchin hello, can you share Subscription IDs with examples for what you're seeing vs what you expect?
Hello everyone, i have a probleme, i would like change my CB/VISA payment methode to VISA but i don't success to do this.. i have tried to modify in the array network of my payment method to remove "carte bancaire" and just keep "visa" but without success.. someone have an idea? thanks everyone
@bold basalt yes, this is the subscription I’d sub_JjNUTHEwW1J5Ml
It’s an annual subscription, but it’s using the 50% off for 12 months coupon. It is correctly being charged 50% at the end of the trial period, but I want to know if subsequent charged will be for the full amount.
@quasi flicker hello, can you share just the PaymentMethod ID for that card (no other details, just the pm_123 type ID only), I think you're referring to a "dual branded" card?
@gleaming urchin looking
pm_1J6GLVCnH6d31UhhTtnjWfuR
yes it's a dual branded card
but i want transform CB/VISA -> VISA
I don't want use "carte bancaire" (cb) anymore but i don't know remove it
thanks a lot
@quasi flicker gotcha, yeah I'm pretty sure the API doesn't allow you to change that part
@hmuno
Sorry, @bold basalt tried editing that but for some reason I can’t… Just wanted to see if you found any information on that sub id?
uhmm and do you think it's possible to not allowed the dual branded and exclude "CB" to just keep the other brand (visa, master card ect..)?
thanks a lot for your quick answer
@gleaming urchin still looking
@quasi flicker I don't think you can disable the dual branded nature of the card. I don't know too much about how we handle that internally, my understanding was that depending on what your region/gateway supports, Stripe will automatically use the right network to run the charge on for those dual branded cards
and it's not possible to tell to stripe which network use?
i have tried to remove "cb" inside payment methode object for just keep visa but the payment appears yet in CB/Visa
@quasi flicker
and it's not possible to tell to stripe which network use?
I don't think there is.
i have tried to remove "cb" inside payment methode object
that isn't removable either, not sure what request you are making to remove that but it shouldn't be updatable (from what I know)
I have just get the payment method as JSON et i have remove cb item in network array before send it in stripeTokenHandler function
@quasi flicker ah turns out there does exist this bit that allows you to run a card on a particular network for dual branded cards: https://stripe.com/docs/card-brand-choice
Enable your customers to select their preferred brand in your payment form.
@gleaming urchin so you set duration_in_months: 12 for that yearly Subscription, meaning the Coupon will keep applying for that duration. Since you have a yearly recurring sub, that means the Coupon technically only applies to it on the first non-zero Invoice, cause by the next recurring Invoice, the 12 month period is over so the Coupon will only apply once.
Ok, great! So just to be clear. The first charge will be for 50%, but on the next charge (1 year later) that coupon will no longer apply and they’ll be charged the full 100%?
@gleaming urchin yep
Awesome! Thanks again @bold basalt!!