#dev-help
1 messages ยท Page 125 of 1
Ahhh thanks for clarifying - no, I believe that is something you would have to delete manually (we call that out in our docs here https://stripe.com/docs/billing/subscriptions/cancel#invoice-items-and-usage)
Learn how to cancel existing subscriptions.
Are you able to see the charge if you go to this link: https://dashboard.stripe.com/test/payments/ch_1JDz9rJkCpb8iYGREeXlrSA9
Thanks @dim hearth ๐ I've seen it throughout the docs but kept wondering if that still held true when having it directly linked to a subscription that was canceled instead of just to the customer. Thanks again for your time, have a good one!
this is not working
What account are you logged in as?
i have currently created an accout
I'm using Fixed Price Subscriptions with php but it gives me the following error on this line const {customer} = await search ('/ create-customer', {}
apparently create client does not exist, how do I solve it?
for integration
Yes, but are you logged into the same account that created the charge?
Hello! What guide are you following?
i have done single charge payment
Learn how to charge, save, and authenticate cards with Stripe's older APIs.
with the help of that
What is the account ID (acct_xxx) that you are currently logged into? Also just want to note - the guide question was for another user.
this https://github.com/stripe-samples/subscription-use-cases/blob/master/fixed-price-subscriptions/README.md helpme plis
acct_1J6HYjCsK0fSIjEp
That is not the same account that created the charge. The account that created the charge was acct_1GVfkcJkCpb8iYGR
how could you know this
where did you find that
can you please tell me more
You can see that account ID acct_1GVfkcJkCpb8iYGR is actually included in the receipt URL in the screenshot you sent earlier
yes
so how is that possible
i am charging these payment to another account
that is what you are saying
If you want charges to be created on the acct_1J6HYjCsK0fSIjEp account then you need to double check your API keys and make sure you're using the correct ones
What specific error message are you getting from that line of code?
this 404 (Not Found)
oh great
i have checked that i was using the incorrect keys
or maybe last keys were expired
thanks alot
my payment is done
Hmm... You made sure to start your PHP server right? Are you seeing anything in your server logs? Did you make any changes to https://github.com/stripe-samples/subscription-use-cases/blob/master/fixed-price-subscriptions/server/php-slim/index.php?
This is how it is to use xampp and not only clone the repository, it included the .env and execute everything fine at the beginning but apparently it does not work.
I just did a fresh clone of the repository and am not seeing the same 404 error with the php-slim server. I don't know much about xampp, but I would go back through the instructions are make sure that xampp didn't diverge from the instructions we give
sorry "create-customer" is a file?
No, create-customer is a route that accepts POST request - it is defined here https://github.com/stripe-samples/subscription-use-cases/blob/8f3bb813e6b45f8ae050baa99091a7e6f29543c2/fixed-price-subscriptions/server/php-slim/index.php#L68
Hm... the best way I can think of doing this is to list all of the charges for the specific customer that the card belongs to (https://stripe.com/docs/api/charges/list#list_charges-customer) and then loop through the results and keep any that match the card you want
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Is there anyway to test 3D Secure/SCA with PaymentRequest button if I don't have one myself (the card)?
Ok got it
Are you just trying to get a sense of the flow/what it looks like? Or are you trying to test something specific in live mode?
I'm just trying to make sure what I wrote works ๐
I already have it working using stripe elements
Would you be so kind to give me a compiled copy?
You can get it by cloning the repository - git clone git@github.com:stripe-samples/subscription-use-cases.git
Sorry I'm a novice in all this I can't understand what is happening since I can't find the error or missing file.
Ahhh, gotcha - I don't believe there's a great way to test this (and I believe most of the time SCA is skipped for google/apple pay)
Do you have the Stripe CLI installed? If you have that installed already, that may be the easiest way for you to get this sample installed since it guides you through the process
@dim hearth I see. Ok, I just wanted to check as there's a test for a response of 'requires_action'. I guess if there's no error, it'll just continue on.
This is how I install it through Stripe CLI
Got it - but from what you mentioned earlier it also sounds like you're using xampp? I personally don't use xampp so I can't give you guidance there, but if you use the guides without xampp they should still work fine (and we already provide the instructions for this).
๐ Messages in this channel are unlikely to be seen by Stripe engineers on weekends. If you have urgent questions then you should 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.
This is how I mention only clone the repository using stripe Cli change the configuration of .env (Do not add a webhooks) I ran the code and received the error.
what command did you use to run your code
do not execute a command only accessed using the address localhost / stripe
or should I have used a command?
The instructions given for the php-slim server code (seen https://github.com/stripe-samples/subscription-use-cases/tree/8f3bb813e6b45f8ae050baa99091a7e6f29543c2/fixed-price-subscriptions/server/php-slim#how-to-run) asks that you use composer install and then composer start to run the application.
@stable viper if you have further questions over the weekend you're welcome to ask here, but you may not get an answer right away as Stripe engineers don't staff this channel on the weekends. If you have an urgent question please ask support 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.
Thank you very much for everything I will be reviewing more thoroughly.
I am trying to implement Customer Portal Session. https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#redirect Looking at the .Net code, it's not clear to me where I would access the SessionCreateOptions class. I tried looking for it under Stripe.SessionCreateOptions but not finding it.
Learn how to configure the customer portal and make it available to your customers.
Have you looked in Stripe.Checkout?
Ah, there's also one in Stripe.BillingPortal, it looks like: https://github.com/stripe/stripe-dotnet/blob/1ebb0d76e45f604efc56f90c50b20c630669997a/src/Stripe.net/Services/BillingPortal/Sessions/SessionCreateOptions.cs
Stripe.net is a sync/async .NET 4.6.1+ client, and a portable class library for stripe.com. - stripe/stripe-dotnet
New potential user and going through the api to see if it will work for me. Am I understanding correctly that you when you want to change/update a subscription (https://stripe.com/docs/api/subscriptions/update) you list every product/item? I just want to make sure that I can easily change products/items and/or their quantities - particularly when using multiple product subscriptions (where they all keep the same start/end/renew dates).
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
plz help, im stuck with this since a lot of time
require_once('https://hasnia-art.fr/vendor/stripe/stripe-php/init.php');
require 'https://hasnia-art.fr/vendor/autoload.php';
\Stripe\Stripe::setApiKey('sk_test_xxxx');```
"Class 'Stripe\Stripe' not found", i've already installed composer and stripe
๐ Messages in this channel are unlikely to be seen by Stripe engineers on weekends. If you have urgent questions then you should 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.
Hi, they asked me for photos with date and tracking code of what I sell, after how long do blocked payouts unblock me?
@languid tulip after refunding amount for customer. customer balance does not reduces.
What steps should be used to refund the extra amount in balance
Any please suggest how to refund amount so that it also reduces the balance from the party account
I would like to integrate klarna payments with stripe how could i do that?
๐ Messages in this channel are unlikely to be seen by Stripe engineers on weekends. If you have urgent questions then you should 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.
Hello
i was blocked at the confirmCardpayment flow in stripe
is any one can help me to get out from this?
Depends on the review time. As far as I know there is no expectation. You should ask that one at support@stripe.com
Could someone help me understand the difference between these two guides?
Facilitate direct payments between other businesses and their own customers.
Collect payments from customers and pay them out to sellers or service providers.
Most of the text is the same, but the payment is a little different
The PaymentIntent
Basically the only difference is in the first one, you create a standard account and do something with a "Stripe-Account" header. In the other one, you create an express account and do a destination charge?
Ah I guess I found the doc I should be reading https://stripe.com/docs/connect/charges
Accept payments and specify how these funds should be split between your platform and your connected account by creating charges.
Yes. You answered yourself there
Direct vs destination sound similar. They both end up going from and to the same place, and the platform still ends up taking a fee
Theoretically, why couldn't you use destination charges in every case?
You can but refunds are easier to handle if your connected account user has to be responsible and their balance is where the refund is issued from vs having to have all transactions be on your account. All your balance transactions can simply be a collected application fee AND you don't have to calculate Stripes fee when passing the application_fee to payment calls to account for stripes fee and your fee. You can only focus on your fee.
Mostly because of the liability on disputes and refunds; direct charges give more independence to the connected accounts
Nice that makes sense
Is there a way to run a report showing how much tax you've collected?
Depends on how you collect them. If you're using Tax rates, I think a Custom report at the Payments section (while using the Export button) should work
If you're collecting this info in your Metadata for some reason, you would need a custom report at the Financial Reports section
That's a good idea, I didn't know about that option. I just tried it and the tax showed a zero value for all entries, but there's definitely tax being charged. I didn't do anything special when setting it up, just selected the tax I wanted to charge from the list.
๐ค That's weird. Let me do some tests
https://stripe.com/docs/billing/taxes/tax-rates#data-exports It took some time
Learn how to collect and report taxes with Tax Rate objects.
Test it out :)
There is one for Stripe Checkout too, but the information is mostly the same
Now I wonder what's the usage for the Tax option at the Payment Export too; it's probably for Stripe Tax, but I'm not able to test it at the moment
That looks like exactly what I need, but when I click on the link in that doc to take me to the Tax Rates List page, it brings me to the "test data" section of my dashboard. When I turn off test data I don't see Tax Rates List anywhere...
Oh! I found it through the search bar...
I think that's got it, thanks!!
Strange though, the amounts exported are two decimal places off, so instead of $500 it's being displayed as $50,000
@toxic lily thanks pal, that really helped me out!
Hello - I have been reading the Stripe API docs and I am uncertain which webhook endpoint to use for when a user's subscription is charged? For instance, the users with subscriptions, when their subscription is "renewed" or otherwise when their card is charged, I would like a callback to my webhook endpoint. At first I thought it was "subscription_schedule.completed", but the more I read about that one, I am questioning if I am mistaken.
It's due to the Stripe system reads the decimal amours of 5 dollars as 500. You would need to divide by 100 at the end of your sums to get ride of those ceros
I just read through the Connect docs and I think I have a rough plan for my app and am ready to start writing code to see if it works. Could you guys let me know if this makes sense? The app is a savings jar app that people can use to save money with their friends, and get all their money back out later -- kind of like a group bank account. Here is my plan:
- When someone creates a new savings jar, an Express account is created for the jar (not the user)
- When someone joins an existing savings jar, no Express account is created because the jar already has an account
- Any user can send money to the Express account representing the savings jar
- When its time to empty the jar and distribute all the money back to the users who made deposits, use the card info that is associated with each deposit to send all of the money back to whoever put it in
๐ Messages in this channel are unlikely to be seen by Stripe engineers on weekends. If you have urgent questions then you should 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.
Hi, Is it possible to use the paymentMethod update to change the credit card associated with a subscription?
Or should I create a new one payment method and update the subscription?
Hi, anyone know if there is supposed to be an event triggered to the webhook when a Checkout session is canceled? We get a payment_intent.created but we dont get payment_intent.canceled?
What event type will my webhook get for successful refund ?
.. Why payment_intent.succeeded isnt firing by stripe ?
a webhook
It used to work fine
Suddenly it doesnt now
when i do stripe trigger payment_intent.succeeded, it works fine
๐ Messages in this channel are unlikely to be seen by Stripe engineers on weekends. If you have urgent questions then you should 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.
Is there any way how I can automatically include the taxes in php api?
is it possible to get the review ID over checkout.session.completed webhook? I need the ip adress and the geolocation ip
or do i need first retrieve Payment Intent and then retrieve review?
I didn't think that I will ever miss Paul โ๏ธ
Hello
Im work right now with api (create custom account with business_type company) and i can't find info about which field say me that registration was successful (not charges_enabled & payouts_enabled)
hi, i am getting this error while integrating the stripe card
Uncaught (in promise) IntegrationError: Please use the same instance of Stripe you used to create this Element to create your Source or Token
can you please help me to get out from this
Can I pass custom data to success page from Stripe checkout session?
need addition to line_item data
๐ Messages in this channel are unlikely to be seen by Stripe engineers on weekends. If you have urgent questions then you should 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.
Can I create Stripe account just for testing purposes?
yeah, that's fine - you can just use it in test mode, and don't need to activate it
but when I try to login it asks me to enter a valid bank account information
how are you trying to create the account? https://dashboard.stripe.com/register?
I arledy have an acocut but I havent use it for a year or so
it sounds like it's trying to confirm your identity because you haven't used the account in a while
iirc, it's not asking you to enter a valid bank account, it's asking you to enter the specific bank account you used when setting up the stripe account initially, to confirm you're you
ok thanks a lot
somebody can help me?
#dev-help message
something like "complete"
what specifically do you mean by complete?
like status complete on main dashboard (list all accounts)
that's equivalent to checking that requirements.currently_due and requirements.eventually_due are both empty (ie: stripe will never ask you for more information about this account), and that all the capabilities on the account you requested are active
Hi guys
I am trying to set up express accounts through onboarding pages.
I've got some questions regarding two Refresh url and Return url which will be used for redirection in onboarding page.
- Does Stripe use
POSTverb on calling this urls ? - What is the data stripe will include in the request? (I could not find any sample request in the docs)
One more question. When im load file (file.create) take id and want update account profile "SS-4 Confirmation letter", "Letter 147C" and can't find which field need to fill
@clever crystal the user is redirected to those URLs, as described here https://stripe.com/docs/connect/express-accounts#return_url
Express enables your platform to manage payout schedules, customize the flow of funds, and control branding. Stripe will handle onboarding, account management, and identity verification for your platform.
stripe doesn't make any requests to those URLs itself
the user's browser would make a GET request to those URLs. there wouldn't be any additional parameters passed, though you will get any cookies associated with your domain on the request
@fast kayak iirc, that's documents.company_tax_id_verification
Thanks for reply @stark tide
However, about refresh url, the doc says:
Your refresh_url should trigger a method on your server to call Account Links again with the same parameters, and redirect the user to the Connect Onboarding flow to create a seamless experience.
if there is no data associated with this req, how my server should know which user should receive the new generated on boarding url ?
should I listen to webhook for this case too ?
if yes, which message please ?
@clever crystal it depends on how you implement authentication on your side, but typically you'd have a session cookie that you'd set when a user logs in. because cookies will be set on any subsequent request by that user to your domain, you can look for that cookie when handling the return_url/refresh_url endpoint to know which user it is
is anyone else seeing this error from CardField of @stripe/stripe-react-native v.0.1.5?
No command found with name "blur"
I see this error appear when i focus on the CardField then tap outside of it. if i add keyboardShouldPersistTaps="always", then i don't get this error. However, the error appears again when I navigate away from the screen. This only happens on iOS:
<ScrollView
keyboardShouldPersistTaps="always"
the onBlur callback also never seems to get called whenever the CardField is blurred (tap to another form field on the same screen or anywhere outside of the CardField).
<CardField
postalCodeEnabled={true}
onFocus={() => {
console.log('this gets called')
}}
onBlur={() => {
console.log('this never gets called <<<<')
}}
onCardChange={(cardDetails) => {
console.log('this gets called')
}}
/>
I also have StripeContainer as suggested here https://github.com/stripe/stripe-react-native/issues/429#issuecomment-881353718
How exactly do webhook endpoints work with gated content?
I am using Gatsby private routes so users can log in and make purchases, how exactly do I set the endpoint url?
in test mode, for user on boarding, when trying to use the test ID document for a users identity, itโs saying the DOBs donโt match on the document and the account ๐ค
Hi, I do not understand why he tells me that my transfer is expected by today but he still gives it as expected future transfers and not in transit. can you help me? I tried to put in manual payments and it doesn't make me withdraw it
Help?
is there anyway to contact the devs over the weekend?
Not usually, but someone is usually here to help, whether they work for stripe or not
does anyone ever have the issue of their redirect to checkout page not working on mobile browsers?
Does Stripe offer any micropayment friendly options?
There are some options, you should contact support for more info: 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.
Hi, I'm trying to use the stripe api. I noticed that the product api doesn't have an easy way to add product variants. Am I missing something? As of right now I would have to make like 10 different products, one for each size of a shoe.
How would I even query for the parent object of that
That's what Prices are for. For example you'd have a Product named "T-Shirts" then Prices for "M", "L" and "XL".
Oh, ok ill look at that again. Thanks for the help!
Could you give me an example of the Price and product object that works for variants?
Have a look here: https://stripe.com/docs/invoicing/prices-guide
Learn how to create and use products and prices.
You can play around with this on your dashboard in test mode: https://dashboard.stripe.com/test/products?active=true
Thanks, so I took a look at it and it doesnt really show an example regarding multiple prices for a single product
Simply create a product and then create some prices for that product
ok, thx for the help
on the invoice it doenst really show the details of the "price"
Yeah, I put one, the description does not show on the payment link invoice
What if I want multiple descriptions, like Medium, White
Hi, I am developing a shopping delivery ecommerce platform in Australia where customers place orders of products they want to purchase from local shops (similar to Instacart). However, many times there are changes and variations to the final order as products are out of stock or prices are different to what was earlier anticipated. For this we take permission from clients to make changes to the final order price. So wanted to ask for the best solution that will allow us to bill the client at the time of the purchase and allow us to make final changes plus/minus based on the actual final price. Please can someone help on how to achieve this?
Ah looks like that isn't supported just yet
I see in the api i can add meta-data
so programmatically i can add it to the Price object
Yes but metadata won't show up in the Checkout UI
But, through the user interface they cannot, so i guess my own platform will have to allow that
Is the plan that you charge your user off-session (e.g. when they aren't on your app/site)?
So the thing I am afraid of is, a vendor can use my stripe connect feature to create a connect account under my platform. They will have access to this Stripe dashboard and they could basically make all the prices and products using this dashboard. But I don't want them to. I want them to use it through my app platform
Is there any way to disable them creating products?
Or do I just tell them in my app, to ONLY create products and prices through my platform
Your users would only have access to the dashboard on their own if you use Standard connect. With Express there's a dashboard, but they can only access it if you provide a login link: https://stripe.com/docs/connect/express-dashboard
Express provides its own account management and reporting features for users, built into a Dashboard hosted by Stripe.
With Custom, there's no dashboard for them to log in to at all and you completely control the creation of Products and Prices
hi @bleak breach, the users get charged at the time of placing the order (eg. 5 items total $100). Then our shopper goes and purchases and delivers the goods and there may be a change to the final order if certain product was not available or there has been been a price change at the time of shopping for the user. So the end result can be a total final cost of $90 or $110 which we need the control to manage as the users give us permission for such flexibility.
Yea I would like that but I need the vendor to handle fraud and liabilities and Stripe to handle verification and payment XD
I guess I will just let them know to only make products and prices through my platform
Hmm that complicates matters somewhat. You probably would need to get explicit permission from your user is the total ends up being more than what you quoted them, but this depends on local laws and I'm not expert on Australian law. What you could do is use separate auth & capture (https://stripe.com/docs/payments/capture-later) to authorize the initial amount (e.g. $100) and then only capture if the amount ends up being lower or the same as the initial quote. In the case of the end total being more than what you quoted, you'd probably need to get your user back on-session and create a new PaymentIntent for the new amount
Separate authorization and capture to create a charge now, but capture funds later.
There's a trade off here I'm afraid, if you want all those protections and liability shifts then you're going to have to be okay with your standard accounts having a certain level of control, like being able to edit and create products
Alright, thanks for the help Paul. Good night!
Thanks @bleak breach . So lets say we take authorisation of the maximum possible charge. How do we mange the final amount if the final order is less than the full authorisation amount?
I mean, if we get an authorisation of $150 but the final bill is only $110, then how do we only get the $110 processed as final amount instead of $150 ?
When you capture the amount, you can specify exactly how much you'd like to capture: https://stripe.com/docs/api/payment_intents/capture#capture_payment_intent-amount_to_capture So if you auth'd $150 but the final bill is $110, then you'd pass in amount_to_capture: 11000. The remaining "uncaptured" amount of $40 will then be released back 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.
Hi,
I'm using Stripe Connect (custom) and noticed that many payment intents for Virtual Credit Cards (VCC) are failing to complete in Europe because of 3DS being required (requires_action).
These VCC payments are initiated off session, i.e. not initiated by the cardholder and they used to work fine.
This is an example PI payload:
{
"confirm": "true",
"transfer_data": {
"destination": "acct_REDACTED"
},
"amount": "8000",
"metadata": {},
"on_behalf_of": "acct_REDACTED",
"setup_future_usage": "off_session",
"currency": "gbp",
"application_fee_amount": "100",
"payment_method": "card_REDACTED",
"customer": "cus_REDACTED"
}
I'm aware that SCA is being rolled out in this region but as far as I know VCCs are meant to be exempt from 3DS.
Could the fact that I'm not setting off_session: true when creating the PI cause this exemption to not apply?
Thanks in advance
@potent bronze do you have a payment_method ID that I can check? or PaymentIntent ID ? it is ok to share those IDs here.
Thanks, this is an example PaymentIntent ID: pi_1JDCWtIliO10oyBMnb3l6441
hi
@potent bronze Ok that PI is created with setup_furture_usage=off_session, that's the direct reason why the PI is in requires_action status where Stripe is expecting your app to ask your customer to authenticate this payment so that the card could be saved for future offline use where Stripe will seek exemption for you
To step back a bit
i am just using your services and I wanted to know how I can connect Strip to WordPress and WooCommerce websitesุ
In order to have SCA exemption, (regardless if it is credit card or vcc), you will first need to set up the card so that Stripe will seek exemption on your behalf during transactions.
There are two ways to do it
- Using Setup Intent with the card. Card can be setup to save to a customer, and the card could be used for recurring charges online or offline in the future. When charging the card off line, stripe will automatically seek exemption for you
- Using payment_intent with
setup_future_usage=off_session; you complete the payment and user authentication at the same time. Then the card is saved and could be used for recurring charges. Stripe will automatically seek exemption for you.
@cursive sigil The simplest way is to make use some of the third party plugins .https://stripe.com/docs/plugins/wordpress
Follow their step by step guide, you will be connect your site to Stripe
Learn about accepting payments on the WordPress platform.
Is it worth it to get any kind of PCI-DSS Certifications?
I'm looking at getting a QIR certificate, but want to know its worth it first
Hey guys ๐ ๐ ๐ ๐ I need to update the satement descriptor but it seems that Phone number is required to be filled in Public business information. Is it safe to say that that number won't be showed anywhere if I untick the setting below? I am planning on putting a fake number as we don't have a US number
Does anyone have experience with using Netlify Functions webhooks with firebase?
I want to update my firestore after a successful payment but im having difficulty in doing so
I have no idea nor any recommendation. But if you are interested in that domain, might be useful.
100% do not do this
at all
How do I unblock myself then? ๐
It can make the dispute process hell if an issuing bank needs to contact you
You can get a Google Voice number, if you're located in the USA, and use that for support
or if you're in canada, there's multiple companies that offer Voice Over IP phone numbers
@vocal wagon What issues are you seeing?
I need to avoid triggering user authentication when creating the payment intent as the user is offline at the time of PI creation. Is setup_future_usage=off_session; causing the PI to be in a required_action state?
@potent bronze correct
@potent bronze but as I said, regardless, you will have to obtain your customer's consent / authentication before Stripe could ask for SCA exemption for you
@potent bronze How do you collect customer card information?
I don't have access to the customer tho, it is a VCC... It's sent by another service I don't own
I am seeing unable to import modules Firebase. Functions is in the root directory (default for Netlify) so Iโm unable to use Firebase imports. I tried to use Firebase admin and it detects two instances.
I want to just be able to use Firebase in my Netlify functions
I can send logs if that would help?
@potent bronze Yeah, if you don't own the customer relationship, you will face higher declines because of SCA as you cannot obtain customer authentication for exemption.
One possibility is that your service provider sending you the VCC might have obtained consent from customer, you can probably import that to Stripe. But that is subjected to approval which you can check with our support 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.
considering how much i integrate stripe, might make sense to be a qualified integrator, there's only like 3 others in canada
Are you referring to importing the 3DS cryptogram? I'm still not really sure how the customer would authenticate these types of payments since the VCC is generated by the provider once the provider charges the customer.
Unfortunately I don't know much about Netlify. are you following these to setup connection between your netlify code and firestore? https://firebase.google.com/docs/web/setup
Yeah, Iโve gone through this and a few posts regarding the issue
No luck
I get two instances error since I initialize firebase through gatsby already
So when I initialize in my function I get two instances even with separate package.json
Yup, that. I assume when the provider charges the customer, they would have to go through 3DS authentication for SCA reason. And that cryptogram collected when saving the card could be used for the VCC. I assume this works like ApplePay/GooglePay which basically they are authenticated when added to the wallet, but the actual transaction is using the DPAN generated.
Hmm so you're saying the same cryptogram (generated for the original charge with the user's credit card) may also be used when charging the VCC which may be issued by a completely different issuer ๐ค ? Also, according to this documentation: https://stripe.com/au/guides/strong-customer-authentication#corporate-payments shouldn't VCCs be exempt from this? If I still have to collect and pass the cryptogram around, it sounds like there's no exemption being applied?
Question, are these cards from Expedia/Booking.Com?
Thanks!
@potent bronze Hmmm, ๐๏ธ SCA is hard.
Based on the docs, it seems that VCC exemption request is entirely controlled by the issuing bank.
The exemption itself can only be requested by the cardholderโs bank, as neither the business nor payment providers (like Stripe) are able to detect whether a card belongs in these categories.
I think I might need some help from the expert in Stripe.
Just curious, will the transaction goes to frictionless by skipping the authentication when you do NOT pass off_session=true nor setup_future_usage=off_session
SCA is hard.
Tell me about it ๐ฅฒ
will the transaction goes to frictionless by skipping the authentication when you do NOT pass off_session=true nor setup_future_usage=off_session
I'm not sure, that's what I intended to find out when writing the first message here. It doesn't seem like there's an easy way for me to test this without doing it live hence I wanted to get some guidance from you first.
I can't disclose too many details as this is a public thread sorry. Would that matter?
Sometimes Expedia and Booking.com tend to be weird with their virtual cards
Booking.com especially
I only ask because I work at a hotel and experience their Weirdness first-hand
@potent bronze I am checking internally now
@potent bronze Ok, got suggestions from our expert.
- The cause of the 3DS is
setup_future_usage=off_sessionparameter passed in. In this case, our internal SCA engine will by-default trigger 3DS regardless of the card type. - The recommended path to try: (1) remove
setup_future_usage=off_session(2) passoff_session=truewhen you create the payment intent, Stripe will bypass the rule engine and let the issuing bank to handle the exemption.
Can you test and let me know if that resolves the issue. I think you are talking to another Stripe too; he will have the same information for you but let me know if there are discrepancies on the message
@lucid raft Thanks for that, will give it a try. I assume there's no easy way to replicate this in test mode right?
no I am afraid
Hello, I was trying to use https://github.com/stripe/stripe-mock for my integration tests. But it doesn't seem to be able to keep the state intact. Plus in the documentation, it says it sends a single type of response for polymorphic endpoints (like getting card information). If I am not wrong, it doesn't send error responses when we use different cards mentioned on the Stripe test page.
Since it has a lot of drawbacks, could you please suggest the next best solution to mock Stripe?
I am looking at https://github.com/adrienverge/localstripe and https://github.com/stripe-ruby-mock/stripe-ruby-mock.
Any advice? ๐ง๐ปโ๐ป
Hello, I was trying to use ACH Direct Debit (https://stripe.com/docs/ach#ach-specific-webhook-notifications) in my application which uses Stripe Connect for payments. I have been trying to listen to webhook notifications for the charges created (charge.pending, charge.succedded, etc.) but I am not receiving any webhook notifications for the charges created via ACH. Can someone please help me with it, want to know if this is different for test and live mode or some other issue. I have webhook setup for connected accounts as well which works fine, just facing the issue with the ACH charges. Thanks!
Stripe supports accepting ACH paymentsโdirect from bank accountsโalongside credit cards. ACH is currently supported only for Stripe businesses based in the U.S. We'd love to hear about your use case, though!
@timber kernel are you using destination charges or direct charges?
For destination charge: you will need to set webhook endpoints on your platform listening to these events
For direct charge, you will need to setup webhook endpoints in the connected account session on your dashboard . https://dashboard.stripe.com/webhooks
Hey @lucid raft , really thank you for bringing this into notice. Adding the webhook endpoint to the platform instead of adding it to the connect applications section worked out!
Yeah, I was using destination charge and had setup webhook for the connect account session, my bad! Appreciate your help!
For smart retries in subscriptions, does the webhook event has a property to get the number of attempts? Or what is the way to calculate the attempt number?
There's no "payment attempted" webhook event, you'd listen to either invoice.paid or invoice.payment_failed and look at the attempt_count property on the invoice: https://stripe.com/docs/api/invoices/object#invoice_object-attempt_count
@bleak breach Thank you for the quick answer. Could you explain what is the difference between charge.failed and invoice.payment_failed ?
You'd get a charge.failed event for every failed payment (Invoices, PaymentIntents etc) invoice.payment_failed will only fire if specifically an invoice's payment failed
Got it, thank you @bleak breach ๐. Do you have an idea about Stripe mock? I had another question just few questions above
Yeah stripe-mock is missing a lot of features. I'm not familiar with those alternatives you linked to so I can't comment on them. I recommend mocking the responses yourself if you need state between tests
That behaviour can't be configured at this time
thanks for confirming. once customer is saved can I use this to update the name? https://stripe.com/docs/api/customers/update
Yup
Thank you ๐
Hey there, when the user makes a subscription he waits 50 min - 1 hour for the payment to change to succeed, and then he will see the confirmed payment on his Bank app, as a developer, I can I set the time to be less time?
Hi, a quick question re customer portal sessions. Is it possible to show the history of payment intents made via a payment intent checkout session in the portal as well? At the moment it only shows the history of invoices
When creating a subscription the invoice should be created immediately. At the end of a billing period a draft invoice is created and finalized/paid approximately 1 hour later. If you want to skip this delay you can finalize and pay the invoice manually via the API: https://stripe.com/docs/api/invoices/finalize https://stripe.com/docs/api/invoices/pay
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Unfortunately not, the customer portal is really only for subscriptions/invoices
@bleak breach how can I adjust customer balance with API
@bleak breach Thanks
Is sending card information not according to PCI compliance? If I use the card field component that Stripe provides and set it to use dangerously so I can send the card info, can that be considered against the rules?
@vocal wagon if your system "touches" raw card details, then you are subject to PCI compliance. It sounds like you're developing on React Native, which counts as Mobile SDK here: https://stripe.com/docs/security/guide#validating-pci-compliance
By not using Stripe's predefined elements you likely will have to prove that you are PCI compliant
So is the CardField component in React native, Stripe's predefined element?
Yes
Even if I set it to dangerouslyGetFullCardDetails?
If you want to send card information to CardField, then that means you are collecting the card details in your own form/UI somewhere, which has PCI compliance repercussions
Basically if you have access to raw card details in your code, you need to be PCI compliant
If your system touches card data, in any regard, youโre automatically in the SAQ-D category, the strictest form of PCI compliance
But it touches the data in the way that I get the 16 numbers and when the card expires, which I can access from the CardField
I dont save it inside my server/database
You can use CardField, just don't use dangerouslyGetFullCardDetails. From the link I shared earlier:
Should you do otherwise, such as writing your own code to handle card information, you may be responsible for additional PCI DSS requirements (6.3 - 6.5) and not be eligible for an SAQ A. In this case, weโd suggest you reach out to a PCI Qualified Security Assessor (QSA) to determine how best to validate your compliance according to the current guidance from the PCI Council.
Got it, thanks guys
Hello Guys,
Can I embed the Stripe part into the website instead of having the customer open Stripe on a separate web view page?
If you're referring to Stripe Checkout, then no. Checkout requires a full page redirect. If instead you'd like to keep your user on your own domain, you can look at using Elements instead: https://stripe.com/docs/payments/integration-builder
Learn how to embed a custom Stripe payment form in your website or application.
Good morning,
I have a question about Stripe's integration, I should be able to pay with card (visa, mastercard, etc), I also have a paymentIntent, when I send a request with stripe.confirmCardPayment, an exception is throw to told me there is missing parameters (card.exp_month and card.exp_year), according to the documentation I should create a paymentMethod but stripe.js told me it doesn't exist ? I don't know neither how to attach the paymentMethod to the paymentIntent
Someone can help me, please ?
Thank you
Hi! You shouldn't have to create a PaymentMethod. Try to follow these integration docs: https://stripe.com/docs/payments/integration-builder
Learn how to embed a custom Stripe payment form in your website or application.
Thank you @bleak breach
Sorry for late reply. so how could i differinate between non-decimal currencies etc...? will the unit_amount always reflect the same (in pennies regardless of currency being taken) and would i have to make some sort of function to manually reflect the price dependant on if the currency is a non-decimal one or not
@hushed escarp the latter I would say. unit_amount:4000, currency:"usd" is $40.00 and unit_amount:4000, currency:"jpy" is 4000ยฅ so you need some custom formatting for that on the display level.
Hello there!
Have a question regarding Google / Apple pay
I want to implement paymentRequestButton to the custom signup page, but the cusomer will subscribe to the trial period, so there wouldn't be any immediate charge
Can I somehow request a Google / Apple pay card just for the future payments, without any charge? Or the only way is to set $0 total and show it to the customer?
Maybe there're some other stripe elements that would help to do that
Thanks
@limpid scaffold you can show a $0 total yes. In general though Google/Apple Pay's user interfaces don't really have a good way to communicate a trial period so there's no great solution
for example in our Checkout product, we don't give Google/Apple Pay as an option when creating a subscription with a trial period and just show a normal card form. Google/Apple Pay are really optimised for flows where the customer actually gets charged, not just saving a card
Ok, got it, as I thought
Thanks
Also, some quick note
I used to write in your freenode chat, and somehow missed that you moved to discord
Had to knock there for a few days before get here
Maybe you'd want to leave some quick note for other dummies like me in freenode ๐
thanks for the feedback!
Hello.
I am using laravel cashier, i want to know how can i customize the webhooks?
@livid rover hello there! what kind of customisation exactly are you looking for?
Hey! Is there any docs on how to save a card to a customer on the base platform, so then you can reuse that payment method for other connected accounts?
@solid ridge there's https://stripe.com/docs/connect/cloning-customers-across-accounts and https://stripe.com/docs/payments/payment-methods/connect#cloning-payment-methods mainly (assuming you are using Connect and using Direct Charges)
Hello, @meager hawk
I am using stripe.js on frontend and cashier's create subscription on backend, should i start customer's subscription soon after calling create method? Or wait for a webhook? Also, i couldn't modify default webhooks, how to modify those?
Laravel cashier by default sends a response of 200 to stripe and saves any necessary info into cashier's table, but i want to create some rows in other tables, that kind of customization i need
@livid rover It's usually best to rely on a webhook for setting up the customer's subscription/service on your side. For example listen to customer.subscription.created https://stripe.com/docs/billing/subscriptions/elements#provision-access
for the other question, I'm afraid I don't know anything about Cashier so I don't have any insight there
Don't you need a card already on the base platform to clone to the connected account? Also in those examples it uses a token for the source. I also thought we need to use the payment method for Payment Intent? I currently use token's for charges but trying to migrate across to the new API
Hi. I'm trying to setup a card for future charges. I've looked at this https://stripe.com/docs/payments/save-and-reuse - the sample is useful but Swift/Objective C specific. I've implemented the server side end points for createSetupIntent and confirmSetupIntent. The first issue I have run into is supplying a payment method and customerId to the createSetupIntent:
{
"customer": "cus_Jvvvvvvvvv",
"payment_method": "card",
"payment_method_types": {
"0": "card"
}
}
To which the server replied:
No such PaymentMethod: 'card'
My question is, why is card not accepted as it is one of the listed payment methods and this is only the setup step?
Learn how to save card details and charge your customers later.
@solid ridge yeah the docs badly need to be updated. Ignore what it says about Tokens, you want my second link, the one about PaymentMethods(the yellow box at step 2 alludes to it), you'd always use those.
And yes you need a card already created on the platform before you can copy it to other connected accounts. It depends what you need though, like you could instead just create the card directly on the connected account in the first place and don't do any cloning. (that's what we do at https://stripe.com/docs/connect/creating-a-payments-page for the Direct Charge examples, if you set stripeAccount when initialising stripe.js that means the details the customer enters gets saved to that account directly) That way though you can't charge the card on your platform, or on other connected accounts, but that might not matter to you; setting up the cloning can be fairly complicated though.
@analog mantle hi! hmm. "card" is not an object ID. The payment_method is the ID of an PaymentMethod (pm_xxx ) that you collected from the customer previously. I think you're a bit confused. You also should not be passing payment_method on the server side. You collect and pass the PaymentMethod on the frontend : https://stripe.com/docs/payments/save-and-reuse?platform=ios#ios-collect-card-details using STPPaymentMethodParams and STPPaymentHandler.confirmSetupIntent
to be clear, "card" is a payment_method_type (like type:card, type:ideal, type:sepa_debit) ,it's not a PaymentMethod object itself.
Ok thanks for helping @meager hawk
If anyone else has any knowledge about laravel cashier, please let me know
Yes, I am totally confused because PaymentMethod is a string on the Stripe API create Setup Intent:
@analog mantle yep, it's a String. The value of the string is the ID field of a PaymentMethod object : https://stripe.com/docs/api/payment_methods/object#payment_method_object-id
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ie. https://stripe.com/docs/api/setup_intents/confirm#confirm_setup_intent-payment_method : ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent
Yeah, we need to save the payment methods to the platform rather than the connected accounts. Then we only need to store the cus_ id for later payments. Maybe i'm missing a step ๐
but again you shouldn't need to pass on your backend server. You omit that parameter, and instead your frontend takes care of confirming the SetupIntent and providing the PaymentMethod
@solid ridge sure, at the time of making a payment, you can list payment methods of the platform cus_xxx, then clone the selected one to the connected account, and charge it one-off there with a Direct Charge PaymentIntent.
The confusion comes from the way the examples show PaymentMethod as a description whereas the documentation describes it as an id:
I think I should be able to figure it out, thanks @meager hawk
hey is there any stripe devs here? got a question to ask
lets say I have this in my frontend:
const { error, ...appleResponse } = await presentApplePay({
cartItems,
country: 'HK',
currency: 'HKD',
})
if (!error) // create payment intent
Then i want to confirm the intent in the server side, so I do:
await stripe.paymentIntents.confirm('pi_blabla', { payment_method: 'pm_blabla' })
When i do it this way, it seems the payment process on apple pay was not completed, but the stripe payment was "completed". Attached is the screenshot
payment confirmed
@analog mantle the screenshot is showing how you'd confirm server side using a test token (https://stripe.com/docs/testing#cards, see the PaymentMethod tab, pm_card_visa is a special magic string for testing) as a demonstration, you you would just follow the guide for the specific thing you're building(so the save-and-reuse guide). PaymentMethods should always be created on the frontend for PCI reasons
@past heath there's a completion block you have to call to tell the OS that Apple Pay completed and it can close the sheet. You're using React Native, just checking? (so I can find the relevant docs)
yes, I am using React Native
so, no matter what, I would have to call the confirmApplePayPayment in the frontend?
@past heath yes
hmm, i see
I was just going to say that, why do you confirm on the backend
ah, its just on my side we have some extra auth steps in the backend, therefore I wanted to confirm on the backend
you need to do what the docs say: https://stripe.com/docs/apple-pay?platform=react-native#handle-payment since part of confirmApplePayPayment is calling the required function on Apple's side that tells the OS the outcome of the payment so it closes the payment sheet
Allow customers to securely make payments using Apple Pay on their iPhone, iPad, and Apple Watch.
sorry for the confusion, unit_amount_decimal allows you to set the "decimal" value other than integer. More example here https://stripe.com/docs/billing/subscriptions/decimal-amounts#creating-objects
Learn how to create prices and invoice items with decimal amounts.
I see I see, i understand now, thanks alot @meager hawk , kudos to you brother
@past heath you could potentially use https://stripe.com/docs/payments/capture-later to delay capturing the funds if there are extra steps you need to take after the customer authorises the payment, btw
but how will it work with the presentApplePay method? ๐ค
@past heath it's not really related, you just set capture_method:"manual" on the backend when initially creating the PaymentIntent, everything else proceeds the same way
i see, i understand, thanks alot @meager hawk
it's just so you have the option to refund the authorised payment if you can't fulfill the customer's order for instance
the server side confirmation flow(https://stripe.com/docs/payments/accept-a-payment-synchronously) is not something really supported in the RN Apple Pay flow right now(it's an advanced flow we don't directly recommend as the default and the library is quite new )
Hello, how are you ? I have a question about the payment validation:
- All things works until here : a user is request for 3D secure
- 7 minutes after, the Charge is capture
- After that, nothing happen, it seems that the next step into the javacript code seems not to be executed
Have you ever seen this statement before ? Thanks a lot ๐
It happend sometimes (1 time for 3 days)
So the flow would be as follows:
Collect the payment info from the card form in the application,
Call server side createSetupIntent, passing from the client the PaymentMethod created by the first step client side.
Finally, I assume that I need to implement the server side confirmSetupIntent to complete the setup by passing same payment method and client secret?
If I decide to use the suggested integration builder.
Is it something that requires PCI certificate or any other prerequisite?
@vocal wagon well in general there's no guarantee any client side code will get called after the customer authenticates through 3D Secure. They might complete it and then immediately close the browser tab for example and never return to your site. So it shouldn't matter, as you always use webhooks to handle the outcome of the customer paying!
@analog mantle no, the flow is what's in the docs (https://stripe.com/docs/payments/save-and-reuse) :
- create SetupIntent on the backend and associate it with a Customer ID
- pass the SetupIntent to the frontend
- the frontend collects the PaymentMethod from the customer's card details directly on your website/app etc
- call confirmSetupIntent on the frontend which completes the SetupIntent with those details the customer selected.
- done!
You never call confirmSetupIntent functions on the backend really. The point of using a SetupIntent is it can present the customer with a 3D Secure interface to authenticate their card when saving it with you. So it's entirely a frontend thing since that 3D Secure UI has to be shown on your frontend where the customer is.
@deft grail if you use any of those recommended integrations you qualify for a simple SAQ A declaration of PCI compliance. See https://stripe.com/docs/security/guide#validating-pci-compliance
I cannot get back into my account
@meager hawk so I have to change my "then" step into Javascript which do the whole last step, by the "webhooks" system which handle the whole issue like : payment bank validation, or a closing browser after payment ?
So a solution full server side ?
:question: @bright hearth Have a non-technical question, account issue, or need one-on-one support?
We wish we could help, but this community is focused on developers and technical discussions. Our support team will be able to assist you better than we can: https://support.stripe.com/contact
@vocal wagon yes, see https://stripe.com/docs/payments/handling-payment-events for example
So @meager hawk in my JavaScript I don't have to check anymore if the payment_intent has succedd, this action will be dedicated into server side directly ? ๐
@vocal wagon Correct! You should handle any post payment actions via webhooks, listening for the payment_intent.succeeded event
has anyone experience setting cookie behavior for stripes redirecttocheckout?
I am getting a few errors from stripe, one is about sameSite settings for it's cookies, and the other is [violation] messenger handler took 526ms any advice on fixing either?
@fair axle Hey! Can you share the specific cookie issue?
sure thing onesec
@fair axle On a related note, you can actually opt out of redirectToCheckout now and do server-side redirects if that is better suited for your integration. The Checkout Session object now includes the url field directly: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-url
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Indicate whether a cookie is intended to be set in a cross-site context by specifying its SameSite attribute cookies: _gcl_au .stripe.com/
17 requests```
js.stripe.com/v3/checkout-inner-address-autocomplete-212a7b6de75afaaa791ea6a81b3e08c1.html#publishableApiKey=pk_test_51Iy5BwIzXo7BVw214tu7VmnejDcK2xWudnRISkloeDQUSUabQTTzKQ4ru75ZDoC5ieRyiFjb7mwC7HNx7kSQY6dv00Moihf4wQ:1 Refused to load the image 'https://q.stripe.com/?event=rum.stripejs&event_count=1×tamp=1626694060304&event_id=46147b50-9b96-4566-b42c-6947ce6a946c&os=Windows&browserFamily=Chrome&version=3&requestId=req_XfPd690Yxcyq89&tokenType=unknown&url=https%3A%2F%2Fapi.stripe.com%2Fv1%2Fpayment_pages%2Fallowed_origins&status=200&start=1626694060066&end=1626694060301&resourceTiming[startTime]=760.1&resourceTiming[duration]=167.7&resourceTiming[redirectStart]=0&resourceTiming[redirectEnd]=0&resourceTiming[fetchStart]=760.1&resourceTiming[domainLookupStart]=760.1&resourceTiming[domainLookupEnd]=760.1&resourceTiming[connectStart]=760.1&resourceTiming[connectEnd]=760.1&resourceTiming[secureConnectionStart]=760.1&resourceTiming[requestStart]=770.2&resourceTiming[responseStart]=926.7&resourceTiming[responseEnd]=927.8&paymentUserAgent=stripe.js%2Fca8ac073a%3B+stripe-js-v3%2Fca8ac073a' because it violates the following Content Security Policy directive: "default-src 'none'". Note that 'img-src' was not explicitly set, so 'default-src' is used as a fallback.
and and thats the other error message
I have a feeling that one of these 2 errors is the reason stripe checkout wont redirect to the checkout form on my mobile browser but works fine on laptops
@fair axle These errors are from the checkout.stripe.com domain?
stripe checkout wont redirect to the checkout form on my mobile browser
That's strange, are you able to provide a reproduction of sorted?
@fair axle Generally those messages are safe to ignore as Checkout is a Stripe hosted solution, so there's no vulnerability for the user per se
Hello Sir,
we have integrate stripecheckout in our react js application, i need 3d secure feature in this below code. can you suggest how can i do.
<StripeCheckout
token={this.onToken}
stripeKey="my_PUBLISHABLE_stripekey"
/>
@kindred frigate Hello! By Stripe Checkout do you mean our hosted solution (https://stripe.com/docs/payments/checkout), or your own custom flow with Elements?
http://roachkings.herokuapp.com/ here the link, as soon as I click the PAYNOW on a mobile device it wont redirect. whats strange is that it was working 50% of the time at one point. I like the hosted solution because its much easier, perhaps it's something on my end though ill need to look into.
Web site created using create-react-app
yes hosted solution
@fair axle Yeah, I can't open Checkout as the buy button is pointing at a localhost:5000 endpoint (to create the Checkout Session I'd assume)
@kindred frigate Our hosted solution handles 3DS/auth scenarios for you out-of-the-box. There's no additional work needed by you! Just make sure you're using a test card that will actually trigger 3DS: https://stripe.com/docs/testing#regulatory-cards
Learn about the different methods to test your integration before going live.
thank you!
can you share me Asp .net API-2 code
i have use given code in API
StripeConfiguration.SetApiKey(System.Configuration.ConfigurationManager.AppSettings["Secret Key"]);
// Create a Customer:
var customerOptions = new CustomerCreateOptions
{
SourceToken = objRegInfo.token,
Email = objRegInfo.EmailAddress,
};
var customerService = new CustomerService();
Customer customer = customerService.Create(customerOptions);
Please suggest improvement for 3d secure
@kindred frigate I thought you were using Checkout? If not, this guide is a great starting point. You can configure the languages specific for your integration (i.e. React & .NET): https://stripe.com/docs/payments/integration-builder
Learn how to embed a custom Stripe payment form in your website or application.
Hi karllekko .. With the help of stripe im onboarding express account and setting it in destination charge during my invoice creation.. I see the events for invoice getting completed, payment_intent completed, the pay out to destination charge payed to connected account. But the thing is Im not able to figure out for which payment the payout have happened from webhook event. the payout object doesnt contain any information like payment starts with py_ or payment intent pi_ .. How to identify that ?
This api code in .net core. we are using asp .net web api2. can share the api code in web API 2
someone kindly help
@junior ivy Hey! Which event are you looking at?
payout.created
this doesnt contain any ways to track on for which payment this payout had happened
@kindred frigate I'm afraid we don't have an official SDK for ASP Web API 2
@junior ivy Checking
Thanks @hollow prairie ^^
@junior ivy You can look up the balance_transaction objects relative to the po_xxx ID and expand the source. That will give you the relevant Charge.
Learn how to leverage expand to perform common tasks
balance_transaction is in payout object.. so i shld check the same in charge object ?
@junior ivy You could compare the 2 yes. But how would you have the Charge object?
i have a reader in 3 different location (3 offices in my scenario)
Im searching the reader through:
discoverResult = await terminal.discoverReaders(config);
const selectedReader = discoverResult.discoveredReaders[0];
const connectResult = await terminal.connectReader(selectedReader, { fail_if_in_use: false });
if (connectResult.error) {
alert('Failed to connect')
}
all 3 location cannot connect to the reader, is it because the discoverReaders() is picking up the terminal discover in the stripe account setting? or is it suppose to pick up the terminal discover in the same Wi-Fi (which i thought it did)
@vast grove Hey there. This behaviour would be different depending on the readers you're using: https://stripe.com/docs/terminal/readers/fleet-management#discover
Group and manage a fleet of readers by physical location.
im currently using verifone for all 3
@vast grove Yeah, the P400 is Wi-Fi enabled. What is the value of the config hash you're passing to discoverReaders?
const config = { simulated: false }
@hollow prairie This is my payment_intent - pi_1JCmO0ChHNy99f8cFiLOiPSy , payout is po_1JEkuJ2S6s26x9KeiRJ88dsS .. I dont find any relation here. this is my charge ch_1JCmOxChHNy99f8cALYfdYYN .. balance_transaction in po_ and charge are different. ..
@hollow prairie is it possible if i DM you about this or do you prefer to speak here?
kindly help
@junior ivy Yes, a payout object will have multiple balance transactions. If you follow the code here, you can pinpoint the all charges in a payout from a single po_xxx ID
Learn how to leverage expand to perform common tasks
@vast grove It's better to keep context here so others can help! Are all the readers are registered to your account? https://stripe.com/docs/terminal/readers/connecting/verifone-p400#register-reader
Register your Verifone P400 reader and connect your application over the internet
yup, all 3 are register in the dashboard
originally the first one was working fine, after entering the next 2, i had an issue with all 3
@vast grove Can you please share your account ID? acct_xxx
@vast grove Are you working in live or test mode?
live
because in test mode (my company has 1 reader) while in live (this company has 3 readers)
im only experiencing the issue with 3 readers in 1 account
@vast grove Weirdly all 3 are reporting as online in the past ~2 minutes
yup
Hi guys. Iam just facing problem with await stripe.handleCardAction(response?.data.payment_intent_client_secret). Iam 100% sure, that Iam passing the right client secret I get from payment intent, but still. I got this response
@vast grove And discoverResult.discoveredReaders is just empty?
discoverResult = await terminal.discoverReaders(config);
const selectedReader = discoverResult.discoveredReaders[0];
const connectResult = await terminal.connectReader(selectedReader, { fail_if_in_use: true });
if (connectResult.error)
//error happens here
@lethal mantle Hey there. Are you using the same API key (live/test) with Stripe.js for handleCardAction as you are to create the PI?
@lethal mantle Can you please paste that pi_xxx ID?
Yap, that was first thing i found online :/ I also got this stuff up
@vast grove What is the actual error/outcome you're seeing?
@lethal mantle Please don't share the secret! Just the actual ID of the PaymentIntent (as shown in your first screenshot)
Oh, sorry and thanks
pi_1JEvnrCZ1pXYosAtiVtO7zmW
@lethal mantle Looking now
@hollow prairie im having an issue with this part unfortunately
Is it somehow possible to pass more than 500 character long string in Stripe as a metadata or something else?
since it is in production and i didnt log it anywhere, i suppose i can ask the customer to open console lol
@lethal mantle Looks like you're working with Connect, right?
pfff, sorry I dont know what you mean by that
@vast grove Yeah really need to see the actual error/outcome you're seeing. It might be worth setting up the readers in test mode to debug what you're building
Looking for a little help on using the Expand functions to retrieve the Fee associated with a given payment. When we try to use this, the fee returns NULL. Is there something we need to send on the Intent side in order to retrieve the Fee on the payment?
@lethal mantle You're passing the stripeAccount parameter to loadStripe. This in indicative of a Connect integration: https://stripe.com/docs/api/connected_accounts
@lethal mantle Yet that parameter wasn't used to create the PaymentIntent, hence the error you're seeing
let me check .. thank you
@sudden ingot Hey there. Can you share the ID of the payment? pi_xxx or ch_xxx?
This is one from Test: pi_1JEtDjKzsQLdHgSOZls1UW3T
@sudden ingot Thanks. And you've followed this guide? https://stripe.com/docs/expand/use-cases#stripe-fee-for-payment
I didn't get a clear answer from customer service so I'm asking here:
Can Tax Rates be applied to payment link feature? I tried and no tax was applied into the invoice after payment thru the link. Even though all tax rates were set up properly in dashboard. So I'm wondering if this is a limitation from the payment link feature.
@hollow prairie before i proceed, the below:
discoverResult = await terminal.discoverReaders(config);
const selectedReader = discoverResult.discoveredReaders[0];
should net me the reader that is connected to the Wi-Fi between our current application and the terminal; correct?
Yes, that is what we followed. We can see the return for Fee, but it shows NULL, not the value.
payment link documentation is very light: https://stripe.com/docs/payments/payment-links
Learn how to create a payment page and embed or share a link to it.
@vast grove That will return all accessible/online readers for your account
@tropic laurel There's no tax support with Payment Links currently
ahh, is there a way to net me the reader that is only discovered in the current location without inputting locationID?
if not, then i might need to add input a locationID when discovering reader
Thanks! Is there an ETA? To see if I'm developping something or wait
@vast grove I'm afraid not, you'd need to pass the parameter
@tropic laurel I don't think we have anything to share on that front right now
@hollow prairie is there an API to return all locations w/ reader in the account
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
@sudden ingot Still checking
Any way to surpass the 500 character limit in the metadata of Stripe Checkout?
@vast grove If you wanted only locations with readers you could produce this from listing readers and then mapping to unique locations: https://stripe.com/docs/api/terminal/readers/object#terminal_reader_object-location
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
@sudden ingot Both fee and fee_details are null?
@exotic shale No, that limit applies to metadata everywhere: https://stripe.com/docs/api/metadata
What are you trying to do?
@sudden ingot We recommend using the fee_details hash over fee. Alternatively you could deduct net from amount
Trying to send an email if checkout is successful, so I pass the CHECKOUT_ID in the URL of success page, get the ID and metadata from the success page and send the email to the user, the content of the email is stored in metadata, but there's a 500 character limit as you said.
@daring lodge @hollow prairie ty for both of your help!
@exotic shale What if you user quits the payment flow before you can send the email? Sounds like a use case better suited for webhooks: https://stripe.com/docs/payments/handling-payment-events
How to use webhooks to respond to offline payment events.
@exotic shale That doesn't sound ideal. you should produce the content of your email on your server or store in your database, and just include a reference to look that up in your metadata
Thanks ๐
Hi everyone,
I used SubscriptionSchedule to update the price in existing subscription on a future date
SubscriptionScheduleCreateParams params = SubscriptionScheduleCreateParams.builder()
.setFromSubscription(userSubscription.getStripeSubscriptionId())
.setStartDate(startingDate.toEpochMilli())
.setEndBehavior(SubscriptionScheduleCreateParams.EndBehavior.RELEASE)
.addPhase(
SubscriptionScheduleCreateParams.Phase.builder()
.addItem(SubscriptionScheduleCreateParams.Phase.Item.builder()
.setPrice(subscriptionPlan.getStripePriceId())
.setQuantity(1L)
.build())
.setIterations(1L)
.build())
.build();
SubscriptionSchedule schedule = SubscriptionSchedule.create(params);
but i got exception
com.stripe.exception.InvalidRequestException: This value must be less than or equal to 9999999999 (it currently is '1656567570000')
@hollow prairie I think that did it! Thank you for your help!
@exotic rain You need to provide the timestamp in seconds, not milliseconds
Specifically: startingDate.toEpochMilli() looks incorrect
Hello again
I'm adding PaymentMethod to the customer (that I got from paymentRequestButton) and assigning it to default_payment_method for the customer
But when I'm trying to make some Charge via API - I'm gotten an error: Cannot charge a customer that has no active card
Does it mean that to make some custom Charge / Hold on a customer PaymentMethod i need to move to PaymentIntents instead of Charge?
@limpid scaffold You're setting the invoice_settings.default_payment_method for the customer, which only applies for invoices/subscriptions, not single payments.
Additionally, you can't use Payment Methods with Charges API. You need to be using the Payment Intent API and you'll need to explicitly provide the payment_method id attached to the customer.
So, yes ๐
However: there might be alternatives depending on what you're trying to do
Are you already integrated with the Charges API?
Not so much
Just placing some holds on a customer cards
At the moment we have a custom sign up form, with StripeJS simple card editor
And trying to extend it to PaymentButtons and some other stuff
If you're building new, definitely use the Payment Intents API. It's the current API supporting the latest features.
Hi there,
I needed to include custom metadata while exporting from https://dashboard.stripe.com/balance
How to achieve that? I tried adding that metadata in creating subscription, but that metadata was not included while exporting.
Extending the old one
But, probably, the time for Payment Intents upgrade has come
Thank you, anyway
now this exception came
com.stripe.exception.InvalidRequestException: You cannot set start_date if from_subscription is set.
i am setting 'from_subscription' for existing subscription and 'start_date' to update on the start_date
What metadata are you expecting to be included, exactly? Can you provide an example object/request with the metadata you'd want?
For help with dashboard reports I would recommend reaching out to support: 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.
You can't do that - the subscription is already started
@exotic rain What are you trying to do / what are you expecting the start date to affect?
okay,
then how can i update the existing subscription with new price on future date?
Hi all .. is there a way to provide express account holder to edit their bank details like the accountURL that we use to onboard the express account ??
You'd set an end date for the current phase and add a new phase with the new price to start then, similar to the second example here:
https://stripe.com/docs/billing/subscriptions/subscription-schedules#updating
@exotic rain note that you need to include the current phase in the update request (and the new phase)
Sounds good! let us know if you have any questions going through that ๐
@junior ivy yep, you can send them to the express dashboard and they can update their bank details there:
https://stripe.com/docs/connect/express-dashboard
Express provides its own account management and reporting features for users, built into a Dashboard hosted by Stripe.
what is setQuantity in this?
And also i don't have any current phase(basically scheduledSubscription) to update it with phases
If your customer is paying for more than one license per month, for example. If you're only using quantity=1 you should be able to omit that.
@exotic rain See here for context: https://stripe.com/docs/billing/subscriptions/multiple-products
Create subscriptions with multiple products, all billed in a single invoice.
Hi, we're building a standard connect integration, controlled by a single platform, and i'm wondering if it's possible to view events relating to direct charges that the platform account creates on its connected accounts?
Are you mentioning current phase to currently running subscription with existing price?
Because as per the example, it is updating the existing schedule and i don't have any scheduleSubscription created before.
thanks a lot .. it really helps ..
excellent!
Sure, you can subscribe to those on your connect webhook endpoint:
https://stripe.com/docs/connect/webhooks
Learn how to use webhooks with Connect to be notified of Stripe activity.
hi, have a trouble with integration flow for recurrency payment after first on-session paymentIntent. someone can help me ?
@exotic rain I'd suggest creating the schedule from the subscription first without modifications, then update that schedule (ie, split into two steps)
@exotic rain After creating from the existing sub, you'll have a schedule with a single phase and can reference the existing phase values when updating to add a phase
๐ hello. what is the issue?
i try to migrate from old process with createCharge to new process, its for integrate 3D secure flow. For the first payment i use PaymentIntent and all is good, but for my recurring process (it's plan product) i don't understand how i can pass 3D secure on a off-session of my user
Thanks a lot, trying that.
Since your customer is unavailable to authenticate for an off-session payment, you wouldn't want this. Instead, you use setup_future_usage during the first payment to set the card up for off session use in future:
https://stripe.com/docs/payments/save-during-payment?platform=web#web-submit-payment
Learn how to save card details during a payment.
@storm walrus then you use that payment method with off_session=true
i already do that i think
@storm walrus Note that the bank may still decline the payment requiring your customer to authenticate, but it will be an immediate decline, different that the requires_action state of the initial payment
is it possible to retrieve PI ID from stripe checkout?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
thank you
If you're already saving the future usage, then you can charge the saved card later:
https://stripe.com/docs/payments/save-during-payment?platform=web#web-create-payment-intent-off-session
Learn how to save card details during a payment.
creating a subscriptionSchedule without modification:-
SubscriptionScheduleCreateParams params = SubscriptionScheduleCreateParams.builder()
.setFromSubscription(userSubscription.getStripeSubscriptionId())
.setEndBehavior(SubscriptionScheduleCreateParams.EndBehavior.RELEASE)
.build();
SubscriptionSchedule schedule = SubscriptionSchedule.create(params);
And then update it:-
SubscriptionSchedule subscriptionSchedule = SubscriptionSchedule.retrieve(schedule.getId());
SubscriptionScheduleUpdateParams updatedParams = SubscriptionScheduleUpdateParams.builder()
.addPhase(
SubscriptionScheduleUpdateParams.Phase.builder()
.addItem(SubscriptionScheduleUpdateParams.Phase.Item.builder()
.setPrice(subscriptionPlan.getStripePriceId())
.setQuantity(1L)
.build())
.setStartDate(startingDateSeconds)
.build())
.build();
SubscriptionSchedule updateSchedule = subscriptionSchedule.update(updatedParams);
for initial payment a do this :
$intent = \Stripe\PaymentIntent::create([
'amount' => $PayCommand->getAmountTotal(),
'description' => 'Nยฐ '.$PayCommand->getId().' - '.$user->getEmail(),
'currency' => $PayCommand->getCurrency(),
'customer' => $user->getStripeUser(),
'metadata' => [ 'command_id' => $PayCommand->getId() ],
'setup_future_usage' => 'off_session',
'payment_method_types' => ['card'],
'confirm' => true,
'return_url' => $redirectedUrl
]);
so i use "off_session" i think
but after when a i createCharge on the card of customer the next mounts i have an error:
Stripe\Error\Card exception encountered when creating a Stripe charge: "Your card was declined. This transaction requires authentication."
i don't understand why, it's supposed to work with your test card ?
I only see one phase there, I expected to see two (the current + the new phase). Does this work as you expect it to?
YOu've included confirm and return_url here. What guide are you following? This is a more advanced/complex integration pattern. I'd expect you to be using client-side confirmation with Stripe.js for the first payment.
@storm walrus and which test card are you using?
@storm walrus can you share the request if of the second payment that fails? https://stripe.com/docs/api/request_ids
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Is it possible to use a existing PaymentIntent for an Invoice?
Can you explain what you're trying to do? Invoices manage their own payment intent for you, so I think the answer is no but looking forward to getting some more context.
just want to confirm:
https://stripe.com/docs/terminal/readers/fleet-management#discover
when discoveringReaders, location_id should start with "tmr" right?
Group and manage a fleet of readers by physical location.
tml_ i think - "terminal location". tmr_ is "terminal reader"
ic, when getting a list of reader, is it possible to display location name along with their id(tml_)
yes i follow the advanced integration, and it's a migration, we use the older advanced method before
i use card 4000000000003220
request_id : card_1JBGabKQQszY1BCq0O6LJZ6Y
that is this you ask ?
not sure if right place to ask, but basically a person i work with that i was supposed to pay charged my bank account 2 times without my aproval or me actually paying him using the discord receipt method. The receipt looks like this on my email, never did anything to pay it, regardless money was withdrawn from my bank
location is exandable:
https://stripe.com/docs/api/terminal/readers/object#terminal_reader_object-location
So you can use expand[]=data.location in your Reader list request to get the full object for each entry
https://stripe.com/docs/api/expanding_objects
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Use the 3155 card here to test setting up for future. The 3220 won't work like that.
https://stripe.com/docs/testing#regulatory-cards
I'd like a request id (req_1234) for the erroring request you hit, if that doesn't fix it for you
Learn about the different methods to test your integration before going live.
My customers can choose between card payment and invoice. I create a PI before the customer selects payment method. Im wondering if i can use that PI for an invoice or do i have to recalculate the amount again?
ok thx u @daring lodge i'll going try
Is it possible to retrieve a customer without passing an id but passing a value stored in metadata? Like Stripe::Customer.retrieve({my_key: 'my_value'}
Do i have to report his as a bug or abuse or what ? Actually got charged 2x 70$ without my aproval, only paid the third one since it was made in proper method like so,
these however got charged without my aproval, 2x
there might be some bug with the receipt from discord method and the discord partnership if person can charge my cc without my aproval, or am i missing something ?
For help with this you should reach our to Discord directly, if the payment was from them, or Stripe support if this was an unexpected charge.
https://support.stripe.com/contact
If you are a customer without a stripe account you can email without logging in: https://support.stripe.com/contact/email or email support@stripe.com
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.
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.
ty
You can't d what you describe, no. Creating invoices is different than payment intents, you need to define line items etc.
@naive kettle Hey! I'm afraid that isn't possible, no. You could instead perform that lookup using the list method with our auto pagination feature
Are these available from my Dashboard too?
Not under your own account, no, but if you can "view dashboard as account" for the connected account, then you should be able to inspect that accounts events there:
https://dashboard.stripe.com/test/connect/accounts/overview
Gotcha, so I can set up a webhook to consume the events on the connected account but can't view the events on the platform's dashboard? Just to confirm
yes, but to be clear you'd set up a connect webhook on your platform not on each connected account
a single connect endpoint on your platform can get events from all connected accounts
excellent, Thanks!
Hello, can i have help please
hey there - what do you need help with?
hello ,
can i integrate 3d Secure (One time password) in given react js code.
render() {
return (
<StripeCheckout
name="Emaily"
description="$5 for 5 email credits"
amount={500}
token={token => this.props.handleToken(token)}
stripeKey={process.env.REACT_APP_STRIPE_KEY}
>
<button className="btn">Add credits</button>
</StripeCheckout>
);
}
Hi folks! I know that PaymentLinks cannot be created via the API at the moment, but if I have a standard connect platform, can I access the PaymentLink objects that my connected account created through the Stripe Dashboard via the API?
Hi, I am trying to integrate Stripe with Unity. Is there any information or tutorial that you can recommend to me? Thank you! ๐
We integrating with metered subscriptions and trying to handle replacing subscription items using stripe.subscriptions.update We are passing price id's to the items property and also passing subscription item id's with deleted: true and we see an error message of:
invalid_request_error
When deleting the subscription item si_JsOJjXG2oXRuDM with a metered plan, all related usage records must be cleared too by setting clear_usage=true.
We do not want to clear usage for the un-invoiced usage on the current subscription items. We would like to to stick with using the update method. If we are able to update usage on those subscription items just before calling update, can we simultaneously mark those as deleted: true and use the add_invoice_items.price to cause one last invoice to be created for those subscription items that will be deleted from the subscription? If not we are looking for suggestions. Thank you!
@kindred frigate Can you explain a bit more what you expect to do here? I'm not sure I understand what you're trying to accomplish.
If you mean supporting 3ds with a custom Stripe Elements payment in react then yes you can do that:
https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#set-up-stripe-elements (choose React tab/option)
Securely accept payments online.
Hi @loud wasp ๐ป ! AFAIK there is no API for PaymentLinks available, even just to retrieve. You'd be able to retrieve the related checkout sessions/payment intents, though.
@civic eagle That looks like you use separate auth & capture, but never captured the payment. You need to capture the payment with 7 days after authorization.
https://stripe.com/docs/payments/capture-later
Understood - thank you!
NP - and welcome to our Discord ๐
Thanks, but how can I make it automatic?
Hi folks ๐
I'm working on a GPay android stripe integration based on these steps: https://stripe.com/docs/google-pay
The flow works fine when using the test stripe publishable key and gpay test environment.
We've been approved in the GPay business console, however now we've changed over to using the live publishable key & env,
we are seeing this error in the GPay flow:
An unexpected error has ocurred. Please try again later. [OR-IDL-09].
We've also reached out to google as our apple pay integration is working fine,
but just wanted to drop in here to see if there's a known resolution for this?
Learn how to accept payments using Google Pay.
I was curious what y'all were going to do in response to the "freenode situation" and 'm very glad to see the move to Discord
Hey there - can you say more about this? What example causes the error? Is there a Stripe API error or is this an SDK error or something else?
Hi, Im trying to backdate a subscription thou the api. im setting the billing_cycle_anchor. But this doesnt seem to have any effect. Would anyone have an idea what I might do wrong?
The dialog is shown within the GPay UI when the user taps the pay button.
This is after our backend has created a stripe payment request, but before the callback from the GPay API.
https://dashboard.stripe.com/test/logs/req_42nvgkrQ1fVYO4 is the request I made
@daring lodge We integrating with metered subscriptions and trying to handle replacing subscription items using stripe.subscriptions.update We are passing price id's to the items property and also passing subscription item id's with deleted: true and we see an error message of:
invalid_request_error
When deleting the subscription item si_JsOJjXG2oXRuDM with a metered plan, all related usage records must be cleared too by setting clear_usage=true.
We do not want to clear usage for the un-invoiced usage on the current subscription items. We would like to to stick with using the update method. If we are able to update usage on those subscription items just before calling update, can we simultaneously mark those as deleted: true and use the add_invoice_items.price to cause one last invoice to be created for those subscription items that will be deleted from the subscription? If not we are looking for suggestions. Thank you!
Taking a look at your example - bear with me
ok, thank you
I think I see it already. I should also set the end date specificaly
Hello
My Stripe account is blocked this stripe account is to promote our brand Sawora.
Please know that this blocking puts us again in a great difficulty because we have stock that costs us money, and a partnership with the production plant that we must respect.
I understand that you are just doing your job and that for you these stripe accounts are just that...but they are much more for the entrepreneurs who use them.
The employees of these companies have families that depend on the wages generated from their customers to live. When you deactivate a Stripe account, you directly impact the lives of these families.
I remain at your disposal, but please do what is necessary.
My best regards.
Thanks in advance
Oh, have you got what you wanted now? I was going to ask about your request because it sets the backdate_start_date not the anchor, so I wasn't sure what you wanted / what you were trying.
Hey guys. I need to take export of Customer Subscriptions from my Stripe Dashboard. I couldn't find it. Can you help me how to do that?
Is it possible? @daring lodge
@thick blaze the tidyest way to transition pricing for meter usage is to add a new subscription item alongside the current one, and start reporting usage there. Then, once the next invoice clears the pending usage payments (either forced or on the natural cycle) you can remove the old subscription item.
I don't know -- can you share some example payment ids? It appears you must be setting the payments to manual capture. If you let these use automatic capture instead (the default), then it wouldn't be a problem for you.
:question: @vocal wagon Have a non-technical question, account issue, or need one-on-one support?
We wish we could help, but this community is focused on developers and technical discussions. Our support team will be able to assist you better than we can: https://support.stripe.com/contact
I've attached the (sanitised) jsonifed payment data request we supply to the call to show gpay, based on the docs I linked to.
There should be an "export" button on the Customers > Subscriptions view:
https://dashboard.stripe.com/test/subscriptions
@daring lodge So would we want to watch for the invoice.finalized webhook event and then delete the old subscription items with deleted:true and clear_usage:true ?
Gotcha, thanks. And this was working for you until recently? Did you make any changes recently to your integration?
Can you paste that pi_123 id here please?
yep, it was working in the test environment, but we switched over to the live credentials today and now we're seeing the issue
and do not share private information in the channel - it is public with many users
pi_1JBkioE8Xk8Pdr1obdeNYxXd
@north ether but was this previously working in Live mode for you?
no, only in test. we have been approved for live in the GPay business console though.
Here is the creation request for that payment: https://dashboard.stripe.com/logs/req_rbkunXstLKqYy4
see that it says capture_method: manual? This must be something you are setting explicitly or via options in your prestashop integration, and you should not use this unless you wish to manually capture.
OK thanks - do you have any errored API requests? Can you share an example payment intent ID working in test mode?
@daring lodge also does metadata from a subscription get added to the invoice event data that is sent to the invoice.finalized webhook?
Thanks, in a dashboard how i can change manual to automatic?
This is not a Stripe dashboard setting, this is part of the request to create the payment intent. You need to change this in your code, or somewhere in what you set up for prestashop.
YOu shouldn't need to clear usage then, adn it will be cleared by the payment and you wouldnt have reported any new usage, but generally yes. Any invoice payment/success event should suffice.
web api we have use given code,
StripeConfiguration.SetApiKey(System.Configuration.ConfigurationManager.AppSettings["Secret Key"]);
var customerOptions = new CustomerCreateOptions
{
SourceToken = objRegInfo.token,
Email = objRegInfo.EmailAddress,
};
var customerService = new CustomerService();
Customer customer = customerService.Create(customerOptions);
Charge charge = new Charge();
var chargeService = new ChargeService();
charge = chargeService.Create(chargeOptions);
after click on pay button it is showing below message
Your card was declined. This transaction requires authentication
can you suggest how can i modified this code for 3d secure (One Time Password)
No, if you need the metadata you'd need to retrieve the subscription
Ah this is using the legacy Charge API, you should look at upgrading to the Payment Intents API to be SCA-ready:
https://stripe.com/docs/payments/payment-intents/migration#web
can not do in legacy charge API?
I can't find any test ones, but here's a successful apple pay one: pi_1JExhPLZMMa5HMOVEvhya9Sa
and a failing g pay one: pi_1JExhzLZMMa5HMOVdx5tahxN
(both in live)
@north ether hello, having a look one sec
Hello, when I try to confirm the capture after the 3DS (in backend with this: https://stripe.com/docs/payments/accept-a-payment-synchronously?platform=web#confirm-payment). I have this error, Cannot modify header information - headers already sent by.
Do you know how I can solve this please?
Learn how to confirm a payment on your server and handle card authentication requests.
@daring lodge thank you for your help
pi_1JEzAZBfAoJM0K2y1JXcxhoQ
@vocal wagon hello having a look
@vocal wagon can you send me the request ID where you get that error? From your Dashboard logs?
@north ether I looked at the second PaymentIntent, nothing failed there? It was never confirmed, had no PaymentMethod attached. There isn't a failure there.
Hi - the payment intent creation part seems fine as you say.
Our issue is that after the intent is created and we show the GPay ui as directed here(https://stripe.com/docs/google-pay#submit-payment),
on tapping the "Pay" button we get the error dialog I mentioned in the original post.
Learn how to accept payments using Google Pay.
@north ether this is on web right? Not on an Android app, correct?
@bold basalt My tests are in test mode, do you find with PI_ID given just before? pi_1JEzAZBfAoJM0K2y1JXcxhoQ
@north ether does it work in test mode, with your test mode API keys, can you check?
Nope, it's in our android app.
Our backend engineer has finished for the day now so I can't switch the intent creation service back to test.
I won't be able to get this done until tomorrow now I think.
@vocal wagon I can pull up the PaymentIntent but no errors on any of the requests I see there, which is why I asked if you have a request ID
@north ether yeah it could be a few things, I'd first verify in test mode, and then have a look at whether you're set up for Google Pay in production. There's a few factors that can cause issues here, like GPay payment sheet validation, the card you select, things like that
Thanks. I'll move back over to test tomorrow and have a look - should we be using a real card to test or should we use a GPay account signed up for google's "Google Pay API Test Cards Allowlist" google group? I think we've got the GPay production approval (based on our GPay console) sorted but I've reached out to google to confirm this. Could you point me in the direction of more info about your other suggestions - sheet validation and card selection?
@north ether real card to test, it doesn't charge the real card but charges a test mode card instead (as long as you're using test mode API keys).
a real card in test mode would cause an error wouldnt it? Im pretty sure it gets rejected
@north ether there's no directions for the other things unfortunately, GPay payment sheet is an opaque box basically but have identified a handful of things over time that can have issues
@bold basalt The error is on the PHP side, because I have to validate the 3DS then confirm the payment on the same PHP page (backend) except that the PHP page is already loaded at the time of the JS call so that the PHP code that I have provides your colleague (visible here: https://stripe.com/docs/payments/accept-a-payment-synchronously?platform=web#confirm-payment) cannot run correctly
@tepid gust not with Google Pay or Apple Pay, for GPay specifically, Google creates a test mode token for 4242 instead of your real card
ah that makes sense
@vocal wagon I'm not sure I understand. Like from the PaymentIntent perspective you've mostly done the right thing, it sounds like an integration issue in your PHP code? which line of code is running into an error, the server-side confirmation of the PaymentIntent?
@bold basalt Here is the code: https://pastebin.com/A0UUWvhi
On line 233 because of what is happening on line 207 to trigger the 3DS (when it is needed)
So i talked to a Dev yesterday, and he said to handle Product Variants, I should use the Price object, I just took a look at the SKU object, how does that relate?
@unreal ingot hello, not sure what the conversation was yesterday but you would just create Price objects for a particular Product. You wouldn't create SKU objects.
OK, thx for the help
@vocal wagon so you're calling handleCardAction() correctly, after that once you get the PaymentIntent status, you need to confirm it server-side.
I don't think that is what you're doing in your handleCardAction() completion. You need to POST to a page or send an AJAX request to send the PaymentIntent to your backend PHP code and confirm it again.
It is a bit hard to follow the code flow in the pastebin but I'd trace that a) you have code to confirm a PaymentIntent server-side and b) you are calling that code (by adding logs etc) after you handleCardAction()
@bold basalt My concern is that after calling handleCardAction, I have no control over the event once the user has confirmed via the popup returned by Stripe?
@vocal wagon you do though, when the promise resolves? i.e. the .then() part after your handleCardAction() ...
@bold basalt Before the call took place in FrontEnd and Stripe took care of it directly, I didn't have to worry about it in BackEnd
@bold basalt Ok, I'll try, wait a minute thank you hmunoz
@vocal wagon yes that is still possible, without manual confirmation. so your code is using a non recommended flow
@vocal wagon why are you using manual confirmation?
@bold basalt I have several uses in Custom, sometimes the capture is confirmed later, when I get the IBAN from the service provider.
Thanks for this. What I'm now seeing, in the test env, is that the flow seems to work with a real card, but the payments aren't appearing in the stripe console. eg for this payment intent id: pi_1JEzYfLZMMa5HMOVlXwqsefd
@vocal wagon that can also work without manual confirmation. Beyond card payments, manual confirmation isn't intended for any other payment methods though
@bold basalt Ok, if it doesn't work better for this case, I'll switch manual to automatic, thanks.
@north ether looking
@north ether ok so here's what I see
@north ether your code is probably creating a PaymentMethod but isn't actually doing the rest of the integration i.e. confirming a PaymentIntent with that PaymentMethod. So something is missing here, could be client side or could be server-side, can't say as it depends on how you're integrated. But your integration isn't confirming the PaymentIntent with the Google Pay PaymentMethod.
ok thanks, that's v useful ๐ I'll take a look tomorrow and drop in again if I have any more questions.
@bold basalt If I pass capture_method & confirmation_method to automatic, I no longer have the 3DS request at all?
@bold basalt Ditto if I leave capture_method in manual and I pass confirmation_method in automatic
Do you have the payment intent I can take a look at?
hello, I'm looking at subscription schedules and have a question re: the end_behavior attribute. If my schedule has 2 phases, each with a different price associated with them. Which price will be used once the schedule ends and the end_behavior is set to 'release'? I assume it will be whatever price is associated with the 2nd phase (e.g., the most recent phase) but want to double check
Hello! When end_behavior: release, that means the subscription will continue with the settings established by the latest phase - so for your case, the subscriptions schedule is ending with the second price and once released will continue on with that price
hi
A follow-up question for you as what I really want to do is:
phase 1: Price A, iterations 1 PLUS an additional X days.
phase 2: Price B, iterations 1. Starts after completion of phase 1 (including additional days)
In theory, we could use trial period but that means customer is not charged upfront which is not what we want. Could make it work by setting a trial period on phase 2? But that seems a bit awkward.
my Live API key not working
Really Phase 2 should go on indefinitely but I assume we can accomplish that by having Phase 2 be a single iteration and then letting the schedule revert back to a simple subscription.
Can you be more specific - what about it is not working? Are you getting an error? (Please make sure not to accidentally paste any API key when answering)
For those additional days, is the goal to not charge the customer for these days, or do you want to charge them a prorated amount (using Price A)?
The goal is to not charge the customer for those extra days with the caveat that we are still charging upfront for the phase (i.e, we don't want a traditional trial period where the charge occurs sometime later)
Have you checked that your site is using your live publishable key? That error is occurring because that token was created with your test publishable key (pk_test_xxx), but then you're trying to use it in a follow-up live-mode request.
We can think of it as:
Phase 1 - has a 30 day interval but should last for 40 days
Phase 2 - has a 30 day interval; should have infinite iterations after the first 40 days
Gotcha - given all your requirements (charging for full phase upfront, not charging for the extra days), your best option is to create a subscription w/ end_behavior: release and the following phases:
- phase 1: price A, 1 iteration
- phase 2: set
phases.trial: true(see https://stripe.com/docs/api/subscription_schedules/create#create_subscription_schedule-phases-trial) and set theend_datefor when you want the free period to end. - phase 3: price B, 1 iteration
I think you could also technical do this:
- phase 1: price A, 1 iteration
- phase 2: price B, 1 iteration, set
phases.trial_endto the timestamp when you want the additional days to end.
This way has fewer phases, but only works if the X additional days is less than the length of the billing cycle, and may result in the first payment at price B to be prorated (although I would have to test to confirm)
Thank you! I will try your suggestion out and let you know if I run into any issues. For phase 2, will that trigger a second invoice?
Hey, we are considering rolling out our own Invoice email and I see that the Invoice PDF link exists here https://stripe.com/docs/api/invoices/object#invoice_object-invoice_pdf. Does the Receipt PDF link exist? I see that it is downloadable via the hosted_invoice_url here https://stripe.com/docs/api/invoices/object#invoice_object-hosted_invoice_url
Also, an idea, it would be really cool if the Docs showed which Invoice object key's are used to populate Stripe Invoice PDF.
Yes, it should still trigger a $0 invoice - but definitely test this out to double check. I don't test with subscription schedules often, so it's always good to confirm
Is there a size limit on metadata values? (Thinking of storing a bit of JSON)
hello! I believe you can find a receipt URL on the associated charge of the invoice (https://stripe.com/docs/api/charges/object#charge_object-receipt_url). You can get to the Charge from the invoice by retrieving or expanding the payment_intent of the invoice (https://stripe.com/docs/api/invoices/object#invoice_object-payment_intent)
I believe the limit we have set on metadata is 40 characters for the key and 500 characters for the value
Thank you! I guess it's up to us how we plan to send the Email, if from the invoice.paid or invoice.finalized webhook but is there a recommendation in regards to that?
We don't have a set recommendation - but if the email you want to send is for the receipt upon successful payment then definitely invoice.paid (invoice finalization doesn't guarantee that an invoice has/or will be successfully paid)
OK. Thanks. Yeah, I think sending a Receipt makes sense after invoice.paid since we work on Subscriptions and use auto-pay - not sure if sending the Invoice as well was a "best practice" sort of thing since Stripe does send both I think
[โ Question] I added some metadata to an issuing transaction (ipi_...), but these metadata are not showing up when I download the financial reports. What am I missing?
Typically, we only send the finalized invoice for invoices where collection_method: send_invoice. If you're doing automatic collection, I don't really think it's necessary to send the finalized invoice but it's totally up to you and what your business needs are
Which report are you looking at? I believe only some reports included metadata, so that may be the issue
Hey karbi! Excited to see you here. I am using "Balance change from activity". I can see some metadata fields as the selectable options, but I don't see them get printed for the issuing transactions
Hmm... Give me a minute to look into it - When you say "balance change from activity" you're looking at https://dashboard.stripe.com/reports/balance right?
yes exactly
Hi guys, this is the current bug I get with this
Any thoughts? Ref to previous cases on discord?
In the future feel free to share the code/error itself instead of screenshots. Easier to debug that way.
Is this in stripe-node, or stripe.js?
Okay thank you I will. I am using node and react yes. I'm not sure what stripe.js is referring to sorry.
The stripe-node example at https://stripe.com/docs/api/tokens/create_bank_account?lang=node shows how to pass everything correctly. Try that example code instead.
Yep, that's the formatting in the example from the API docs.
Okay thanks I'll try this now, I was following CJ's format the 1st time I think
Could be the API was updated since the video
more than likely, yeah
I tried a couple of things, but none of them panned out - I'd recommend writing into support and asking which (if any) reports will include issuing transactions metadata on them. I know the csv export will, but couldn't get it to work for reports ๐ฆ
is there a proper way to paste code in here? Like /code or something?
The markdown formatting would be three backticks before and after the code
some code
const accountform = React.useRef("account-form")
const formdata = new FormData(accountform)
formdata.set('external_account', bankToken)
fetch('/create-account', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(Object.fromEntries(formdata))
}).then(function(r) {
return r.json();
}).then(function(response) {
JSON.stringify(response, null, 2)
});
}
const handleStripeConnectBtn = (event) => {
event.preventDefault();
console.log("hello");
createBankAccount()
.then(CreateAccount);
};
Woops, thanks, well anyway I have a button which is supposed to lead to the Account Link, but I get this error, sorry I'm a noob guys
Looks like createBackAccount() is undefined
Where are you defining that?
I have it defined right above the code I just pasted ๐ค
I see a definition of CreateAccount but not createBankAccount()
stripe.tokens.create ({
bank_account: {
country: 'US',
currency: 'USD',
accountnumber,
routingnumber,
account_holder_type: businesstype,
account_holder_name: businessname,
}
}).then(function(response) {
// debug("created bank account" + response.token.id)
return response.token.id; // btok_xxxx
})
}
const CreateAccount = (bankToken) => {
const accountform = React.useRef("account-form")
const formdata = new FormData(accountform)
formdata.set('external_account', bankToken)
fetch('/create-account', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(Object.fromEntries(formdata))
}).then(function(r) {
return r.json();
}).then(function(response) {
JSON.stringify(response, null, 2)
});
}
const handleStripeConnectBtn = (event) => {
event.preventDefault();
console.log("hello");
createBankAccount()
.then(CreateAccount);
};
I'll work to figure it out, but atm, I hover over .then and see this as well
OK, so createBankAccount as defined doesn't return anything, let alone a Promise which you'd need to return in order to use .then() on the result
Have you done much asynchronous programming (Promises, await/async) in JS before?
Haha, I'm working to get better, I definitely need to grasp those concepts better
No worries. Let me change a couple things to make it flow better, one moment.
I haven't tested this yet but try removing createBankAccount()'s definition and use this modified version which calls the function directly
const CreateAccount = (bankToken) => {
const accountform = React.useRef("account-form")
const formdata = new FormData(accountform)
formdata.set('external_account', bankToken)
fetch('/create-account', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(Object.fromEntries(formdata))
}).then(function(r) {
return r.json();
}).then(function(response) {
JSON.stringify(response, null, 2)
});
}
const handleStripeConnectBtn = (event) => {
event.preventDefault();
console.log("hello");
tripe.tokens.create ({
bank_account: {
country: 'US',
currency: 'USD',
accountnumber,
routingnumber,
account_holder_type: businesstype,
account_holder_name: businessname,
}
}).then(function(response) {
// debug("created bank account" + response.token.id)
CreateAccount(response.token.id); // btok_xxxx
})
};```
you may need to change the references to things like businesstype
I have a question about the testing of errors in your API.
I am using a credit card 4000000000009995 Which is supposed to get declined for insufficient funds.
I first create a customer and then a payment method with this credit card number and then I attached that payment method to the customer that was created and then I error stating the card has insufficient funds.
Why is that happening?
I would have assumed that the card would have been declined when the payment intent was created and I actually put the amount of the charge and was attempting to charge the card.
The line that is error with
paymentMethodService.Attach(paymentMethod.Id, new PaymentMethodAttachOptions()
{
Customer = customer.Id
});
Is this something that only happens when using testing card numbers?
Cards only get verified when you attach them to a Customer or you actually attempt to confirm a PaymentIntent with them.
I was expecting this to only happen when confirming a PaymentIntent. Like, how does it know there is an 'insufficient funds' error when I haven't told you the amount?
In the Product API documentation, there is no mention of the field "type": {
"id": "prod_JsoAYdmTa8V3HD",
"object": "product",
"active": true,
"attributes": [],
"created": 1626724497,
"description": "TestDescription",
"images": [],
"livemode": false,
"metadata": {},
"name": "TestProduct",
"package_dimensions": null,
"shippable": true,
"statement_descriptor": null,
"type": "service",
"unit_label": null,
"updated": 1626724497,
"url": null
}.
@dire shadow oh and there's a missing s on the stripe. line in my example
Here it is defaulted to "service"
You want the card ending in 0341 which attaches to a Customer but then fails on any charge attempt. The other ones will always fail on attaching (some verifications on attaching will authorize $1 and thus can fail for insufficient funds)
Thank you
@unreal ingot Hello! The type on Products is for our deprecated Orders API and can safely be ignored.
ok, ty!
hi i run prestashop, orders are not visible in my back office ๐ฆ
@plush lintel Hello! Unfortunately we're not able to help with PrestaShop here, you'll need to reach out to PrestaShop for assistance: https://www.prestashop.com/en/help
Wow thats amazing you would do this, thanks, I'll test this out now
Sure thing! I need to step away but @mighty hill can help if you run into any specific errors from here.
So im putting in metadata such as this: "metadata": {
"attrs": [
{
"name": "Heel Height",
"value": "High (2-1/2 to 4 in.)"
},
{
"name": "Upper Material",
"value": "Synthetic"
},
{
"name": "Toe",
"value": "Open toe"
},
{
"name": "Brand",
"value": "Metaphor"
}
]
},
And it fails: stripe.error.InvalidRequestError: Request req_BnPI0BBsyq84mY: Invalid value type: {:"0"=>{:name=>"Heel Height", :value=>"High (2-1/2 to 4 in.)"}, :"1"=>{:name=>"Upper Material", :value=>"Synthetic"}, :"2"=>{:name=>"Toe", :value=>"Open toe"}, :"3"=>{:name=>"Brand", :value=>"Metaphor"}} must be a string
Does metadata only take in key: str?
@unreal ingot Yep, metadata in the Stripe API only allows for keys and values that are both strings.
oh man! RIP
@unreal ingot See here for details: https://stripe.com/docs/api/metadata
@unreal ingot You can serialize to JSON and store the JSON as a string, then deserialize after reading the value back, as long as you're careful not to go over the limits listed at the link above.
ok, ty
In the metadata for Prices, I saw stripe plugins for Product Variants, and they use Family: Attribute: Value
can i do {"Family": "Attribute": "Value"}?
@unreal ingot No. Where did you see this?
Some weird youtube video lol
Eh, nvm lol
How does a Connect Account add a product specifically under that vendor's connect account?
When I add a product, it goes under the main account
@unreal ingot You would make the API request to create the Product on behalf of the connected account: https://stripe.com/docs/connect/authentication
Are there any benefits over: Server-side with the Stripe-Account header and the connected account ID, per request VS.
Client-side by passing the connected account ID as an argument to the client application
hey guys, totally new here, I'm building a platform using Stripe Connect. Anyone knowledgeable about Standard Connect accounts and such?
@unreal ingot Client-side you only have your publishable key which can only perform certain operations.
@vocal wagon Hello and welcome! What are your questions?
Ok, that's what I thought, thanks
Thank you Rubeus for being available. I am getting an error (Id is missing in session response) while testing a checkout. Do you mind if I share my steps here?
@vocal wagon If you can provide the request ID showing the error I can likely point you to the solution. Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
yes i have this one: req_pYMajHL5HLntwH
But please let me share some background info if i may
@vocal wagon That looks like a successful request with no error; do you only see the error after loading Checkout?
see it in the Dev tool
orders are not visible in my back office prestashop
@vocal wagon I'm not seeing any errors. More details/a screenshot of the error you're seeing would be helpful. ๐
im lost guys, my customer has paid and ordered something from my prestashop but i didnt get thsi order
@plush lintel As I mentioned earlier we're unable to help you with PrestaShop here. Have you reached out to PrestaShop for help?
they are useles
@vocal wagon I'm not seeing an error there, and the id property is populated with the Checkout Session ID.
The error appears in the Console
@vocal wagon Can you provide a screenshot of the error?
1/ I created my session in 'setup' mode with Connected Acct and platform SK in the header. Is that correct?
2/ I "save" the cs_ID.
3/ Then I retrieve this ID in Retreive Checkout Session API, which generates the seti ID.
4/ Then I retrieve the setup intent with this seti ID.
5/ Then create paymentIntent (for auth then capture later) with the On-behalf_of (?)
@vocal wagon I don't understand steps 3-5. Can you tell me at a high level what you're trying to build?
Can we create a side room where we can chat?
@vocal wagon We try to help people here so others can follow along and learn from the discussion.
@vocal wagon If you want dedicated one-on-one support or need private support you can reach our support team here: https://support.stripe.com/contact/email
Ok, understood,
So we have people with Connected Account offering services. Users would pick their service and book.
When they book, they submit their cc for a charge later.
So we use session.create in 'setup' mode, then,
we want user to send funds direct to connected account and the platform take an application fee.
@vocal wagon What type of connected accounts are you using? Standard?
Yes Standard Connect sorry
@vocal wagon Okay, so generally speaking it sounds like the flow you want would be something like this:
- Create a Customer on the connected account
- Create a Checkout Session in setup mode for that Customer
- Send the customer to Checkout
- Later...
- Create a Payment Intent on the connected account with an application fee
- Specify the Customer and Payment Method set up for future use by the Checkout Session
- Confirm the Payment Intent
@vocal wagon Does that line up with what you've been working on?
Basically following these steps: https://stripe.com/docs/payments/save-and-reuse#create-checkout-session
I am at 3/ right now
Trying to send customer to checkout. I have my cs object created, then, a url is generated but I need to redirect
@vocal wagon What code are you using to redirect to the URL?
That is my very question: how do i do the redirect? See the 303 redirect here.
@vocal wagon There's nothing special about it or unique to Stripe. It would work like any other HTTP redirect.
The lines of code before are done. The redirect is confusing
@vocal wagon You're using PHP, correct?
yes
@vocal wagon It would be something like this:
<?php
header('Location: https://example.com');
exit;
I could not find a way to fetch that 'url' in the session object response somehow...
@vocal wagon Oh, you can get the URL using $session->url
When doing a payment intent with a connected account. Is there a way to attach the card back to the base platform? It just seems to save to the payment on the connected account
@vocal wagon So putting it together would be:
<?php
header('Location: ' . $session->url);
exit;
@solid ridge No, you can't go from connected account to platform, but you can clone from platform to connected account: https://stripe.com/docs/payments/payment-methods/connect#cloning-payment-methods
How would you get the card saved initially to the platform? Would you need to process the first payment to the platform. Then use for connected accounts after?
Thanks a lot Rubeus. We'll get this to work. Now another question if I may
@solid ridge You don't need to process a payment on the platform. You would create the Payment Method on the platform, clone it to the connected account, then charge there. Can you talk about what you want to build/what issues you're running into so I can assist further?
@vocal wagon No need to ask to ask, just ask. ๐
Very kind of you. So this flow you laid out here quite close.
4/ is no so late: once checkout 'setup' succeeds, I want to auth the cc submitted. Then later capture the card.
5/ so I do create a paymentIntent for the auth.
6/ A few days later: Retrieve then Capture.
Now, Im confused about the Connected Account, platform API sk to put in the headers and where to use the on_behalf_of
@vocal wagon Can you give me an example scenario with specific timelines? Do you want to authorize/place a hold a specific amount? How long do you want to wait to capture that amount?
@vocal wagon With Standard connected accounts you will be using direct charges and will never use on_behalf_of. See here: https://stripe.com/docs/connect/charges#direct
User books the service on day1. Cc authorization then.
Service is rendered on day 3. End of day, both user and service renderer click to confirm service rendered.
So it is a "manual" payment.
Capture happens off session, when user is offline.
If someone switches from a yearly subscription to a monthly one, is there a way to have it only update when the yearly one finishes rather than charging it straight away?
Got it, so I use the direct charge already: Connected Account in header of the customer create and create checkout session.
@vocal wagon Ah, okay, so you likely don't want Checkout in setup mode or Setup Intents at all, you likely want to place a hold on a card: https://stripe.com/docs/payments/capture-later
We are doing fixed price subscription. We notice that Stripe allow the user to purchase multiple concurrent subscriptions of the same product (& price even). We want to avoid double charging the customer, so we would like to make sure the user doesn't get a second subscription if they already have one. Or if they have a cancelled subscription, that they just restart it. What's the best way to doing thot?
Yes I'm following these steps after following these https://stripe.com/docs/payments/save-and-reuse#create-checkout-session
@vocal wagon When you create the Checkout Session you would set payment_intent_data.capture_method to manual to place a hold on the funds and capture them later: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-capture_method
@vocal wagon Yeah, what I'm saying is you don't want to use https://stripe.com/docs/payments/save-and-reuse at all.
@stray skiff You can schedule the change to happen later with a Subscription Schedule: https://stripe.com/docs/billing/subscriptions/subscription-schedules
@abstract compass That's logic you would need to add to your integration on your end.
Fab, cheers
@abstract compass Basically you need to put checks in place to determine if a Customer already has an existing Subscription and do things accordingly from there.
@vocal wagon Does that make sense?
Having a hard time here. user submits cc but is not charged right away. Auth is now, but capture is 3 or 4 days later
So if not save and reuse, what API then?
@vocal wagon Yep, that's how manual capture works. You specify the amount you want to charge in 3-4 days, a hold is placed on that amount after they go through Checkout, then you capture when 3-4 days later.
So which API shall I call then?
1/ create customer API
2/ paymentIntent API? that is it?
@vocal wagon Well, if you're using Checkout, it's:
- Create a Customer
- Create a Checkout Session with the appropriate options
- Later, when you're ready, capture the funds placed on hold by the Checkout Session's Payment Intent
No Setup Intent is involved in that flow.
When/how does the user submit his cc details to the "card element' safely?
@vocal wagon To clarify, the docs I linked earlier about placing a hold don't cover Checkout specifically, so you won't be able to use them directly.
@vocal wagon That's the basic flow though. I don't think we have a Checkout-specific guide for exactly what you want to do.
These 3 steps look simple. Thanks for that. Which key options shall I set properly? Which mode?
@vocal wagon The closest guide is probably this one: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=checkout
The biggest changes are:
- Set
payment_intent_data.capture_methodtomanualwhen creating the Checkout Session: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-capture_method - Capture the funds later on your server: https://stripe.com/docs/api/payment_intents/capture
@vocal wagon The Checkout Session mode would be payment
In checkout session: 'payment' mode then paymentInent with 'manual' capture method, correct?
@vocal wagon Yep!
in the header of this API, the Connected Account right?
@vocal wagon Yep, you want to create the Checkout Sessions on your Standard connected accounts, not your platform, so you need to specify the connected account's ID when making the API calls.
got it
so now the session will generate a paymentIntentID which I need to save then retrieve later for the capture
@vocal wagon Correct.
And the success url in the session create: https://mediadash.com/stripe-checkout-confirmed.php?session_id={CHECKOUT_SESSION_ID} correct?
@vocal wagon That seems fine, yep.
sorry typo :p
@vocal wagon I think you need the literal { and } characters in the URL to get the Checkout Session ID in there though, not the URL-encoded versions.
@vocal wagon I don't know if that was Discord messing around with the URL or not.
@vocal wagon I'm an engineer at Stripe, and I'm part of a team that helps developers use Stripe.
So grateful to have you here man
@vocal wagon Happy to be of service! ๐
Greetings from Europe. Will touch base again if I run into another "wall" Are all you guys based in America?
@vocal wagon I'm in America, but we have people on our team from all over the world that are in here most of the time during weekdays.
Got it. Quick question, the application fee amount should be set in the session create or when i retrive the payment intent and capture?
@vocal wagon I believe you can do it in either place.
@vocal wagon Checkout Session: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-application_fee_amount
@vocal wagon Payment Intent capture: https://stripe.com/docs/api/payment_intents/capture#capture_payment_intent-application_fee_amount
Yeah sure! We have a connected account for different regions on our website. For the customers we just use the platform cus_ key. So we don't have to have different keys for different regions. Previously using the Charge API. So was easy to just use the Token to save the cards.
So we currently moving from the Charge API to Payment Intent. Got everything working except for being able to save the card to the platform customer as it just saves to the connected account payment.
Hi There, I am looking for a inperson payment capture solution. I need some information on PCI certification on the devices that stripe is supporting. Any help on this will be grately appreicated. https://stripe.com/terminal
@solid ridge You would do this
1/ Create a PaymentMethod client-side with the platform's API key (pm_A)
2/ Attach the PaymentMethod pm_A to a customer in the platform
3/ Clone the PaymentMethod pm_A on the connected account and get pm_123
4/ Use the PaymentMethod pm_123 to confirm the PaymentIntent on the connected account
@pearl bridge https://stripe.com/docs/security/guide#validating-pci-compliance covers this, it has a tab for Terminal specifically. does that help?
Hey there, I got a question about the invoice object. I'm looking for a way to identify whether an invoice is coming from a subscription original purchase or is a subscription renewal. Is there anything on the invoice object that would tell me? I'm currently using billing reason. When that's set to "subscription_cycle" I believe that's a renewal. Does anyone know how reliable that "subscription_cycle" string is? It's not going to change anytime soon is it?
@brittle stump it's reliable, it's here for this exact purpose and changing it would be a breaking change so it'd be behind an API version. We detail all values in the doc: https://stripe.com/docs/api/invoices/object#invoice_object-billing_reason
Ok cool! That's what i'm looking to do. I'll try a few things. Currently I just create the payment method client side then do pretty much everything else server side(php). Loosely based on this https://github.com/stripe-samples/saving-card-after-payment/
Thanks Koopajah. I am looking at following integration https://stripe.com/docs/terminal with BBPOS 2XT device. What PCI questionnaire are we looking at
Do we need to do it as terminal (SAQ-C)?
Thanks @crimson needle
@solid ridge yeah it's a bit different to save on the platform but charge on a connected account but the steps I outlined should work for you
@pearl bridge yes, it's the Terminal product but we pre-fill it for you as mentioned in the doc I linked earlier
quick question re: billing_cycle_anchor in test mode. the shortest interval is 1 day. is there any way for us to trigger an invoice before the current anchor time? it would expedite testing a bit if we could manually trigger invoice processing since we cannot manipulate the billing_cycle_anchor time
Epic, I watched a few of your office hours videos on youtube and no one really touched on how to get the card attached to the platform. Will give your suggestion a go. Thanks!
@wraith hound no you can put billing_cycle_anchor a few minutes in the future for example
@solid ridge let me know if you're stuck
ok. we tried to do that using subscription.update but we got an error
Thank you .... Does it matter who the acquirer is in this case when Stripe is perfilling the SAQ questionnaire
@wraith hound yeah that can't work on update. It's only settable on a new subscription
@pearl bridge I don't know much about PCI, or at least I can't really comment here. You might want to talk to our support team if you have more questions
Sure .. thanks
@crimson needle thank you for the confirmation. suppose we can go through the entire subscription process. at least its a solution.
yeah the idea is to create a subscription with billing_cycle_anchor to a few minutes. It starts and pretends the period ends in 3 minutes for example and then it looks like a renewal
to be clear, billing_cycle_anchor accepts this as valid: (Date.now() / 1000) + 120
yep
Any idea when stipe reader device will be Available
@pearl bridge what do you mean by that exactly? There are many readers and it also depends on your country
how do people usually unit test their stripe code?
is using the testing keys on stripe's servers best practice? I've been looking around for an offline mock stripe server for local development.
@bronze sigil we recommend mocking yourself or using https://github.com/stripe/stripe-mock
and that would mean putting down an auth key since stripe mock talks to stripe server right
no, stripe-mock does not talk to stripe servers, otherwise it wouldn't be a mock. It returns fake data
Got it working! Thanks for your help. Was banging my head on this problem yesterday ๐
@solid ridge woot!
@crimson needle Just tried to delete subscription items after a invoice.paid and we see 0 usage on the subscription items on the subscription page, but we see this error still:
When deleting the subscription item si_Jsq575QkmSodqQ with a metered plan, all related usage records must be cleared too by setting clear_usage=true.
Hello, I changed my phone number recently. The password I am using for my account that I saved seems to not be working. I'm unable to change my password because I no longer have the phone number that's connected to my account. How can I get help?
@thick blaze whether you have usage or not you have to pass that parameter to be explicit
@crimson needle was under the impression we did not need to set clear_usage:true . If we set clear_usage:true on the invoice.paid webhook, it is 100% safe at that point, right? Is that clearing all usage ever on the subscription item?
:question: @empty bloom Have a non-technical question, account issue, or need one-on-one support?
We wish we could help, but this community is focused on developers and technical discussions. Our support team will be able to assist you better than we can: https://support.stripe.com/contact
@thick blaze no it's just removing the price for the current cycle mostly
I've been there. It asks me to log in to get help.... Which I can not do.
Anybody know where I can find a tutorial for the server side code to accept a payment with stripe using Node.js?
@empty bloom there are many options one of them being
Missing a recovery code or locked out of your account?
That's what you need to choose. We can not help here with questions about your account unfortunately
@kind python https://stripe.com/docs/payments/accept-a-payment has examples in all languages
Thanks. Who can help? I've tried all option. But, the system keeps asking me to log in for help....
I followed this tutorial: https://www.youtube.com/watch?v=WG4ehXSEpz4&t=292s. Would the code in the website work with the client-side code in this tutorial?
@empty bloom https://support.stripe.com/questions/sign-in-to-your-stripe-account-without-a-two-step-authentication-device-or-backup-code has a link to https://dashboard.stripe.com/recover which seems exactly what you want/need
@kind python you need both client-side and server-side code for it to work and yes all examples would work but they really are just demos/examples. We expect you to build your own code end to end
Ok
I've tried this.. And again. It asks me to log in in order to use my backup code. My password is not working. How can I get help if I can not log in. I've even tried the reset password option. That option does not work because I no longer have the phone number that was associated with my account.
@empty bloom Then you should email support@stripe.com with as much info as possible and they'll help you get access back to your account
Thanks! The website should have better options to contact support when you can not get into your account. I was not able to find this email anywhere..
yep that's totally fair
Hi all! got a question regarding schedules. How can I charge immediately when upgrading a subscription via schedules? The billing cycle stays the same. Essentially trying to mimic proration_behavior=always_invoice when updating a subscription
@hollow hawk that's not possible with schedules today
@crimson needle So do i have to release a schedule and then update the subscription itself to achieve this? (Not sure if releasing a subscription will trigger any charges?)
Either that or upgrade first and then call https://stripe.com/docs/api/invoices/create + https://stripe.com/docs/api/invoices/pay
Hi, is there a way to lookup Invoices by Invoice Number via the API?
I don't believe there is
Hey #dev-help, I'm getting a CORS error when trying to redirect to Stripe Checkout. I'm using an express back end and I am enabling CORS for any (*) origin. I'm also getting a 404 on preflight OPTIONS request. Is this something anyone has dealt with before?
Here's a screenshot for more information:
how are you redirecting to the page?
@sacred crest I'm guessing you're probably hitting the same thing talked about here: https://stackoverflow.com/questions/68266238/stripe-checkout-session-not-working-nodejs
That's definitely it. Thanks! @dim hearth
Hello,
I recently changed our phone number in account settings (as this is required to save anything on that page) and customers started calling that number even if I unchecked the option to hide it on receipt and invoices. How can we remove that number from customers? Can you confirm that, if unchecked, this won't show on bank statements? We don't actually have any support numbers. Thanks
Hello! That's a better question for support - you can contact them at https://support.stripe.com/contact
I contacted them and never replied.
Did your customers specify where they were getting the phone number from?
Bank statements
This isn't a question we typically answer here, but from what I understand displaying your phone number (as a merchant) is entirely up to the bank and is something out of our control. We (Stripe) send them information as part of the charge (like statement descriptor, phone number, etc.) and the bank decides how to display that back to the customer. If that's something you want removed, I'd suggest contacting the bank that's displaying these numbers and ask if it can be removed
Anyone got a quick pointer to API call that I can use to download Stripe PDF's of invoices?
Thanks @dim hearth. Why setting that as mandatory then...?
๐คท That's out of my wheelhouse - I just know collecting the phone number is mandatory to use Stripe, but don't have any context about why (that's for the lawyers/other policy folks). I do also want to mention, you can contact the bank but it's really just a suggestion and there's no guarantee they'll remove it completely from customer bank statements
You can find the invoice pdf at invoice_pdf https://stripe.com/docs/api/invoices/object#invoice_object-invoice_pdf
Taa
๐ Hi folks - Tomorrow is a holiday for the team in Singapore, so messages are unlikely to be seen from now until 1AM PT when Europe comes online. If you have urgent questions then you should reach out to Stripe support directly at https://support.stripe.com/contact.
Thanks @dim hearth
@crimson needle , i am talking about this device.
And we are in US
Oh Stripe Reader M2? Yes all I can say is it coming soon, and really don't know when
When checking Subscription status, what is the best way to figure out if the user still has auto-renewal turned on, or if the user had already cancelled renewal (but the subscription may still be active because the current/last period isn't over yet).
How do you handle situtations where customers do not enter their name and zipcode and fill it with fluff in a purchase? e.g. name: sfasfasfsf, zipcode: 12345
I think you can set up Radar Rules for that
Radar applies any rule you set up
I think some of them are available but disabled by default, like the Zip rule
You should check that one out
ok thank you
If I am selling a personal product (online document), is 3D secure reasonable to ask or would it be overkill?
The corresponding parameter to look at is cancel_at_period_end: https://stripe.com/docs/api/subscriptions/object#subscription_object-cancel_at_period_end But you can detect those changes in webhook events as well. Detail here: https://stripe.com/docs/billing/subscriptions/cancel#events
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Learn how to cancel existing subscriptions.
How are you planning to enable 3D secure? If you are using stripe.js then it will hanle the flow for you.
@dry hatchjust enable it in rules for checkout with redirect
it's one of the pre-defined rules
it's disabled by default
Which setting/rule are you referring to? (Sorry didn't have the context)
Request 3D Secure if 3D Secure is recommended for card
the first set of rules, 2nd option
@dry hatch
Ah I see. Radar rules are completely up to you, I think
I am trying to connect a react stripe front end form to the backend . Any tutorials or guide. I literally copy and pasted off the docs and it wasnโt connecting
Hi
I have a requirement where I want to update the existing subscription on a future date
So as per my last conversation, i tried this
What error are you getting? This doc should be the fundamental of web-front end: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
Securely accept payments online.
afk and will TAL later
?
Sorry, I meant I will take a look after coming back from lunch later
hi, i have a question about the PaymentsIntents api. i had thought that when the user completes the payment, the paymentintent api would fire a webhook to let my server know the payment was completed but the documentation doesn't seem to imply that, does that mean i have to poll the paymentsintent to see when it's completed?
You want to listen for payment_intent.succeeded
ah gotcha, so it's just one webhook for all events and then filter as needed. I thought it might be a unique webhook per type of api or per request
The full list of events is here: https://stripe.com/docs/api/events/types. There are certainly different events based on what endpoint you use. But yeah, for knowing when a customer's payment is completed successfully you want payment_intent.succeeded
thank you!
Hi Team, Is there any way to fetch charges those hase source connected Account Id
If we are using "Stripe-Account : connectedAccountId" it gives charges those have passed connected Account Id as destination
@north ether sorry I'm not really understanding what you mean here. Can you explain another way? What exactly are you trying to retrieve?
Direct charges on your Connected Accounts?
Or the Connected Account ID for destination charges?
Or something else?
@exotic rain did you hit an error? What are you trying to accomplish?
@exotic rain a Subscription Schedule is indeed the way to update on a future date
Actually, We are charging a refund fee by passing the connected Account Id as the source. We are not able to get those fee charges which we are created by charging refund fee.
Ah I see, you are using Account Debits
Is there any way to get those by passing connected Account Ids
@north ether one sec, I'm looking. Can't remember.
@languid tulip Thanks
@languid tulip have you find that ?
@north ether I think you want to list charges and expand the source_transaction
But testing cause can't remember
I have a requirement where in YEARLY subscription, if a user is in the last 3 months of the period then if user switch the subscription it will take action or active after the next subscription period
Example, suppose i have a current subscription period from 1 jan, 2021 to 31 dec, 2021 and now if i switch the subscription after september then it wil active in the 1 jan, 2023 not from the next subscription cycle i.e. 1 jan 2022 to 31 dec, 2022.
So for this i am updating the existing subscription with new price on future date.
and logic i applied is if the user switch in the last 3 months then i will update the price on the starting date of the next subscription cycle i.e. 1 jan 2022 after the invoice paid for 2022 period so as i updated the price on this 2022 period then when the new invoice comes for the 2023 period then the invoice is paid by new updated price.
Please correct me.
Ok Thanks I will check
@north ether sorry had to step away for a moment. Meant source_transfer not source_transaction (typo)
when setting up the stripe CLI to listen to events, should i use the CLI key when creating the stripe object on my server or the test data secret key?
Your test API key (sk_test_123) to create requests on your server
gotcha. if i want to give another developer access to the stripe cli to be able to listen to my test events, do i need to login to my stripe account for them or is there another way i can grant them access?
Yes you can do this with Subscription Schedules. Sorry, am I missing a question in there or are you clarifying what you are trying to do?
@languid tulip what is the use of this webhook type "Endpoints receiving events from Connect applications"?
If you are a Connect Platform and want to listen to events occurring on your Connected Accounts then you use that Connect Endpoint
Suppose we are using webhook and try to create a dispute from our salesforce org in that case shall we receive the event from that org?
When we are using REST API's to create charge or dispute from salesforce Org in that case shall we receive that event ?
Yes as per my last conversations I am using SubscriptionSchedule and yeah i want confirmation from your side that as per my requirement am i doing in right way?
Please correct me?
What do you mean "create charge or dispute from salesforce Org"?
Is the charge on your platform's Dashboard or your Connected Account's?
We are creating charges and disputes from Salesforce Using REST API callouts
Are you a Connect Platform? I would guess not based on the conversation so far. Do you pass a Connected Account ID (acct_xxxxx) when you create charges?
yes
Okay then you do want to use the Connect Endpoint to listen for the events that occur with those charges. Feel free to provide an example charge ID and I can verify.
Have you tested the code you provided?
Yes i have executed this code
I can look at a Subscription ID if you like to verify that it is doing what you desire? Would that be helpful? I'm sorry, I still don't really understand if there is an issue here.
Yes, please take a loook id:'sub_JfTTssxOoFVzVw'
I just have a confusion that the price will updated without disrupting the running subscription and will charge customer as per my required subscription period
How can I hide the country or region section in paymentSheet(React-native) ?
Hi. I have a problem I created a subscription with a daily billing period. Subsequent invoices are created by Stripe, but remain in Draft status. A message appears in invoice details. The hour has been changing for 48 hours ๐
Has anyone had a similar problem?
The only thing that jumps out to me is that you have the schedule set to create prorations as it changes phases. Do you want proration to occur? Or do you want to just charge the customer at the next billing date for the new price?
Are you listening for webhooks?
Usually this is a webhook issue: https://stripe.com/docs/billing/subscriptions/webhooks#understand
Learn to use webhooks to receive notifications of subscription activity.
I don't want proration and just want to charge the customer at next billing date for new price
Then you want to make sure to set proration_behavior: none https://stripe.com/docs/api/subscription_schedules/create#create_subscription_schedule-phases-proration_behavior
I do not currently do this. Is this necessary? Why doesn't Stripe automatically finalise the invoice after an hour?