#dev-help
1 messages · Page 117 of 1
In order to make payouts, can we add fund to stripe connected account by bank transfer in stripe account? How long does that take?
@manic harbor please stop, this channel is for developers with questions about code and we already redirected you. You need to reach out to our support team directly https://support.stripe.com/contact/email
@mortal tinsel https://stripe.com/docs/connect/top-ups
Do you know other discord of stripe comunity can help me? Please
I asked this question this morning:
Hi all; for a client I'm implementing Stripe Connect with Standard accounts on a platform which is mostly going to be used by private individuals; however the form the user is redirect to seems to be mostly targeted towards businesses. Is there any way to make it less daunting to fill in for private individuals?
And I was told that I had to use the business_type: 'individual' param. However, it only seems to change the default select for the business type in that form, however, the form isn't any less daunting. Users have to complete 10 form steps before they can start accepting payments. Is there any way to lower the hurdle for users (other than prefilling a few fields)? Can they somehow at least start accepting payments / selling digital goods with just their email adress and name? I can't imagine the conversion being very high on the form as it is
Thanks I see top-ups - how long before the funds are available (US Bank)
@languid tiger hello
@manic harbor you have to talk to our support team please: https://support.stripe.com/contact/email
@languid tiger no that is not really possible, there are strict rules and regulations for money movement around the world and a lot of information has to be collected upfront
@mortal tinsel it's covered directly in that doc https://stripe.com/docs/connect/top-ups#settlement-timing
@crimson needle thanks, guess we'll just have to prefill as much info as we can
Thanks I see this: US platforms add funds via ACH debit, and can take 5-6 business days to become available in your Stripe balance. You can request a review of your account for faster settlement timing in the Dashboard.
@mortal tinsel correct, you'd talk to our support team for that https://support.stripe.com/contact/email
is there a charge to transfer from your own bank to stripe and vice versa?
In Stripe API calls in Django, do you use synchronous or asynchronous? Currently, I use asynchronous using Celery but that has been kind of unreliable. Should I just get rid of celery and do synchronous calls instead? What is the common practice?
@mortal tinsel I don't think there's a fee for Topups, but there are fees for Connect: https://stripe.com/pricing covers all our fees but you can ask our support team for more details
@old phoenix our official stripe-python library is synchronous, and our API in general is synchronous too so I'd recommend synchronous
also can i get started with out this step (Add business details to activate your account.) - to just test the code?
yes you don't need to do this for Test mode to work
thanks. To make payouts to vendors - what is the least cost to do that? Is there something like ACH pay outs that cost less than 2.9%?
the 2.9% is about payments, so it's unrelated, you need to read the pricing for Connect instead https://stripe.com/en-fr/connect/pricing
Thanks - I see the fees for express and custom. Can our Vendors setup Standard accounts and then we have even less fees to pay them?
no you can not, with Standard accounts you are not supposed to transfer funds to them directly. You will need to use Express or Custom for this.
On the receipt page generated by Stripe that is emailed out, I see a "Receipt #" but that value isn't present anywhere in the charge.captured or payment_intent.succeeded events?
ok thanks for letting me know - is there a way to save this chat? i am on mac discord app...
@echo pollen https://stripe.com/docs/api/charges/object#charge_object-receipt_number is what you want
@mortal tinsel not really, you could copy-paste the text
ok thanks
@crimson needle it's null in all cases so far from what I've seen. Is this a case of it just being a Test Mode thing?
as a dev can I create my connect account and then create some kind of test express account - just for testing without adding real bank accounts?
@echo pollen yes because in Test mode email receipts are not sent. If you force send a receipt in Test mode and then fetch the charge you'd see the property set properly
@mortal tinsel yes all of it can be tested easily purely in Test mode
GREAT thanks for all your help!
awesome, thanks for the help as well 🙂
Hi @ all, since fewe days i have a big problem. i stucked in the entire documentation and examples for .net, i hope someone can help me here. My problem is:
return Response.Redirect(session.Url);
this line give me an error in the entire line. The error is in "session.Url" (session.Url is type void, but the application in Response.Redirect is a Task. What can i do?
can someone help me out with this problem...return Response.Redirect(session.Url); it is not working and the code is directly from Stripe. Have you here also code proof, befor publish?
@rugged coyote can you share a bit more code? Everything I'm looking at says Response.Redirect expects a string as a parameter.
try adding async to your function signature and instead of Create do CreateAsync
and await that
the original is thi[HttpPost("create-customer-portal-session")]
public Task<IActionResult> CustomerPortal()
{
// Authenticate your user.
var options = new SessionCreateOptions
{
Customer = "cus_JmA1KXUMNL3y4O",
ReturnUrl = "https://example.com/account",
};
var service = new SessionService();
service.Create(options);
var session = service.Create(options);
string miUrl = Convert.ToString(session.Url);
return Response.Redirect(session.Url);
}s
thats the original code from stripe
which exact doc or sample are you following?
thanks looking
Hello
@deep parcel hello!
i need help with my account issue
with or without is the same error
:question: Have a question about your account @deep parcel?
While we're sorry to disappoint, this Discord is intended for technical questions and developer chat—we're not able to help with account specific questions. For help with your account please reach out to Stripe support directly at https://support.stripe.com/contact
my example doesn't show the conversion to a string
oh, but you aren't returning that anyways
Hum I can't run our code either, feels like the code is just wrong
https://stripe.com/docs/checkout/integration-builder seems like a better approach, it's for Checkout but it does the redirect like this Response.Headers.Add("Location", session.Url); return new StatusCodeResult(303);
when i use async nothing to await also no result
that makes me feel a little better....jajajjaajjajajaja
ok great, let me give it a shot and try
[HttpPost("create-customer-portal-session")]
public IActionResult CustomerPortal()
{
// Authenticate your user.
var options = new SessionCreateOptions
{
Customer = "cus_JmA1KXUMNL3y4O",
ReturnUrl = "https://example.com/account",
};
var service = new SessionService();
service.Create(options);
var session = service.Create(options);
Response.Headers.Add("Location", session.Url);
return new StatusCodeResult(303);
}
thats have no error but i have not try it out....but the code is clean
What is a good way to test that :dynamic_tax_rates are working? If I have TaxRates set up for CA and TX in the USA, would I just type in billing addresses from those states?
@viscid burrow Yep. Go through a transaction flow that should be taxed and see if it works as expected.
OK, so we should pull all the tax rates in the account, but exclude those without which parameters?
The tax rate txr_1EB7WBGABbZHUFxpke4PYxum requires country parameter to be set. All tax rates provided as dynamic_tax_rates require country parameter.
@viscid burrow Sorry, I don't think I understand your question, can you rephrase?
We are a Stripe Connect platform so the standard account holder creates tax rates. We just tried to pull all their tax rates and put them in the hash for :dynamic_tax_rates but they seem to have made a bunch of tax rates that don't meet your requirements (they did not have country). So what parameters are required on a TaxRate for it to be used as a :dynamic_tax_rate. Seems like in the dashboard you do not require country parameter but it throws an error when included in the hash.
@viscid burrow According to the API reference we require the Tax Rates you supply as dynamic_tax_rates to be in specific countries: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-dynamic_tax_rates
We currently support the following countries: US, GB, AU, and all countries in the EU.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
The tax rate txr_1J8oZSGABbZHUFxpnk5MzGA4 requires state parameter to be set. Tax rates provided as dynamic_tax_rates require state parameter when country param is US.
Is there logic for each country. Like if US, then you need a state parameter. I imagine the EU and other countries have sub-categories as well. is there docs on this logic?
Are there docs with a table of what values are needed for various countries? Or is it only the US where you need a 2nd parameter of the state?
@viscid burrow Yes, this is documented here: https://stripe.com/docs/payments/checkout/taxes#dynamic-tax-rates (make sure you're on the Tax Rates tab at the top and you're looking at the Dynamic tax rates section.
Learn how to collect taxes for one-time payments in Stripe Checkout.
Pass the array of tax rates to line_items.dynamic_tax_rates. Each tax rate must have a supported country, and for the U.S., a state.
OK, hmmm. So does Stripe Tax solve most of these technical issues so the standard Stripe Customer does not have to worry about adding jurisdiction etc. and dealing with immutable TaxRates already created?
@viscid burrow Yep, Stripe Tax is designed to handle a lot of these burdens so you don't have to.
OK. Like.
Thank you! We are going to look more into Stripe Tax along with the standard fixed TaxRate. Thank you for your help!
@viscid burrow No problem, always happy to help! 🙂
In the future if you are wanting to switch to an async version, you can do this: var session = await service.CreateAsync(options);
👋 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 have a question about the Stripe Test Cards for producing specific errors. I was under the impression that I would be able to add these test cards under the customer's account and that the error would show upon creating a charge. Instead, I am seeing the error when I try adding the card so it won't let me add the card at all.
is this excepted behavior or should I be able to add these cards still?
Learn about the different methods to test your integration before going live.
In sandbox this will always be declined
@neon bronze That's expected behavior. Cards are validated when attaching them to Customers, and the test cards you're using are triggering declines during that validation process.
However, we do have a special test card that can be attached to a Customer but will fail when you try to use it: 4000000000000341
@mighty hill hm.. that’s kind of inconvenient because we were hoping to test those specific error messages in our sandbox environment, but currently can’t because we can only add the successful charge test cards. Is there any other way of doing this?
Hi,
I'm very confused about the stripe connect.
Firstly, copied the stripe connect url when click the testing OAuth button on stripe connect setting on Stripe dashboard.
Secondly, pasted above url to the 'register bank account' button on our app. The url is working, but our client filled in the forms, there is no stripe connect account on Stripe dashboard.
I'm not sure the reason why we could not create stripe connect account. Could you please let me know how to solve this issue?
Thanks,
Akira
Sometimes I find that Stripe Connect accounts take a little bit of time to actually appear in the dashboard
I've seen it take as long as a day for me
Hello! I have different stripe accounts, and I created an API to receive all webhooks. I wouldn't expose this API servies n times (one for each account) on different endpoints in order to understand from which account I'm receiving webhooks. Is there a best practice here?
Bonjour ma boutique Shopify le mode de paiement est géré par strip or quand je vais sur mon compte strip je ne vois pas l’argent que j’ai gagné ni les virements je comprends pas pouvez-vous m’aider s’il vous plaît
👋 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.
good morning I am having difficulty with Stripe verification, I first set stripe through WooCommerce and I could not verify because I needed client information, the following day I create another account directly through the portal and I was able to verify that, but now I have two store fronts and the WooCommerce Storefront cannot be verified. I am not sure where to go from here. Any thoughts?
Hello, is it possible for the client to access the metadata in paymentIntent.create?
hi! how are you guyz... i need help in transfering payments from stripe account to customer's bank account... is there any one who can help me? Thanks in advance
Hi! My credit card expired and I also lost it and I asking me for it numbers when I don not have it. How do I add a new card
👋 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
Can someone help me please?
I am creating my first implementation with online payment and I need some help. I'm using checkout and I receive payment information on my webhook, while I'm in the trial version, and I want to know after making a payment, how many paid or succeeded messages I get on my webhook, why after making a payment I received different customerId from what I had received from the customer who registered to make payment, remembering that I'm in a testing environment
@craggy granite are you still around?
If so, you should check whether you are passing the customer ID into your Checkout Session: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer. Otherwise a new customer ID will be created.
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, is there a way to remove country region selection from prebuild payment sheet?
in react native
hello. Does anyone help me figure out how to sort the returned payment method list?
I only want to get the latest registered payment method for a customer.
The current docs are a bit vague and do not specify the returned order.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Hello,
With which event can we update our database via a Webhook, to know if a subscription has been renewed, that is, if the user takes a monthly subscription, update every month my database please..
for @stripe/stripe-react-native lib, is it possible to send in metadata to the confirmSetupIntent (https://github.com/stripe/stripe-react-native/blob/2b8fdd8/src/functions.ts#L244) api? i've tried sending data a couple of ways but it doesn't seem like it's picking it up.
{
type: 'Card',
billingDetails,
...cardData,
metadata: {
userId: user.id,
},
}
{
type: 'Card',
billingDetails: {
...cardData,
metadata: {
userId: user.id,
},
},
}
it takes this data, but even here i don't see the postalCode that the CardField provides either. :
interface Params {
country: string;
brand: Card.Brand;
currency?: string;
expMonth: number;
expYear: number;
last4: string;
funding: 'Credit' | 'Debit' | 'Prepaid' | 'Unknown';
address: Address;
name?: string;
}
this example from the docs https://github.com/stripe/stripe-react-native/blob/master/example/src/screens/SetupFuturePaymentScreen.tsx#L83 says that the property name for postalCode is addressPostalCode is this correct?
Hi, I was trying to understand how to display and charge different currencies depending on customers' location
nodejs by the way
Hi everyone,
I've been searching in the Stripe/Java documentation for a way to charge a card on the back-end side only (in a RESTFul API manner, without using the stripe.js library). Til today, I'm not finding any part of the documentation that explains how. Does anyone know how to do that?!
Maybe I didn't look hard enough. Can someone point me in the right direction?
@verbal sandal In short, you cannot, as it would break PCI compliance (= your servers would have access to the card number). You need Stripe.js in order to turn the card number into a token, and then you charge that token from the backend and remain PCI-compliant.
What are you trying to do specifically?
@tepid gust I was trying to communicate with stripe exclusively via my server sending the card info directly to my server and charge it from there.
My client is actually built in Flutter and Stripe doesn't seem to support Flutter...
@verbal sandal I believe https://github.com/flutter-stripe/flutter_stripe is maintained by @ripe robin among others, maybe he can help you
@tepid gust thank you for sharing this.
I stumbled upon this Flutter package but I wasn't sure if it is safe enough to add it to my project.
I don't know anything about flutter so I can't help you there 🙂 good luck
Thanks a lot @tepid gust
👋 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 @verbal sandal, that's your best bet for Flutter, because if i recall correctly, while it isn't maintained by stripe, it is sponsored by them.
At what time is a PaymentIntent that's not completed, no longer capturable
is it at Midnight of the 7th day
E.G. Transaction happened at 8:36PM on 7/03/21, would it expire at 8:36PM on 7/10/21, or at Midnight on 7/10/21
👋 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 everyone, quick one, is there any way we can add trial period on the checkout page?
const session = await stripe.checkout.sessions.create({ payment_method_types: ['card'], line_items: [ { price: subscriptionType, quantity, }, ], mode: 'subscription', allow_promotion_codes: true, success_url: ${req.headers.origin}/payment/result?session_id={CHECKOUT_SESSION_ID}, cancel_url: ${req.headers.origin}/hello, });
I tried to set it at the price level but there's a warning that the feature is not compatible with the checkout and it needs to be done at the subscription level. I checked the docs but I'm not exactly sure which part needs to be applied.
Do I need to change my code to something like this
await stripe.subscription.create ? It would be great if someone can point me to the right part of the docs.
Thank you!
Hello guys, I'm trying to build a very simple "store" with Stripe but I'm unsure what event says that the customer paid and everything is ok to give them what they paid for. I'm using payment_intent.succeeded for now but not sure if charge.succeeded or another one is more suitable
@verbal sandal feel free to write me a dm if you encounter any problem with the package
Thank you @ripe robin . Will do
hi everyone!
`
i don't understand this error why stripe.paymentIntents is undefined?
thanks everyone!
Fais voir ou tu definis 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.
ok thanks i have founded!
however now i have this issue
i don't understand what is client-secret string if it's not that..
how can I make the connected account pay for chargebacks/frauds
I am using destination charges
payment_intent_data.transfer_data
@quasi flicker still need help?
I'm reposting 🤞
there could be many solutions for that. For example: If you are using checkout page, there is a success_url. You can use that also.
you can also listen to webhook for that. Could you tell me more about your scenrio
That's what I'm trying to do, because I didn't find any other way to give to the customer what he paid for, which is strange because webhooks were introduced as "optional", right ?
success_url is where I'm redirected to but how can I differenciate customers there ?
As no data is passed to this endpoint
what exactly you want to give your customer? and according to that I can share my suggestion
basically a ticket
ok sec
Thank you 🙏
So for now I'm getting the user's email through webhooks but not sure what event is better to send them their ticket
success_url="http://localhost:3000/success/{CHECKOUT_SESSION_ID}",
you can do such format on ur success_url
are you using React?
Should I literally set success_url to this ?
No
yes {CHECKOUT_SESSION_ID}
it will automatically add the id in the success url
on your client side, you can add the route handler.
Ok, thank you
So once this url is called I'm sure that the client was billed and that money is on my end ?
this will pic the id of checkout_session which you can then use to find out if the payment is successful or not
If the payment_intent succeeded ?
when this url is called, it always mean successful but you can use that checkout_session Id to find out more about that specific payment
Okay, thanks a lot!
I would recommend you to also check the details of the checkout out after it is success because otherwise people can just open that success url manually and cheat you
the safest would be to use webhook for that. The event is called "checkout.session.async_payment_succeeded"
Is checking if payment_status == 'paid' enough ?
no the main thing to check is that if that payment belongs to that user
if some other user get access to that url, they will also get free ticket because you have not set a security measure to connect specific payment with specific user
if I have an app from where you can buy ticket. I would personally divert user to "purchase page" and use webhook to update that users purchase history. So frontend will call the database and display all history
Right
But using webhooks doesn't allow the system to the display the ticket on the success_url right ?
As it's not 100% sure that the payment is successful when the success url is called
okay, let's discuss your use case first before picking the solution.
Do you instantly want to display a specific ticket info to that user after they make purchase or you want to just add ticket to their account, so that they can find it from their purchase history at later time?
There is no account system. Ideally, it would display the ticket on the success page and send it to the customer email
At least, the email have to be sent
okay do the following steps
-
create a checkout page with
success_url="http://localhost:3000/success/{CHECKOUT_SESSION_ID}", -
On client side add a route handler which will handle "success:id"
-
when this success page is rendered you should read the id which is in parameter
-
After the page is mounted, you should use that id and send it to your backend
-
and BE, create 1 more end point, which takes the checkout_Id and retrieve it's info
-
There should return Ticket and set up email
@app.route("/checkout-session/<id>", methods=["GET"])
def checkout_session(id):
try:
session = stripe.checkout.Session.retrieve(id)
return (ticket )
except stripe.error.StripeError as e:
raise StripeException(e)
Hi everyone, I am hoping someone can help - I've been following the documentation here to do hosted checkout https://stripe.com/docs/billing/subscriptions/checkout. It all works and I've got an API serving the 302 redirect but when the client side follows the redirect, I get a orgin null cors error from stripe, I was wondering how I fix this?
Learn how to offer and manage subscriptions with different pricing options.
so your checkout is returning a url? but this url doesn't work from client side?
Yep, I can see in the console log that the correct URL is returned, and if I manually navigate there it works, but when following the redirect it errors
could you take a screenshot of that error
Why creating a second endpoint ?
Terrible redaction because mobile but hopefully this helps
You should redirect to that URL
I follow the redirect but that's the error
what method are u using to redirect and what framework or library are u using on client side?
Method is a GET and it's React (axios)
second end point to display data for that specific success url
Thanks both, appreciate you're trying to do two issues as once!
no, I mean are you using history.push(url)?
Ooh I am not, I will have a look at that
this should work ```js
window.location.replace("http://www.w3schools.com");
Will give it a go, thank you :)
anyone can help me with the card.js i found here. cant seem to get it to display properly on my side https://github.com/stripe-samples/accept-a-payment/blob/main/custom-payment-flow/client/html/card.js
im not showing any js errors either
The redirect to checkout from the server vs clientside is working great in all my testing so far. Great not to have extra javascript cluttering stuff up 👍
Anyone?
@mighty hill hello,
Mind if I could DM you a question that probably doesn't fit here? It's not to do with support or anything, more just asking about what will happen to a sus website that's blatently copied Stripe
Does anyone know the number ?
Hey @vocal wagon, I recommend separate endpoints yes. What we (want to) do on dj-stripe is exposing individual webhook endpoints, each with a UUID in the URL. This keeps the URL secret which limits exposure to spam and attacks, incidentally.
Tahnk you
I'm new to stripe. My payment page does not display any stripe errors. Insufficient funds, rejected card, nothing. It works perfectly on the server-side. In the client-side however, the only message it shows is: success or it requires action and nothing else. the code is based on https://tinajam.wordpress.com/2020/02/20/stripe-php-api-with-strong-customer-authentication-sca-and-3d-secure/ The payment works fine, it just it doesn't show any error in case the card is declined or it doesn't have enough money etc.
Are you expecting the payment to fail? If so you should see some errors in your Stripe dashboard logs
"code": "card_declined",
"decline_code": "do_not_honor",
"message": "Your card was declined.",
That means the decline came from the issuing bank, it's unlikely to be a problem with your code
but the same happens with insufficient funds. i mean, my customers have no idea why they can't pay and they spam the pay button like hell.
The "Your card was declined" message should show up in result.error of your Stripe.js confirmCardPayment call: https://stripe.com/docs/js/payment_intents/confirm_card_payment
Complete reference documentation for the Stripe JavaScript SDK.
thank you
ok, i'm doomed.
Why do you say that?
To use confirmCardPayment you need the secret client key generated right ? but everything get stuck after PaymentIntent::create when using a card with no money/declined/any issue. there is a mistake in that code or missing code and i'm not smart enough to get it right
Are you passing confirm: true when creating the PaymentIntent?
yes
$intent = \Stripe\PaymentIntent::create([
'payment_method' => $json_obj->payment_method_id,
'amount' => $Total,
'currency' => 'eur',
'customer' => $customer,
'metadata' => $metadata,
"description" => $ProductName,
'confirmation_method' => 'manual',
'confirm' => true,
]);
if i put a die(""); message above, it shows, if i put under it doesn't show anything
if (result.error) contains nothing
That would be why, with confirm: true Stripe will immediately attempt to confirm the payment. In cases where a card doesn't require 3DS it'll attempt to make a charge. In those cases your PaymentIntent creation would return an error in the case of declines
So you'd have to return the error to your client or else your users won't know there's a problem
Or you could remove confirm:true and do all the confirmation on the client (this is recommended)
const config = {
publishable_key: "<?= config('publishable_key') ?>",
...
how exactly? check the above link please
If I get 400 response ( Invalid Request Error ) when trying to create payment intent, does Stripe create the payment intent object and then send the payment_intent.payment_failed webhook ?
Hello, does Stripe Radar cover our disputes and fees even if we use our own custom checkout using Stripe's API? We don't use the pre-built checkout.
Or does Stripe Radar even work even if we use our own custom checkout using Stripe's API?
Stripe Radar does not cover disputes in any capacity. If you enable the chargeback protection feature, for Chargeback protection to actually function, it has to be used in conjunction with a Stripe Checkout Session
I see. Thanks for confirming. Can you also confirm if Stripe Radar works if we use our own custom checkout using Stripe's API? Like, will the rules we create apply?
I believe radar only functions using Elements or Checkout
You shouldn't be passing card data to your server anyways, PCI-DSS Level D is hell
it's hundreds of pages of compliance documentation, and getting a security firm involved
versus
Clicking a checkbox, signing a sheet of paper, and sending back to stripe
Got that! Thank you. 👍 👏
So it looks like there are two types of 400 error ( invalid request error ): Red and Yellow. Red one doesn't create a PaymentIntent object while yellow one does. Is that right ?
testmode_charges_only is an example of yellow 400 invalid request error. It creates the payment intent object but why is it different than other 400 errors ?
Your PHP code would need to return the error to your frontend
It looks like your javascript is already set up to do that, you just need to tweak your PHP code to actually return an error, if there is one
That's the issue. i tried. from what should i fetch the error ? can you give me an example please?
This is your PHP code right? You should wrap this code in a try/catch block and then return the error message to your frontend: https://stripe.com/docs/api/errors/handling?lang=php
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 was wondering is someone could answer hopefully a quick question on Stripe customer 'status' ..... we have a developer who has used the successful payment of a subscription within Stripe as the 'if/then' ... if payment is successful / then do this ... however, this is not allowing for a free subscription whereby no payment is required. Is there an all encompassing status that would include successful payment and free subscribers ... eg - status = 'complete' or the like which would be better for the if/then type statement. many thanks in advance
@lapis ember what business logic is executed in the then statement?
I am not sure of the exact technical components - however, if a payment is successful, then the status in our (non-stripe) database is updated and the status goes from pending to active. So if successful payment, make vendor status 'active' ... this 'active' status triggers various automated emails and allows for full backend access to the vendor. I am presuming there is a status within Stripe for the Stripe customer (our vendor) which is recorded 'after' the payment is successful?
I think probably all you need is subscription status https://stripe.com/docs/api/subscriptions/object#subscription_object-status
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Many many thanks. I'll pass this onto our team. The logic here is simple however we have two or three different scenarios to capture which is proving somewhat complicated to get right across all those scenarios! many thanks again - it is greatly appreciated.
Anyone else have customers get duplicated with WHMCS linkage?
Because of COVID-19, I can not handle extra bank cards. Can I apply for 2 accounts with only one bank card?
@split yoke I would suggest you to reach out to WHMCS support on this.
@bleak plank You can use the same bank account for different Stripe accounts.
Hi everyone,
I have a question regarding distributing payments among different users within our platform. (Someone pays and the amount is split between a number of other users).
Could you confirm the following assumptions ?
- To receive payments, each user (Stripe customer) needs to have a connected account.
- If the above is correct: our requirement is to create a Stripe account per Stripe customer through our platform. Therefore, "Custom" and "Express" accounts are our options ("Standard" account is not, we are willing to create the customer through our application only).
- Since our startup is based in the UK, creating "Custom" connected accounts is not an option for us. It is fully supported only in the US yet.
- We prefer not to redirect users to some external link, while by going with "Express" connected accounts, Stripe would generate links to open in our front-end/mobile side and let Stripe take care of the rest of creating accounts. And this is the only way we can create accounts using Express accounts option.
My questions:
- Do we have another option, which has not been listed in the documentations (or it is and I have missed it) to create connected accounts fully through API in the UK AND Stripe would verify the bank account validation (if it belongs to the user, etc.) ?
- Does stripe validate bank accounts when creating "Customer" connected accounts?
To receive payments, each user (Stripe customer) needs to have a connected account.
Correct
If the above is correct: our requirement is to create a Stripe account per Stripe customer through our platform. Therefore, "Custom" and "Express" accounts are our options ("Standard" account is not, we are willing to create the customer through our application only).
Correct
Since our startup is based in the UK, creating "Custom" connected accounts is not an option for us. It is fully supported only in the US yet.
this is not true, You can use custom connect in UK
We prefer not to redirect users to some external link, while by going with "Express" connected accounts, Stripe would generate links to open in our front-end/mobile side and let Stripe take care of the rest of creating accounts. And this is the only way we can create accounts using Express accounts option.
We recommend you to create an an account then an account link which you can show to your users; Stripe will auto collect all the required KYC information.
Else, incustomconnect, you can create the account and provide the KYC information required through API https://stripe.com/docs/connect/identity-verification-api
Learn how Connect platforms can use webhooks and the API to handle identity and business verification.
- Does stripe validate bank accounts when creating "Customer" connected accounts?
No, Stripe will only perform basic format validation; it is possible that the account number provided by your customer is invalid
In this case, you customer won't receive the payout
But it is fine, the money will stay in your customer's stripe balance; you can notify them to provide a valid one and you can payout to them again
fantastic, thanks @lucid raft
Just about the part u mentioned that custom account is available in the UK.
It is stated that Custom accounts are generally available in the U.S. and are in beta in all other countries. here: https://stripe.com/docs/connect/custom-accounts#requirements
That's why I felt like custom account should not be safe to use in production environment, in the UK.
Use Custom accounts with Connect to control your users' entire experience.
Hi there. Can you guys help me checking the payment intent pi_1J9kfXKscTKNxsxlWnbyZ403? Why was my payment being declined? I have valid card but the Stripe said I have failed to add them to source.
@clever crystal you can definitely use it for UK platform ; please write in to support if you have any problems using Custom Connect.
@gritty spindle your customer does not have a credit card saved; thus the payment of the invoice failed. how did you save the card to your customer cus_JnKUnzZcA1X4RU ?
I did use createSource()
The code works fine with test card but then I use live card in prod, Stripe declines it.
Source is an old API, what we recommend now is to use payment_method with setup_intent https://stripe.com/docs/payments/save-and-reuse
Learn how to save card details and charge your customers later.
Saying all that, what is your code of createSource?
Creating source does not necessary means you are saving the source to the customer
try {
await global._Stripe.customers.createSource(customerStripeId, { source: source.id });
} catch (error) {
logger.error(Create new source failed: , error);
errorCode = error.code;
decline_code = error.decline_code;
}
It fails when createSource
yup, if creating source fail, you sure will fail the invoice payment because it requires a card to complete the payment
402, fail to add source, which is working in the test env with test card
yeah, because in testing mode, we don't really call the banking system to perform any validation on the card because it is a fake card
but now, when you save a source to a customer, Stripe would verify the card with the bank
and the card issuing bank declines the card
So you mean the card is invalid itself rather than the code
I mean according to what you said, my card is invalid because it is declined by the bank. And Stripe doesn't record the reason, just say generic decline.
decline does not mean the card is invalid. It just means that your card issuer declines it (validation is nothing but a $0 charge).
The generic decline error come from the issuing bank
The card issuer might reject the validation / transaction for some risk reason
you will have to reach out to the card issuer.
Hey, im trying to implement the prebuilt checkout using .net and the SessionService.Create method that returns a checkout.Session does not contain a url. So I cant redirect to the checkout. Even the sample code does not compile with this issue. Is there an issue with this at present?
@split viper You should be getting a URL in the Session object https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-url but it's possible your .Net version doesn't support that yet.
It was added in 39.54.0: https://github.com/stripe/stripe-dotnet/blob/master/CHANGELOG.md#39540---2021-06-16
Hi - I am using shopify and have stripe payment enabled - I wanted to ask - we do sales locally in Hong Kong and the site is in HKD currency. The local government has issued a $5000 spending credit to a certain type of mastercard. I am wondering can stripe detect the type of card used (HK) and process this payment? This funding scheme only applies to Hong Kong based retail, but I think Shopify is Canadian based? Shopify told me to contact stripe directly
@remote parrot Hi! You likely want to reach out to Support to ask about this: https://support.stripe.com/contact/email
I see thank you timebox!
You're welcome!
.net 5 is what im using. Yep I didnt spot the update. I have updated nuget package to latest and its now showing the url parameter in session. Thanks!
Awesome. You're welcome!
Hello, someone available to help ?
@vocal wagon Hi - what's up?
I can't find concrete answer about invoicing in future (scheduling invoice for future date), is that possible with stripe ?
ah, yes, I know about subscriptions, but I'm asking about one-time payment through Invoice ?
You could do that with Subscription Schedules with just a single iteration.
I think. I haven't actually tried it - so you should test it. 🙂
Yes, I understand, thank you .
You're welcome!
@everyone I am using stripe with magento 2. 3ds card works fine with magento 2 checkout but when I check same with Magento API(payment api) it throws an error: TypeError: Return value of
Magento\InventorySales\Plugin\Sales\OrderManagement\AppendReservationsAfterOrderPlacementPlugin::aroundPlace() must
implement interface Magento\Sales\Api\Data\OrderInterface, null returned in
vendor/magento/module-inventory-sales/Plugin/Sales/OrderManagement/AppendReservationsAfterOrderPlacementPlugin.php:214
Can someone please help me out with this.
@vocal wagon This looks like a bug in the Magento plugin you're using, but your best bet is probably to reach out to Support for help with Magento: https://support.stripe.com/contact/email
I did, but I didn't get any reply from them and it's very urgent for me.
Unfortunately I don't think anyone here knows much about Magento so you may have to wait - or debug it yourself I guess.
Wow..super happy you guys have a Discord now!
I have a quick question (as i couldn't find the docs for the specifics on this).
I have a platform with multiple connected accounts. We have already plumbed in some application fee logic to send fees to the platform as part of direct charges. We have a requirement now that for SOME transactions we need to split some other fees to another bank account. Is it possible to breakdown charges like the following:
- $100 Charge to Connected Account
- $10 Fee to Platform Account
- $10 Fee to another bank account?
Connected account gets $80 (ignoring stripe fees for simplicity)
From looking at the documents i can only see a single application fee object without ways to split this..
it sounds like what you need is separate charges and transfers :https://stripe.com/docs/connect/charges-transfers. Something to take into consideration though is that this will work best if your connected accounts are all located in the same region that your platform account is in
We have global franchisees however this specific example only takes into consideration a branch from the same country as our platform account is based
SGD - SGD
When doing transfers, are these done pre or post fees from stripe?
and finally..can you do both application_fee and transfers on same transaction (as simply adding a transfer for specific transactions may be easiest implementation)
ahh crap..just noticed that this flow (transfers) assumes money goes from Platform to connected...i need to charge on connected and then transfer from them to another party....
so separate charges and transfers should still work in your situation
what would happen is that :
- you make a destination charge on the connected account (with the on_behalf_of parameter if necessary)
- you take an application fee from the connected account
- then you can transfer part of the application fee received to another party (connected account)
so money goes Connected > Platform > [Another Connected for additional fee collection]
yep!
@glass pilot i do want to mention you should ensure that you use the source_transaction parameter when making the transfer : https://stripe.com/docs/api/transfers/object#transfer_object-source_transaction. This will ensure that the funds transferred to the connected account are linked to the original charge.
@glass pilot if you don't include the source transaction, what will happen is that the funds will be immediately transferred to the connected account from your available balance.
However, this isn't great since the funds (from the charge) may still be "pending" - you're essentially "floating" funds which are not yet available to the other connected account - hope this all makes sense
yw!
@golden cosmos - just for clarity..when doing transfers to another party..do they have to be a connected account themselves or can i transfer directly to a bank account? (this fee recipient is just an external investor who is taking a fee so they don't process transactions and just get $$$)
I would just rather not have to go through the pain of setting them up as another connected account that's all.
@glass pilot yes you need a connected account today, you can't just send funds to a bank account. There are strict rules and regulations around money movement and we need to collect details information about the recipient of the funds
ok..thanks for clarifying 🙂
@bleak breach, for one-time payments, can I create products in stripe for that. If yes, can I track them like how many people buy a product?
@brittle summit I don't think there's a way to track it in Stripe at this point, I think you need to do it on your side.
hello, how i can add SEPA direct debit to my website
Hey @tight summit by adding do you mean accepting SEPA direct debit? If yes then this would be what you are looking for: https://stripe.com/docs/payments/sepa-debit/accept-a-payment
my company registered in georgia tblisi and we are not able
@tight summit Georgia isn't currently a supported country: https://stripe.com/global
Hi all!
Hi!
Subscriptions with Checkout offers prebuilt hosted forms to collect payments and manage subscriptions. We require additional information from customers during checkout. Was wondering how we can grab this custom info?
You'd have to grab it either before or after the Stripe Checkout process - likely before is the best place - in your own form.
Thanks timebox
I need a Stripe executive to know more about international payment collection for my business.
I tried contacting the email support, no help.
@shut berry This place is for technical integration questions. For more general questions, Support would be a better place for you to contact.
hi everyone!
i have this error when ii run this code:
someone know what i need to give in parameter like client_secret?
thanks a lot
it's just pi id
or pi secret client?
Where are you running this?
in front to get the status of pi and make or not the 3ds confirmation
RN related question: Is there a way to set up payments (native or credit card) outside the component? We user GraphQL and Statelinks quite extensively and doing all the payment setup in-component is kinda breaking our coding norms.
@quasi flicker it's the client_secret field of a PaymentIntent object you create on your backend server (https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements)
thanks! do you have an exemple of client-secret please?
@quasi flicker what do you mean by an example exactly? It's not a static value, it's different for each PaymentIntent. It's the client_secret field of a PaymentIntent object (https://stripe.com/docs/api/payment_intents/object#payment_intent_object-client_secret) that you pass from your backend to your frontend.
the client_secret is the return object of intent creation?
@alpine depot I would assume not, but maybe open a Github issue on https://github.com/stripe/stripe-react-native with a full description of what you're trying to do and some pseudo-code of how you'd prefer your usage of the library to look so we can look into the feedback!
i thought that it was just a string
it is just a string.
Hey! 🙂 I also have a question about PaymentIntent (I'm using rails/js), I keep getting this error, yet the account that is the destination is a test account has a ‘complete’ status. This 'completed' connect account for @workshop.trainer.user.connect_uid matches the connected test account id on my stripe dashboard (which is where I’m trying to send the money) and is not the platform's account id or the current user's account id, any advice?
@vocal wagon which API key are you using? It should be your platform's account's key, maybe you're using the connected account's key?https://stripe.com/docs/connect/authentication
That could very well be it!! I will give this a try and will see if it fixes it, thanks! 🙂
cool! there's no reason to ever use an API key belonging to the connected account
if you can't solve this, please share a request ID req_xxx for the error https://support.stripe.com/questions/finding-the-id-for-an-api-request
ok sorry for my questions but what the easiest solution to check the status of payment intent (required_captured ect..)
Hello guys. I have an issue that just came up recently. For some reason all payments are being shown as uncaptured
@quasi flicker the code you have seems like a good approach
@reef charm do you have an example payment ID for that? (pi_xxx / ch_xxx)
pi_1J9XewCIAqtD1tun1NEXnMGg
I tried capturing manually and the order still did not appear in my backoffice - prestashop
i am using a stripe module for prestashop
the last successful payment I received was on 01/07
ok sorry but i just don't know how to retrieve the client_secret field of the PaymentIntent object..
thanks a lot for your quick answer
@reef charm I'd suggest reaching out to Prestashop as it seems to be an issue on their side and I don't know much about how that plugin works.
@quasi flicker it's a field of the object. So e.g. if you use PHP on your backend and have like $pi = $stripe->paymentIntents->create([...]); then it would be $client_secret = $pi->client_secret; . It's hard for me to be more specific.
to clarify that's the response object your frontend is seeing, your screenshot is from the browser devtools Network tab in Chrome right?
but it can't be because that would imply you are using your secret key sk_test_xxx in your frontend code, which you must never do. I'm quite lost.
Anyway, what code do you use to make the request shown above and handle the response? I can probably show you how to get the client_secret from it(your screenshot shows it's part of the response so you just need to read it from the JSON).
Hi. My Dev team are trying to integrate the express setup and have said they are struggling to find where they get all of the customer / payment information from. We currently have the screen on the left, but we are trying to get something more like the screen on the right shown in the demo. Can someone provide guidance on this please?
@lyric iris https://stripe.com/docs/api/balance/balance_retrieve + https://stripe.com/docs/connect/authentication for example to get the balance of an Express account.
I don't really follow what you're asking without a more specific question about your own scenario. The screen on the right is a demo application with its own business logic(like "recent rides" is coming from a business logic database(the code is all public at e.g. https://github.com/stripe/stripe-connect-rocketrides/blob/f38e8595b39dfb713ace40482342852b304fb1d3/server/models/pilot.js#L85 ) so it's not really something that can be generalised. The general bit, the balance of the Express account, uses the approach I mentioned above (https://github.com/stripe/stripe-connect-rocketrides/blob/f38e8595b39dfb713ace40482342852b304fb1d3/server/routes/pilots/pilots.js#L30-L44)
The express account will be taking in payments. These payments I assume will have an amount, the name of the buyer, and the date/time, like on the demo. These will all be then presented in a list, like on the demo.
How do we pull all that data together and present the screen, like the one in your demo to your customers?
That's the core of the application you're building though, so that's a massive question, there's not a one-line answer I can give you
Are you using Direct or Destination charges? I assume Destination. The amount/buyer name of the customer is part of the Charge/PaymentIntent object on the platform in that case
Destination
when you process a payment you can write something to your local database with the details of the transaction per your business logic , like who paid, to which account, etc, and can pull some of the info from the relevant Stripe API objects
that's what that demo is doing, it writes to this custom "rides" database (since in that demo business logic, "rides" are the service being provided) : https://github.com/stripe/stripe-connect-rocketrides/blob/f38e8595b39dfb713ace40482342852b304fb1d3/server/routes/pilots/pilots.js#L65-L110
then when a user comes to your platform, you authenticate them and you pull information from your database for the transactions involved with that user and render it to them. That's what that demo does : https://github.com/stripe/stripe-connect-rocketrides/blob/f38e8595b39dfb713ace40482342852b304fb1d3/server/routes/pilots/pilots.js#L31-L62
Hi all!
This is all business logic at the core of what you're building — the dashboard/user management that your users log into when they are onboarded to your system. Stripe's Express dashboard(your left screenshot) helps with managing the user's payout settings and such, but you are building the business logic dashboard of your system.
@ember yarrow hello!
ahah. thought i had an issue but discovered stripe CLI no idea that existed, life = easy jaja
Thanks Karlekko
@lyric iris happy to try answer specific questions, like how exactly you can get the customer name from a Destination charge(the short answer is usually to look at https://stripe.com/docs/api/charges/object#charge_object-billing_details ) as you build this, just have to clarify the scope here a bit
@vocal wagon I can try to help — what's the question?
I'm going to bring the dev onto the board, because I'm non-technical and somewhat playing middle man here.
yes this is a channel aimed at developers so seems like a good idea
Hello. The matter is, I'm still waiting for a payment that should have been on my account on 2nd of July, but I still don't find it on my bank account. What's going on?
Hi guys
I did ask that when I join, my team are native arabic, so I often end up making sure the questions are well worded, but I think here it's better direct.
@vocal wagon that's a question https://support.stripe.com/email can help you with
@tacit ibex hello there
@meager hawk meet @tacit ibex this is one of our lead developers who is working on the Stripe Express integration. @tacit ibex I'm not sure if you can see the conversation we've had already, but if not I'll copy and paste to you externally. Over to you.
Sorry sir, I need a chat assistance
good
And I have to fix this problem asap
to be clear this is not somewhere I can directly consult with you 1:1 on your entire integration :p: — it's ad-hoc developer support. But if you have specific questions after reading the docs or so on that's something I can help you with.
@vocal wagon there's a chat option on https://support.stripe.com. I can't help you here sorry. Thanks.
bonjour jai besoin d'aide pouvez vous mecontacter
Ok I can ask directly
: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
hello there, i cant find a Stripe test card which can be added as a pm which will return a declined error during the invoice payment.
I am trying to imitate a successful first subscription payment but the second one is declined. For this im creating the sub w a 4242 card, then I change the card (cant find one), reset billing anchor, and trigger invoice.pay again in order to have a invoice.payment_failed hook
i had one at some point but cand find it anymore from the doc :/
Thanks. Totally understand that. @tacit ibex and I are disagreeing on something here. He thinks we need to build this payment page, which lists individual payments as shown in the demo from scratch. I think that page is something you have already built for us in the integration, but we just need to pull the appropriate data through to it. Can you confirm which it is please?
@cobalt pendant I think you might want 4000000000000341 from https://stripe.com/docs/testing#cards-responses
@lyric iris your colleague is right(as I described above)
Perfect ty
OK then - @tacit ibex I stand corrected!
as I mentioned — this is all business logic at the core of what you're building — the dashboard/user management that your users log into when they are onboarded to your system. Stripe's Express dashboard(your left screenshot) helps with managing the user's payout settings and such, but you are building the business logic dashboard of your system.
Stripe is involved because obviously you process the payments there and our API objects have the data, but the overall concept of "service provider provided Service X to Customer Y at Date Z with Details xyz" (and then showing those details to your service providers on their dashboard on your system) is a higher level thing that's part of your database/business logic, the Stripe payment object ID and details pulled from that , would form part of it.
can i reset a sub billing anchor from dashboard ?
@cobalt pendant it's an option in the Edit Subscription page yep :
How I can get the S2S Postback URL from each unique offer of Stripe?
@obtuse hamlet hi! I don't understand the question I'm afraid(what is a "S2S Postback URL" and what is an "offer"?)
test
@fluid parrot hello there
For tracking sales data back into the AD Tracking software by each unique user identification
Has anyone run https://stripe.com/docs/billing/subscriptions/checkout on AWS Lambda before? I am having issues getting the client to follow the redirect
Learn how to offer and manage subscriptions with different pricing options.
@quasi mirage what's the exact issue? There can be some issues depending on how you implement the redirect(things with redirecting with a POST) but there's nothing specific to Lambda that should be directly related
So I've set the "Location" header and status code 302, the client receives them but when the client connects to stripe, it gets an Origin null error
@obtuse hamlet I don't really follow, but maybe start at https://stripe.com/docs/reports .
@quasi mirage hmm let me think about this/try some things
Thanks, if you need me to share the code I am happy too, it's using python and react (axios)
Hello everyone
Now I'm trying to set up a business account registration(connected accounts)
But I can't understand what needs to be sent after I have added all the owners of the company
https://paste.pics/8558f239c95fba8b956aeac3234f2794
Action like this button
Hello all !
I have created subscription, and I would like to know how to know when the subscription ends ? I didn't found an event to listen to
Hello, I have a question regarding Stripe Connect, where a platform we're developing will collect a payment, deduct a fee for the use of our SaaS and then transfer the remainder to the service provider. It seems that there is no extra PCI DSS compliance required when following the guide linked below, as all the card details are handled by Stripe with Elements (iframe). Is it correcly understood, that we don't need seperate PCI compliance? https://stripe.com/docs/connect/collect-then-transfer-guide?platform=web
Collect payments from customers and pay them out to sellers or service providers.
@quasi mirage so you use an XHR to hit create-checkout-session instead of a form POST submission? That's likely the issue, if you're doing things that way it's probably better to have the backend return a string/JSON object and just set window.location in JS.
Thank u so much )
@drifting hatch customer.subscription.deleted would happen when the subscription is cancelled : https://stripe.com/docs/api/events/types#event_types-customer.subscription.deleted
@worthy crane yes that's accurate. See also https://stripe.com/docs/security/guide#validating-pci-compliance , but in general yes, using Connect doesn't really change anything there, it's just based on how you accept the card details
Thank you, and my apologies for asking that question here, but the support chat didn't seem to know the answer. I'll follow the guide!
@meager hawk Ok, if subscription is "canceled at period end", so the user does not want to automatically renew it, when it arrives to its end, that send the customer.subscription.deleted.
If the subscription is automatically renewed , do I will recieve the "subscription_schedule.expiring" 7 days before the end ? (I assumed that subscription_schedule events are for subscription that are automatically renewed)
So it's just a normal axios post request so shouldn't be using XHR, unless that's what the library is using under the hood
@drifting hatch if it's cancelled at period end, yes you get that event at the end when it's cancelled!
Your second sentence is not really true, SubscriptionSchedules are a whole separate thing and not really involved. What do you mean by "the subscription is automatically renewed"? If you just mean, the subscription recurring each month, you'd generally use invoice.paid event events to keep track of that per https://stripe.com/docs/billing/subscriptions/webhooks#tracking , Schedules are something else entirely.
@quasi mirage axios requests are all XHRs yes
redirecting from an XHR enforces CORS which is why you get that error
ah interesting, thanks @meager hawk, would a fetch be better or is window.location okay?
the code assumes you're using a full-page redirect with a form action (https://stripe.com/docs/billing/subscriptions/checkout#create-session)
well fetch is exactly the same as making an axios request
ah damn, can tell I am not a JS dev
if you're going to do things this way you should change the backend to return the url in the HTTP response, parse it from the response handler in JS, and set window.location to it
Great, thank you, I will do that!
Ok, thanks for these explanations
How can I get the invoices linked to a customer (an history) ?
(a customer can have a subscription, then delete it, and days later get a new one. I would need to access all his invoices)
oh 😅 Sorry, I looked for something more complicated. Missed that doc
hey again, doing this will imitate a situation where a payment fails while the sub is still not done right ? if so the invoice.payment_failed hook supposed to b triggered right ?
@cobalt pendant yep, seems like it would work
thats weird it seems the hook is not triggered
the technically most accurate way to test it would be to have the subscription running, use the API to add that card to the customer, then set trial_end to a few minutes from now(https://stripe.com/docs/api/subscriptions/update#update_subscription-trial_end), then wait an hour for the renewal invoice to fail (https://stripe.com/docs/billing/invoices/subscription#subscription-renewal)
in order to notify user something went wrong i listen to invoice.payment_failed, then i check if its part of a subscription, if so i notify user his infos is wrong and sub payment has not been able to b collected. But it looks like the hook is not called
I'd need to look at your specific example sub_xxx . I think there are some updates where the customer's card gets charged without creating an invoice as such and resetting the anchor might be one of those(so it's not a perfect test to do things the way you describe unfortunately)
to explain my comment above, when a trial ends, a renewal invoice is generated, so using trials is the easiest way to test recurring invoice behaviour
but i do need to wait an hour ?
the sub is a subscription schedule created as such : https://pastebin.com/eeMpH8rL
you can skip that by finalizing(https://stripe.com/docs/api/invoices/finalize) and charging(https://stripe.com/docs/api/invoices/pay) the Invoice I believe(the dashboard has buttons for that as well), it's what I usually do
To link an account into a platform (as connected account), developer access to that account is enough?
can i set a trial end date to do what u described above in this sub schedule ?
@fluid parrot no, Owner or Administrator is needed to approve an OAuth connection as far as I know
ok, thanks
let customer = await stripe.customers.create({
email: "test@example.com",
});
let pm = await stripe.paymentMethods.attach("pm_card_visa", {customer: customer.id});
let subscription = await stripe.subscriptions.create({
customer: customer.id,
default_payment_method : pm.id,
items: [
{
plan: "plan_DQYe83yUGgx1LE",
},
],
expand : ["latest_invoice"]
});
// simulate failure
pm = await stripe.paymentMethods.attach("pm_card_chargeCustomerFail", {customer: customer.id});
await stripe.subscriptions.update(subscription.id, {
default_payment_method:pm.id,
proration_behavior:"none",
trial_end: moment().add(30,"seconds").unix()
})
that's the basic idea of how I test this at least @cobalt pendant , I force a recurring invoice with a trial and then try to pay it through the dashboard
though it actually doesn't generate a invoice.payment_failed event either, since those only happen when the payment 'naturally' fails from the recurring Invoice process unfortunately :/ So as I said, waiting an hour is the technically most accurate simulation. Sorry, this stuff is quite a pain to test. Once you've done it once though it's not so bad since you can look at that example subscription and events, and you can create a bunch of subscriptions in this scenario and build up lots of testing data.
@cobalt pendant sure , you can use https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-phases-trial_end if using Schedules I think. If you're using Schedules you could also just create really short phases and automate this I think
like one of the things you can do in a phase is set the default_payment_method (https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-phases-default_payment_method) so you can set up a test that way ( having a phase that starts, sets that to the test card that fails and seeing what happens with the recurring invoice. You'll probably have to wait the hour though). It's complicated unfortunately.
AH, i added a trial end date to the first phase, added a new pm method w (4000000000000341) to the customer, then triggered the charge from the sub invoice in the dasbhoard but nothing happened
actually something weird happened the invoice says paid for $0
, it got created after 90 sec (end of trial date)
it could be many many things, like probably proration cancels out the cost, I'd need to look at your specific sub_xxx or in_xxx really
sub_JnRaHNn0lD5wrK / in_1J9qhBDEtaVUCGWzu8aNJ11S
could it be a trial invoice corresponding to $0 ?
yeah that's just the invoice that's generated when starting a trial, it's always $0
ohh ok got it
you can ignore that one. It's the upcoming one that's currently a draft which represents the actual recurring payment
another one is generated now with the correct amount
yeah was about to send u the ID
if i click on charge customer you are saying the invoice.payment_failed wont b triggered either ?
yay!
Hi. In express/destination accounts. If we set up a refund, is there a mechanism to ensure that the seller, rather than us, pays the Stripe fees.
I.e. if a $10 payment is made, and then refunded, we will get hit with Stripe fees both ways if we just reverse the transfer. Is there a mechanism to take $10 + Stripe fees from the client instead?
@lyric iris not really no, if you use Destination charges the platform is liable for refunds. You can reverse the transfer yes but you still lose out on the Stripe fees, that's just how it works. You can only reverse the amount transferred to pull that back.
You would set up your application fees/business to cover the cost of potential refunds basically.
ok thanks
Do you know if we face Stripe fees on both the initial payment and the reverse payment?
Hi, i got (maybe a bit of a noob) question regarding payment methods. So how can i add them? i downloaded the example checkout from stripe and of course the only payment method is by card. How can i add local payments and other, more known like apple pay?
Thanks very much in advance
@lyric iris the only fee is the payment processing fee on the original Destination charge. You don't get that refunded when refunding the payment, but there's nothing else(like no fee for reversing the transfer itself)
@fathom mantle I would start here ! https://stripe.com/docs/payments/payment-methods/overview Assuming you're using PaymentIntents and Elements directly then each method has a specific integration (e.g. https://stripe.com/docs/payments/ideal/accept-a-payment?platform=web) If you use Checkout itself then it's generally just a matter of adding it to payment_method_types, e.g. https://stripe.com/docs/payments/ideal/accept-a-payment?platform=checkout#enable-ideal-as-a-payment-method ) [not sure what you refer to exactly with 'the example checkout from stripe' as we have a few products and ways to integrate]
https://stripe.com/docs/payments/integration-builder
Exactly that one, with
Platform=Web
Frontend=Html
Learn how to embed a custom Stripe payment form in your website or application.
Backend=php
Custom Payment flow
i just downloaded the entire package
So i need payment_method_types right?
Thanks
Hello, good afternoon, I urgently need help to fix the card payment gateway. We are a company dedicated and specialized in medical products and services and our gateway has been blocked, can someone help me please?
We are dedicated in particular to Covid detection services in physical centers through collaborations with laboratories and medical personnel at home
Hi everyone, I am working on a subscription integration. I’ve noticed the are few test cards which request 3D secure for a payment even if the card is confirmed via "this.Stripe.confirmCardSetup” (e.g. 4000 0000 0000 3220). I am wondering if this is a live behaviour, or it is caused by a test scenario not reproducible on live. Can someone help me on it?
Hi good morning, I am creating charges for my test connected stripe accounts and trying to add metadata. I have no issue updating each charge with metadata, and when I view the stripe dashboard as my test connected account and look under all transactions, I can see the the transfer_id and payment_id for each charge. The metadata however is not visible from the dashboard when I update the charge. I thought about updating the transfer, but when retrieving the transfer via the transfer_id, every attempt is met with an error 'StripeInvalidRequestError: No such transfer: 'tr_XXXXXXXXXXXXXXXXXXXXXX' So my questions are: 1) Why can I not see the charge metadata under each connected stripe account dashboard? Do I have to update the transfer metadata instead? 2) If I do have to update the transfer metadata, why can I not retrieve any of the transfers via the transfer_id? Thank You!
what event would i listen to for detecting when a subscription cancels? not when the subscription is updated to cancel soon - when the subscription is actually over
would it be customer.subscription.deleted?
Hey everyone. At my company we have a use case for charging a customer in their local currency and then at a later time perform a commission transfer to a Connected Account with the same local currency.
Checking the Stripe docs here https://stripe.com/docs/currencies/conversions we saw that we could avoid currency conversions by connecting bank accounts to certain currencies, which we did, but still the currency conversion is happening. How can we, a company in the United States, have Stripe balances in different currencies other than USD? Thanks.
Learn more about how Stripe handles currency conversions for you.
@meager hawk I have an issue with the stripe webhook. I configured it on paymentintent events, but after a successfull payment, if the user is on the same page, it sends payment_intent_successfull to my webhook multiple times. I verify the webhook exactly like in the documentation. I am in sandbox mode, and i use ngrok to forward the webhooks to my locahost.
@vocal wagon hi! you can't really, US accounts can only settle in USD ,per https://stripe.com/docs/payouts#supported-accounts-and-settlement-currencies . I'd suggest asking https://support.stripe.com/email as it's not really a coding question.
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.
Hey,
I am currently implementing metered billing and thus far I've used the flow where I redirect users to the stripe site and then they return via a callback. Now, looking on how to store some basic information on what their subscription ID for that is going to be afterwards I came across this example repository and it doesn't even use callback flow:
https://github.com/stripe-samples/subscription-use-cases
What's the preferred way then and why?
@zenith nimbus are you using Destination charges? sounds like it. The metadata is on the payment object on the platform, you won't see anything on the connected account. The connected account just sees the money received from the transfer, all the metdata and customer information/payment info is on the platform account instead
Do I have to update the transfer metadata instead?
you'd update the transfer destination_payment( https://stripe.com/docs/api/transfers/object#transfer_object-destination_payment) if you were going to do something like this. But really it depends, since if you'e using Express/Custom accounts, they never see any of this anyway, they don't actually have a Stripe dashboard to log into.
why can I not retrieve any of the transfers via the transfer_id?
The transfer object exists on the platform account so you need to access it from there.
@subtle harness "where I redirect users to the stripe site and then they return via a callback." do you mean Checkout?
@meager hawk Yes, correct, I was following this guide so far: https://stripe.com/docs/billing/subscriptions/checkout
Learn how to offer and manage subscriptions with different pricing options.
@fair smelt it's hard to say without looking at the specific evt-xxx in question, but you can sometimes get duplicate events had have to be able to handle it (https://stripe.com/docs/webhooks/best-practices#duplicate-events)
Does stripe webhook expect a response from the webhook? I think that is the issue.
@subtle harness then you can keep using Checkout, it's your choice really! You can use Checkout or you can build a payment page directly into your own page if you want a more integrated/advanced integration(it adds a lot more work to what you need to build). The repo you mention happens to be using the latter.
@fair smelt you have to return a HTTP 200 status yes(it's described at that page I linked as well)
Haha, ok, that is probably why.
@slate elbow yep, it's customer.subscription.deleted !
Got it. Ok, makes sense 💯
Is it possible to get some more details on the created subscription based on the callback from the session?
Basically I need to get from this callback "https://example.com/success.html?session_id={CHECKOUT_SESSION_ID}" to having a subscription in the database to update the metered billing with, right? 🙂
@subtle harness you should use webhooks for that instead. https://stripe.com/docs/payments/checkout/fulfill-orders Handle the checkout.session.completed even that's sent to your server and you can read all the details you need(like the Subscription ID) from that data when handling the event
the servers in the example for the page you linked have examples of doing that (e.g. Node) https://github.com/stripe-samples/checkout-single-subscription/blob/master/server/node/server.js#L111-L146 (right now they just print : "payment received!" to logs, but you could expand that to reconcile the payment/subscription to your system
@meager hawk Amazing and quick feedback. Makes all sense and I'll probably go with the checkout in that case for now. 💯 Great support, keep it up! 🎉
Thank you @meager hawk . In that case, can you tell me how can I transfer funds to a connected account in their local currency? For instance I want them to receive exactly 5 EUR but I have to send the funds in USD. Do I have to do the exchange rate conversion beforehand, using an external service?
@vocal wagon you can't really, since you can only transfer in the currencies that your platform hold available balance in ,which is USD. You could use some external service to look up the exchange rate but that won't be the one Stripe is using, so it's not really possible.
Usually you'd use Destination charges (https://stripe.com/docs/connect/destination-charges#flow-of-funds-amount) because then you can charge the customer in e.g. EUR and transfer an exact amount of EUR to the connected account, and the remainder is converted to USD for your platform to keep. If you're using Separate Charges and Transfers(since you mention "at a later time perform a commission transfer") then it's more complicated and I don't think you can accomplish what you describe, as I mention in my paragraph above
one option might be to use auth-and-capture(https://stripe.com/docs/payments/capture-later) with Destination charges instead of separate charges and transfers, if that works for the use case
That's not really an option because we can only hold funds for 7 days, but nonetheless thanks a lot for your help. We'll try to work around these limitations.
Hello. I need to implement monthly subscription where first 3 months, user will be charged discounted price, and after that, standard price. Could you please tell me what's the best way of doing this?
@split karma hi! I would add a coupon with duration_in_months:3 when creating the subscription, for the amount of the discount: https://stripe.com/docs/billing/subscriptions/discounts
That's great! Thank you very much!
hi, i just got here. I'm having an issue listing all cards that a user has created, is there a proper example where the variable cards is used further in an array or list?
Here's the code from the docs.
var service = new CardService(); var options = new CardListOptions { Limit = 3, }; var cards = service.List("cus_FdnL8neGIqEm2c", options);
@ebon raptor nope — you should use https://stripe.com/docs/api/payment_methods/list instead
uh, what's the difference between the two?
but i suppose that makes sense, thank you!
if you're asking what to do with the return value though it's just like
static void ListPMs()
{
var options = new PaymentMethodListOptions
{
Customer = "cus_IvsAKqSZcOxKmt",
Type = "card",
};
var service = new PaymentMethodService();
StripeList<PaymentMethod> paymentMethods = service.List(
options
);
foreach(PaymentMethod pm in paymentMethods.Data)
{
Console.WriteLine(pm.Card.Brand);
Console.WriteLine(pm.Card.Last4);
Console.WriteLine(pm.Card.ExpMonth);
Console.WriteLine(pm.Card.ExpYear);
}
}
i.e. you iterate over the return value(which is a StripeList that has a .Data field, per the API reference("A dictionary with a data property that contains an array of up to limit PaymentMethods")
CardService.List is a legacy endpoint that returns only legacy card_xxx objects while PaymentMethodService.List returns the current PaymentMethod pm_xxx tokens and is backwards compatible so should always be used (https://stripe.com/docs/payments/payment-methods/transitioning#compatibility)
ah, yes i was just working on that part now. You've been to great help! Thanks again!
with stripe tax, if a customer sets up a subscription and then after we register in their country, do they start getting charged tax (for example, if the product is set to tax exclusive, does their total payable amount change)?
@slate elbow hmm, that's a great question actually
I would assume the answer is yes but I don't actually know so maybe write to https://support.stripe.com/email for a definitive answer. I can try to find out by testing it but I'm not sure I'll be able to, let me look..
if you find out, you should probably get it added to the stripe tax faqs
is there a webhook , if we create a new connect account?
there is account.update but not for new account
Are you creating the account through the API or OAuth(i.e. https://stripe.com/docs/connect/express-accounts versus https://stripe.com/docs/connect/oauth-express-accounts) ? In the former there's no webhook event as far as I know — I don't follow why you need one. You call the API and get a synchronous response, so you know the account was created and can update your records at that point.
i guess i could just assume tax will be around 20% max and just make a price adjustment
but would be better to know. i'll reach out to support
I am creating via API
I want to save the accounts in our database everytime it is created
I have webhooks for updates but not for new account
I am using stripe.AccountLink.create
why not just update your database after calling stripe.accounts.create(..) in that case?
yea i guess I will have to do that. I was actually using Dj stripe. and all the webhooks and model are there already but not this use case
Hallo I am having a problem redirecting the user to the 3D secure on flutter.
I am using both plugins: stripe_payments and stripe_sdk
I use stripe_sdk to create the SetupIntent for the credit card, and to confirm the SetupIntent.
I get back a populated next_action {} so I know that the card has to be confirmed in 3D secure mode.
if I search for a link inside the object i find nothing, if I try to authorize the SetupIntent with the .authenticateSetupIntent() the request goes in time out and says "error in getting the configuration).
Can you help me in having the user authorize the setup intent for the payment method?
@night kite hi! well, a few things. You shouldn't be looking for a URL/link, that's not how it works really. Unless you choose to opt into showing 3DS yourself(by passing return_url https://stripe.com/docs/payments/3d-secure#manual-redirect ) then there might not be a link in next_action, since the contents are designed for our SDK to use.
secondly, I'm afraid I don't know anything about that Flutter SDK you mention — that one stripe_payments was replaced with an official one , see https://github.com/jonasbark/flutter_stripe_payment/blob/master/migration.md => https://pub.dev/packages/flutter_stripe . But I don't know much about the new one either as it's not a fully supported Stripe product at the moment. I'd assume you want the confirmSetupIntent function instead when using that new library so I'd maybe migrate to that and follow a guide.
oook i thought that may be an issue, because sometimes i was getting the link and other times i did not.
I have seen the new flutter library but it is still in beta... I guess I will try that...
Just to get it right, the confirmSetupIntent should automagically redirect the user if needed? I do not have to manually launch the authorize[...] ?
It's supposed to launch a WebView that shows the 3D Secure page and close it when the user is done, yep
it's a wrapper around our native SDKs like https://stripe.dev/stripe-ios/docs/Classes/STPPaymentHandler.html which do that(present any additional UI needed)
Hello people, I have set up a Laravel application where people can buy stripe subscription to open shops. It works perfectly! Now I'd like to transfer to theme a certain amount of what they sold, I stored their customers id to proceed this action but it does not seem to work this way. Do you know the way I can do this ? Thank you very much! 🙂
@viral tangle hi! you'd need to look into Stripe Connect for that : https://stripe.com/docs/connect/
you can't send money to end-customers, anyone who receives money needs to have a Stripe account of some type and Connect is our product for managing that marketplace set up where you have sellers/other entities with Stripe accounts connected to yours.
so it's a fairly sizeable undertaking at least, so I'd start by reading through those docs to understand the set up a bit more.
Hello @meager hawk thank you very much for reading me ! Ok I actually saw that part of documentation, I'll read this at once ! My very last question would be : is there a easy way to create a seller account through API or they have to fill the form to create their account?
well they do have to fill in a form at some point.
it's required to verify your identity(https://support.stripe.com/questions/know-your-customer-obligations) before anyone can send you money, as money movement is a highly regulated space due to things like anti-money-laundering regulations etc
so basically either you create your own onboarding experience that collects the required information from the user and provide to Stripe via our API or (and I'd really really recommend doing it this way instead) you use our onboarding forms/products like Express accounts. But at some point the user does need to provide some info about themselves.
Got it @meager hawk ! Thank you for your time ☺️
hi everyone! i have this error: "This PaymentMethod was previously used without being attached to a Customer or was detached from a Customer, and may not be used again" with a test card do you know what to do?
it's possible to remove the payment method?..
thanks a lot!
@quasi flicker what's the request ID req_xxx for the error?
req_PypmKMrvXM13x6
@quasi flicker it's complicated a bit :
- you created a PaymentMethod using
createPaymentMethodon the frontend : https://dashboard.stripe.com/test/logs/req_jNfXzu66sXOngK - you passed to that your backend and used to attempt a payment on https://dashboard.stripe.com/test/logs/req_Rk2vyo8y5YKv5p . It required 3D Secure
- but on the frontend, you did the wrong thing because you collected a _brand new _ card (so you typed your card number twice?) and used that : https://dashboard.stripe.com/test/logs/req_OajDmsR2WcvhKd
so it's actually that second PaymentMethod that was saved to the customer and basically this is why you get the error
you should fix that third step — you want to call https://stripe.com/docs/js/payment_intents/confirm_card_payment#stripe_confirm_card_payment-attached instead , simply confirmCardPayment(clientSecret), you don't need to pass confirmCardPayment(clientSecret, {payment_method:{card:...}}) again , since you already had the PaymentMethod.
sorry, I can't explain more, I have to run! If it's not clear please write to https://support.stripe.com/email !
👋 I have to step away, folks, so a Stripe engineer might not see your message here today due to the US holiday — please contact https://support.stripe.com/contact for a guaranteed response!
hello, im just wondering how i redirect customers to a thankyou page after they have made a payment with stripe ?
thank you! your time is precious for me!
hi every one! it's still me sorry but i have a last question and project is done
i make two payment in the same time but with different payement intent but with the same payement method! but with 3Ds secure i valid the first one but not the second so the second is incomplete.. it's possible to validate the seconde with the confirmation of the first?
thanks a lot!
If a user is sent to the connect onboarding URL and they already have an existing Stripe account, when they are finished connecting and are redirected to my return URL, will my webhook still receive an event showing the 'details_submitted' boolean?
does https://stripe.com/docs/api/refunds/create returns with the final state ? or do i need to use a webhook for success ?
Hi everyone, I want to create a payment link using stripe API's and then this link would be further shared with customers, is this use case possible in stripe? Create payment links using API's?
hello, anyone from Brazil? I need to integrate PIX payments with Stripe and ClickFunnels... anyone did this ?
Hi All,
We've been playing around with a React / node implementation of this: https://stripe.com/docs/payments/checkout/custom-success-page and it doesn't seem to be working.
Although the browser seems to display the returned success_url with session_ID, the custom success page doesn't seem to load from the defined server.js endpoint. Is this potentially an issue with the initial client side page being created in React and the browser interpreting the URL as a react router route instead of an external URL to be loaded?
Learn how to display a confirmation page with your customer's order information.
Hi All,
I am trying to make an app with react naitve and I used react-native-payment to do the apple pay and google pay.
https://github.com/naoufal/react-native-payments
I could connect it to the strip and it works fine in the test mode. But in production mode stripe shows me this error:
"message": "You cannot confirm this PaymentIntent because it's missing a payment method. You can either update the PaymentIntent with a payment method and then confirm it again, or confirm it again directly with a payment method."
As an example, I pass the paymethod like this:
payment_method:"visa"
can you please let me know how should I pass the right payment method. Thanks in advance.
@vocal wagon I'm not a genius or anything, but I'm pretty sure you're gonna need to pass the json a lot more variables than just the card type.
On another note. I've been trying to display to users which card is their default. Where can i get that variable from?
@ebon raptor : Thanks for your replay. Do you have any idea about the proms that I need to pass? how many credit cards type we have in stripe?
If you are working with react-native-payment, you can manage it by adding this to your supportedMethods data:
supportedNetworks: ['visa', 'mastercard'],
I don't work with react-native, I'm on C# WPF. I've you're planning on just using credit/debit cards, you'll need to pass cardnumber, expiry month and year and cvc
hey guys im getting an error when iv added 2 possible options for subscritpions choices
im getting a invalid_request_error Subscriptions require at least one recurring price or plan to be passed to line_items...
var options = new Stripe.Checkout.SessionCreateOptions {
SuccessUrl = "https://mysite.net/success?session_id={CHECKOUT_SESSION_ID}",
CancelUrl = "https://mysite.net/failed",
PaymentMethodTypes = new List<string>
{
"card"
},
Mode = "subscription",
Customer = possCustomerID,
LineItems = new List<SessionLineItemOptions>
{
new SessionLineItemOptions
{
Name = $"Your Event maestro",
Description = $"our most popular product ready to rock.",
Amount = 5000,
Currency = "usd",
Quantity = 1
},
new SessionLineItemOptions
{
Name = $"Standard Event Pachage",
Description = $"Limated version of our app, good for small events",
Amount = 1500,
Currency = "usd",
Quantity = 1
}
}
};
try
{
var service = new Stripe.Checkout.SessionService();
Stripe.Checkout.Session session = await service.CreateAsync(options);
return new OkObjectResult(session.Id);
}
catch (Exception ex)
{
log.LogInformation("error was thrown");
log.LogInformation(ex.ToString());
return new NotFoundResult();
}
hi
hi
does anyone know if it's possible to pass metadata to confirmSetupIntent from @stripe/stripe-react-native or any other api? the source code doesn't have it documented but the SetupIntent object supposed to have the metadata property per https://stripe.com/docs/api/setup_intents/object#setup_intent_object-metadata
Hello! Is it possible to add additional charges on the fly.. I have this products.json.. So for example the first one costs 160 aud, so depending on their location I would have to charge extra for that.. Also if they select add-ons e.g. mattress, etc...
so if user select add-ons like a mattress the amount should change from 160 to 180 for example.. any idea on how I can do this? Thanks so much!!
[
{
"sku": "001",
"name": "2 Cubic Meter Bin (2m3)",
"description": "1.8 X 1.4 X 0.9M",
"trailer_loads": "2x",
"wheelie_bins": "8x",
"image": {
"url": "/static/ee64d7dc86c1f5d7130635dfb094b07e/c5f46/bin.webp",
"key": "bin.png"
},
"amount": 16000,
"unit_amount": 160,
"currency": "aud"
},
{
"sku": "002",
"name": "3 Cubic Meter Bin (3m3)",
"description": "1.8 X 1.4 X 1.25M",
"trailer_loads": "3x",
"wheelie_bins": "12x",
"image": {
"url": "static/ee64d7dc86c1f5d7130635dfb094b07e/c5f46/bin.webp",
"key": "bin.png"
},
"amount": 20000,
"unit_amount": 200,
"currency": "aud"
},
]
Hi folks, so a Stripe engineer might not see your message here in the next 8 hours or so due to holidays caused coverage gap. Apologise for the delay — please contact https://support.stripe.com/contact for a guaranteed response!
I will be online sporadically answering questions though.
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.
@halcyon raptor what API are you using? I assume it is invoice API? normally you would modal your add-ons as another invoice item https://stripe.com/docs/api/invoiceitems/create
the added invoice will be automatically included in the next invoice together with the existing invoice items.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
It seems that the confirmSetupIntent method does not have parameters allow you to pass metadata https://github.com/stripe/stripe-react-native/blob/3378e6f24d92accfff4b6b8d66ae764561ba470b/src/types/SetupIntent.ts#L23
However, you can definitely do that through Stripe API https://stripe.com/docs/api/setup_intents/confirm#confirm_setup_intent-mandate_data
I would recommend
- You might need to update metadata in your server side
- raise an issue to in the github repo to suggest include this feature https://github.com/stripe/stripe-react-native
React Native library for Stripe. Contribute to stripe/stripe-react-native development by creating an account on GitHub.
React Native library for Stripe. Contribute to stripe/stripe-react-native development by creating an account on GitHub.
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 this possible on select change?
hello, Im not sure this is where I need to be for help?
@grizzled frigate if you have any technical questions, you can ask here
@halcyon raptor can you explain a bit more on what you mean by Select Change?
Please can any one help me to address my issue?
Currently im using stripe API for payment in.net.
My client requirement is, in the installment payment we have to collect the first payment and the rest recurring should start from the specific date.
Ex: I just make the 10 instalment payment and the first instalment deduct from my account now(07/06/2021) and next should start 10 of October . After that next 10 of Nov.. 10 Dec like that.
Is this possible?
@white ibex currently Stripe does not support instalment payment except in Mexico https://stripe.com/docs/payments/installments#requirements
Learn how to accept credit card payments using an installment plan with Elements and the Payment Intents API.
@white ibex You might need to work around this by using subscription schedule API to schedule
- initial payment now
- monthly subscription payment after October
https://stripe.com/docs/billing/subscriptions/subscription-schedules
take note this is not really an instalment but more of a recurring payment. Thus unlike instalment the payment is guaranteed because I believe the credit card company hold the full instalment amount for payout. with the workaround however, there might be declines for the subsequent payment due to insufficient fund.
Learn about the Subscription Schedules object and how to use it.
Is it possible for a PaymentIntent to have line items? Or is that only possible if also using Invoices?
@echo pollen no, it is not possible. The work around are
- as you mentioned using invoice
- OR you can use metadata to store those in the PI object
- OR you can use Checkout Session
paymentmode to include line_items and checkout session will create the PI. https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yeah, I have line items in my Checkout Sessions, but I also store payment methods for automatic monthly payments in the future, just was wondering if I could detail the receipt these customers will get with more than a single line
I can't use a stored payment method on a PaymentIntent created by the checkout session can I??? Set it to off-session, pass the payment method, and attempt to capture?
Thanks. Yes Im using recurring payment with subscription payment. seems there are no way to change the recurring date. can we use Pause payment collection ? after complete the first payment of the subscription ?
currently I have these products listed.. on click of those gets you to the stripe checkout.. I'd like to change the flow.. on click will go to the single product pages where they can select add ons.. so for example if the user chooses to have add ons the amount will change dynamically.. so for example product 1 have a default amount of $160, if they select an add on costing $20, the total amount should change to $180.. hope it makes sense
For your monthly payments, are you using Subscriptions or you create billing your customer using your own scheduling logic. Using subscription API will allow you to specify the line_items for sure, if you are creating PI manually each month, then you will have too keep track of what you are charging to your end user and send them the detailed receipt
You can change the recurring date using https://stripe.com/docs/billing/subscriptions/subscription-schedules ; I would recommend you to give it a read and try it out
Learn about the Subscription Schedules object and how to use it.
Ok thanks you.
Manually doing it unfortunately 😦 I will have the detailed breakdown of what they are paying available
Thanks for the help though!
yup, so you are using checkout. Yes, in this case, you need to modify the flow a bit, instead of creating the checkout session now, you would create the session only after user selects the addsons with the final line_items user have selected https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
However, you can definitely do that through Stripe API https://stripe.com/docs/api/setup_intents/confirm#confirm_setup_intent-mandate_data
do u mean to do this on the server side (as your first point)? I'll raise an issue. thanks!
@frank mountain yup, on the server side.
Hi Team, Is there any way to add multiple salesforce sites with single Stripe Webhook as endpoint URL?
I don't know - it depends on how Salesforce handles Stripe webhooks. I do suspect the answer is no though.
actually, the issue is that different salesforce org have different site url so we have to use single webhook with multiple endpoint url's
shall we use https://*.force.com/ something like that ?
@north ether you can not use wildcard in the webhook URL no. You will have to use the same URL for all the sites but in your webhook handler code, you will need a way to distinguish and identify from which site the webhook is.
Its not possible in salesforce that we can create site with same url.
then you will have to create multiple webhook with different URL in your stripe account
but they can use the same logic and it is jus the routing is different. I guess.
We can identify it by using stripe signing signature but suppose we are calling API to debit amount when dispute is create then it debited amount 5 times right?
I see so by metadata
We are storing webhook signature in custom metadata
I am lost
what do you mean by storing webhook signature ?
Webhook signature is created by Stripe
Yes we are storing that signature in our custom metadata record
You shouldn't be storing the signing secret in the metadata - the totally defeats the point of having it at all.
And when dispute is created we are matching that stored signature with stripe signature if its verified then we are doing further steps
Anyone could use the signature you're storing to modify and then re-sign the event and you'd never know it didn't come from Stripe.
Those are secrets that need to be kept safe.
Yes we are using protected custom metadata no one can use those
How are you 'protecting' it?
How to handle that logic. Suppose I configured 5 Webhook's with the same event and when the dispute is created I debited the amount but it charges 5 times because of 5 webhook configuration?
To be clear, this is really a bad idea.
Then what is the best way to verify the stripe webhook signature ?
To store the secret server-side safely and then use that when you receive an event to verify the signature.
What is a DML activity?
The webhook signing secret should be stored in some type of (secure, protected) configuration system; I'm not sure what Salesforce offers for that kind of stuff, but it must offer something.
Means Insertion or upsertion
Insertion or upsertion of what?
For storing signing secrete to salesforce so that next time we don't need to bother about the signature
Suppose there are 5 webhook's configured then whenever there is any activity performing at stripe end these 5 webhooks are hitting salesforce webservices that is wrong right
If you configured 5 webhooks, then an event would be sent to each of those webhook endpoints, yes.
I guess there is no way to prevent that right?
Hi
There's not, no.
@blazing pumice Hi!
I would like to ask about stripe. What is Stripe?
Is there any way to directly check charges dispute fee with dispute Id. So that I can put extra check there ?
Any one there?
@blazing pumice I think that's probably a better question for Support https://support.stripe.com/contact/email
Is there any way to directly check charges dispute fee with dispute Id. So that I can put extra check there ?
@north ether I think you'll find it in the Dispute's Balance Transaction? https://stripe.com/docs/api/disputes/object#dispute_object-balance_transactions
Shall It will give me all the balance transactions related to dispute Id?
It would, yes.
Reverse Transfer status and Id able to see in the dispute response by expanding charge.transfer
But not able to see the dispute fee charge Id and Refund Transfer Id in that dispute Response
Do you have an example Dispute ID you can share with me?
Sure
@mellow spear We are creating Transfer Refund: https://stripe.com/docs/api/transfers/create
Transfer Reversal: https://stripe.com/docs/api/transfer_reversals/create (Here we are able to get reversal Id in dispute Response)
Charging dispute Fee: https://stripe.com/docs/connect/account-debits
Dispute Id : dp_1J9ozZDLFJuEW2E764GYGAa7
@mellow spear calling that
https://api.stripe.com/v1/disputes/dp_1J9ozZDLFJuEW2E764GYGAa7?expand[]=charge.transfer
But here not getting dispute fee charge Id & refund Transfer Id
Apparently I can't look into that, so I'd suggest you write into Support for help in understanding what's missing here. https://support.stripe.com/contact/email
Hello all !
To display the different prices available to the subscriber, I list all the price of my product : $stripe->prices->all({'product' : myProductId})
I would like to know if it is possible to order the prices we receive (for instance "monthly" price first and then "annual" price) ? I searched on the stripe dashboard, but there is no way to order the prices
Hi! You can order or group them however you want once you receive the list.
Yes, but I was wondering if the responsable of the site I develop would have been able to reorder the prices without having to change the code
No, it would require changing the code.
Ok tks !
I think you will have to get the customer linked to this subscription and then you can list the invoices of this customer
Oh no sorry, you can do that https://stripe.com/docs/api/invoices/list#list_invoices-subscription
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 every one!
i make two payment in the same time but with different payement intent but with the same payement method! but with 3Ds secure i valid the first one but not the second so the second is incomplete.. it's possible to validate the seconde with the confirmation of the first?
thanks a lot!
$stripe = new \Stripe\StripeClient(
'sk_test_51Ht4FiHswjr8bdMVX98R5g022v4URa3P9QLPqAcvnUNXky46nUZNL7iO41sf8iGFvF66y88373ch2iqeUc3fwlEH00n7CP9fbP'
);
$stripe->invoices->all(['limit' => 3]);
this is the invoices for all but how i can pass subscription id
$stripe->invoices->all(['limit' => 3, 'subscription' => "YOUR SUBSCRIPTION ID" ]);
oohhh
😁
It's not possible to do that, no.
I would like to get the price that is reccurent and with interval "month" .
In the doc https://stripe.com/docs/api/prices/list in "More parameters", we have reccuring.interval
So, I tried $stripe->prices->all(["product" => $productId, "recurring.interval" => "month"]); but it says that "recurring.interval" is an unknown parameter.
How can I do that ?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Try $stripe->prices->all(["product" => $productId, "recurring" -> [ "interval" => "month" ]]);
Great ! Thanks !
Hi
My application requires a subscription that charges on the platform and creates automatic transfers to a connected account, also an application fee must be collected from customers.
I integrated the APIs for the same, but since my application requires an international transaction, am getting an error.
This is the error message am receiving - "Cannot create a destination charge for connected accounts in US because funds would be settled on the platform and the connected account is outside the platform's region."
Which is the best flow that I should follow?
Hello guys! I need to integrate Stripe Connect API, and support team says, that I need a business account for it, even for test purposes. What business information do I need to provide for stripe to start testing integration? Currently I'm getting error, when I'm trying create a checkout session for payment https://i.imgur.com/JbBk2U2.png
@stone panther you'd need to settle the funds locally via https://stripe.com/docs/connect/destination-charges#settlement-merchant
which requires requesting card_payments Capability for the connected accounts
there's also the options at https://stripe.com/docs/connect/account-capabilities#transfers-cross-border (under the "Transfers" heading there of .e.g creating multiple platform accounts, one per region)
hello, i've been redirected from the support team to you guys in the hope that you can help me with a query I have. I am a BA on an MVP project and we are currently using Stripe to implement our payment feature for one-time online payments (with a fixed amount) using credit and debit cards. I am currently looking at the https://stripe.com/docs/error-codes#card-declined and i am having a hard time splitting this for the online payment only, is there any technical documentation available that can be shared ? I saw stripe docs contains lots of info but no page has this split by payment method
Learn more about common error codes and how to resolve them.
@quasi ruin when onboarding the Express/Custom account you should use the info at https://stripe.com/docs/connect/testing#identity-and-address-verification-
e.g use 1/1/1901 as the date of birth and address_full_match, London, United Kingdom etc as the address
@vocal wagon can you say more about what exactly you're trying to do at a code/technical level and what the blocker is?
I think that it possible maybe if we save the payment method no? i have seen on a project that it's possible..
@quasi flicker what is possible? I don't follow what you're asking
i want make two payement with th esame payement method, and i would like make the 3Ds confirmation just one time at the first payement
and after make a little paiement of 1.90 of fees without send an other message confirmation..
@quasi flicker how much time is there between the two payments you want to make?
instantly after!
I'd highly recommend against that. You're doubling your chances of a decline and it has 3DS issues as you mention.
I would say you should just do one 'big' payment instead. Maybe use auth-and-capture with https://stripe.com/docs/payments/capture-later with partial capture, etc.
At the begin i did that to reduce the charge back
@meager hawk sure, we are trying to make a list with the error types that should be in scope for our MVP (something like the attached) but filtered out only for one time online payments and i am having a hard time matching all the info i.e which decline code corresponds to each error code and type etc.
I would like make 2 payement intent for begining and after maybe i will make 1 big
do you think it's possible? because for the moment my second payment of 1.90 is always "incomplete"
@balmy river not sure I understand why or the overall goal. Errors are mostly handled for you — our Javascript library returns a Promise with the error and a message field that you can show to the user (e.g. https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-submit-payment ) or you use Checkout and the errors are all shown on the Stripe hosted page.
The approach I would take is the other way around — start with using the test cards at https://stripe.com/docs/testing#cards-responses and see what errors you get and how you'd handle them in your code.
@quasi flicker it's possible if you use an off-session payment for the second once since it has a chance to get an exemption from 3D Secure : https://stripe.com/docs/payments/save-during-payment?platform=web#web-create-payment-intent-off-session
but as I said I highly highly recommend against it. You'd generally use that approach for if you are e.g. charging a saved card a few days/weeks after the customer saved it. Charging the card twice immediately will likely get declined by the bank or disputed for looking like a duplicate payment. It's a really bad idea.
also you might have to do 3D Secure twice anyway, since there's no guarantee you get the off-session exemption(the bank decides)
@meager hawk thanks for your reply, we need to configure those errors according to a given standard, that's the reason why we cannot just display them as they are. we thought about using the test cards as our last resort as it's still a bit confusing and time consuming towards our goal for now(defining the scope first). So, just a final try, is there not any documentation somewhere that can give a similar spit as the one mentioned above? 😦
@meager hawk i am also thinking that using the test cards will not give us the answer of " which are the errors that might never occur for the one time online payments" and therefore we might get into the situation where we configure for something that will never happen..
I still don't follow what you mean really or what this "standard" is. The documentation that exists is the pages you found, that's it at least so there's nothing else I can link you to!
I just think you're approaching this in a way that doesn't really make sense for Stripe. We don't provide a set-in-stone proscribed list of every possible outcome and you transcribe it. It's more like, we have guided docs and samples like https://stripe.com/docs/payments/accept-a-payment , you follow those, and then you organically start testing the integration with the test cards to build your knowledge of how your system behaves and how to expand it where needed. Folks often have your perspective though where they want some dedicated mapping of every possible outcome but it's really not how our product is designed.
If for whatever reason you want to not show the error.message we provide(note it's localised too, since as I mentioned they come from our Javascript library and it uses the browser locale) and want to inspect the raw error and show a message, for an MVP I'd really just catch any error and show it as "Your payment failed, try again" or similiar, and worry about making it more specific later, since it's just an MVP as you said.
thanks @meager hawk
ok i will speak about that to the project owner! i work but if the 3ds is required i have a 402 error
but i thinks i cannot do more no?
@quasi flicker yep you have to do the payment off-session and there are number of common issues there you might be running into
for example the main one is it only works if you use the 3155 test card specifically : https://stripe.com/docs/testing#regulatory-cards (the others require 3DS regardless of being previously used)
and you need to be using setup_future_usage:off_session on the first payment and off_session:true on the second, as all documented at https://stripe.com/docs/payments/save-during-payment
did you use setup_future_usage:off_session on the first payment ?
in any case you need to handle that case regardless. You can't just assume the second payment never requires 3D Secure because that's not how it works, it's not guaranteed. Any payment can require 3D Secure, it's at the bank's discretion. But you can test the "happy" outcome using 3155 and the set up at https://stripe.com/docs/payments/save-during-payment .
What's the pi_xxx of the second PaymentIntent that failed?
Hi Guys, I need support with -- Received unknown parameter: automatic_tax (Stripe Tax is an invite-only feature. Please request access at https://stripe.com/tax)
what should I do to enable automatic tax option
req_pvzaf0DOze7xXz
@twin cairn visit the page in that error message and express you interest in the beta! (the Request access button)
@quasi flicker last4: "3220" that's not the 3155 card
Hey there, what is the reason that I get the error Expired API Key provided: rk_test_*******afdad when I try to run stripe listen --forward-to=localhost:4242/webhook?
Okay thanks
@pure finch I think it means you just need to run stripe login again
@meager hawk Yes, thanks
hello, for android integration, should we host stripe on our server or there is some cloud server solutions
Hello. I am trying to wrap my head around pricing configuration. I have set up with dashboard and appears initially to be what I wanted, but now I want to use quantity transformation too. I have metered billing with tiers, but it seems quantity transformation does not work with tiers. Perhaps there's an alternative configuration where I can charge a set amount per month upto a quantity, and anything over than is charged per unit (eg first 200 units cost $50 (total) then $1 for each unit on top of that - with quantity transformation)
@jaunty scaffold hi! you need a backend server that your app can talk to yes. It's the same as any backend you'd use for your app in general(for things like your user database or order/transaction management etc). So it can be your own server you host, or you an use something like AWS/GCP/Firebase, whatever works for you.
Hi All, completely new to stripe here, im trying to create the following subscription plan via CLI & APIs to test it out if it works? But I'm a bit confused with the docs? Not sure what my next step should be exactly. I've created the products and now I would like to test them by subscribing and basically re-creating the whole flow that a usual customer would go through. since im not a web dev, im trying to re-create the whole thing using only CLI and APis Calls
any idea on how i can approach this ?
can i make the whole th ing via CLI and API;s ? if yes... then really not sure how to start ? I'm currently reading the subscription docs and understanding it's architecture but everything is web based, not sure if i can make same actions using cli only
@old canopy hi!! well, hmm, you can create a Subscription just for testing using the CLI/API, it's just not going be exactly the same as a real integration. Since in reality you need to collect the customers payment details(which means you need a web page that uses our libraries to collect it from the user) for instance. Stripe is kind of a web-based integration so I assume you're working with someone who is a web-dev on this?
You can use the test tokens/magic strings from https://stripe.com/docs/testing#cards to skip that for testing at least.
like for example I have this snippet I use in Node to quickly create a subscription
let customer = await stripe.customers.create({
email: "test@example.com",
});
let pm = await stripe.paymentMethods.attach("pm_card_visa", {customer: customer.id});
let subscription = await stripe.subscriptions.create({
customer: customer.id,
default_payment_method : pm.id,
items: [
{
plan: "price_xxx",
},
],
expand : ["latest_invoice.payment_intent"]
});
you can do the same type of thing with stripe-cli
hi thanks for ur reply, yes we have web devs but before i handle anything to them or loop them in on our payment, we internally need to understand how it works first and make sure it works for us after that i would send it to my devs, basically i create the archeticture for them
i can subscribe via cli thats isn't an issue but for example, anyway i can test out the metered usage billing and billing threhold via cli's ?
as u can see in the image i have attached above, i use Volume tiered metered pricing module on some variables, i would like to test them out via cli to see how things work exactly in the stripe world, and i would like to have the SUM of all these 3 values to have a threshold of 100$ let's say , as in every time the sum of those 3 values reaches 100$ i would to instantly bill the customer. Any ideas how i can test all of this?
What's the easiest way to get a hold of Data variables from the json? I'm trying to tell the user if they are subscribed or not. If im correct i should be able to get that from the subscription object. I'm trying to get the active variable, to check whether or not the subscription is active. Any help with that would be greatly appreciated.
@old canopy sure, it's all testable! So you're using https://stripe.com/docs/billing/subscriptions/metered-billing/thresholds ?
To trigger it you just do what you would do in reality — make an API call to update the quantity of the Price for instance : https://stripe.com/docs/billing/subscriptions/quantities#setting-quantities
e.g.
for instance , would increase the quantity and might trigger an invoice according to the thresholds set.
@ebon raptor you don't generally need to parse any JSON since you've using one of our libraries! Like it's just https://stripe.com/docs/api/subscriptions/retrieve and then you access $sub->status or subscription.getStatus() or so on depending on what language you're using
what language are you using and what have you tried so far?
C# WPF
LOL
I've mostly just gone straight from the documentation, but none of that seemed to work
then you'd generally be using https://github.com/stripe/stripe-dotnet/ and it's like
var service = new SubscriptionService();
Subscription sub = service.Get("sub_xxx");
Console.WriteLine(sub.Status);
wait a second, sub.Status, i tried that one.
but i came up with the conclusion that sub.Status was the status of the actual subscription, i ended up thinking it was the status of the actual subscription item.
Let me try again.
Thank you, yes I’m trying to following the threshold. Let me try to follow what u explained & provided & i will get back to u ! Thanks!
Hello. I have an existing simple SaaS app with users (~1k) in freemium model. Now I'll add a stripe integration with subscription. Should I create an stripe customer for every existing user or creating stripe customers only for users which buy a premium?
Just quick question, i have 4 subscriptions
- flat fee monthly fee
- metered value ( from monthly plan, customer gets 50 users, anything extra is chargeable )
- metered value ( same scenario)
- metered value ( same scenario)
Does this mean, i need to subscribe the user too all those 4 subscriptions plans at once? Cause they are related to each other. I just separated to handle tiers and different pricing modules
Hello. I am trying to wrap my head around pricing configuration. I have set up with dashboard and appears initially to be what I wanted, but now I want to use quantity transformation too. I have metered billing with tiers, but it seems quantity transformation does not work with tiers. Perhaps there's an alternative configuration where I can charge a set amount per month upto a quantity, and anything over than is charged per unit (eg first 200 units cost $50 (total) then $1 for each unit on top of that - with quantity transformation)
@gentle thicket it's up to you I would say! I would probably create Stripe customer objects for every user, because that way you have a record of them and it might streamline things when you do want to create a subscription for them since you already have some details.
Hi there, i'm working on a platform where customers can subscribe to various Stripe Connect Standard accounts using our platform. Is there a way to display all of a customer's subscriptions in a single Stripe Billing Portal?
@old canopy you can use multiple Prices/Products(that's what you mean, they're not "subscriptions", they're pricing plans basically) on a single subscription sure : https://stripe.com/docs/billing/subscriptions/multiple-products It works as long as they are the same billing period and currency, they all invoice together in a combined invoice for the subscription every period.
Sorry I’m confused now, now i have 4 products as I explained above. Main one is the subscription flat fee recurring monthly, other 3 are the values i want to meter and invoice the client on once the usage reaches 100$ threshold. R u saying those 3 products aren’t subscriptions? They are? Aren’t they? Lol
@meager hawk Ok, thank you for advice. Have a nice day! 😄
Thats the thing, the billing period might be different, as the client might reach his 100$ threshold mid month or anytime. Depends on his own usage
@languid tiger no, since I assume you mean there are N cus_xxx Customer objects across the N Standard Connected accounts? There's no concept of an aggregated customer or portal session that handles all of those at once unfortunately, you might have to build your own dashboard for that powered by making API calls across all the accounts, or maybe consider Destination Charges if that is an option
I just wonder did you see my previous messages? - It seems I'm being ignored
you're not, I just don't know the answer to your question so I was thinking
Ok. Thanks
@meager hawk that is unfortunate
So stripe told me I would get my payout the 6th but now it says I’ll get my payout the 7th. What’s up with that?
@old canopy a subscription is the combination of a Customer object and 1 or more Prices, and it results in a single Invoice being generated per billing period(as defined by the recurring field of the Price object). Your diagram above is Prices! so if they're the same recurring[interval] and currency then you can call stripe subscriptions create and pass all 4 of them in the items array. They might invoice more frequently because of thresholds but that's kind of separate. It's quite complicated so the best option here is to just try things out in test mode.
:question: @stiff bronze 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
@cosmic galleon ultimately the only way I know how to do what you're describing is by not using a metered plan and using a per-seat("licensed") one instead where you directly manipulate the qunatity (https://stripe.com/docs/billing/subscriptions/quantities) , since as you say, usage transformation is not supported on metered plans
Thanks. I'll look into that. It's a shame it's not compatible with tiers as we also need to have usage submitted within 5 mins of cancellation meaning submission is best done at intervals of <5 mins, if we did our own transformation the more frequently usage is submitted, the more loss of usage due to rounding
Is there a way to limit subscriptions to 1? I have 3 subscriptions on one product now lol
@ebon raptor there's not. Not sure why that's a problem?
hmm, well users shouldn't be able to buy another subscription if they already have that exact subscription. But i can find a work-around.
yep, you can call https://stripe.com/docs/api/subscriptions/list#list_subscriptions-customer before creating the subscription, or store information in your local database to check before creating the second subscription
Hello
I have an issue with my webhook which used to work (I did make some changes though) but I can't figure out why it isn't working
I've checked the response of the event in stripe it says this: "Trying to get property 'type' of non-object"
however, the event does have a property 'type':
{
// ...,
"type": "checkout.session.completed"
}
anything wrong with this curl ?
-u sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxcx: \
-d "customer"="cus_JlWaqQ4oxM6Df8" \
-d "items[0][price]"="price_xxxxxxxxxxxxx" \
-d "items[1][price]"="price_xxxxxxxxxxxxx" \
-d "items[2][price]"="price_xxxxxxxxxxxxx" \
-d "items[3][price]"="price_xxxxxxxxxxxxx"
Im trying to create the subscriptions with the array, im giving the 4 products i have ? 1 is flat fee monthly , and other 3 are metered products
this fails in the curl
following this https://stripe.com/docs/billing/subscriptions/multiple-products#discounts-taxes-trial-periods
Create subscriptions with multiple products, all billed in a single invoice.
@west pivot hi! what exact line of code in your endpoint throws that error?
the switch statement
you should check your own server logs/debug the endpoint code rather than rely on the error message you send back to Stripe, as you have full access to your code
what switch statement exactly? Can you share the full code you're using and what line the exception was thrown at?
@old canopy what's the error you get when it fails?
Invoke-WebRequest : A positional parameter cannot be found that accepts argument ''.
At line:1 char:1
- curl https://api.stripe.com/v1/subscriptions \
-
+ CategoryInfo : InvalidArgument: (:) [Invoke-WebRequest], ParameterBindingException + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
im in windows power shell
@old canopy remove the ':' at the end of the -u line
let me try that
$event = null;
try {
$event = \Stripe\Webhook::constructEvent(
$payload, $sig_header, $endpoint_secret
);
} catch(\UnexpectedValueException $e) {
// Invalid payload
http_response_code(400);
exit();
} catch(\Stripe\Exception\SignatureVerificationException $e) {
// Invalid signature
http_response_code(400);
exit();
}
switch ($event->type) {
// Payment is successful and the subscription is created.
// You should provision the subscription and save the customer ID to your database.
case 'checkout.session.completed':
$session = $event->data->object;
$this->print_log("Fulfilling order...");
$this->fulfill_order($session);
break;
// ...
}
same error still
would that work? I feel like that would just break it more since you need that to specify the Authentication header value
Thanks by the way
I'd suggest using stripe-cli or writing some actual code/script instead. The curl examples we give are intended for unix shells and probably don't work in Powershell directly(and I've never used it so I wouldn't know what would have to change)
It was worth a try. The error message is telling the : is wrong there
@west pivot maybe try adding some print statements to log out the value of $event and $payload to your server logs to get more understanding of what's happening?
I'll try that 🙂 thanks
seems like a strange error though, yeah! but inspecting the variables directly should help clear it up
can i use postman ?
yep!
it's a HTTP call so you can use anything that does that really. Personally I prefer to write some backend code in a script using our libraries(https://stripe.com/docs/libraries) and run that , like the Node snippet I mentioned earlier, as I find that easiest to hack on and iterate with and work with the response, but you can use any tooling that you prefer for using HTTP APIs really
Hmm, my bad seems like it was an invalid signature
the thing is i dont have any web dev experience
that's why im looking into work arounds
so in postman , i have POST for : https://api.stripe.com/v1/subscriptions
and in bearer token i give my sk token, now for the following, are they HEADERS ?
-d "customer"="cus_4fdAW5ftNQow1a"
-d "items[0][price]"="price_CBXbz9i7AIOTzr"
-d "items[1][price]"="price_IFuCu48Snc02bc"
-d "items[1][quantity]"=2
sorry body
"error": {
"message": "Invalid request (check that your POST content type is application/x-www-form-urlencoded). If you have any questions, we can help at https://support.stripe.com/.",
"type": "invalid_request_error"
}
}```
i get this
i have my SK as bearer token on postman and not in the body
i see
sec let me try something sorry
as I said earlier, Stripe is kind of a web-based integration so I assume you're working with someone who is a web-dev on this? You're going to have to build some HTML pages with some slightly-above entry-level Javascript at some point for the actual payment processing/collection of card details/presenting of 3D Secure authentication later.
For that error, you need to do what it says and use that content type(Postman has I believe a checkbox for it in their UI https://learning.postman.com/docs/sending-requests/requests/#sending-body-data)
and again I really suggest writing some code in your backend language of choice here using our official libraries, I personally think it's easier than learning how to configure things like Postman or curl to send correctly-formatted HTTP requests so you can focus your time on actual business logic
@meager hawk thanks, I figured it out. I renamed the environment variable and forgot to add it to my services file 😅
ah, I see!
Apologies for sort of using you as a rubber duck haha
hmm if the verification failed it looks like the code should have exit() 'd though
because its about to go live so I tried to separate it
so I'm not sure how it fell through and gave you a null $event (I think that's what happened?) hmm
Yep it seems like it, I think it's probably the right behavior given the code:
$event = null;
try {
$event = \Stripe\Webhook::constructEvent(
$payload, $sig_header, $endpoint_secret
);
$this->print_log($event);
// ...
} catch(\Stripe\Exception\SignatureVerificationException $e) {
// Invalid signature
$this->print_log("Invalid signature...");
http_response_code(400);
exit();
}
Thank you @meager hawk
If I have a Customer with a Default Payment Method attached, and then clone said customer using a token to a Connected Account, does it also clone the payment methods?
Because I keep getting the error The customer must have an active payment source attached whenever I try to create a subscription for that account
@languid tiger this is a bit of a can of worms unfortunately and our documentation on cloning customers is not the best so there's a few pitfalls here. Let's start with, can you share a request ID req_xxx for that error you get creating the subscription? That will help me understand your exact set up so I can help directly
@meager hawk i have created my Product as metered volume pricing, i made it from 0 - 100 units free and >100 to be 2$ per unit. but now when i tested it completely ignored the free units and calculated 2 * 150, it should have calculated 2 * 50 as the first 100 are priced at 0$
@meager hawk req_GDouR5486Tw1oW
@old canopy can you share the Subscription ID sub_xxx ?
sub_JnoRxqWDqo9Z96
I've got a bit of a strange one. For a subscription, we're using the card that fails with 3d secure. I'm told by QA that previously, they clicked the hosted invoice url and it showed the 3d secure box and they could pass it. However, on this subscription, its failed with 3d secure, but the hosted invoice URL just offers them to fill in card details. No option for 3d secure.
we also noticed the invoice went through multiple stages (oldest to newest): invoice.created, invoice.payment_failed, invoice.payment_action_required, invoice.updated, invoice.finalized, invoice.payment_failed (again), invoice.updated (again)
Is the hosted invoice URL supposed to allow for 3d secure auth? or is something else up in this process?
@languid tiger yep so you're using PaymentMethods pm_xxx which means you should never be using this stripe.tokens.create approach, per the yellow callout box on https://stripe.com/docs/connect/cloning-customers-across-accounts#creating-tokens you want to use https://stripe.com/docs/payments/payment-methods/connect#cloning-payment-methods instead here
sorry, as I said , the docs are really not great and we should just remove that tokens section entirely and I've raised it a few times.
@meager hawk cheers, i'll have a look!
@frosty coyote the hosted invoice page supports 3D Secure yes. That event sequence seems normal. I'd need to look at the specific in_xxx to say anything more here
@meager hawk The docs mention this:
Cloning supports PaymentMethods of card type only.
Does this mean I won't be able to support any other payment methods at all?
in_1JAABfKjnjltSiTlqCcdzsK0 it could be normal behavior. It's awkward as we have to wait for subscription to fail to test it so not something we can quickly test.
I guess the problem is why we arent seeing the 3d secure page on the hosted invoice url
@old canopy I think you want to use "tiers_mode": "graduated", when creating those Prices if you want it to work the way you described. "Pricing model : Graduated pricing" in the dashboard dropdown.
"i made it from 0 - 100 units free and >100 to be 2$ per unit" that's not really what you did, but it's what graduated pricing is I believe, so try that and see if it does what you expect
@languid tiger you can support them but you can't do something like create the PaymentMethod on the platform and copy them to individual connected accounts. You'd have to create the PaymentMethods directly on the connected accounts basically. It's because for most non-card methods they relies on the account being onboarded to the method and it's very tied to their merchant account and credentials.
oof
should I perhaps be using Destination Charges or Express Accounts instead?
it's my first time using Stripe and my client really hasn't said anything other than 'get it done', basically, so perhaps I'm taking the wrong approach altogether here
I can't answer that really since it's a business decision for you. Might be easier but it does change things like liability for refunds/chargebacks and you have to build more of an experience for your users since they won't have a full Stripe account dashboard themselves
Looks like I'll have to talk with my client then, thanks for all your help @meager hawk 🙂
@meager hawk you said:
it's up to you I would say! I would probably create Stripe customer objects for every user, because that way you have a record of them and it might streamline things when you do want to create a subscription for them since you already have some details.
- How can I create many customers (~1k)? There is something like batch import? I found only import from other payments provider (https://stripe.com/docs/security/data-migrations/imports) and this (https://www.youtube.com/watch?v=7HnpdHrK9A4, which is close what I'm looking for, but missing metadata field)
- There is limit of customers in stripe?
Securely import sensitive payment data from your current payment processor into your Stripe account.
Use Import2 when you need to mass import customers in Stripe from a CSV file. It may offer you additional flexibility on how you upload data into your account.
Start a free trial here: https://www.import2.com/data-import
@frosty coyote yeah this is a weird one, where when the payment attempt through the hosted invoice page fails, it detaches the PaymentMethod from the PaymentIntent. The idea is, the attempt the customer made to pay failed(here they failed to complete 3D Secure, like they pressed the "fail payment" button in the test 3D Secure page in the popup) so the page is asking them to enter a new card and pay the invoice with that one. I suppose that's how it works but it's a bit confusing and I would have hoped the page lets the customer pick their existing card and try to pay with it again but seems like it doesn't.
@meager hawk so are you saying that QA failed the 3d secure payment by clicking fail? If so thats very easy for me to go back to them with.
@gentle thicket you can just call the API in a loop really through a script you write to call the /v1/customers API, 1k customers isn't that many and you don't need a batch import or migration! And no there's no limit on the number.
We have another test subscription about to go through, so I can make sure they test the successful 3d secure route, and provided that's fine its probably not an issue
@frosty coyote yes as best I can tell when they were prompted for 3D Secure, it went through 3D Secure v2 through our test mode service and the user would have hit the "fail" button
in production that might happen if the customer can't authenticate or they enter the wrong OTP or something in their bank's UI, that kind of thing
Perfect, ill go back to them, and make sure they test the successful route. However, entering the details again after a failed 3d secure is fine by me.
yeah the idea is, the payment on the saved card failed and the customer can't complete it, but the invoice still needs to get paid, so it wants you to enter a new card to unblock the invoice payment
We did notice the invoice was updated a few times, so hoping that didnt trigger it to go into the failed route.
Hi there, I had paused a subscription for an user using resumes_at timestamp but the upcoming invoice billing cycle date didn't change! How can I have the actual date when the next bill will be collected after the paused period.
is there a way to add a usage threshold to a subscription and not only subscription item ? as i have 3 metered usage products and i want to have the SUM of all 3 to have a threshold
@bleak quartz hi! yes, when paused(depending on how exactly you did it), generally invoices still get created on the normal dates, it's just they get immediately closed instead of charging, which is why the upcoming invoice date is what you see.
How can I have the actual date when the next bill will be collected after the paused period.
you could just look at theresumes_atvalue. It's not exactly when the next invoice is, but you can say "any invoices after this date will be collected".
https://stripe.com/docs/api/subscriptions/object#subscription_object-pause_collection-resumes_at
@old canopy seems like you can set it at the subscription level: https://stripe.com/docs/billing/subscriptions/metered-billing/thresholds#monetary-threshold
i see, but i want to ignore or subtract the flat fee
as i have total of 4 products ( 1 flat fee , 3 metered usage) and i want the sum of 3 metered usage to have threshold, possible ?>
Under 1 subscription
@vocal wagon hello — what's the technical coding question I can help you with?
i have problem with transfer
@old canopy I don't think it is possible, no. Maybe you should create a separate subscription entirely with just the one flat item, and another with the 3 metered items? That's the only way I can model that requirement with the limitations of the API right now.
i see
makes sense
@vocal wagon what's the problem exactly?
Hi guys, got a bit lost, was trying to use the IRC server and realised the admins weren't about, maybe add something there so people know you're on discord now? Regardless, I wanted to ask a question about objects beginning with py. Are they only created via transfer objects? I can't find any documentation specific to "py_" objects, is there any available?
"greater than or equal to" i.e. > or = in math terms
@zenith kite hi! they are the same as Charge objects
so everything under https://stripe.com/docs/api/charges works with them
basically some type of actions create a payment instead of a charge for historical reasons — a Transfer landing in a connected account is one of them as you mention, and also non-card payments from customers are sometimes py_xxx as well
:question: @prisma sonnet 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
Okay thanks for the clarification, so if I wanted to update the description for a py object on a transfer, the best way to do that would be subscribing to transfer events rather than payment events (do they trigger charge events?)
@zenith kite they trigger a payment.created event. I think what I would do is update the description at the time of creating the Transfer as it's likely easiest!
for example this works if it helps show the concept
let pi = await stripe.paymentIntents.create({
amount: 1000,
currency: 'usd',
payment_method_types: ['card'],
payment_method:"pm_card_visa",
transfer_data:{destination:CONNECTED_ACCOUNT},
confirm:true,
expand:["charges.data.transfer"]
});
await stripe.charges.update(pi.charges.data[0].transfer.destination_payment, {
description: "test payment"
}, {stripeAccount:CONNECTED_ACCOUNT})
or you could listen to transfer.created events on your platform and then make a call to update the destination_payment in a similiar way as the second function call there (remember the object lives on the connected account so you need the Stripe-Account header https://stripe.com/docs/connect/authentication)
Yeah unfortunately we can't do that, the payment intent won't be paid for at the time that is is created
I'll add a webhook to listen to events on our side rather than the connected accounts side
true, but you can do this when e.g. handling a payment_intent.succeeded event as well or so on, basically if you're using destination charges to create the Transfer, whenever you are handling the successful payment capture, you are able to access the destination payment on the connected account and update it
I just used a direct server-side PaymentIntent creation there to have a compact example :p
Oh right, got you. Thanks for the info, will be able to work something out from here
Hello, is it possible to have a webhook like payout.created trigger for a payout from Stripe to a connected account's bank (rather than the platform's payouts)? We want to build in some reporting/clarifying emails to help our connected accounts understand what is included in the Stripe payout they see on their bank statement.
Hi,
I'm getting this error in my payment success (fulfillment) endpoint:
"type": "StripeSignatureVerificationError",
"raw": {
"message": "No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe? https://github.com/stripe/stripe-node#webhook-signing",....
I followed this guide to set up local dev because I kept getting the same error no matter what I tried: https://stripe.com/docs/webhooks/test
I tried to pass a JSON stringified param or a javascript object, still fails. Have checked all the webhook tokens to match!
I'm lost here, any advice would be appreciated.
Do you mean when a connected account gets a Payout? You'd use a Connect endpoint on the platform and listen for the relevant event type(s) on the connect account. https://stripe.com/docs/connect/webhooks
Learn how to use webhooks with Connect to be notified of Stripe activity.
You need to pass the raw body. No parsing, no JSON, etc.
If you're using body-parser, see https://github.com/stripe/stripe-node/issues/341
Thanks I'll try that!
Thank you! I feel stupid. I can see now I just create the webhook in the Dashboard under "Endpoints receiving events from Connect applications". Thanks again!
No worries! You're not the first or the last to ask that question. 🙂
Are stripe servers slow now? Loading time on localhost is extremely slow. It took 6 seconds for client to load this: https://js.stripe.com/v3/fingerprinted/js/elements-inner-card-ce2ab3b2df43cacc22d29ba9c151bfa7.js. But when i paste it in url it is extremly fast, I dont know what I can improve to make it faster.
Sounds like something is blocking the loading on whatever page you're seeing slowness loading the resource to. Loads fine for me, too.
I'd say start your debugging on the Network tab in the browser tools and see what that looks like.
The only thing i do is mounting the card elements
Hello everyone, I've setup a form for my sellers to create an Account. How exactly could I update their account to verify them ? These are the requirements due
1 => "business_profile.url"
2 => "company.phone"
3 => "company.tax_id"
4 => "external_account"
5 => "relationship.director"
6 => "relationship.executive"
7 => "relationship.owner"
8 => "relationship.representative"
What type of accounts are you using? Standard/Express/Custom?
@sick talon Custom
and live mode or test mode?
I'm currently in test mode
ok, you want https://stripe.com/docs/connect/testing-verification
A walk-through of testing different verification states for Connect Custom accounts using your test API key.
Thank you very much 🙂
Is it faster if i store this from my server: https://js.stripe.com/v3/ or it not recommended?
You cannot load Stripe.js from anywhere but Stripe's servers
The issue you're seeing is almost definitely unrelated to anything on Stripe's end. You likely have a related local issue that is causing you to see the slowdown.
Probably my internet speed
But how do i set SameSite=None and Secure in stripe cookies, i got a warning in the debug console
@meager hawk hi, can you please tell me how can I know if a subscription is paused or not?
Can you copy-paste the exact wording of that error?
I tried both:
try {
and
``` app.post('/verify-Payment', bodyParser.raw({type: 'application/json'}), async (req, res) => {
try {
Same result??? 😦
and you're certain there is nothing else parsing that body before it gets to you? A network device that inspects packets, a proxy, etc.?
It's almost always one of those kinds of things if it's not the parser locally.
Try using express.raw, bodyparser is deprecated
I'll verify. Thanks!
Thanks, Elias. I'll try
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
to I need to cast the request body to anything?
.toString() or JSON.stringify before inputting to constructEvent
Those are warnings, not errors. See https://github.com/stripe/react-stripe-elements/issues/445#issuecomment-630267786 for why they're not an issue
Nope, you do absolutely nothing to the body. You just follow https://stripe.com/docs/webhooks/integration-builder and add in the verification step
Learn how to set up and deploy a webhook to listen to events from Stripe.
(you turn on "Secure Your Webook" in the builder)
What I did was putting the code before i use these: app.use(express.json()); app.use(cookieParser()); app.use(express.urlencoded({ extended: true }));
I'll try and set up a new application to see if the error perseveres.
Are you running the current one locally on a corporate network or in the cloud somewhere?
Hi, can I be helped?
with what, specifically?
I have about 100 euros locked on my stripe's account
You want the message below ...
:question: @open skiff 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
oh, sorry. Thank you anyway
Thanks for confirming! This is correct - customers with existing subscriptions will begin to be taxed once you register in their country if automatic tax collection is enabled.
you might want to get this added to the faqs for tax. im assuming a lot of people are gonna start wondering the same
With dynamic tax rates, if I pass in let's say 2 different US - state tax rates (CA and CO) and then the person is from NY, how do I make sure that the default tax rate is applied? Right now it is applying 0% rather than the default tax rate.
Is it that if you use :dynamic_tax_rates and there is no match that no tax is applied?
Is there a way to set both an (A) default_tax_rate and also (B) an array of tax rates such that no match will apply the default tax rate?

