#dev-help
1 messages · Page 122 of 1
@lost turtle yes to support paying users you need to use Stripe Connect. Again, would recommend reading through all the Connect docs very thoroughly, it is a complex topic and a lot goes into deciding how to use Connect
@dim hearth Okay, so from what I'm hearing for our scenario is I would need to (1) create a subscriptionSchedule that just sets from_subscription , then updating that very same newly created object to have a phases.items.price as well as a start date? (sorry about the late reply)
Hi all. Hoping someone can assist me. I'm using Stripe CLI to test my webhooks integration. stripe listen --load-from-webhooks-api --forward-to localhost/API/Billing/Webhook but when the events occur, it's trying to post to the wrong url: [404] POST http://localhost/API/Billing/Webhook/API/Billing/Webhook ... like it's doubling up on the end there. Anyone seen this before?
@sage acorn Interesting, that seems unexpected. But, I think the forward-to spec is to provide a full URL
@daring lodge I've tried that as well.
If it's helpful, the only events I'm listening for at the moment are customer related (i.e. customer.created)
Almost - you'd make the first request to set from_subscription, then you'd update the schedule to keep the current phase (which has the free price) and add an additional phase that starts after the first one. That additional phase will have the paid price.
@sage acorn It does the same thing if you specify the complete URL?
@daring lodge That's correct
The mocked events work fine. This is only occurring when using the --load-from-webhooks-api
Only other info I can think of is environment, which is windows. Just installed the CLI today.
I'm not familiar with that option tbh, never used it before. When using listen i typically either let it read all events or supply an explicit type or two for a smaller test
@daring lodge looking closer at the docs... I think this is the culprit! The flag works by loading the endpoints defined in the Dashboard through the Webhooks API. It parses the path and event mapping for each defined endpoint, then appends that path to the --forward-to path provided while maintaining the event list for each endpoint.
Let me see if i can get it to behave similarly on my machine
Hah! That was it. To properly forward events from webhooks: stripe listen --load-from-webhooks-api --forward-to http://localhost and that's it!
yea i think the full url with http[s]:// is expected, so theres probably somerthing weird happening when thats missing
this error seems to suggest that its OK to use a relative path sometimes, but should be blocked for loading form the api
What it does, according to the docs is look at your webhooks you have setup in the dashboard, grabs the trailing URL, and appends it to what you set in the --foward-to which is why I was getting a doubled up URL
so after switching to just http://localhost it worked great!
I am working on recreating existing subscriptions after a migration (that Stripe will perform). I am wondering what is the way to prevent any disruption for existing customers. What I’d like to achieve is:
- customer has a subscription set to renew in 10 days
- Stripe will migrate customer data and payment methods today
- I will recreate the subscription on the new account today
- Customer will see the renewal and will be billed on the new account in 10 days
Is this code to recreate the subscription enough to achieve the above?
Stripe::Subscription.create(
customer: customer_id,
billing_cycle_anchor: old_billing_cycle_anchor,
items: [{ plan: plan_id }],
start_date: old_billing_cycle_anchor
)
@naive kettle I'd recommend working with the migration expert to get help with this to make sure you get the result you want
@daring lodge ok. I have a ticket open already. Will ask there. Thanks.
Hi Stripe folks. I'm having issues with creating a SubscriptionSchedule, specifically with the start/end dates of phases.
I have created a SubscriptionSchedule with from_subscription to an existing subscription. Following that, I am attempting to update the newly created SubscriptionSchedule. I keep getting different errors for having invalid start/end date for one of the phases.
My goal is:
- Keep the existing price ($0) all the way until the end of the current billing cycle, and
- At the beginning of the new billing cycle, switch over over to a new price (paid).
An example of an error I'm getting is: "The subscription schedule update is missing at least one phase with a start_date to anchor end dates to."
@mossy wren Can you share the request ID where you encounter an error?
https://stripe.com/docs/api/request_ids
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
But given your last message, does that makes sense based on your code? Are you missing the start_date as indicated?
hello guys !
i have one important question! I need to build a website for an association, I read that Stripe can have special offers for association, but if people give 50$, i will never receive 50$ right ?
@vocal wagon hello
@mossy wren if you're updating to add a phase, you need to include the current phase in the array. Is it possible you've left that out?
https://stripe.com/docs/billing/subscriptions/subscription-schedules#updating
Learn about the Subscription Schedules object and how to use it.
@vocal wagon there are Stripe fees involved with each payment yes, I don't know much about how pricing differences for special set ups etc
(this should include the start date of the existing/current phase)
ok thx.. if someone is working for Stripe.. it could help me.. 🙂 thx
@vocal wagon sorry it isn't clear to me what you need help with, can you clarify?
Hi! Is the stripe-signature header always included with all webhook events? I've got an incoming event and I'm not seeing the signature, which is causing issues. The event is account.application.authorized.
Hi stripe no longer lets me capture payments by default, they sit in uncaptured when using the api, it never used to do this and its not been touched on our end.
@bold basalt I need to know if Stripe can have no fees with donations for associations
@solid sigil hello, yes it should have the signature in the header. Is that on a new webhook endpoint? or an existing one?
@tropic talon can you share a PaymentIntent or request ID? Stripe wouldn't automatically change behavior like that esp for something this major
@vocal wagon ah ok for that please talk to Support at https://support.stripe.com/contact they can help with fee and pricing qs
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.
@bold basalt I'm not seeing it: evt_1JCXBsBWzDUTgImKl0Jx61TE
ok thx
I know it shouldn't but it did lol, when i rang them they helped me accept the payments but not fix the issue lol
I'll have to send it tomorrow when i am on the computer
@tropic talon yeah if you can share a request ID I can tell you what happened, how are you integrated? Checkout? PaymentIntents?
When is the stripe fee taken? Before or after the conversion and in what currency? Default or Foreign?
@solid sigil shows on my end it was sent
@solid sigil that it had the Stripe-Signature header
Do u guys all work for stripe? I'm just curious
Hmm, the capitalization may be off. Thanks!
@tropic talon the Stripe Admins and Stripe tagged folks do, yes
Oh nice!
Hi There, When is the stripe fee taken? Before or after the conversion and in what currency? Default or Foreign?
@daring lodge I don't have immediate access to the request ID. Let me see if I can set that up. Meanwhile, this is what I have for my subscriptionSchedule update params:
{
proration_behavior: "none",
end_date: stripeSubscription.current_period_end, <<<< from current Subscription
items: [{
price: existingPrice!.id, <<<< Customer's active Price
}],
}, {
proration_behavior: "none",
start_date: stripeSubscription.current_period_end, <<<< from current Subscription
items: [{
price: activeStripePrice.id, <<<< Price we want to switch to
}],
}
],```
@dapper badger fee is taken when a charge is captured and the balance transaction is created. Try creating a Charge in test mode for different currencies and see how the fees are taken
The Stripe fee would be taken before the conversion, and would be in the default currency?
Thanks!
Would be cool if stripe had there own ecommerce solution like shopify, like a platform to create stores themselves too
Man, I'm really banging my head against the wall. If you look at one of the recent event (evt_1JBq0eKVQGv4EdBV6SuTuhAL) responses, you'll see at the top of the response I'm outputting whether the Stripe-Signature header is present. Earlier, I dumped all the headers and didn't see it. If I use Postman and set some random value as the header, it works. 😕
@solid sigil wait which webhook endpoint are you referring to here? Can you send me a redacted url or the webhook endpoint ID?
I only have one webhook endpoint set up: we_1A8FA7LyXkL8xusLhjw4gjXN
@solid sigil hmm looking more ...
Ahh ok it seems to be complete @mossy wren -- but please do try to get the request ID from the headers, from your stripe dashboard logs, etc and @bold basalt can take a look at the exact request & error (or whoever is online later when you can get that).
@daring lodge Great. Regarding the request ID, is it also found in the error response as well?
@mossy wren yes it would come back in the header of the response
@bold basalt Got it. It is: req_0PfGTujBt3SM4B
@solid sigil have you revealed the webhook endpoint secret for your endpoint? I think you need to do that first
@bold basalt I'm not sure what you mean by "revealed"? As in within the Stripe admin UI?
@bold basalt Oh, I think I see what you mean. I think we're using the wrong secret when constructing the Webhook object.
@solid sigil yeah you have to reveal the secret in the Dashboard UI first I think
Ah! Yup! I'm seeing it now. Thank you!
@mossy wren I could be wrong but I think you're missing a start_date in your first phase?
@bold basalt I emailed stripe over 24 hours ago because my account was wrongly closed and I haven’t gotten any response
I’ve been waiting like 2 days now
@mental oriole ah I see, yeah unfortunately this channel wouldn't be the right channel to raise this with, the Support team would be the right one to talk to here, I'd say wait a bit more. We don't have account related access in this channel and also aren't the right team to help with account related questions, sorry!
Help needed with legacy specific error : billing_cycle_anchor cannot be combined with trials in this version. Consider upgrading to version 2018-02-05, where this is supported.
Oh alright thanks anyway
@sage burrow hello, what do you need help with? you can make a request on a different API version, depending on the API library you are using
@bold basalt, wondering if I can accomplish the same thing without needing to upgrade to a new version
@bold basalt If I include the start_date, I get a different error 💩
"You can not modify the start date of the current phase."
Am I putting in the wrong start date? I was initially marking it as "now"
@sage burrow what API library are you using server side to make requests?
you don't need to upgrade your entire default API version, you can make a single request on a particular API version too, depending on what library/language you're using
@bold basalt I see. I am using php composer to manage this. Do you know if I can use both libraries with composer?
@sage burrow you won't need to upgrade your library either
@sage burrow I'm referring to this: https://stripe.com/docs/api/versioning
you can pass an API version in the request options
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
@bold basalt great then! awesome! thanks a lot!
and make an API request on 2018-02-05 to update that Subscription
@sage burrow do keep in mind that there would be changes in the response shape that is returned to you so handle those accordingly
@sage burrow would recommend looking at the API changes doc https://stripe.com/docs/upgrades#2018-02-05
Keep track of changes and upgrades to the Stripe API.
@bold basalt sounds good! thanks!
@mossy wren try this, from the SubSchedule, pass the existing current phase's start_date and end_date as-is in your update request
Just want to make sure I have this correct. In for example a piggy bank app where a user can store their money, they should click a "connect with Stripe" button to create an express connect account in order to deposit and withdrawal?
@lost turtle so yes that will create an Express account for that person, you also have to create a payment page where end customers will come in to pay the Express accounts piggy bank. You then create a Destination Charge for $X where you transfer up to $X to the Express accounts balance.
@lost turtle also I'm not an expert at this but do double check with Stripe Terms if this is a supported use-case with Stripe
The piggy bank has an express account too?
We created a Standard account for the platform
@lost turtle the piggy bank account is the Express account.
And the customer?
@lost turtle Customer is a Customer. J
Oh, the customer doesn't need an account? Their piggy bank does
Hi everybody,
Do you know if there is a way to filter charge by payout id?
Thanks for your help ?
You can list all Balance Transactions and specify payout (see https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) - The charge associated with the balance transaction will be found at source (see https://stripe.com/docs/api/balance_transactions/object#balance_transaction_object-source)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
The customer doesn't need an account - only the piggy bank/express account does.
Interesting
So,
- they save payment methods inside the express account
- the express account isn't theirs
- they don't have to create the express account
- they can store money in the express account and get it back out
?
Sorry let me back up for a second (customers means something specific in the Stripe API and I don't want to get us confused) - You want to have a piggy bank app where your users are able to deposit/withdraw money into a stripe balance, correct? If that's the case, then each of your users must have their own express account.
Ok. We've already implemented firebase login (it's a RN app). So they should go to payment settings and click a "connect with stripe" button and create an express account?
yes
Nice
And if piggy banks are shared between users (they are more like savings jars that users help fill, like gofundme), then what about the "backend" accounts?
Should there just be one central stripe account for the app where everybody's money goes to?
That's how connect works - they would all be connected to your platform account, which the funds are routed to on their way to the express account. Also just want to reiterate - have you spoken to support about your use case yet? This is a user case I'm not entirely sure is supported by our terms of service, and it would be good to double check that earlier rather than later
Ok, good call. I'll check that with support
platform account, which the funds are routed to on their way to the express account
This part I don't understand -- where are they routed from and to?
Why not from the customer's express account to the platform, and then that in reverse when they withdraw?
Sorry I know this is probably all in the docs, but I think I have to understand the basics of my use case first, so then reading the docs will make sense to me
Otherwise I would read the docs and try to make my own plan based on that ... it would be easier to go in reverse & start with the plan and then read the docs 🙂
Really, I think it would be more beneficial to read the docs - connect has a lot of different aspects and limitations, and if you get boxed into a plan early it's likely you'll have to change it once you have a better understanding of how connect works. I'd suggest starting with the very basics of what your integration needs to do (which you already know), read through the docs, and then try and model what you need on top of what stripe offers.
For your earlier question - the reason I described the funds as first going through the platform is because that's how destination charges work (you can see charts showing the flow of funds here https://stripe.com/docs/connect/destination-charges)
Hello all. I just wanted to know if it is possible to accept Apple Pay only (i.e. reject all other payment methods) via Stripe? Thank you!
Hello! Yup, I believe that's something you could configure using Radar and block any payment where digital_wallet != apple_pay (you can read more on how to set rules here https://stripe.com/docs/radar/rules)
Hello, even though I have a support issue, I'm only a customer, and Support is unwilling to hear my case. I want to make sure I understand what has happened from a technical standpoint, since it seems to be the only way of resolving the issue faster at this rate. Is that acceptable?
Hello! You're totally welcome to ask, but depending on the question I may not be able to help
Hi everyone! Hope you're all doing well. I am attempting to test a local webhook (following https://stripe.com/docs/payments/checkout/fulfill-orders). I have CLI installed, I am getting the responses in the console fine, however I am unable to get to the point of verifying events are coming from Stripe. The line $sig_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; is where it is dying, saying HTTP_STRIPE_SIGNATURE is an undefined index. I also tried running on a live server and was getting the same error.
Okay, so I am a customer of proxy service, who uses Stripe as their payment processor. I have attempted to make a purchase today numerous times. All of which were declined. However, the most important point against this is that my banks were unable to see that any transaction request came in. The merchant said the error code indicated it was denied for "unknown reasons". This is why this issue is so baffling. Since I have used different banks and no one else I know is having these issues, i think there may be a customer account generated, in order to integrate invoices to the user accounts on the main site. As such, my "customer account" may have had a flag set on it. Is this the correct logic as to what may have happened?
By the sounds of it, it sounds like radar blocked the transaction
that would be my immediate assumption
what does radar look for when blocking a transaction? what methods are needed to reverse it.
have you confirmed that the events being sent by stripe have stripe-signature set? Do you have an event ID I can look at and double check?
Radar, essentially, looks at a transaction and compares it to other transactions on the stripe network.
At it's core, it's looking for things that may be irregular or out of the ordinary for a transaction, before it even goes to the bank for authorization
(With the goal of preventing Disputes for fraudulent card use before they appear)
then, wouldn't it be flagged as fraudulent
Not necessarily
unless the merchant is lying to me, the specific description was "The card has been declined for an unknown reason."
A stripe Radar flag internally is essentially saying to the merchant, "hey we didn't let this go through because this looks really weird"
that's not a stripe error message
^
it's not
Here is an event ID for a successful test transaction: evt_1JCv9jFXxHVtzIr1gez6Lnkl
that sounds like the merchant isn't handling the error properly on their ernd
it was a description of the error code
there's presumably some translation layer in front of that - who knows what that error actually means
gotcha
they did not tell me the exact error code
furthermore, i used that card just days ago, and it went through just fine
my mistake
Hmm... that's strange. What happens when you add print_r($_SERVER)?
which one? i'm looking at the codes, and that description is used for multiple codes
it could be any of the ones on https://stripe.com/docs/declines/codes
Understand what decline codes mean and how you can resolve them when a charge is declined.
prints the server information and looks like some settings and client information, is there something I should look for specifically in it?
call_issuer, do_not_honor, do_not_try_again, generic_decline, no_action_taken, revocation_of_all_authorizations, revocation_of_authorization, security_violation, service_not_allowed, stop_payment_order, transaction_not_allowed, try_again_later are all the codes associated with the description
so assuming it's any one of these. how should I or the merchant go about getting this to bypass radar
maybe no guarantee, but it's pretty likely
as it's being denied before hitting the bank
You really need to be pushing on the merchant to dig into why your payment is not going through, and they can escalate it to us if needed (they'll have the charge/payment IDs needed to dig into this). Without the charge IDs, we're really just speculating and don't have any definitive answers.
yeah but the merchant keeps disregarding my claims. stating i need to go to my bank
is there any way i can pull the charge ids from the payment link?
If it is radar, then it's up to the merchant to make the changes needed to allow your charge to go through but it's really up to them - their radar rules are in place for a reason, and if they decide to not accept payment that's their decision
alright then. with this, i have enough info to dig into them
Is HTTP_STRIPE_SIGNATURE included in the output when you print $_SERVER?
No it is not
Do you mind putting the output here (stripping out anything you think is sensitive) to see if I get any clues?
@silk lark This is a channel for technical/developer questions and our rules explicitly prohibit spam/self-promotion so I've deleted your last message. If you continue to violate the rules you'll be banned from the channel
I had a few test keys stored in my config, let me know if I missed removing any 😛 https://gist.githubusercontent.com/kohle/863134ffd8f1f6d518c5f298c109b50b/raw/c247a4f47ac4f70151f5d66903e9d3813c0b29b4/gistfile1.txt
Another question - what's the CLI command you're using to test?
@errant sky Also want to mention - I don't believe that output is from Stripe sending the webhook event. We send those in post requests to your endpoint, and that output has REQUEST_METHOD=>GET
hi, Iam nex with stripe. My websit eis ok, and everything ok. When I try to make a payment, (bay card or apple pay) : it doesn't work. The payment is stopped.
I tried with 3 credit cads but none works. Any solution ?
I am following the guide at https://stripe.com/docs/payments/checkout/fulfill-orders, so I have CLI open with the listen command forwarding to my localhost path
Are you seeing any errors? Do you have a request ID we can take a look at?
hmm yeah I see the get in there now
Where can I check that ?
You can check for that in your dashboard
ok, I see that :
État de PaymentIntent : requires_payment_method
What specific listen command? Is it stripe listen --forward-to localhost:4242/webhook or have you changed localhost:4242/webhook to something else?
Can you send over one of those request IDs? It'll start with "req_"
I see that :
"id": "in_1JCv5GLXvLg5O5d4TiZCHoP3"
You have failing requests on your account saying that you cannot make live charges - I'd suggest contacting support at https://support.stripe.com/contact and them to fix this for you
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.
thanks a lot !
stripe listen --forward-to localhost/includes/checkout/handler.php that is the path thats running locally, just default port 80
Something small must be wrong, but I can't seem to think of what it could be - what are you seeing in the console output?
In the CLI? Looks correct:
That looks like the event is forwarded successfully to the handler.
Are you seeing any errors in your PHP code or they are not called at all?
The POST returns 200 so meaning it is running correctly
its failing at catch(\Stripe\Exception\SignatureVerificationException $e) for invalid signature
ooo
That screenshots suggests that you are returning a 200 back to the CLI though
Make sure that you're using the webhook signing secret given to you by the CLI rather than the one from your dashboard
thats the whsec_?
Yup
Ah, so I think that might have ultimately been the issue and I had fixed it without realizing when I followed the steps in the guide again from scratch.... think I have that all set now 😛 thanks guys
Hello Stripe! I've a question about Subscription & SubscriptionSchedule.
If I have a SubscriptionSchedule that was created with from_subscription and subsequently updated it with new phases, what will happen to the original Subscription's billing period if I am to delete the associated SubscriptionSchedule at a later time?
That's a good question, let me ask around
@mossy wren When you say "delete" do you mean release or cancel?
@bleak breach Actually, I'd like to know which one I should use. Here's what we're trying to achieve:
The scenario is this. A User is subscribed to a $0 Price plan. The Product Owner of that Subscription decides to increase the Subscription from free plan to plan with fee. By default, Stripe resets the billing period; however, we would like to have the User finish the the billing cycle at $0, then start billing them at the new plan with fee beginning the next billing cycle.
I was able to achieve this by creating SubscriptionSchedule. However, the problem now is when the Product owner decides to set the plan price back to $0; the plan with fee remains in place even if I updated the User's Subscription object (subscription.items[].price) with the new $0 price.
My instinct is to cancel/release the SubscriptionSchedule, but not sure if I'm on the right track.
I also wonder if the end_date from Subscription is altered because of the SubscriptionSchedule.
I think you're on the right track. By releasing the Subscription Schedule the subscription will continue on with the settings from the last used phase. Then you could update the released subscription to be on your free plan
Difference is that canceling the subscription schedule will also cancel the underlying subscription, releasing stops the schedule but the underlying subscription continues
Perfect, I'll go ahead and work with releasing the Subscription Schedule. Thank you so much.
Hello everyone. I've had some people email me after paying a donation concerned that their statement says it's a "recurring" charge. I found this page about the subject: https://support.stripe.com/questions/non-recurring-charges-show-as-recurring-on-customer-bank-statements
What I'm wondering is if there's an option or something I can set on my payment intent which will avoid saving info and as such avoid showing up as a recurring charge?
Can you show how you're currently creating the PaymentIntent? It'll be easier to point you to the relevant field
Of course!
const paymentIntent = await stripe.paymentIntents.create({
amount: Math.trunc(args.amount * 100),
currency: 'usd',
// Verify your integration in this guide by including this parameter
metadata: { integration_check: 'accept_a_payment' },
});
Are you attaching a customer to this PI at any point?
Hmm, possibly, but maybe not on purpose?
const billingDetails = {
name: name,
};
const curUser = firebase.auth().currentUser;
if (curUser) {
billingDetails.email = curUser.email;
}
const result = await stripe.confirmCardPayment(props.clientSecret, {
payment_method: {
card: elements.getElement(CardElement),
billing_details: billingDetails,
}
});
(This is the frontend)
I add an email to the billing details for reference
I'm not sure if this ends up attaching a customer or not
Hi @all here....i have days trying the webhook integration for subscriptions. I have try at least 10 diferent templates, with all the templates i got error 500. I have write also to the support staff from the hosting company, but their have no clue why it is happen.....can anyone here give me a hook...
Doesn't look like you're setting up the card for recurring charges here, so I'm not sure why your customers are seeing "recurring" on their statement
What's the exact error you're getting?
Hmm okay. Strange. I'm pretty sure I'm not doing anything else
Can you provide me a PaymentIntent ID of a payment where your customer said they saw "recurring"?
I'll try to find one, sure
@bleak breach pi_1H8jO1IOTcCTLqtf0ifVeqrS should be one. This person emailed me about it
(It's a bit old, hopefully that's not a problem)
Hello! Can anyone help me to add stripe api code into wix embed? Cuz it needs to enter the HTTPS.
Something like this
If you aren't a developer yourself then this might be difficult. You could start by looking at the docs here: https://stripe.com/docs/checkout/integration-builder
Explore a full, working code sample of an integration with Stripe Checkout.
If you want a no-code solution then I recommend looking at using Payment Links instead: https://stripe.com/docs/payments/payment-links
Learn how to create a payment page and embed or share a link to it.
Hmm that shouldn't have shown up as "recurring". Would you be able to write into support? This will require more investigation and I want to make sure you get a response: 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.
Sure. Is providing them with the PI ID and the context sufficient?
Yep that should do the trick
Cool. Will do. Thanks for the help!
You can tell them that you spoke to Stripe engineers on Discord and they are the ones who told you to write in
Thanks a ton!
But seems like I can't find it in my dashboard.
Is it correct?
It would be under products
generate a product first, then from that products page you can create a Payment Link
though i'm genuinely confused as to why this dashboard seems so... Off...
Yeah found that!
thanks
I’m trying to use the prebuilt ui (multi-step) outlined the link below@stripe/stripe-react-native
@stripe/stripe-react-native
https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet-custom
However, not sure how to pass the cart details for validation, and after validation, should I save the cart details and tie it to the payment intent id on the server database or can it be passed with the web hook payment complete event.
I’ve seen mentions of stripe checkout for web which I’m not using here hence the cart in my situation has extensive details and modifiers.
The React Native SDK isn't really meant for cart manipulation, that's something that you'd have to build on your own
so I want to make sure i'm not reinventing the wheel. My plan is to include the cart details when calling the backend to create / update the payment intent, It'll be validated, creates the payment intent, then saving the cart details along with the payment intent id in our database. Once the payment hook is successful, the cart details will be published to our backend workflow. Does that sound right?
previously when we used tipsi-stripe, the cart was passed along with the card token to our backend, which is validated, token charged, and then goes straight to our order processing work flow, now with the payment intent the processes have to be separated
But if I don't want to go another checkout page. Just once click the button 'Buy Now' and can enter the credit card directly on the same page. Is it possible to set this?
I think what you need could be achieved as simple as changing a parameter when you create the payment_intent https://stripe.com/docs/payments/save-during-payment
Learn how to save card details during a payment.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
When you pass setup_future_usage in your payment_intent creation, Stripe will validate and setup the card. Then you can simply pull the payment_method from the Payment_intent and saved it to a customer.
Sure, but it requires development work on your end: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
Securely accept payments online.
it's possible but can be hacky, e.g. if using apple pay or android pay, it'll go as follows: payment intent created, customer click place order, confirmPaymentSheetPayment(),
customer pick apple pay, and submit, in this situation it was submitted to the stripe api, not to our server, so we still rely on the webhook order successful and we need the cart details
@tranquil bough I might misunderstood your ask. You are referring to Card Details. Have you consider using the metadata
remember seeing it but didn't look into it
yeah, before you calling confirm payment, you may conduct an extra call to update the payment_intent with metadata https://stripe.com/docs/api/metadata to include the cart information. Then you don't need to worry about the data synchronisations as the PaymentIntent will be the source of truth where you can get the cart infor and the payment status
if metadata can handle my cart details, then u made my day (night here) 🙂
👍
To answer your question
Which option do I use to link to my app
For example when they open the app I want them to be able to tap the photo icon and it take the, to y stride checkout
Please help me connect the dots
@zinc radish for building apps, the recommendation is to use our Mobile SDK https://stripe.com/docs/payments/accept-a-payment?platform=ios
Securely accept payments online.
It has a step by step guide on how you can achieve that. What the screenshot you are showing is more for web implementation although you could potentially show a page in a webview;
Unfortunately metadata won't work for carts. Metadata is key value structure with a limit of 500 character max value
what is your cart structure? you can have multiple key value pairs. Are you storing the JSON string in a single key<>value pair?
or your product name is longer than 500 characters?
it's a ntested json object, e.g. large pizza, details, extra pepperoni, no sauce etc...
can also be multiple items and multiple vendors
in one cart
Metadata is useful for storing additional, structured information on an object. As an example, you could store your user's full name and corresponding unique identifier from your system on a Stripe Customer object. Metadata is not used by Stripe—for example, not used to authorize or decline a charge—and won't be seen by your users unless you cho...
ooo, I think you can
- either store an ID pointing to your internal DB so that you can get the long details out
- or you can be creative in terms of representing the JSON object
e.g.
{pizza: {details: {extra Pepperoni: true, sauce:false}}}to
pizza.details.pepperoni: true
pizza.detaisl.sauce: false
something like that
yeah, was trying to avoid that 🙂
just dump the cart into strip, and i'll get it with the order confirmation
but now i have to keep a copy of every cart/payment intent into the server
I don't think there is out of the box solution on the API. You will have to maintain the mappings somehow as you cannot really simply dumping the JSON into stripe API.
Agree
I'm having trouble using the Android SDK after user logout. The behavior I see is that when a user logs out of the current user session and logs back in with a new session, the Android SDK remembers the previous stored payment method from the previous user session. I cannot figure out how to properly close/clear the PaymentSession (https://stripe.dev/stripe-android/com/stripe/android/PaymentSession.html). Is there any guidance on handling this case?
HI team,
please review the screen shot i want to display discount after my tax so it's possible i am using checkout session
$session = \Stripe\Checkout\Session::create([
'payment_method_types' => ['card'],
'payment_intent_data'=>[
'transfer_group'=>mt_rand(000000000,999999999),
],
'line_items' => [[
'price_data' => [
'currency' => 'gbp',
'product_data' => [
'name' => $brief->title,
],
'unit_amount' => $invite->budget*100,
],
'quantity' =>1,
'discounts' => [[
'coupon' => 'ojOJ4wnc',
]],
]],
'mode' => 'payment',
'success_url' => url('/').'/order/success?session_id={CHECKOUT_SESSION_ID}&invite_id='.$value.'&brief_id='.$invite->brief_id.'&pr_id='.$invite->pr_id.'&title='.$brief->title,
'cancel_url' => 'https://example.com/cancel',
]);
Hi Team, While retrieving the Dispute we are getting chargeId starts with 'ch_' is there any way that we can get 'py_' Id for charge.
When We are trying to get Dispute for connected Account we are getting 0 disputes
?
(completely unrelated note: I ADORE your logo)
I don't think you can apply taxes post discount, cause of how VAT is calculated
@dreamy karma VAT is calculated before discounts, as @meager oasis said
Hi @bleak breach @meager oasis , While retrieving the Dispute we are getting chargeId starts with 'ch' is there any way that we can get 'py' Id for charge.
When We are trying to get Dispute for connected Account we are getting 0 disputes
?
Objects that begin with ch_ are charges, which mean the payment was a card payment. Objects with py_ are payment objects, which mean it was a non-card payment (e.g. iDEAL). You don't have any control over the prefix of objects
Ok
Hi @bleak breach is there any way to calculate payement exchanges rates ?
any instruction on how to run this inside a wordpress site
I have setup on local but having issues with setting up on siteground server
Hi @bleak breach @meager oasis
Actually when I am retrieving charges with Stripe-Account = connectedAccountId header then I am getting payment exchange rate only when I am expanding "expand[] = data.source_transfer.source_transaction.balance_transaction" in that case when I use limit 100 then facing "ERROR: First error: Error while communicating with one of our backends. Sorry about that! We have been notified of the problem. If you have any questions, we can help at https://support.stripe.com/."
You mean like FX? No there's no way to do that with Stripe, you'd have to use a 3rd party service
Can you share the request ID of this particular request? Looks like req_123
no VAT is calculated after discount it should be 400
I'm afraid I don't know enough about how VAT works with Checkout. I suggest you write into support directly: 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.
@meager oasis VAT is 20% Exclusive and it should be 400
@bleak breach you can consider + 20% tax on 2000
Request Id : req_vVsyXUHHRV4BpP
Taxes are on the amount accessable value and not on the value of the commodity or service. Hence, taxes are charged on the net amount, i.e., amount after allowing discounts, and not on the Gross Amount.
You can't legally collect VAT before you apply a discount, because at that point, you're technically miscalculating VAT.
@meager oasis
Amount= 2000 pound
Vat = 400 @20%
Discount = 50 pound
Total = 2350 pound
i actually want this
You can't legally do that.
This particular request failed due to the error "This property cannot be expanded (source_transfer). You may want to try expanding 'data.source_transfer' instead.". It's because the return object is a "list". you should try expand: [ 'data.source_transfer.source_transaction'] instead
That's the issue, because VAT has to be charged on the accessible amount. All VAT must be calculated after any discounts, otherwise it's a miscalculation of VAT, and at the end of the year when you file with HM Revenue, you're going to face a whole new nightmare of VAT issues
Stripe won't allow you to do anything that can potentially be illegal, or incorrect
Like that
You're missing a [] for that first expand. Should be expand[]
@meager oasis got it and one more thing i also want to charge stripe processing fee to client so how i can do that as you know that i am using Session checkout
Follow this calculation
That ☝️ , then add that fee in as an application fee here: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-application_fee_amount
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Like That
Yep, looks like it worked, no?
Its worked but some times I am facing communication issue
@young ibex I can't seem to dismiss the keyboard on outside tap for the CardField component. I saw your answer here https://github.com/stripe/stripe-react-native/issues/334 but the link you mentioned doesn't show the CardField nor the StripeContainer. can you clarify your response please? thanks!
I'd also like to point out @dreamy karma that passing on the stripe fees may be illegal
Its worked but some times I am facing communication issue
P goal and p fixed = ?
under the new European directive PSD2, merchants are prohibited from charging consumers may not charge consumers additional fees for paying via credit or debit card. It applies to customers whos bank or card issuer, as well as the processor (I.E. Stripe Payments) are both located in the EEA
PGoal = Principal transaction amount (The charge after vat, in this case, 2340GBP)
- the fixed fee
divided by 1-(percent fee you pay stripe)
i will talk with my lawyer about this.
let me sketch this out in scope really quickly here
thank you if you can
We in canada can't either, so our work around is, we don't charge fees. We just offer a discount to consumers who pay with cash, equal to the transaction amount less stripe fees
I am not a lawyer, so i'd strongly recommend that you do bring the PSD2 directive up with your actual lawyer
this business will be in UK
I think the UK is now outside of the EEA, post brexit
Not sure about that though
Nope!
post brexit, the UK is no longer part of the EEA
(as always, confirm with your legal representative)
@meager oasis can you sketch the formula according to this
2000
discount is 50
VAT is 400
i will definitely confirm
Let me find a notebook and sharpie quickly
thank you!
What do you mean by "communication issue"?
your VAT calculation is incorrect by default here
As I said before, vat has to be calculated based on the accessible amount
which is the amount following any discounts, rebates, and otherwise reductions in price
you cannot discount VAT. ever.
i'll show you how if we calculate it your way afterwards
or rather, the why that doesn't work
yes show me correct way then i will show it to owner of project
any instruction on how to run this inside a wordpress site
I have setup on local but having issues with setting up on siteground server
I've just realized my phone is dead and I wouldn't be able to take apicture of this if i wanted to
let me open up photoshop quickly
@meager oasis can you confirm what is accessible amount?
The accessible amount is the actual amount of the product
after all discounts, rebates, and anything else to modify that price
If it helps, think of it this way
Pretend VAT doesn't exist for a second (wouldn't it be nice?)
Now do all your price calculations
we start at 2000 GBP
apply the 50GBP discount
we're now at 1950GBP
that's our Pre-VAT total.
we take that number, and multiply it by 0.20 to get the amount of vat to be charged
that's 390GBP in VAT
Altogether, we have our total Transaction of 2340. How much the business is to receive, inclusive of VAT
@meager oasis what about this?
Still working on it
Good afternoon, I'm afraid I've a stupid question. Is there a way to process a token generated from a different platform. My case: we have 2 platforms (a legacy one, and the new one). We would like to interchangeably process token generated from the other platform (while we are migrating everyone on the new platform). I'm pretty sure it's not doable for obvious reasons, but I'd rather double check.
oops wrong channel
Correct channel 🙂
So in the UK, you're presented with an interesting dilemma
All objects created by Stripe can only be manipulated by the account that created them. The only way around this is to use Stripe Connect, which allows one account to make API requests on behalf of another. In your case it sounds like you'd want to share PaymentMethods between accounts, which can be done via Connect: https://stripe.com/docs/payments/payment-methods/connect#cloning-payment-methods
Considerations for Stripe Connect platforms adding support for new payment methods using the Payment Methods API.
European Cards (Including the UK) pay a fee of 1.4%+20p, while non European cards pay a fee of 2.9%+20p
I'll make an equation for both
yeah the issue is, it's not about the connected account, ideally, I'd like a on_behalf but for a platform account 🙂 . I have let's say one user generating a token using the puiblishable key of one platform, but then the payment would be done by another platform
That's not possible unless you connect the two accounts together
@meager oasis sure i am waiting
Wait, we can connect platform accounts together, the same way as regular stripe accounts ?
Yup! It would just be Standard Connect
any instruction on how to run this inside a wordpress site
I have setup on local but having issues with setting up on siteground server
Arg, almost, one of the platform account is a Custom Connect 😦 Anyway, Thank you Paul for the answer 🙂
Thank you for the reply tho 🙂
any instruction on how to run this inside a wordpress site
I have setup on local but having issues with setting up on siteground server
@bleak breach
HI there.
I need to do an export of my connected account with the dashboard;
The tools returns an error "Whoops! Something went wrong with your export. We're looking into it now, so please try again in a few minutes, or get in touch with our support team."
Run what exactly inside a wordpress site?
For help with that you should contact 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.
@meager oasis thanks and i talked with owner of project about discount and VAT and she said
2000 GBP is project price
because freelancer is UK registered business so the VAT @20% is 400GBP so the freelancer is not giving discount , platform want to give 50GPB discount to client. freelancer don't want to loss money.
That's
Hm.
Who's collecting the VAT, you or the freelancer
who collects the VAT, and who pays the bill
freelancer
the freelancer
we have 3 role
client
plaform
connected VAT account
Stripe Checkout in any case will not apply the discount after VAT
hello, I will need information, a creator speaks French?
Ouai Je parle Français
so how it's possible and what is the best way
Mais je ne travaille pas pour Stripe
- describe this entire situation to the VAT accountant in full. just to cover your ass and ensure you won't have the feds knocking at your door for VAT misreporting
ah mince, sait-tu si on utlise tripe pour une boutique en ligne, comment cela se passe, ils nous ouvrent un compte en banque et nous envoie une carte de crédit directment?
- Calculate VAT before sending the transaction to stripe
Euh... Non. Stripe faites les paiments par virement bancaire. Vous devez avoir un compte bancaire déja en place pour que vous receviez les paiments du Stripe.
ok super merci beaucoup!
stripe self hosted checkout
The quickest way to build conversion-optimized payment forms, hosted on Stripe.
There's multiple ways of doing so. What do you plan to sell using the checkout?
subscriptions
fixed price monthly
I have setup one of repo on local
and it is working
but how to move this to siteground hosting?
with a live url
instructions are only for local setup
@odd fjord There are many ways to do it, have a look here: https://kinsta.com/blog/stripe-for-wordpress/
@meager oasis thanks for your help
I know how to setup on wordpress site as such using various plugins
but I am not going to setup a wordrpress site, will be linking another site with this for payment only
so user will click a button on site A and land on landing page with subscription option
buy it and redirected back to Site A thank you page @bleak breach
Sorry for the delay, I fell asleep on my code. It's working.
Thanks a lot.
@odd fjord I'm not sure what your question here is. You need to be more specific in what problem you're facing
Hello! We manage to get objects, but when we try to update the record (add metadata), we get an error.
parameter_unknown - {"metadata":{"Tax":"11.82", "Source":"Lens_spaces", "Products_SKU_List":"LENS-SPACE-MO"}}
Can you tell me what we're doing wrong? We tried to update a charge using Apex. Application - Advanced Rest Client
Do you have request ID I can look at?
Yes, It's in test mode: req_ChTUPB23ePf5cu
Thanks.
Here's another try. req_jw8oY4KQxzlpxX @bleak breach
Here's what you passed to the Stripe API:
{
{"metadata":{"Tax":"11.82", "Source":"Lens_spaces", "Products_SKU_List":"LENS-SPACE-MO"}}: null
}
It looks like you stringified your metadata before sending. You'd want your request to look like this:
{
"metadata": {
"Tax":"11.82",
"Source":"Lens_spaces",
"Products_SKU_List":"LENS-SPACE-MO"
}
}
Ok forget about wordpress , how to setup stripe self hosted checkout on a server not local
Same issue with that second request @teal cobalt , here's what you sent:
{
{metadata:{Test:"test"}}: null
}
That's a "how long is a piece of string" question that no one but you can answer. What hosting service are you using? What backend/framework? This is something you'd figure out on your own
I created a webhook that gets triggered on payment_intent.succeeded (so far everything is fine)
I'm using Checkout session for the payments and send a few metadata infos but in my webhook i dont get these infos, do I need add another event to get these kind of infos?
Welcome back! What did you attach the metadata to, the Checkout Session object? If so the metadata will be on the Session rather than the PaymentIntent
PHP as server, apache
site ground hosting
ty, I'm using the NodeJS API wrapper and the stripe.checkout.sessions.create method there i pass the metdata like below
const session = await stripe.checkout.sessions.create({
payment_method_types: ['card'],
line_items: [
{
price_data: {
currency: 'usd',
product_data: {
name: product.name,
},
unit_amount: product.price * 100,
},
quantity: 1,
tax_rates: [...taxIDs],
},
],
client_reference_id: user.ID,
customer_email: user.email,
metadata: {
userID: user.ID
},
mode: 'payment',
success_url: `${process.env.HOSTSERVER}/index`,
cancel_url: `${process.env.HOSTSERVER}/cancel.html`,
});
with payment_intent.succeeded event i confirm the payment process and update the DB but I need more infos to do that
I recommend listening to the checkout.session.completed webhook event instead, that way you can get the metadata directly from the event payload. If you listen to payment_intent.succeeded it's harder to link that payment back to the Checkout Session. The Session will have the PaymentIntent ID included that you can then retrieve if you need more info: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_intent
I wasn't sure about if checkout.session.completed gets triggered both canceled or succeed
I have a broke english i hope you understand me ✌️
No worries, it's a common misconception. There is no "checkout failed" event, only "checkout succeeded" which is checkout.session.completed
thats awesome ty
Trying that. Thanks @bleak breach
alguien sabe por qué no me permite verificar mi cuenta???
:question: @vocal wagon Have a non-technical question, account issue, or need one-on-one support?
We wish we could help, but this community is focused on developers and technical discussions. Our support team will be able to assist you better than we can: https://support.stripe.com/contact
I have an question but it's not about programming,
How does Stripe handling using fake Credit Cards? in my country there exists something like "3D secure" thats sending a OTP to the card holder via SMS does stripe support something like that?
The question why I'm asking is I will sell web scripts over my website and its possible that they get leaked and mostly leakers uses fake cards so i want protect me against them
AH. Fraud Prevention.
Stripe not only supports 3DS, it may be required in some cases. When a transaction is initiated, and stripe asks the issuing bank "are the funds available", in some cases, the bank will force 3DSecure before the transaction will even go through
Stripe also offers Radar, which prevents fraud before it even hits the bank
does stripe sessions handle this or do I need such kind'a option that says to Stripe you are free to use it?
Stripe Checkout is the optimal condition for stripe radar
ty ^^
@livid blade it sounds like you might be referring to card testing: https://stripe.com/docs/card-testing
When using Checkout, we have built in mitigations to prevent card testing. One such mitigation is that if we detect card testing on your account we automatically enforce a CAPTCHA on the Checkout page for your account
Still getting the same error @bleak breach
req_STuKyMVE9NfdL0
You're still nesting the payload which causes weird things to happen:
{
{ "metadata": { "Tax":"11.82", "Source":"Lens_spaces", "Products_SKU_List":"LENS-SPACE-MO" }}: null
}
your code is inserting the whole block { "metadata": { "Tax":"11.82", "Source":"Lens_spaces", "Products_SKU_List":"LENS-SPACE-MO" }} as the key, with a value of null
I'm very sorry to ask this. I'd like to know what webhook event I should listen too when a payment fails and need attention from the user to either change their card or confirm sca. Is there any documentation on this?
Are you using Checkout or PaymentIntents?
We're using our own integration with PaymentIntents and Setupintents
and we have a subscription service too
If you specifically want to know when a PaymentIntent requires action from the user, you'd listen to payment_intent.requires_action: https://stripe.com/docs/api/events/types#event_types-payment_intent.requires_action
thanks @bleak breach
@bleak breach Great stuff, I've been reading around and I think 'invoice.payment_action_required' and 'invoice.payment_failed' are two events I can listen too that would help me to prompt our users on whether we they need to take action. At this point should I consider the subscription not active in that case and make sure they do not get the product?
Have I got the idea of how those events are supposed to be used correct? And does the requires_action state do more than identify whether sca has failed? For example does it enter that state when the card has expired
I would check the subscription's status directly: https://stripe.com/docs/api/subscriptions/object#subscription_object-status
If it's anything but active or trialing I wouldn't give access to your product
invoice.payment_action_required specifically means that the payment hasn't failed yet, just delayed because the user needs to get back on-session to complete the payment (likely due to 3DS). If the payment method were expired you'd get a invoice.payment_failed as it'd be a hard decline
@bleak breach That's brilliant, thanks
@bleak breach Sorry to bother you again. Is is better to listen to the event that triggers when a subscription enters the subscription.past_due status rather than both of the above invoice events?
because doesn't a sub transition into the past_due status when either of those events are trigger anyway
It depends on what behaviour you want when a payment fails really. If you only want people to have access if they've paid up, you'd listen for that event. If you want to only disable access after all payment attempts have been exhausted you'd listen for customer.subscription.deleted
@bleak breach ok so could I listen to the 'invoice.payment_action_required' event for when sca failed (to being the user back on session to confirm) at this point the subscription might still be active, right? And the past_due subscription change when all payments attempts have been exhausted to bring the user back on session still to perhaps update their payment method
@vocal wagon the past_due status happens after the first failed payment. But otherwise yes what you said is what I'd recommend
hello everyone
how to change the email template on stripe?
@remote warren you can't really tweak the template beyond a few things like the language or the logo
so any other way to send custom emails when Successfully Billed (Recurring)
Hey! If I set auto_advance to True when finalising an invoice, it should proceed to charge the payment method associated to the payment intent, right? Because now it stays in "incomplete payment" and I am using sepa...
@remote warren we recommnd just using our official emails which any merchants use today! And otherwise you'd really build your own email integration instead
@rigid ridge The payment doesn't happen immediately, it happens one or two hours after finalization unless you call https://stripe.com/docs/api/invoices/pay yourself
Also it's possible that it can't be paid (hard to say but if you have an example invoice id in_123 I can look)
in_1JD4PfJ1CItnDVH67UTjJTuK
@crimson needle i want to send custom text in email any other way to do that custom code anything..
okay so it was just finalized minutes ago. If you want to pay it, you should call https://stripe.com/docs/api/invoices/pay or pay in the Dashboard. Otherwise you wait an hour or two
@remote warren what do you mean "that custom code anything"? Are you a developer yourself?
ahh ok well in that case the only event I need to listen for is the past_due event rather than invoice.payment_failed and invoice.payment_action_required. The functionality I'd like is to bring the user to our site whenever the payment fails for whatever reason.
Hi there~
Now, I'm following this way for Apple Pay.
https://stripe.com/docs/apple-pay
And I want to enable to pay with JCB.
I found out how to set with paymentRequest here.
https://support.stripe.com/questions/integrating-jcb-payments-on-japan-based-stripe-accounts?locale=en-US
But I don't know how to set with presentApplePay . Could someone help me?
@vocal wagon there's no "past due event" though. There's customer.subscription.updated where many things can be updated and sometimes it will be the status to past_due but I would absolutely listen to both invoice.payment_failed and invoice.payment_action_required
@blissful bear what do you call presentApplePay exactly?
Hello, can I ask question about webhook here?
@peak flame sure thing!
I've got it from useApplePay().
When I do: stripe.exe trigger invoice.payment_succeeded , I get some 401 status, why?
@blissful bear sorry you're a bit cryptic, what is useApplePay()?
No signatures found matching the expected signature for payload
@peak flame it could be many things in your code but usually it means you are not verifying the signature properly in the code. Maybe you have the wrong secret? Or maybe your code is not properly using the raw payload we send and instead some modified version. What programming language do you use? What's your framework?
@crimson needle PHP, here is the code: https://pastebin.com/xZAU6gE4
I'd recommend starting to log things in that code: do you get the right secret? Do you get the right signature? what's in the raw payload?
sure but logging the raw payload would help
Around 4 request has 401 status
one thing that can happen sometimes is an encoding issue
This is it.
https://github.com/stripe/stripe-react-native/blob/14709da7e11907660650f2ecbade8c43cd6306c7/src/hooks/useApplePay.tsx
And it's shown with the example here. https://stripe.com/docs/apple-pay
@crimson needle payload is json , i think
@blissful bear ah so you're using the React Native SDK, that's the piece of information I was missing. Looking
@peak flame I know it's always json, but you need to proactively dump all the values so that we can debug this
Yes! any idea?
@blissful bear not yet but I am looking into it
in iOS at least you do it by calling StripeAPI.jcbPaymentNetworkSupported = true , but I'm not sure about React Native yet
Thank you for your help😇
yeah I don't see any support in the code for the various networks
seems like a missing feature request
@crimson needle https://pastebin.com/ncqVFpND , payload that I have written to a file.
hum why are there so many? which ones are failing? You said it was only 4 so I'm confused
I have printed after: $payload = @file_get_contents("php://input");
sure but why are there so many? Can you just do one unique one that returns a 401 and nothing else? Can you also confirm you get the signature and the secret?
@crimson needle https://pastebin.com/ku4AQqwp , 6 occurence of 401 status
Here are six json, I think when SignatureVerification exception occurs
I'm sorry, I am trying to help you debug just one unique one if possible
Right now I have zero idea what it could be unfortunately, the only way is to go step by step, log the secret, log the signature, compare it to what I see on my end and advance slowly
thanks!
Hello everyone
how can i update the subscription with new price on specific date?
is it possible to retrieve the actual bank name on sepa_debit payment methods or just the bank code?
@crimson needle Should I log endpoint secret?
This is the endpoint secret: whsec_uj.................Mm
I am doing: stripe.exe listen --forward-to http://localhost/project/strip/hook
Hi, I think I already know the answer to this, but worth a shot.
We didn't have a particular webhook enabled, roughly 20 or so payments have gone through before we noticed. Is there a way to retrospectively get the payment_intent.succeeded webhook to be sent out for those payments?
Guys some doubt regarding stripe ACH Payments
We have our main stripe account where we have lot of connected accounts.
If we opt to go with Plaid integration do each of our connected accounts need to connect their account to plaid? Do each one of them need to have a plaid account?
@rigid ridge yeah don't share the secret here but make sure it's the correct one. Does it match what you get on an event that is successfully parsed? Do you have an event id that works and one that fails so that I can compare them?
@cosmic tide no that's not possible though if they are less than 30 days old you could use the Stripe CLI to force re-send them (but you need to look up the event id in the Dashboard)
@fickle vessel depends on your integration. But usually no, you connect your own account (the platform) to get bank account details there instead (and you pay the Plaid fee)
just so I know I'm following, even through the Stripe CLI, I CANNOT force it to resend a webhook it never sent initially?
I'm confused, what does the secret have to do with the bank name?
Ok then the liability for the collected bank account details of our connect customers will fall in our plaid account right?
@rigid ridge I never asked about a bank name?
@cosmic tide you can and it should work
I'll take a look thanks
@fickle vessel not really. You can collect bank account details in your account first and then clone that bank account to the connected account if you use Standard accounts + Direct charges
@crimson needle It looks, when 401 status, the endpoint secret is null or empty, what should I do?
$endpoint_secret = getenv('STRIPE_ENDPOINT_SECRET');
@peak flame ah nice okay so that explains the issue. I'm not sure what you can do, this looks at the environment variable in your server right? So something is not set up right with your localhost
Hmm it seems that your last reply wasn't for me, because I was asking how could I get the bank's name from a sepa_debit payment method... :/
Only problem with that is our platform account will start to get more customers if we start to get bank details from our side.
Hello there. I am new here. I've got an issue with a client's Stripe account. They are already using their Stripe account for another application (not developed by us) and we are integrating our application to work with that account. We've created an additional secret key and a webhook with a signing key and payments are being handled fine, however we are getting continual webhook failures - upon investigation these failures are due to the payments they're taking from the other application are connecting to the webhook. How do we stop that?
@rigid ridge ah yes sorry, got mixed up with the names I'm sorry
And no we don't have the bank name in the API for SEPA Debit today unfortunately just the bank code
@fickle vessel it isn't really an issue right? It's really common for platforms to "vault" all customers themselves to share between connected accounts.
@vocal wagon that's totally expected today. All events for all activity on that account is sent to all webhook endpoints. You should create a completely separate Stripe account if you want to separate the traffic/data
alright, thanks!
Have to discuss this with my team. Anyway thanks for the input
Thank you, just the answer I wanted! I had indicated already to the client that would be the outcome
@fickle vessel you can always delete the customer right after otherwise
Yep thought of that too. But have to take some call on that.
@crimson needle Thank you. I have statically put the $endpoint_secret="whsec_...." instread of $endpoint_secret = getenv('STRIPE_ENDPOINT_SECRET');
@peak flame ah yeah that works too!
@blissful bear sorry for th delay. The feature is not supported just yet, I recommend opening a github issue directly on the library!
@crimson needle But why did you want to see $payload? What happens with $payload?
@peak flame you had mentioned that it worked fine for all events except a handful. So it's rarely an issue with the environment variable in that case (otherwise it just never works). And the payload can often be mis-handled, for example it loses the extra new lines, or replaces " with ' and such. Any character changing in the entire payload would change the signature. And when only a subset of events fail, it's usually a specific character being poorly handled/encoded in that event. For example it's common if you have an accent in a description like récurrent and your server is not configured to use UTF-8 properly
Hi guys, quick question: When using the setup_future_usage parameter in the confirmCardPayment function, from what I understand on_session is for when your user is in your checkout flow and just choosing to use the same card again, and off_session for when you want to charge the card while they're not using the app. Am I understanding this correctly, or do I need to use off_session since I am creating the paymentIntent on my backend?
@royal turtle it's not exactly that. The parameter is here to indicate not how you are charging the customer right now but how you will charge them again in the future. Will they always be in your app/website for the next payment and always confirming "on session" or do you need to sometimes charge them out of band where they are not around ad won't be able to do 3DS and you'll plan to pass off_session: true at that point?
good for diy recurring payment logic iirc
I will never be charging them without their direct consent. Their card will just be displayed in the checkout flow as a payment option so they don't have to re-enter their details.
@royal turtle in that case you want setup_future_usage: 'on_session' like you originally planned and you were correct!
@peak flame you don't have to do anything, there's nothing saying it doesn't work since the webhook issue was unrelated and was just a bug in your code.
It was just a possible root cause to your problem
Hi, with our previous provider SagePay we used to be able to take 115% of the original authentication (for modifying delivery rates etc and increasing price marginally). Is there any room for maneuvering with Stripe and if so by what %? Thanks
@crimson needle When I type: stripe.exe trigger invoice.payment_succeeded , why does it request these extra following events:
payment_method.attached, customer.source.created, customer.created, customer.updated, invoiceitem.created,
invoice.created, invoiceitem.updated, charge.succeeded, invoice.paid, invoice.finalized, invoice.updated, payment_intent.succeeded, payment_intent.created.
Hello everyone, I have a problem with my STRIPE account:
Stripe does not accept my payments anymore and has blocked my account because of a high number of disputes.
On this account I have 90% of my customers who pay a subscription which is still in progress. But I can't collect these outstanding subscriptions anymore.
Is it possible to clone the customers and clone the payment source of this account which is blocked with STRIPE CONNECT to sub-account ?
Can I import my customers and their payment sources who have an ongoing subscription, to a stripe sub-account in order to continue the subscriptions and continue to collect?
Thank you
@crimson needle If the card needs authenticating when using on_session, the stripe element handles this like normal? The bit that is confusing me is that in the docs it mentions that the flag is used for failure states, and that you have to handle the failure state yourself with off_session, but then never mentions anything about what happens in on_session. Sorry if this is obvious, or I missed it in the docs.
@royal turtle yes it just works. And I'm not sure where you're reading but it doesn't mean that, it's really just about future payments, and if the next payment is on session it will work the same as the current one and do 3DS as needed
:question: @worthy tapir 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
@crimson needle Okay that's perfect. Thank you for your time.
sure thing!
hi @crimson needle i have written a code to schedule a update of price in existing subscription
So below is the code
When I type: stripe.exe trigger invoice.payment_succeeded , why do I see other events in stripe listen --forward-to http://localhost/project/stripe/hook ,
but i have a error on 'Item' attribute
@exotic rain you can just share code here instead of a screenshot. What's your question?
ah looking
I am trying to understand how these events work.
Stripe.apiKey = stripeApiKey;
SubscriptionScheduleCreateParams params = SubscriptionScheduleCreateParams.builder()
.setFromSubscription(stripeSubscriptionId)
.setStartDate(startingDate.toEpochMilli())
.setEndBehavior(SubscriptionScheduleCreateParams.EndBehavior.RELEASE)
.addPhase(
SubscriptionScheduleCreateParams.Phase.builder()
.addItem(
SubscriptionScheduleCreateParams.Phase.Item.builder()
.setPrice(subscriptionPlan.getStripePriceId())
.setQuantity(1L)
.build())
.setIterations(1L)
.build())
.build();
SubscriptionSchedule schedule = SubscriptionSchedule.create(params);
@peak flame Hey! This is somewhat explained here: https://stripe.com/docs/cli/trigger
These test webhook events are based on real API objects and may trigger other webhook events as part of the test (e.g. triggering
payment_intent.succeededwill also triggerpayment_intent.created).
@peak flame So because you're triggering invoice.payment_succeeded, there needs to be a customer created, an invoice created, a payment intent created, etc, etc
How will I know the dependant events or dependant requests of an event?
@hollow prairie ^
You can't really know beyond experience I'd say, but it doesn't matter, you should listen to the events you care about, not every single event
@exotic rain I'm still looking, sorry, typed params in java can be finicky sometimes, trying to find the right incantation
@exotic rain ``` SubscriptionScheduleCreateParams params =
SubscriptionScheduleCreateParams.builder()
.setCustomer("cus_123")
.setStartDate(SubscriptionScheduleCreateParams.StartDate.NOW)
.setEndBehavior(SubscriptionScheduleCreateParams.EndBehavior.RELEASE)
.addPhase(
SubscriptionScheduleCreateParams.Phase.builder()
.addItem(
SubscriptionScheduleCreateParams.Phase.Item.builder()
.setPrice("price_123")
.setQuantity(1L)
.build())
.setIterations(12L)
.build())
.build();
SubscriptionSchedule schedule = SubscriptionSchedule.create(params);
I can't find info on how to force an event that's already happened, could you point me in the right direction?
@cosmic tide what's blocking you exactly?
I can see how to trigger new events, but I'm wanting to retrigger one that's already occured
it's showing me this error "Item cannot be resolved or is not a field" and as in screenshot it is underlined with error line.
@exotic rain With my exact code or with yours?
@cosmic tide hum sorry looks like we don't support https://stripe.com/docs/cli/events/resend in Live mode but I don't know why so it seems we're back to "that's not possible" sorry for the red herring 😦
in my code
Let me check if it gives me error on build
@exotic rain can you try mine first?
yeah sure
wait, with the livemode property as true would it not work?
@cosmic tide okay @meager hawk mentioned it works if you explicitly use --api-key sk_live_123 when you use the command I shared
otherwise it errors for reasons that I don't know :p
@cosmic tide also which version of stripe-java are you using?
sorry @exotic rain ^
mixing up everyone today 😦
sure!
Hey everyone, I'm new here so sorry if I repeat a question that's already been answered.
Hi team, I'm iOS Dev from ShearShare team. We were previously using Older Stripe SDK prebuild UI. Now, we are migrating to use PaymentSheet. I followed the doc link :https://stripe.com/docs/payments/accept-a-payment?platform=ios&ui=payment-sheet-custom But I'm facing some issue there.
I'm using Stripe SDK via:
pod 'Stripe', '~> 21.6'
And in code,
var configuration = PaymentSheet.Configuration() configuration.merchantDisplayName = "ShearShare Inc." configuration.customer = .init( id: stripeCustomer?.customerId ?? "", ephemeralKeySecret: stripeCustomer?.ephemeralKey?.secret ?? "" )
Now , then
`PaymentSheet.FlowController.create(paymentIntentClientSecret: stripeCustomer?.paymentIntentClientSecret ?? "",
configuration: configuration) { [weak self] result in
switch result {
case .failure(let error):
print(error)
case .success(let paymentSheetFlowController):
self?.paymentSheetFlowController = paymentSheetFlowController
paymentSheetFlowController.presentPaymentOptions(from: onController) {
}
}
} `
Now, I'm able to see the PaymentSheet UI, I fill the card details and check mark the "Save this card for future ShearShare inc. payments"
And, then does the final payment as:
paymentSheetFlowController.confirm(from: onController) { paymentResult in // MARK: Handle the payment result switch paymentResult { case .completed: print("Payment succeeded!") case .canceled: print("Canceled!") case .failed(let error): print(error) } }
Now, I get "Payment succeeded!".
Then, I re-initiate the payment flow, but I'm unable to see filled card in "Saved card section".
Could you please help me on this.
I can't seem to figure out how to setup a payment plan. I want to charge someone $315, but allow them to pay in 12 installments. Can I do that with Stripe without having to do any coding/automation?
Hi, I am getting error when I try to pay with GPAY Kindly check the our sandbox demo link: https://devdining.wpengine.com/google-pay/
It would be lot of help and thanks in advance!
@fallen bluff You will always need to write some code to integrate Stripe, no other way unless your use a third-party. But you can easily do 12 installments via the Subscription Schedules API: https://stripe.com/docs/billing/subscriptions/subscription-schedules
Hello. Here: https://stripe.com/docs/connect/manual-payouts I found out that if the owner of Stripe Connect Account doesn't payout money 90 days after that money becomes available, that money will go back to the Stripe "main" Account. We need to handle this in an application, but I'm not sure what's the best way to do this. We thought about having a webhook event handler that would manually send money back, but I couldn't find a webhook event for that. Also, the payout schedule option can't be anything but manual for business reasons.
@sterile night what exact error do you get, can you share more details first?
@split karma the money won't go back to the main Stripe account, that never happens automatically. But you are not allowed to keep money that long, you have to pay it out first. I'd recommend just chatting with our support team instead https://support.stripe.com/contact/email as it's not a question about code and more around the rules and regulations for the flow of funds
I can't setup subscription schedules in the Dashboard?
Sharing screensshot
@fallen bluff you can I guess but that means collecting card details manually and such which I wouldn't recommend. Sorry this Discord is more for developers asking questions about their code usually
Oh sorry, my bad. I remembered now that it actually goes to the bank account that's connected to the main Stripe Account, not the Stripe Account. I will talk with my client and we shall contact your support team. Thank you!
@sterile night but webhook errors are unrelated to your web integration itself. I can't see anything in that screenshot unfortunately either. Do you have an event id evt_123 or PaymentIntent id pi_123 I can look at?
@split karma no it doesn't do that either, it just stays in your balance and we contact you to fix it
I have tested a webhook locally typing: stripe.exe trigger invoice.payment_succeeded , but in projects's code, how does it call or trigger an event?
@noble yarrow sorry for th delay, I don't know our iOS SDK so I'm waiting for someone on my team to look
pi_1JD6U9SG8S31TrJyMaSZQKdT
@noble yarrow hi! let me catch up 👀
👍
@sterile night you shouldn't share a client_secret like that, it's... secret for a reason 😅
When and how an event is triggered?
I have tested a webhook locally typing: stripe.exe trigger invoice.payment_succeeded , but in projects's code, how does it call or trigger an event?
@crimson needle this is our website GPAY link: https://devdining.wpengine.com/google-pay/
https://dashboard.stripe.com/test/events/evt_1JD6U9SG8S31TrJygpYUeA5c you can see more details about the attempt here and your server returns a 404
Did you write the integration yourself, like you are the developer? Or you are using a third-party plugin? I'm thinking it's the latter
@peak flame your code makes API requests and those API requests trigger events. You create an Invoice and you get invoice.created as an event
@noble yarrow so, two things : are you sure you're using the same cus_xxx Customer ID the second time when you re-initiate? That depends a bit on how your app and backend do authentication and get the Customer ID and what your "stripeCustomer" model is and how that works, I would think. Secondly, can you share a pi_xxx PaymentIntent ID for the second attempt?
When is invoice.payment_succeeded triggered?
ignore that one, it's old, use invoice.paid instead
I found what I was looking for. Thanks.
Can I share my script?
@peak flame https://stripe.com/docs/billing/subscriptions/webhooks covers a lot of this for example
@fallen bluff great!
@sterile night the script doesn't really matter yet. Let's take this one step at a time. Did you write the entire code yourself? Because the logs seem to indicate you are not using any of our official client libraries, and it sounds more like when you install a third-party PHP / Wordpress plugin
Also your code currently is 1/ creating a PaymentIntent, 2/ Creating a Token. And then it does nothing else
@crimson needle I have not used any Wordpress plugin, Just writing the code using this link: https://stripe.com/docs/stripe-js/elements/payment-request-button
Okay so did you write the webhook handler yourself? You added a webhook endpoint but it returns a 404 as if that URL doesn't exist
And where is your code broken? Like what do you see when you debug it? Add logs at each step client-side to figure out what's preventing your code from confirming the PaymentIntent successfully
this is my code, actually, I am not getting how to set webhook
but you did set up a webhook. You manually added it yourself to your account.
Also why do you use raw curl calls instead of our official PHP library? https://github.com/stripe/stripe-php
When is invoice.paid triggered by code?
Also you just shared your exact code with your hardcoded API key that you should roll immediately even if it's just test mode
@peak flame That's a bit of a weird question and kind of the same as before. Did you read the doc I shared? That event is sent when an invoice is paid. Invoices are usually paid async based on the default payment method assigned to them. So there isn't really "code" for it. But you seem quite lost on the overall products and what you're trying to do which makes it tricky to help answer your questions
What are you really trying to answer?
Okay, Thanks! but how to setup manually without using composer
it's documented right below the composer option: https://github.com/stripe/stripe-php#manual-installation
but that isn't really the issue you have since your code is creating the PI successfully
When do we need a webhook? Must we need webhook for every stripe project?
oh boy :p
@hollow prairie is taking over for me and I'll let them explain/help i have to run
hey @crimson needle it's not resolved getting "Unresolved compilation error" when i execute the code.
@peak flame Webhooks are useful for being notified of events that are happening in your Stripe account, such as successful payments etc. More here: https://stripe.com/docs/payments/handling-payment-events
One example of webhook functionality would be order fulfilment upon a successful payment (the payment_intent.succeeded event)
Ohh, okay. Can you tell me then how will you contact us? I guess it's an email with all info we'd need to fix that, but checking just to be sure.
@exotic rain Hey! I'm taking over for @crimson needle, let me catch up!
@exotic rain Can you share the code on that specific line the exception is referencing?
@hollow prairie So is it must to have a webhook of every stripe project?
@split karma Via email, yep!
@exotic rain what version of stripe-java do you use too
@peak flame Well, it depends. Most Stripe integrations utilise webhooks, but they aren't required. What is it you're trying to do exactly?
I have some code with webhook, I am trying to understand it.
(no screenshot we can't run that code @exotic rain )
My code that I tried locally is ``` SubscriptionScheduleCreateParams params =
SubscriptionScheduleCreateParams.builder()
.setCustomer("cus_123")
.setStartDate(SubscriptionScheduleCreateParams.StartDate.NOW)
.setEndBehavior(SubscriptionScheduleCreateParams.EndBehavior.RELEASE)
.addPhase(
SubscriptionScheduleCreateParams.Phase.builder()
.addItem(
SubscriptionScheduleCreateParams.Phase.Item.builder()
.setPrice("price_123")
.setQuantity(1L)
.build())
.setIterations(12L)
.build())
.build();
SubscriptionSchedule schedule = SubscriptionSchedule.create(params);
I am trying to understand which part of code is triggering invoice.payment_succeeded or invoice.paid.
It is a PHP stripe code
So far I have tested webhook from terminal locally
By running: stripe.exe trigger invoice.payment_succeeded
@peak flame Yes, but what is it you're actually building with Stripe? A Billing app?
And I think, it creates some dummy request
I am trying to understand existing code.
I think, it is a billing app.
Great! Thank you!
SubscriptionScheduleCreateParams params = SubscriptionScheduleCreateParams.builder()
.setFromSubscription(userSubscription.getStripeSubscriptionId())
.setStartDate(SubscriptionScheduleCreateParams.StartDate.NOW)
.setEndBehavior(SubscriptionScheduleCreateParams.EndBehavior.RELEASE)
.addPhase(
SubscriptionScheduleCreateParams.Phase.builder()
.addItem(SubscriptionScheduleCreateParams.Phase.Item.builder()
.setPrice(subscriptionPlan.getStripePriceId())
.setQuantity(1L)
.build())
.setIterations(1L)
.build())
.build();
SubscriptionSchedule schedule = SubscriptionSchedule.create(params);
@peak flame Yes the CLI just generates dummy objects to simulate the events. In a real world scenario, your application would trigger those events via your Stripe integration
@exotic rain Which version of stripe-java are you using?
How can I check my code? Which part of my code is triggering invoice.payment_succeeded or invoice.paid event?
@peak flame That's hard to pinpoint without knowing your application/integration. But those events would be triggered upon successful payment of an invoice. Either somebody signing up to your service for the first-time and entering payment details or a recurring off-session payment
@peak flame Are you using Stripe Checkout, or your own payment flow with Elements?
"Are you using Stripe Checkout, or your own payment flow with Elements?" how can I check that?
19.36.0
@exotic rain that's the issue, it's too old, from a time where the property was named Plans not Items
you should upgrade to the latest
okay, so is there any other way that will do my requirement instead of SubscriptionSchedule
@hollow prairie "Are you using Stripe Checkout, or your own payment flow with Elements?" how can I check that?
@exotic rain but why? Schedules are exactly what you want. the right next step is to upgrade stripe-java to the latest. If you can't, you need to use the syntax from that older version where you likely want SubscriptionScheduleCreateParams.Phase.Plan.builder() instead
In code, there is option to add a Card.
@peak flame Checkout is a hosted solution (https://stripe.com/docs/payments/checkout) as opposed to Elements which are preconfigured UI components for you to build your own payment flow.
I'm having a hard time understanding where you are with your Stripe integration and where I can help! So when you refer to your code, what exactly is that?
Hey all!,
I have a doubt about the response of stripe after made a confirmCardPayment with wrong billing details (for example wrong city).
Can anyone help me find this response errors?
I need to do different events depending on the stripe error.
@craggy sand Hello! Do you have a specific request ID that has thrown an error? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Hi, I'm developing adding bank account as a payment method (ACH Debit) for customer via Plaid. And now, I'm facing an "bank_account_exists" error when I add the second bank with a difference institution. In my understanding, it's because of Stripe always create the same test bank account, isn't it? So, my question is how can I test adding multiple bank accounts via Plaid in development environment?
No, i tested it on UAT that war the reason i cant see the response
@regal dune Hey! Are you testing using our ACH accounts? https://stripe.com/docs/ach#testing-ach
@craggy sand I'm not sure I understand. You can find your Stripe request logs here: https://dashboard.stripe.com/test/logs
i´ll check it. Thanks!
@craggy sand Also worth noting that a billing address mismatch with the payment method might not result in a failure/error
But i supose stripe will returns something if its a mismatch between billing details and stripe user data account
@hollow prairie Yes, I've tested with accounts in that document but by creating it directly on Stripe dashboard
But now, I want to add difference cases ACH account number via Plaid, is it possible?
For example here if i have a wrong cvc or expiration date, stripe returns an associate error
@craggy sand What do you mean by 'Stripe user data account'?
For example name of the user that provides the card (card name), city, country, zip code
Complete reference documentation for the Stripe JavaScript SDK.
I want to know which are that errors
@craggy sand Yeah a mismatch in data provided there to what is on the card is not guaranteed to return an error. That's ultimately on the issuing bank to determine whether or not to authorise the payment
and how i add more security for a transaction for example, name, city, state,country, zipcode
@craggy sand As for the specific error messages, they aren't documented anywhere. You should instead just rely on the code
@craggy sand I'm not sure what you mean? If you're using Elements w/ Stripe.js, then Radar is working to prevent any fraudulent transactions if that's your concern
@craggy sand You'd need to handle any address validation in your own application
@regal dune Sorry for the delay, just checking on something for you
Can you elaborate on what you mean here? What API objects are you looking at, what do you want to detect differences in, etc.?
Hi all, hope you are doing great. I have a use case which I am not sure if it's possible. Any idea if we can have early payment but begin the subscription from a specific date. So for e.g. if a user renews the yearly subscription today which was actually due on 1st August and would like to ensure that the customer still gets 15 days completed and we get paid early as well the same amount. so the subscription payment due will be on next year 1st august, rather than the date today. Consider cases of if a user was not on recurring subscription and planning to auto-renew subscription and also if he was already subscribed and paying early.
To be clear, you want to create a subscription where the initial period is shorter than the "normal" billing period?
👋 Hello
I'm using the Stripe Subscription Schedule API, I scheduled the subscription phase but stripe is sending invoice immediately, before the endDate of the phase. How do I change the invoice date?
https://stripe.com/docs/api/subscription_schedules/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
What i mean is that behind that picture that i show to you i made a stripe.confirmCardPayment with this info:
I know that for example if the card is invalid, then in the result it shows to me Ex.: "The card’s security code is incorrect. Check the card’s security code or use a different card"
I want to know if something similar is returned to me when, for example, the city that is in billing details is wrong
Invoices for subscriptions are always created and sent at the beginning of the billing cycle. The only ones that would send after the billing cycle are metered subscriptions.
@craggy sand The card errors are handled by the Elements component you're using, we can validate card details that way. When you provide billing details in the confirmCardPayment function, they're sent to Stripe via an API call which ultimately is sent to the issuing bank with the rest of the transactions details.
Any error returned there would be in the Promise chain of the confirmCardPayment function. Details on those errors are here: https://stripe.com/docs/api/errors
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yes, something like that, is it possible?
Thats was what i looking for!, thanks
@craggy sand Nice! Let me know if there's any other questions 🙂
@sick talon For using Plaid to collect and verify customer's banking info, the system will receive Stripe bank account token directly from Plaid, then use it for creating a payment method. However, the bank account token from Plaid always create the payment method with the same routing number and account number, so I receive this error from Stripe API
I want to add many payment methods into a customer via Plaid on my platform
I understand that on the production that use the real banking info will be work, but I want to test it on my development environment too. Is it possible?
You'd create the Subscription with billing_cycle_anchor set to the start of the first full billing period. Try it in test mode and you'll see what happens on the initial invoice. https://stripe.com/docs/api/subscriptions/create#create_subscription-billing_cycle_anchor
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Are you trying to test multiple bank account sources on a single Customer?
Yes i am
via Plaid
I can do it on Stripe dashboard with difference account numbers this document provided
https://stripe.com/docs/ach#testing-ach
Stripe supports accepting ACH payments—direct from bank accounts—alongside credit cards. ACH is currently supported only for Stripe businesses based in the U.S. We'd love to hear about your use case, though!
But I'm not found Plaid test data to do it with Plaid pop-up
I'm not 100% sure as we don't control Plaid's integration, but from what I know of it they always return the same bank account numbers in test mode. They mention it in https://plaid.com/docs/auth/partnerships/stripe/#test-with-sandbox-credentials
my only concern on updating to latest version is this that what if there is deprecation of some code in latest version and that i may used in my system and that deprecated things will effect the system.
@sick talon thanks, so as per this, let's say we have 1st August the start of the first full billing period. I would still like to charge same amount if payment is made today and miss the upcoming 1st August and actually bill next year on 1st August
That's something you'd want to work through in test mode when upgrading before deploying to production. Upgrading libraries is a part of being able to use the newer features when working with a strongly typed language like Java.
You can't set the billing cycle anchor further out than the length of the billing cycle (so for an annual plan, you can't set it more than a year out).
@sick talon Thanks!! I'm migrating subscribers that are stripe customers, I have their renewal date but how do I create stripe subscription without charging/invoicing them until there renewal date?
Learn about backdating subscriptions.
there are a couple different options there, try them in test mode to see which one has your desired effect
@sick talon exactly what I needed! Thanks!!!
When generating a session url to the the customer portal page , how long is this url valid for?
Trudog — Today at 10:08 AM
Question: re: test data invoicing. We are in the process of integrating Stripe's metered subscriptions into our web service. In production we will be invoicing monthly, but for development we are using daily so we can work through the entire process more expeditiously. daily is ok, but it would be better if we could trigger the invoices to run at a specific time instead of waiting for 9pm every day which is the time of day when the original subscription was created.Is there a way to do this?
@wraith hound for testing purposes if you don't care how long the actual period is, you can change the billing cycle anchor once all the usage has been updated https://stripe.com/docs/billing/subscriptions/billing-cycle#changing
Subscriptions are billed on a cycle, learn how to set the billing date.
excellent! thank you.
You should use them immediately and not expect them to be valid for very long. If you need to email a customer to have them use the portal, link them to your own page and generate a link when they visit.
Hi I am a new member. I am working with a client developing their eCommerce platform. They sell clothes. They has recently partnered with another organisation and have created a single branded product. For just this product they would like to set-up revenue share. Looking at the connect accounts I can documents that describe this but nothing that idicates that it can handle a revenue share from just one specific product. Using Wordpress/Woocommerce as the sales plaform with Stripe payment gateway. Has any one set-up something similar and can provide some advice?
Can you define what you specifically mean by revenue share for a product, versus what would happen for a product where revenue is not shared?
Revenue share - they are selling a branded jacket for £600. My client will keep 70% of the £600 and pay the remaining 30% to their business partner. It is one product, all their other products they keep the full 100%.
Are both the client and partner connected accounts on your platform in this scenario?
That would be the plan. My client's Stripe account would collect the customer payment then transfer thr 30% to a connected account.
Just to make sure I understand, is the "client" here the platform or do you have your own platform account to which the "client" is connected?
The client is the platform (their website) - I assume that is what you mean?
OK so if the client is the Connect Platform account, and the partner is connected to that platform, then you would look at what the revenue share is for the given product (or if it's 0) and set either transfer_data[amount] or application_fee_amount appropriately https://stripe.com/docs/payments/connected-accounts
As a marketplace business using Stripe Connect, you can use the Payment Intents API to create charges on behalf of connected accounts.
Since you're using WordPress/WooCommerce, you'd need to check with their support to see if and how they let you set that up. They control their integration and not everything you can do with our API works with their plugins.
Thank you. I am new to Stripe at this level. Can I pass a unique product code into the system from Woocommerce - would it then be used as a parameter withing Stripe?
I'm not sure as far as WooCommerce goes, we don't know or control their integration.
Okay, understood.
hello there,
I am updating the subscription and if 3D Secure card is used then stripe first send the invoice.payment_failed webhook. Now if the subscription is rolling over to next month then at that time if somehow charge is failed then also stripe give invoice.payment_failed so just wanna know how to determine the difference in between those two
Hello, I am a dev at Stitch and we are using the Stripe api to extract customer data. Currently, we are missing some balance_transaction objects using created as the replication key. We keep a bookmark each sync and query with a look-back window of 5 min (record ['created'] > bookmark-5min).
We miss some objects where the created time is within a few seconds of the bookmark, even though we keep a look-back window.
Do some balance_transactions objects take longer to become available to the api? Do you have any suggestions about how we could avoid this? Thank you
The Invoice's payment_intent will have the last error in https://stripe.com/docs/api/payment_intents/object#payment_intent_object-last_payment_error
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You should increase your lookback to be greater than the time between checks. E.g. if you check every 5 minutes, look back 10 minutes and check if you've already seen an object or not.
Hello community! I'm trying to create a test for P24 payments, I wonder, is there a way to confirm a P24 payment programmatically ie (with mandate or other mechanism)?
hello guys
how much stripe charge when we transfer money from stripe token to our stripe account?
in case of stripe
apple pay and google pay
I don't imagine that would be possible. P24 requires redirecting to the customer's bank for confirmation.
https://stripe.com/pricing has the overview and the support team can answer specific questions about fees via https://support.stripe.com/contact
Find Stripe fees and pricing information. Find our processing fees for credit cards, pricing models and pay-as-you-go fees for businesses.
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.
thanks @sick talon
you saved my day 
Thanks for the reply, could you describe why we would need to double check every timestamp? Are the balance_transaction objects not always available at their created time?
I'm not sure what you mean by not always available at their credited time. What it sounds like you're dealing with is you're checking for the last five minutes every five minutes, and that naturally will have some latency as if you request at a timestamp X, your response will be at X+n where n is the number of seconds of latency over the network.
Hi @sick talon i am trying to get the card object using this: https://stripe.com/docs/api/cards/list i'm using typescript and graqhql. do you know what's the type of the promise i should use in this case please for the query resolver?
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 there,
I just want to know that how much amount does stripe charge for a transaction/transfer for all payment methods. I just need the exact figures, not a web link. please help me.
Can you elaborate on what you mean by using GraphQL? We don't have any official support for GraphQL and if you're using a third party plugin, you'd want to ask that plugin's developers.
Hello, is there a way to customise the text in the "Pay Now" button to a custom text? We are using the PaymentRequestButton (https://stripe.com/docs/stripe-js/elements/payment-request-button) and we want to indicate to the user that the card is saved in their browser.
The support team can answer that. This channel is for development and integration questions and we can't answer that sort of question for you here.
There's no customization for that button directly, but see https://stackoverflow.com/questions/47437687/custom-theme-for-payment-request-button-stripe
so where I can get my answer if I can't get it here?
so where I can get my answer if I can't get it here?
The support team, which is the link I provided above -- 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.
Great, thank you! I'll take a look. 👍
ok so just an async function that has this inside: const cards = await stripe.customers.listSources(
'cus_AJ6mUWjfoelHlJ',
{object: 'card', limit: 3}
); what type should i use for this promise?
Thanks for your help!
I'd imagine it's a list of Sources https://github.com/stripe/stripe-node/blob/master/types/2020-08-27/Sources.d.ts
but it may also be Cards https://github.com/stripe/stripe-node/blob/master/types/2020-08-27/Cards.d.ts
Hello - I am implementing fixed-price subscription leveraging the donNet example here https://github.com/stripe-samples/subscription-use-cases/tree/v1.0/fixed-price-subscriptions.. Everything seems to be working until we added in the Trial period. With Trial period, the LatestInvoice.PaymentInten=null. So, we can't get the .clientSecret. What should we do?
The connect onboarding docs are a little unclear. It says to check the charges_enabled flag of the accounts object to see if an account is fully onboarded. Then the paragraph ends by saying you can check the account’s details_submitted flag to see if the user has completed the onboarding process. Which is it and what’s the difference?
There won't be a PaymentIntent until there's a paid Invoice (which will generate at the end of the trial period)
The details are submitted at the end of onboarding, and then after they're verified, charges are enabled.
In that case, how do I get a clientSecret which I think I need in order to capture credit card payment information on the web client?
i'll check these links, thanks. i know there is no support for typescript or graphql but i'm really stuck here for 2 weeks trying everything and see what sticks.
There's no payment to get a client secret from. If you want to collect payment method details during a trial period, use a SetupIntent https://stripe.com/docs/payments/save-and-reuse and then set the result PaymentMethod's id to the Customer's invoice_settings.default_payment_method
Learn how to save card details and charge your customers later.
We do have TypeScript support in the Node library, but nothing on GraphQL.
These types really messed me up
Yeah, Sources is an older API and the types can vary. Doesn't really map well to "always use this type for all Sources".
Understood. So there should never be the case where charges_enabled is true but details_submitted is false correct? But the opposite could be true.
If charges_enabled is true, it wouldn't matter what details_submitted is. If details_submitted is true and charges_enabled is false, you're waiting on verification.
Got it. If the user is waiting on verification can they still do other things like create products and configure their branding settings? But they would not be able to, for example, initiate a checkout session?
Yep, can't make charges but you could certainly manage non-payment stuff like that.
The created time is an attribute on the balance_transaction object and we are querying using the created attribute.
This might be a better example of our issue:
- a balance_transaction object was created at 22:30:47.000000
- The starting bookmark of the sync it should have been received on was 22:30:46, just one second before.
- With the look-back window, we synced records from 22:25:46 -> 23:01:42, but missed the one created at 22:30:47.000000.
would the latency between our request be long enough to miss this record?
This is our first time implementing Stripe, so this is a bit confusing. Looking at the url you sent, how would I then attach that payment information to the Subscription that it's meant to pay for?
We can't see what the response was for a GET request to confirm on the specific request, but that sounds like there might be a bug in how you're processing the records. If you get records both before and after the created timestamp, there's no reason we wouldn't send that one. How are you paginating when you page through the results?
Once the PaymentMethod is set up, update the Customer (of the Subscription) to set Customer.invoice_settings.default_payment_method https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Hey we are implementing Stripe Connect Express and now we need to handle the refunds. We don´t really get what " reverse_transfer". Not even with the description:
optional, default is false
CONNECT ONLY
Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).
A transfer can be reversed only by the application that created the charge.
Maybe someone can help me out. Kind regards
And would I need to do any other changes to the webhook to charge? Or would the charge happen automatically when the trial is up?
When a new Invoice with an amount due is created, assuming you have set things up to automatically charge, it will go forward automatically using that default PaymentMethod.
And how would we set it up to automatically charge? Did the code I sent earlier do that? Sorry, we are complete noob to Stripe. thx
Hello, I have a question about a Webhooks event. I want to take an event that tells me that the person has renewed his subscription, and thus update my database. Thank you.
You're using Destination Charges with Express, right?
If automatic payments are set up you can check the status for “paid” on the invoice that stripe generates automatically
It'll be automatic unless you set https://stripe.com/docs/api/subscriptions/create#create_subscription-collection_method to send_invoice
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, got a question about Connect and Destination charges. Is there anyway to hold the payment to a standard connected account until an event has occurred on the platform? Not a fan of separate charges and transfers, one of the main reasons being no visibility in terms of the platform fee.
You could listen for the invoice.paid event and check if data.object.billing_reason == 'subscription_cycle'
@zenith kite hello
@zenith kite you need to have manual payouts on the Connect account to do that. So funds stay in the Connect account balance and are paid out when you manually make a request to create a Payout.
Humm, okay. And it's not a Stripe event who sends each time a subscription renews.
@zenith kite oh wait you mean store funds on the Platform? before transferring to the Connect acct?
It’s a stripe generated event to your webhook
We are using auto-pagination. Its probably worth noting that when we run the query with the example I gave last time, a week later, we do receive the missing record
@lone flower hello, one sec (turbo had to step away)
Looking at my logs, I don't see a specific event for a subscription itself being renewed, at least as far as the format subscription.renewed like you might be expecting. But it can be inferred by an invoice's billing_reason state.
Yes that's correct. We had a problem today with a customer where we transferred a payment to their account before they confirmed it, a payout was made on their account before they declined the order and we refunded the payment, leaving their stripe account in debit.
@vague lava the webhook event invoice.paid does point to the subscription object that's been renewed.
invoice.paid is sent every time the person pays, but is this event sent at the end of the cycle?
@lone flower can you bring me up to speed real quick? you're listing BalanceTransactions within a timerange? and not getting a particular BT?
@zenith kite so there's a couple of things here ... where do you want to store the funds, Platform level or on the Connect acct?
right.
@vague lava if invoice.paid 's data.object.subscription has a value and data.object.status == 'paid' i think it's safe to presume and infer that that subscription has been fully paid and renewed for that cycle.
@vocal wagon turbo had to step away, hello! Can you bring me up to speed?
Okay
Of course i can. I will repeat the question for you.
Hey we are implementing Stripe Connect Express and now we need to handle the refunds. We don´t really get what " reverse_transfer". Not even with the description:
optional, default is false
CONNECT ONLY
Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).
A transfer can be reversed only by the application that created the charge.
Maybe someone can help me out. Kind regards
Yes, this is the example I gave earlier:
- a balance_transaction object was created at 22:30:47.000000
- The starting bookmark of the sync it should have been received on was 22:30:46, just one second before.
- With the look-back window (5 min), we synced records from 22:25:46 -> 23:01:42, but missed the one created at 22:30:47.000000.
- the request was made around 23:01:16
we are sometimes missing records when they are created close within seconds of the range we request
when we repeat the request about a week later we do get the missing record
Ideally, before the order is confirmed, on the platform account (cannot be included in our own payouts) until the order is confirmed, at which point we'd transfer the money to the connected account. This sounds like a good use case for separate charges and transfers, but the problem with that is there is very little visibility in regards to fees on Stripe, so it means more development work on the platform side to make fees more visible, on top of moving from destination charges to separate charges and transfers.
reading over both, one sec
@vocal wagon and you are using Destination Charges right?
@zenith kite holding funds on the Platform is really only do-able with Separate Charges and Transfers. Manual Payouts (on both Platform and Connect acct) prevent funds from being swept away in automatic payouts so manual payouts cover that for you.
@lone flower ah I see, what I'd recommend is this:
1/ run your BT listing script and share the request ID for that request
2/ autopaginate and write the responses to a file
3/ send over the ID of the BT that you expected to see in the response but did not get back
4/ write in with the above 3 (i.e. request ID, the full responses and the missing BT ID) to Support and they can help you have a look at it
is https://support.stripe.com/contact the Support link
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.
right.
Okay, will relay it back to the relevant parties. Thanks for the help.
@vocal wagon so what a Destination Charge does is, it charges the Customer for $10 for example and you choose to Transfer say $8 to the Connect acct and keep $2 on the Platform.
Refunding the Destination Charge allows you to reverse the $8 Transfer to the Connect acct to recover the funds back from the Connect account.
@vocal wagon so that reverse_transfer param controls that
hello there,
is there way in which I can roll up my testing subscription manually and check with the card which fails the charge on next cycle
Currently using the node api to create external accounts for my connect accounts, and for countries such as singapore, japan and hong kong, for example, how do I add in the extra details such as the account clearing codes, branch codes and things like that? Do I just have to hyphenate them into the routing_number value? Especially for the Japan accounts which need bank name, branch name, all sorts of values
hey guys, is there a place I can understand, for sure, the lifecycle of events?
Im looking for an event when the first purchase is successfully finished... not invoice.payment_succeeded (since it happens is renewals)
Im thinking about https://stripe.com/docs/api/events/types#event_types-customer.subscription.created but Im not sure it it happens only when payment is succeeded...
Can you help?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
@toxic quartz yes you can use the pm_card_chargeCustomerFail PaymentMethod that attaches to a Customer but fails a charge. You can create a Subscription on that Customer then
@thorn bone hello, invoice.payment_succeeded also happens on the first initial payment, really anywhere an Invoice is paid which happens on the first initial payment too.
@vocal wagon
I mean for the first time it should charge with success and on next cycle it should failed and my another question is lets say I have a subscription for a month and I want to trigger some action to it immediately charges for the next month in test environment
@thorn bone this section and the one after it will be helpful: https://stripe.com/docs/billing/subscriptions/overview#subscription-events
Learn how subscriptions work within Stripe.
amazing.. it is exactly what I was looking for...thanks @bold basalt
@toxic quartz ah I see , yeah so create a successful Subscription on a good PaymentMethod like pm_card_visa then attach pm_card_chargeCustomerFail to the Customer and set it as the default_payment_method on the Subscription, then change the billing_cycle_anchor to now to "simulate" the Subscription taking a new payment.
@stray skiff coming to your question, one sec
great thank you!
No worries, thank you
@stray skiff it would follow the format here: https://stripe.com/docs/connect/payouts-bank-accounts#formats
I think the format there sometimes does require hyphens in fields like account number for HK
Managing bank accounts and debit cards on your Custom connected accounts.
But for the fields that places like Japan needs, would I just do like branch_name:xx, bank_code: 123 or whatever?
@bold basalt but even with that there is still a question: I want to trigger contract creation on my end when user pay through a checkout link...
so as I understood, in this case, when checkout is finished and succeeded, invoice.payment_succeeded will be triggered, but it will be triggered in renewal as well...
how can I differentiate them!???
I need a differentiation in first payment and the renewals
@stray skiff yes
There's subscription renewal webhooks you can use @thorn bone
Fab, thank you
Is it possible to use the Stripe's Checkout page in conjunction with a subscription schedule? ie add a recurring monthly product but with only 12 iterations
@thorn bone you can use billing_reason to check if it was a Subscription creation or Subscription cycle : https://stripe.com/docs/api/invoices/object#invoice_object-billing_reason
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
where? didnt see that? What I saw is the invoice.upcoming but for me it is irrelevant... I just want to
- when user finishes payment the first time I create his contract and account and setup everything for him
- when renewal payment is confirmed, I extend his contract
- when renewal payment dont happen in time, I cancel his contract
I’m having trouble logging into my stripe account to release my funds
@jolly bone you'll want to contact actual stripe support, this is just for development help
I have contacted stripe support and it was very unhelpful
@balmy yacht hello, you can have Subscription create done by Checkout, then on the webhook event, update the Subscription via a SubscriptionSchedule
@jolly bone as the other user mentioned, account and login support is handled by Stripe Support at https://support.stripe.com/contact?skip_login=true
This channel doesn't have account related access sorry
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.
@thorn bone did my response answer your question? the billing_reason field on the Invoice?
it feels cumbersome because I dont understand it completely... But I will definitely explore
thanks
@thorn bone how does it feel cubersome? doesn't it help you identify if an Invoice was created due to the first Subscription creation, or a recurring Subscription renewal?
Hi all! Long time Stripe developer here. Quick question: is there a way to get total connect processing volume via the API?
Hi @light urchin! What type of Connect charges are you using (Direct, Dest, Separate Charge & Transfer)?
Separate Charge and Transfer (I believe)
When I log into our Stripe account and see total volume, that's the number I want to get on a per month basis.
Just to clarify, the "total volume" is on your home Dashboard for your account or specifically "total volume" for Connect Accounts (as in you want to know the volume you have transferred to your Connected Accounts or the total volume you are processing regardless of it being transferred to Connected Accounts or not)?
Total volume for Connect Accounts. So all the accounts that are using our application.
@light urchin in that case you would want to list your transfers using https://stripe.com/docs/api/transfers/list and calculate using amount: https://stripe.com/docs/api/transfers/object#transfer_object-amount
Let me know if you run into any issues!
is it possible that failed invoices automatically cancel subscriptions on test environment? I have set subscriptions to be cancelled after 4 retries, but using the test account ES9121000418450200051332 automatically cancels the subscription...
@rigid ridge hello, can you share the Subscription ID for that?
sure, sub_Jqt6cx9YzcBrft
I am trying to connect to stripe-mock in my local using the following docker command.
docker run --rm -it -p 12111-12112:12111-12112 stripemock/stripe-mock:latest
I am using Stripe SDK for NodeJS (Typescript). This is how I am trying to connect to Stripe in my code.
'sk_test_123',
{"apiVersion":"2020-08-27","protocol":"http","host":"http://127.0.0.1:12111","port":"12111"},
);
However I am getting this error.
'getaddrinfo ENOTFOUND http://127.0.0.1:12111'
Any idea what I am doing wrong here? 🧑🏻💻
hi- i wish to attach some metadata to a Stripe Checkout Session Line Items. I don't see that this is supported, and receive a InvalidRequestException when trying to attach metadata. is this expected?
Hi @rigid ridge! smart retries don't apply to SEPA payments: https://site-admin.stripe.com/docs/invoicing/automatic-collection#smart-retries
Give me a few minutes to try and figure out what's wrong - I haven't dealt with stripe-mock often, but I'll see what I can find
Yes, this is expected - if you give me some details on what exactly you're trying to accomplish, I can try and come up with a workaround though
oh, okay... and how could I set it so that it didn't cancel the subscription if it's paid by SEPA? I'd like to let the user change the payment method instead of just cancelling the subscription... It should cancel if it fails when paying by card, but not when paying by SEPA
@dim hearth PHP environment- i create a Session and redirect to Stripe's hosted payment page that shows line items. Upon successful payment the customer is redirected to a success page. my server is waiting for a 'checkout.session.completed' event which then converts the Session to a order record on my server (transaction info, line items, etc). the line items do not contain any useful information to help me identify which product it matches on my local database- so i thought to attach some metadata (SKU#) so i can find it
How do taxes work with selling online products (in my case online documents) as a personal seller. That is, I have no physical presence. I can't seem to find a clear answer
@dim hearth Got it. We need to set the host as localhost. Thanks for your help
Phew, that's a relief!
is just because I was trying to separate events using events itself... but it feels that I will need to also differentiate the same event in two cases
It may actually be more useful for you to add this information as metadata on the Checkout Session object itself - line_items is expandable and wouldn't be included in the checkout.session.completed event as-is, so you'd need an extra API request to get those line items anyways
ah, ok. i will experiment with that. thanks
That's a bit outside our comfort zone here (we mostly answer technical/developer questions) - I'd suggest contact support https://support.stripe.com/contact, and they should be able to give you more guidance on taxes
https://stripe.com/docs/tax/checkout ~ I think it's safe to just go this route
Learn how to automatically calculate taxes in Checkout.
Thanks though
Sorry still looking. One sec!
Hello everyone! Is there a way to have dynamic product/subscription names? I've got two hosting use-cases where it'd be great to have "example.com hosting" or "example.com domain renewal" in the subscription/invoice versus "Web Hosting" or "Domain Renewal" – especially because customers can have multiple sites/domains.
Unfortunately we don't support splitting these settings by payment method. So, in this case you would need to change your Subscription settings to not cancel after retries (I'd recommend using 'mark unpaid' instead) and then listen to the subscription.updated event to check on the paymentmethod type used and then handle the cancellation manually for cards (using https://stripe.com/docs/api/subscriptions/cancel) when all retries have been used or allow for a different paymentmethod if it was a SEPA payment attempt.
Hello! Am I understanding correctly - you have various customers (all with different domains) and you want to be able to sub out "example.com" in the subscriptions/invoices for each customer?
Okay, thanks!
@rigid ridge to be clear, this is overall not something I'd really recommend and I'd just cancel the subscription for SEPA and have them start a new one with a different payment method.
Okay, and how could I block that SEPA from being used again? by detaching it?
Yep detaching it via https://stripe.com/docs/api/payment_methods/detach
okay, thanks!
Yes, basically being able to display the site/domain in the subscription so they don't see a generic "hosting" or "domain renewal" subscription. We track this in the metadata, but would like to make it clear to customers so they know which site/domain the subscription applies to.
Especially for those who have multiple subscriptions for different domains
How are you displaying the subscription - through the billing portal? or through your own UI?
just to clarify, would this apply only to this customer or to all of them?
Each paymentmethod has a unique ID (pm_123) so it will only detach from the customer that the paymentmethod with that ID that you pass is attached to.
We display customers' active services through our own UI, so it's definitely possible to show the domain stored in metadata there. We would like to leverage Stripe's subscriptions and invoicing, though, so we need to show the domain on those invoices and payment screens. That way customers know exactly what they're paying for and don't wind up with multiple invoices/receipts that say "web hosting" or "domain renewal" for example.
Gotcha - let me see if I can find anything that'll work
Appreciate the help!
So looking at what's available on the subscription I'm not seeing anything that'll work - descriptions are determined at the product level (either the product name or description) and to accomplish what you want you'd need a different product for each of your customers with their domain information. Personally, I'd just continue on with adding this information in your metadata (or maybe as metadata on the customer) and add the logic on your end to display this information in your UI
Hi team! I'm working on an invoicing integration at the moment and occasionally will find that when creating a draft invoice with invoice items > $0 and amount_paid == $0 the amount_due is $0 even though the total is equal to the amount of the invoice items. Any thoughts on what circumstances could arise that would cause this?
What is the recommended way to create a test account for connect that has test charges enabled?
Hi all, I want to create a checkout button on my website where I can collect different payment amounts with an automatic surcharge/tax. HELP
When the amount due on the invoice is below the minimum allowed charge for the currency I believe we'll say the amount due at that time is $0, and we'll apply it as being due on the customer's credit balance. This will accumulate and be included in the next invoice for the customer until the amount due on the invoice goes above the minimum allowed charge for the currency (https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts).
Do anyone have a code that I can just plug in to my website for that?
Hi Brittany, you could just add the surcharge to as a line item for your checkout session
Hello guys how can i make a form that people can upload image and after they pay money. i can receive that photo into my gmail?
Hi! You will want to use the testing info on https://stripe.com/docs/connect/testing to get your test account enabled.
I'm new to property management and we want to collect rental payments off of our new website.
The customer uploads a photo and then they pay you to have it emailed to you?
yes
Thanks, I should have specified, this is for Standard accounts
Is there a way to configure something compatible with a paypal.me link to just add that it's connected to my site?
Are you the developer for the site?
Thanks for the quick reply! You sure are fast. In this case the invoice item is for $115.50 so I don't think that's the case 😦 does this event ID help give you any other ideas? evt_1JDBsU2hJ37qA5WsST7MSnWY
Yes, never had to create something like this before
Yes, never had to create something like this before
Check out: https://stripe.com/payments/payment-links
Hmmm, that's weird - let me take a look
help me 😦
You should not need to enable charges on the Standard test account to make test charges. Are you hitting an error?
I can do this without products? Can this be a universal checkout button?
I see that I have o create product first to create a payment link.
I8
When the image is uploaded you can create a product for it in stripe via api. Then create a checkout session for the user and for the product and direct them to the checkout url. Use webhooks to see when the payment has succeeded and trigger the email to you
You could create one product in the dashboard and reuse it universally with the single payment link
Once the connect account has been onboarded I need to generate checkout sessions for them. I'd thought I couldn't do that unless charges are enabled?
Hm... this is super strange. Do you have another one where the invoice hasn't been deleted?
Ok! I was able to do it. Is there a way to go further and collect multiple payment amounts from hat link and tax?
If you're going to have dynamic amounts, you'll need to use the api to create the product on the fly and then send a unique payment link to the customer
yes
Sorry I hit enter too early, edited my response above
Sorry this is the only one I've been able to find. It's deleted because we have an internal checksum system in prod. If the draft invoice's amount_due does not match the invoice total we expect we delete. We are expecting it to equal 115.50 so we delete. I have been thinking about using the invoice.total field as a fallback, but want to understand why the amoun_due is $0 before making that change.
Hi,
I would like to subscribe and sign up at the same time. The background is that a user must complete the subscription to be able to log in. I had thought that I can somehow query whether the user who is about to log in has already subscribed. If he hasn't, the server will reject him or redirect him to the Register page. Do you have any tips on how I can check if the user already has an active subscription running?
Okay, so nothing can be done automatically
No worries if you don't have another example - I'll just dig in a little bit more on the one you already provided 👍
I'm not sure what you mean by automatically. Somewhere the platform has to know about the individual charge amounts. You can definitely dynamically calculate fees like taxes. If you're doing this to recurrently charge rent, you may want to look at the subscriptions api, set up a subscription for a renter with their tax rates and fees added and then they can get charged automatically and manage their own accounts
Thanks a lot. This customer and this invoice has this issue persistently. If you look back at this customer's history you can see that we have tried the same process numerous times. So I thought maybe it is a customer credit balance or something, but can't see any credit balance reflected in the draft invoice data.
Hello! There are a number of different ways you can do this - one way is that you take whatever identifier you're using for users on your end and map that to the Stripe customer ID. You can then list all subscriptions for the customer (https://stripe.com/docs/api/subscriptions/list#list_subscriptions-customer) to check if they have any active subscriptions
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Your user should login to your system so you can retrieve their stripe account id. then you can look up their subscription in stripe to see their status.
Thanks. I gonna test it.
Sorry for delay! I just tested to make sure. You don't need charges enabled in test mode here to test Direct Charges with Standard Connect using Stripe Checkout.
Hi, I would like to know how to process a payout to a bank account token generated for a customer using Plaid. I need this so users can withdraw to their bank accounts from my app.
I already have a Plaid integration set up and know how to generate the bank account token with stripe/plaid. I'm stuck on how to use this token to pay a customer.
I hope you can help, thanks.
Oh that's great. I apologize for making you test that I should have just tested it myself to see what would happen. Thanks again!
No problem at all!
Thanks @dim hearth – bummer, since building out multiple products will get messy, plus it breaks MRR and other reporting. I'll submit it as a feature request in the hopes that others have the same use-case. Thanks again!
If my client is on my payment site and completes the subscription there and a new client is generated as a result, do I somehow get to the clientid? So I can then pass the ID into the backend (for login), whereby the two are then linked?
One way would be to listen for webhooks and listen for the account.created event. Then create the account on your backend linking it to the new stripe account id passed by the webhook
Each of your customers will need their own connect account, and you would add the plaid bank token as an external bank account to be used for payouts (see https://stripe.com/docs/api/external_account_bank_accounts/create and https://stripe.com/docs/connect/payouts-bank-accounts#multiple-accounts)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Managing bank accounts and debit cards on your Custom connected accounts.
Yes, they are in there. We are wanting to get it universally done on our website.
What does universally done mean? You already have subscriptions defined in stripe?
wow O.o
Is there any other easier way?
I do not use Stripe CLI as well :/
Just want to note, the account.created event is only something you'll need if you're using Connect. If you're doing plain old subscriptions with customers you wouldn't need this
Can you clarify your question a bit - are you asking how to get the Stripe customer ID back after a customer has been created? Are you creating subscriptions through Stripe Checkout or a different flow?
I would like users to be able to register. However, this may only happen if they have also taken out a subscription. So once the users have subscribed, they can register and see more content on my website.
Thanks a lot for this. I'm guessing I can create a connect account for my customers right? Without having to bother them with creating one by themselves..
This is what we want to be done, a link from our new website to connect to our stripe account. When connected, we want to receive rental payments of for example...1200, 800, 1349 at any time from our tenants through that one link that is connected on our site. Is this possible?
When you say "connect" do you mean to pay into your stripe account? Or do you mean connect as in Stripe Connect?
For tenants to pay online where the money will go to our stripe account.
And will the users specify the amount to pay or you will look them up based on some id in the backend and determine which they need to pay?
So let me get this straight - in your integration for a new client, you'd create a stripe customer and subscription. Now that they're subscribed, you want to give them the option of being able to register on your site?
Users specify the amount to pay
Then the path of least resistance would be to create 3 products, one for each amount and subsequently three stripe payment links. Place those three links on your site and let the user choose which to click to pay.
yes excatly. First subscription and than the register. No register without subscription. And no register mean, that you have online the default content on the website.
Got it - and when they register for your site are they doing so with their email address?
yes, they do.
Okay, so then what I would suggest is that when they go to register you check whether they already ahve an associated Stripe Customer object by making a request to list all customers with that particular email (https://stripe.com/docs/api/customers/list#list_customers-email). If there are no customers with that email then you know that they have never subscribed and you can have them go through the subscription flow. Depending on what you want, you can also take it a step further and confirm that the returned customer has an associated subscription as well.
I have an issue with invalid credit card details being entered for subscriptions with a free trial using the hosted checkout page. Does anyone know how to force Stripe to verify the credit card details entered are valid?