#dev-help
1 messages · Page 131 of 1
Hi everyone,
Quick question, on the test environment, I am creating a transfer without a source_transaction and using the source_type bank account to transfer money from balance to connected accounts https://stripe.com/docs/connect/charges-transfers, however I'm getting an insufficient balance error.
When checking balance via API, there is a balance available, but it shows balance source type as cards so I suspect that might be related
if that is the issue, how can I make the balance available for the direct transfer from balance to connect account? I tried to add to balance option via UI in the test environment but didn't add it to the balance
These docs (https://stripe.com/docs/payments/sepa-debit/accept-a-payment?platform=checkout#compatibility) state that Checkout isn't supported for SEPA Direct Debit subscriptions. Does that imply that I must use elements?
Correct
Hi! Can someone check internally for a feature. I would like to know if Apple Pay will be coming to Stripe Tax sometime soon.
@smoky ledge no timeline for now
Hi!
I need to test how we handle customers with failed payments and invoices. When I try to retry a charge or create a test invoice through the Stripe Dashboard using one of Stripe's integration test cards for testing for errors (https://stripe.com/docs/testing), the attempt is blocked up front, preventing me from emulating a failed charge. Is there anyway around this?
Ah; thanks. If it does get added onto the pipeline; how can I find out?
@smoky ledge we don't really have a solution for this today unfortunately. Mostly email announcements (or asking regularly here). Sorry we want to improve this but we're not there yet
@boreal prawn https://stripe.com/docs/billing/testing#payment-failures is what you want
No worries; hopefully y'all can get a public roadmap out soon.
Hey @crimson needle any idea about this one? #dev-help message
hello guys i'm trying to migrate from tipsi-stripe to the new react-native-stripe. SO far i'm only able to get it to work on android but i'm getting an error, i'm using firebase cloud functions to create the payment Intent but i'm getting this error -> Error: You cannot confirm this PaymentIntent because it's missing a payment method. You can either update the PaymentIntent with a payment method and then confirm it again, or confirm it again directly with a payment method.
this is how i run the function;
@fleet kiln sorry I missed that one. There's no solution today to make funds instantly available into the bank_account balance unfortunately
stripe.paymentIntents.create({
amount: req.body.amount,
currency: req.body.currency,
description: "tutoring services",
confirm: true
})
@thorn anvil yeah that can never work. You can't confirm a PaymentIntent if you haven't already created or attached a PaymentMethod. Just remove confirm: true and then confirm the PaymentIntent client-side in the mobile app
Thanks @crimson needle so even on test environment we have to wait for the balance to be available?
thanks @crimson needle -- is it possible to create a shorter retry schedule than 1 day for testing?
@boreal prawn no it's not but that links explains the exact workaround for this
To test the effects of payment failure on an active subscription, attach the 4000 0000 0000 0341 card as the customer’s default payment method, but use a trial period to defer the attempt (a trial of a few seconds or minutes is sufficient).
The idea is that the trial ends, a new period starts, which is the same as a normal renewal
Shipping Rate is set to exclusive with VA tax of 6%. When used in checkout; it does not calculate the proper tax.
||shr_1JHeAZDd9uihyzujD1jjGZMi||
If you need the PI; I also have that.
Can you provide more details? It could be anything, I have zero context on the ask :p
Do you have the Checkout Session? My guess is that you're not properly configured for this state
Yeah; let me give you the link.
It has the normal tax on there; and also the shipping option. However; it's calculating tax off of the item and not the shipping rate also.
What are you doing to simulate tax calculation? I don't really understand
Stripe Tax; apologizes. It's supposed to auto-calculate based on location.
Apologies if this is a dumb question but how do I give single test user a custom trial period?
Sure sorry Im nitpicky but it's still missing real info
Like what exactly do you enter, why isn't that Session paid with proof it has the wrong tax?
You can't in the Dashboard, you have to write code to set trial_end to a few minutes in the future
I see this may not work for my use case since I'm trying to specifically test for users with invalid payment methods whose trials have expired
Right now it's calculating 6% tax on the 25.00 item;
it's supposed to be calculating 6% of the item PLUS 6% of the shipping rate.
(30.00 is the total with shipping;)
Let me go see if the docs have an example;
One second; I think I know what's the issue.
it doesn;t really matter though it's overall the same thing, it's just a subscription renewal and that renewal fails since it's just a test you can assume it works this way
Nevermind; I forgot to check whether that specific state taxes shipping, sorry.
Stripe Tax showed a UI with it being taxed and I was confused.
Koop; do you know why we can't change Shipping Rate information; like price and the name itself. I feel like there's a good reason.
We almost never allow you to update the amount/name of things like this since they act as records on past transactions
Ah; makes sense.
(delurking for the night but people on my team will follow up since they are based in Asia)
thanks for the help - for IOS, i'm getting
Showing Recent Messages
: Directory not found for option '-L/Users/ryanrebbas/Documents/imathtutor/ios/Pods/Stripe/InternalFrameworks'
Apple Mach-O Linker (ld) Error Group
linker command failed with exit code 1 (use -v to see invocation) , any idea where the error might come from?
Thanks for this mate - Just another one, for sending funds directly from the balance to the account, do I need to specify "bank_account"? - if use a card it works because there is available balance. So my question is would there be any problem using the card as source type? (apart from the fact that money might exceed the card charges). The second question can we not specify that option then Stripe uses whatever balance that is available?
@thorn anvil Unfortunately I am not too familiar with the react native part, do you mind raising an issue in https://github.com/stripe/stripe-react-native/issues. with detail steps on how you setup your project or how you migrated your project to react native?
@thorn anvil Did you run pod install in your ios directory?
- You don't have to specify
bank_account, it will by default use thecardbalance types to transfer to your connected account - No, there is no problem of using card as source type.
Your balance type really depends on how you accept payment from your customer. If your customer pays by credit card, the money will appear in your account's card balance; while charing user with bank account, the balance will appear in your balance as bank_account type.
You can transfer any type of balance to your connected account as long as the balance has sufficient available balance
https://stripe.com/docs/api/balance/balance_object#balance_object-available-source_types-bank_account
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yes i did
already asked the question
What version of iOS are you targeting?
Thanks that make sense. so our scenario here is that some of our customers will pay via card, and for some of our customers we are manually invoicing them, then we are going to top-up our balance via the dashboard for them, then transfer the money to connect accounts. I thought I need to use "bank_account" for these referring to our bank account but seems a misunderstanding from me. So when we top up our balance via dashboard, that top-up will be available as card source or bank_account source in the balance?
@fleet kiln let me check
11
@fleet kiln by testing the topup, the default balance type is card
Are you using Expo? If so what version of Expo and what version of stripe-react-native?
yes "expo": "^40.0.0", "@stripe/stripe-react-native": "^0.1.5",
Legend! thank you @lucid raft
@thorn anvil Ah you're on the wrong version of Expo. You need to be on at least v42 to work with 0.1.5
i'm getting this error now
[!] CocoaPods could not find compatible versions for pod "Stripe":
In snapshot (Podfile.lock):
Stripe (= 21.7.0, ~> 21.7.0)
In Podfile:
stripe-react-native (from ../node_modules/@stripe/stripe-react-native) was resolved to 0.1.4, which depends on
Stripe (~> 21.6.0)
and this when running for android
Task :expo-permissions:compileDebugKotlin FAILED
Can you try installing with expo install @Stripe/stripe-react-native
I thought expo rolled out a fix for the incompatibility, but it doesn't look like they have yet. Which means that you need Expo v42 and stripe-react-native v0.1.4
yes i keep getting this error : [!] CocoaPods could not find compatible versions for pod "Stripe":
In snapshot (Podfile.lock):
Stripe (= 21.7.0, ~> 21.7.0)
In Podfile:
stripe-react-native (from ../node_modules/@stripe/stripe-react-native) was resolved to 0.1.4, which depends on
Stripe (~> 21.6.0)
Can you try targeting Stripe iOS version 21.6.0?
how can do thar
I believe it should be in your Podfile
Is there a way to let a customer remove items or change quantity on a checkout page?
dont seem to be able to figure it out
Hey dev-help,
We deployed payment intents and tried to make transactions with it. When customer tried to authorize $99 and captured $2.21, he is seeing $0 auth and a -$99 transaction along with charged amount in his statement. We are afraid we might be refunding $99 for $0 auth and charge the customer for $2.21.
Earlier in Charges API it used to be +$99, -$99 and actual transaction amount.. so the statement settled well. But here we see $0, -$99, $2.21 which is scary.
unfortunately no. but you can create a custom UI allowing your customer to choose the items first Before creating the checkout session and redirecting them to the checkout page
@frigid light the refund will only refund up to the full charge amount. If you auth $99 but capture $2, during capture $99-$2 will be immediately refunded; so your next refund is really jsut the $2
What shows up in the customer credit card statement is controlled by their bank. But it will not impact the actually money movement.
Some bank show the authed amount and some bank don't
because they don't really present real money movement. they are just holding fund in customer's credit card
Cool. Another question, we have been waiting for $1 pre auth and seems like the customer is getting a $0 pre auth although along with $99 too. If we din't get $99 in the customers statement that would be the perfect flow for us. Is this $0 auth something new or is it Beta of $1 pre auth?
$0/$1 auth is done when you attach the credit card to your customer record. They are stripe-initiated transaction to validate the card. We try $0 first if it fails, sometimes we try $1 again.
Most of the bank won't show this but some bank does show the $0/$1 in the bank statement. They will be immeditately refunded
Okay last we heard about $1 auth was that it would be ready by 3rd quarter end so got confused. So Is it available now?
Hi, the invoice amount_due value is represented in the smallest currency unit. How can we convert efficiently to a user readable amount ? For instance: 1000 (USD) -> 10$ while for Chinese Yuan it should be 1000 (CNY) -> 1000¥ ?
Wait I'm confused; we can't let customers edit quantity? My checkout page allows for removing and changing product quantity.
You can allow customers to edit your page in a Payment Link session, but not in a checkout session
I'm on a checkout session; because Payment Links don't support Stripe Tax atm.
@smoky ledge I am sorry I am wrong here
You can configure the checkout session using https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-adjustable_quantity
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 setting the minimum number to 0 means your customer could basically remove the item
My knowledge is out of date.
@burnt needle For you 🙂 ^
Hah its fine; nobody is expected to keep up with software that changes at least once a week.
Stripe doesn't provide anything for this, unfortunately, this will need to be handled by your code. https://stripe.com/docs/currencies provides a list of all currencies and a separate list of all currencies that are subject to the zero-decimal rule. However, the docs say that CNY is not subject to the zero-decimal rule. I think that means that if you want to charge 100¥, you actually need to provide a value of 10000 to the API. Do you think that could be right?
See what currencies you can use for making charges and for paying out to your bank account.
hey Stripe! quick question
Hi guys, I have a test account which is in pending review, any way I can skip that step, I have a bunch of test accounts which are stuck in the pending review state
let's say I run an insurance brokerage that sells policies at checkout on a car rental platform - i.e. you're on carrentals.com and you can 'add' an insurance policy (my company's) to your rental order.
What kind of integration would be recommended to collect the fees for the insurance policy at the car rental's platform? Open to any and all suggestions
You can still create testing transactions on your account that is pending review. Are you facing any issues using these testing account?
are you going to be charging the user separately from the car rental place? i.e. is the user going to pay twice?
@lucid raft yeah I do that already, but if customers have second thoughts it would be really annoying for them to go through the whole process again. My service doesn't have any logins or anything.
to me, the integration that makes the most sense is that the car rental platform collects the payment, and then disburses a fraction to you based on whether the customer selected your policy.
You can add adjustable quantity with a couple lines of code; let me grab it.
which means you wouldn't build any payment infrastructure yourself, and just handle everything with ACH transfers or whatever.
Then would we require our own Stripe account? if all of my bookings get booked this way? Guess they could just wire us the payments
is the car rental platform already using stripe?
@smoky ledge yeah I'll check out the payment link session things. I don't need to collect tax. Didn't know there was a thing for that
I think so yes
i guess they could do a transfer amount/destination thing, but that seems kind of complicated and failure prone
@burnt needle
Checkout has quantity here: https://stripe.com/docs/payments/checkout/adjustable-quantity
(recently added I believe)
Configure the Checkout Session so customers can adjust line item quantity during checkout.
would you recommend one or two charges being made on the car rental platform to separate APIs? example: total booking is $100 - $80 to the car rental and $20 to insurance. $80 gets sent to the car rental's Stripe API, and the $20 gets sent to ours.
I don't think so, but I don't have a ton of experience with the problem space
price: {{PRICE_ID}},
adjustable_quantity: {
enabled: true,
minimum: 1,
maximum: 10
}
quantity: 1,
Just add those lines of code for each product and set a minimum of 0 and a maximum of whatever.
@smoky ledge hmmmm why doesnt it show that as a parameter under session object in docs
That's weird
I'm pretty sure this was added recently; so it probably hasn't rolled out to all of the docs.
if I wanted to do a "pure-stripe" solution, it would be something like "when they collect the payment, they ear-mark part of it for you, and transfer it to your Connect sub-account immediately using transfer_data on the payment intent." This has the benefit of automation, so that nobody has to manually transfer money around, but it has the drawback that you have to think through a lot of payment flow edge cases—what happens when a transaction gets cancelled, or refunded?
i just don't know enough to say whether that's a good idea though compared to the more "normal" way people would handle this kind of transaction. my guess is it isn't, but that's just a guess
Well that's great, so now if people decide they don't want the add on they can just quantity 0
You're a lifesaver @smoky ledge
Anyways; if you add those lines of code for each product; it'll allow them to edit.
Thanks
It'll remove the product entirely if it gets changed to 0;
The only drawback is they cannot add the product back once it gets removed; as with all normal e-commerce.
hello, i'm using classes and it seems to use useConfirmPayment() i need to use hooks, is there class support, how can i implement in my case?
Yeah we can always add it back on manually when we call later on to verify stuff, my main concern with not being able to remove it was that we may lose the original sale
that's SUPER helpful, thank you! Is it possible at all for our API to make a transaction based on the parameters received from the rental platform? Would be two separate transactions but can help with the cancelled/refunded transactions as they are in fact two separate services bundled together
There is class support, but it's not documented greatly. Here's all the components you can import: https://github.com/stripe/stripe-react-native/tree/master/src/components
Understandable;
how can i confirme a payment with those components?
You'd want to use the confirmPayment function, which you import like so:
import { confirmPayment } from '@stripe/stripe-react-native';
You can find all the importable functions here: https://github.com/stripe/stripe-react-native/blob/master/src/functions.ts
[TypeError: (0, _stripeReactNative.confirmPayment) is not a function. (In '(0, _stripeReactNative.confirmPayment)(clientSecret, {
type: "Card"
})', '(0, _stripeReactNative.confirmPayment)' is undefined)]
this is my implementation const {paymentIntent, error} = await confirmPayment(clientSecret, {
type: "Card",
})
hm it might be possible but it would definitely be tricky, you'd basically need a Connect sub-account on the platform's main account, and you'd need to handle the whole scope of potential payment issues (for example, what if the customer's card requires 3D Secure, and you need to prompt the user for authorization? you'd need to go through a whole two-step async flow with the car rental platform). It would be a little easier if the rental platform is already setting up the customer's card for off_session payments, because then you'd have less of a chance of 3D Secure (but not a zero percent chance). I don't even know if you can do PaymentMethod cloning with Standard Connect accounts instead of Express connect accounts, which is what you'd probably need for this. I think if you want to go down this road at all then you'd probably just want to use a normal Express Connect account and a single payment + transfer, and that's only if it makes more sense to use Stripe's transfer functionality then it would to just wire the money
How are you importing confirmPayment?
import {initStripe, useStripe, confirmPayment} from "@stripe/stripe-react-native";
Woooo thank you @icy anvil !!!!
Hmm, try using useConfirmPayment instead, as per the example here: https://github.com/stripe/stripe-react-native/blob/9f065c4905225c3174240ab6bac99c8d2f77eec7/example/src/screens/WebhookPaymentScreen.tsx#L17
thats a hook and im using classes
how to save card details for future transaction
you're using useStripe aren't you?
Have a look here: https://stripe.com/docs/payments/save-during-payment
Learn how to save card details during a payment.
its also a hook
The import statement you shared earlier has useStripe in it. Are you not using it?
i am not since it is a hook and i'm using classes
can you suggest the ways to save card details on stripe page. for example if i am clicking on button it will redirect to stripe page where i can put card details once success it will redirect to our application.
Ok, one more question for the night. Can I have a promo code that only applies if you have more than 1 product?
Like to take off $50 if you bundle 2 items together, etc
Workaround I found so far is to just set a minimum order amount, but meh
Sounds like you might be interested in Checkout in setup mode: https://stripe.com/docs/payments/save-and-reuse?platform=checkout
Learn how to save card details and charge your customers later.
Not out of the box no, you'd have to implement this logic yourself
I mean like, 2 specific products, not just based on a count
Not sure if that changes your answer, but I assume not
Is the use case that if you add 2 items to your Checkout line_items you get a 50% discount?
I think using minimum amounts is the closest you're going to get for promo codes: https://stripe.com/docs/api/promotion_codes/object#promotion_code_object-restrictions-minimum_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.
can you share simple demo link in react js
There's no demo code in react.js, you'd just follow the guide I already sent for web.
How can we set Free Trials since the dashboard option is marked as Legacy?
Are you integrating with Checkout?
There are several ways to integrate trial periods: https://stripe.com/docs/billing/subscriptions/trials
Delay payments on active subscriptions using trial periods.
guys im trying to use the new stripe-react-native library https://github.com/stripe/stripe-react-native/blob/master/src/ but it seems that the hooks folder contains what i need (use confirm payment) The problem is i'm using classes and not hooks so whats the solution to implement a the check
guys im trying to use the new stripe-react-native library https://github.com/stripe/stripe-react-native/blob/master/src/ but it seems that the hooks folder contains what i need (use confirm payment) The problem is i'm using classes and not hooks so whats the solution to implement a the check
Perfect; thanks.
try this:
import { confirmPaymentMethod } from '@stripe/stripe-react-native';
{"code": "Failed", "declineCode": null, "localizedMessage": "Card details not complete", "message": "Card details not complete", "stripeErrorCode": null, "type": null}
how can i use my custom card
i dont want to use CardField
That's not possible, you have to use CardField if you don't want to use the Payment Sheet
Similar to Elements on the web you have to use Stripe's UI component, but you can style it however you like: https://github.com/stripe/stripe-react-native/blob/master/src/components/CardField.tsx#L30
hello stripe team
on your website, you have an example code that seems insecure, perhaps i misunderstand
Learn how to embed a custom Stripe payment form in your website or application.
if the client.js code is in the browser
doesn't it mean you will have to expose the clientSecret some how?
the document says that "Secret You must keep your secret API keys confidential and only store them on your own servers. You must not share your secret API key with any third parties. Your account’s secret API key can perform any API request to Stripe without restriction. If Stripe believes that your secret API key has been compromised, we may cancel and reissue it, potentially resulting in an interruption to your Stripe services."
Hi, I have a question regarding Refunds. The payment was made for a Connected Account, (Ex: 1000), where the platform charge was included. When the refund happens, how does the platform charge get refunded? Is it rolled back completely and Stripe gives up their charge too? Or us as a Platform Account have to give it back to the end consumer?
hello! client.js is initialised using the publishable API key - It is safe and expected to be used on your client. You can read more here: https://stripe.com/docs/keys
Stripe's fee is not refunded, but the platform's fee is refunded if you choose to do so: https://stripe.com/docs/api/refunds/create#create_refund-refund_application_fee
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 Alex, thanks for the response, what about this code here on line 56:
payWithCard(stripe, card, data.clientSecret);
Hi @bleak breach, thanks for the update. So a consumer who has paid 1000, won't get the full amount back? Or they still get the full amount back but the charge that was taken by Stripe will be compensated from the Platform Account?
still getting this error {"code": "Failed", "declineCode": null, "localizedMessage": "Card details not complete", "message": "Card details not complete", "stripeErrorCode": null, "type": null} Even when using CardField. isn't when using cardField stripe will get the cardDetails automatically?
The end-user will get the full amount returned. As to who eats the Stripe fee depends on the type of charge you're making. If it's a direct charge then the connected account eats the fee (which is taken from their balance), if it's a destination charge it comes from your balance. As a platform you then have the choice whether you want to refund the application fee or not
That sounds like you didn't fill in all the fields correctly
Can you share the code you're using to confirm the payment?
const {paymentIntent, error} = await confirmPaymentMethod(clientSecret, {
type: "Card",
billingDetails: {
email: "test@gmail.com",
name: this.state.cname
}
})
console.log("ERROR2:")
console.log(error);
console.log("PAYMENT INTENT")
console.log(paymentIntent);
if(error){
this.setState({loading: false});
this.setState({errorMessage: "Transaction Failed"});
}else if(paymentIntent){
//payment successful
this.setState({loading: false});
try{
console.log("SENDING EMAIL");
this.email_sender(firebase.auth().currentUser.uid, this.state.currentAmount)
}catch(e){
}
console.log("ADDING HOURS..");
this.addHours();
}
}
}catch(e){
console.log("e")
console.log(e)
}
}
hello stripe team
I got an email from Google. Please read it.
Your app uses a non-policy-compliant version of the Stripe SDK that makes it easy to transfer information about installed packages in a way that violates prominent disclosure and privacy policy guidelines. It turned out that it has become. If necessary, please contact the provider of your SDK for more information.
Do you mind if you tell me what Google said and what I should do to resolve it?
The thing is, we are not allowed to update our app due to this problem.
this what the logs look like
The client_secret is different from the secret API key. The client_secret can only be used to complete a payment from your frontend. You should ensure that the client_secret is not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Also, make sure that you have TLS enabled on any page that includes the client secret.
@craggy kernel you'll have to talk to novu algo directly
Yeah, but where? i sended 5-6 mails and nobody answer
We can't help you here unfortunately, this is a Discord for code and development questions on the Stripe platform. For issues with a Stripe merchant you'll have to reach out to them directly rather than here. You can also try contacting Stripe support directly but they'll likely tell you the same thing: https://support.stripe.com/contact
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
ok, thx
@golden cosmos thank you, that makes things clear now
you're welcome!
@thorn anvil are you using wix react native navigation?
Have a look here: https://stripe.com/docs/apple-pay
Allow customers to securely make payments using Apple Pay on their iPhone, iPad, and Apple Watch.
I m trying since last 2 days but unable to verify my ac
i uploaded all correct details ID passport
but again and again its failed
I'm using stack navigator
is there any way to conatct and support
:question: @devout bough 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
Can you try looking through this issue and see if any of the solutions help you? https://github.com/stripe/stripe-react-native/issues/371
Try this specifically: https://github.com/stripe/stripe-react-native/issues/371#issuecomment-877764806
Hi @bleak breach, follow up for the previous questions. What's the difference between a Direct Charge and Destination Charge when it involves Connected Accounts?
See here: https://stripe.com/docs/connect/direct-charges and here: https://stripe.com/docs/connect/destination-charges
With Connect, you can make charges directly on the connected account and take fees in the process.
With Connect, you can create charges on your platform account, take fees, and then transfer remaining funds to your connected accounts.
All our apps have been sent warning emails by Google Play. The reason is Stripe SDK. Does anyone also happen to this situation?
Can you post the exact email here please?
Wait a minute, let me ask one more question, if we use a very old version of Stripe SDK, will this problem happen?
How old are we talking?
Same question for you @leaden mirage, what version of the SDK are you using?
@bleak breach
i'm not sure i know how to solve it in my case. Idont have mode="modal" for my stack nativation
This is our used Stripe SDK of flutter project.
Which flutter package are you using?
I used a simple createStackNavigator({}) method
This should be personally developed, not official.
so it should be in mode 'card'?
@twilit narwhal That's an extremely old and unmaintained package, which uses a very old version of the stripe-android SDK. You should use this package instead: https://pub.dev/packages/flutter_stripe
Thank you very much for your prompt reply. We will gradually replace it with the official package, but currently we want to know whether the warning email is because the Stripe SDK version is too old or the unofficial version is used.
It's hard to tell since that's a 3rd party library and we don't know how it works, but it's likely using an old version of the stripe-android SDK as a base, which is probably what's causing Google to send you warning emails
Great! Can you elaborate what fixed it?
const AppStack = createStackNavigator({
Home: HomeScreen,
Payment: PaymentScreen,
},
{
defaultNavigationOptions: {
gestureEnabled: false,
},
mode: "card"
});
Bear in mind that flutter_stripe is also a 3rd party library. There is no official Stripe Flutter package
added mode: "card"
@bleak breach understood. Thank you very much for your support.
@bleak breach thanks a lot for your help
No problem, glad you got it working
Hi Team ,
I have a question ..if express connect account is getting updated by login link(changing the payment method from card to Bank account) ..then where Can I capture the event
hello! you can use the account.updated event. You can read more about it here : https://stripe.com/docs/connect/webhooks
thank you for answering. i am using '14.2.0'
Did you integrate directly with the stripe-android SDK or are you using something like flutter?
@bleak breach i did integrate directly with it
Hi Alex .. I tried but with web hook I am not getting any event on account.updated
That SDK is 1.5 years old at this point. I recommend updating to the most recent version if you can
@granite basin troubleshooting this step by step! when creating the webhook, was it created with the connect parameter? https://stripe.com/docs/api/webhook_endpoints/create#create_webhook_endpoint-connect
Ok, i will. i will tell you if we can't resolve this problem despite updating to the most recent version.
@granite basin or if you go to your Dashboard, is your endpoint created under the section 'Endpoints receiving events from Connect applications'?
@Alex - Endpoints receiving events from Connect applications --was empty
checking after updating
@flat flicker I think this should be possible, but I'm not sure how. You should reach out to Stripe support about this: 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.
Thanks !!
@golden cosmos -Yes ,it is working .Thanks a lot !
Is the Stripe CLI supposed to allow us to test webhooks that are not publicly accessible? That seems what the documentation is hinting at, but I can't figure out how.
you're welcome!
Which documentation would that be?
Either way there are no "hidden" events, all the events you can trigger with the CLI can be seen by running stripe trigger
The steps at the top of https://stripe.com/docs/webhooks mention on Step 2 that the Stripe CLI allows us to test that the endpoint works before Step 3 and registering it.
Listen for events on your Stripe account so your integration can automatically trigger reactions.
how to save card and get saved cards in checkout
Checkout supports saved cards by enabling Link with Stripe: https://dashboard.stripe.com/settings/checkout
If you wish the card details entered via Checkout to be saved, you'd pass in setup_future_usage: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
i have use below code, after successful submit how to get saved card details
StripeConfiguration.ApiKey = System.Configuration.ConfigurationManager.AppSettings["Secret Key"];
var options = new SessionCreateOptions
{
PaymentMethodTypes = new List<string> {
"card",
},
Mode = "setup",
Customer = "cus_JvDa5g0miKLIjA",//objRegInfo.CustomerId_Stripe, //"{{CUSTOMER_ID}}",
SuccessUrl = "http://localhost:3000/VedicMath/AccountDetails?session_id={CHECKOUT_SESSION_ID}",
CancelUrl = "https://example.com/cancel",
};
var service = new SessionService();
var session = service.Create(options);
return Ok(session.Url);
I am trying to add a balance but it says "You must have access to livemode Issuing to top up the Issuing balance." What should I do
In setup mode the PaymentMethod should be saved to the customer in question
You should contact support about livemode issuing: 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.
how to get saved card details
You'd want to list a customer's PaymentMethods: https://stripe.com/docs/api/payment_methods/list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
how to remove and update card
Hi there, a card is just a Payment Method tighted to a customer. You can update it by https://stripe.com/docs/api/payment_methods/update and detach it from a customer by https://stripe.com/docs/api/payment_methods/detach
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.
what is mean order ID
That is a Meta data, means you can set anything you want that might be useful for your business. order_id here is just an example
okay can i change card number, expiry date and CVC number using this API
@kindred frigate not using the metadata. You can update the expiry month/year using https://stripe.com/docs/api/payment_methods/update. But for the other fields, you'll need to create a new card payment method. Those are sensitive pieces of information and you wouldn't be able to view or edit them from the payment method object
how can update the expiry month/year , can you suggest code
assuming you've created a payment method and it's been attached to a customer already, you can update the expiry month/year with this example using cURL
curl https://api.stripe.com/v1/payment_methods/pm_1JHkq5JQtHgRImA73XglxL0l \
-u sk_test_...: \
-d "card[exp_month]"=12 \
-d "card[exp_year]"=2026
@kindred frigate you can change the code sample in our docs to show the programming language of your choice
Hello, I'm stuck with a few problems, 1. i'm using stripe checkout page and i want a custom translate for the input lables, In RO language is not translated well, "Name on card" = "Numele cardului", Numele cardului is not correct: "Numele de pe card", I didn't find anything on stripe doc for this problem. 2. How can i change the order for the billing address with the shipping address? 3. If my client is a company and not a private person how can i add a check box for more info? like Company details, vat number, company name etc. (I'm using php)
How long a customer portal session is valid?
Hey guys I would like to implement a fractionnable payement . The client will not pay the full amount of the order but a fraction every month. What's the best solution to implement this. I was thinking to use suscription object
the customer portal session URL should be valid for ~5 mins, but this may change in the future
I've manage to solfe my 3 problem but i need some help with the first 2
Hi, is it possible to pass metadata all the way from setup intent creation to the payment method which will be created after setup intent is complete?
hello @vocal wagon, i'm not that familiar with Checkout but i'll try to help.
- Regarding the translation issue, it sounds as if Stripe translations are not accurate? If that's so, you could write in to Stripe support https://support.stripe.com/contact/ mentioning that.
- Could you elaborate a bit more on what do you mean by changing the order for the billing address with the shipping address?
Hello! Returning to my question from yesterday, namely the option to "remember card data" in an iOS-SwiftUI implementation. I confirm that the PaymentIntent has the setupFutureUsage flag like so:
paymentIntentParams.setupFutureUsage = .onSession
However, after successfully completing the payment with the 4242 test card, the card data is not remembered. I still need to input everything in my STPPaymentCardTextField object.
What could I be doing wrong? Also, just to be sure, what exactly should happen when the card is properly remembered?
As a reminder, my code is based on this sample: https://github.com/stripe-samples/accept-a-payment/tree/main/custom-payment-flow/client/ios-swiftui/AcceptAPayment
@golden cosmos My mistake, sorry about my exprimation. I want to change the display order for those two. Now will display the shipping input group address first and if i want the invoice input grou first
Hello @proper ledge! Subscriptions could be one way to implement this - you could set the Subscription to end after a certain number of cycles, another way would be to use 'Buy Now Pay Later' payment methods : https://stripe.com/docs/payments/buy-now-pay-later
i'm afraid not, the UI of the hosted page can't be changed to display the invoice input group first
Hi there. setupFutureUsage means to save/tight the current Card information to a Customer object within Stripe API, if you are creating one (this is often done in Server side, so it's not related to iOS). And you can charge your Customer later on. It doesn't mean on the next time it will prefill the Card Field in UI
I'm trying to set up webhooks for processing successful payments and giving extra permissions to these users in my app. The part I'm struggling is with is figuring out for which product they have paid.
Do I seriously need to write functions that query the StripeProduct based on the paymentintent, invoice, checkout.session or order object? That seems like quite a hassle...
Hi orakaro, thanks for the answer. That makes sense, I guess I have to adapt the UI client-side when the card was saved with a future usage. Does Stripe give you some kind of info (e.g in the PaymentIntent) when the customer already has a card bound to his account on the iOS side? Or can we only figure this out server-side?
It looks like you're mainly doing subscriptions here, right? In which case I'd just retrieve the subscription ID from the invoice.payment_succeeded event, retrieve the subscription and look at its items to find what product your users subscribed to: https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-price-product
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I would say the latter. I think you can give your Backend customer_id. Backend can list all PaymentMethod tightened to that customer using, for example, List PaymentMethod API https://stripe.com/docs/api/payment_methods/list?lang=ruby , when it detects there is saved information, it can tell your iOS app then you can tweak the UI yourself.
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 guys. Is there any option to use OCR with react native to create payment method and stay PCI compliant?
What do you mean by OCR?
Or maybe you know 3rd party integrration services that provides that feature
I have one subscription type (various products though: monthly, yearly, etc.). So your suggestion would work for the subscriptions. However, it is as I said then, depending on the object, I need to query the related product/subscription? And then I have other products which are game licenses, these are mostly the same other than the title of the product which can help me decide what game license I should assign.
Make card photo, parse image and create payment method
I don't think that's supported by the Stripe react native library as of right now
I think there's a native iOS way of doing this, but I don't think it exists for Android
So manual typing to cardElement is the only pci compliant way to create PM from mobile
Thank you, Paul!
hmm I'm not 100% sure but I think using Apple's built in card reader still counts as PCI compliant. I'd reach out to Stripe support who might know the definitive answer: 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.
Nice advice. Thank you)
The only downside is that my app is react-native and targeted for both android and iPhone 🙂
Kinda sad but anyways)
It depends on what information you really want. checkout.session.completed, invoice.paid and payment_intent.succeeded will all trigger at the same time if a subscription without a trial is created. You should probably only listen to one or two of those depending on what information you want. If it's just "I want to know if someone has paid for a premium product" then I'd use invoice.paid or checkout.session.completed and ignore payment_intent.succeeded, as the latter fires every time a payment completes, not just those tied to subscriptions/invoices
I just asked some big brained people internally, it's possible with stripe-react-native but only on iOS and if you use the PaymentSheet
Oh, I've never heard of it, I'll investigate. Thank you)
Which means that it's PCI compliant 🙂
The PaymentSheet is the pre-built UI: https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet
Securely accept payments online.
Paul, you are my savior!)
oh look at that we even have docs for it: https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet#card-scanning
Securely accept payments online.
My lack of english skills can't help me express all of my grattitude to you)
ty
how to get 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.
@bleak breach
Hi,
I am in a test environment and when I do a test transaction: my webhook doesn't work.
Is it because it's not a real webhook (I am using CLI for testing)?
hmm, which webhook specifically isn't firing?
can I use Stripe subscription for SasS platform?
Sure!
Ah you're asking for specifically charges on iOS? It gets a little complicated there. Are you charging for access to an app specifically?
yes
this one.
After performing a test (localhost) transaction (4242 card) everything seemed to be working just fine (stripe dashboard says I did receive a payment), but the server console is empty, so no hook was fired.
Once again I am using CLI and I AM NOT triggering an event manually
Then you'll need to use Apple's in-app purchases: https://support.stripe.com/questions/apple-pay-or-in-app-purchases-for-mobile-application-payments
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.
Do you have the CLI set up to forward events to your local server?
@thin isle Also make sure that the webhook signing secret you're using came from the CLI rather than from your dashboard
I just triggered webhook manually and there was no output in the console, perhaps something's broken. Thanks 🙂
so, the CLI webhook HAS to be fired even in test environment?
Try running stripe listen in a separate tab and trigger an event in a new tab stripe trigger payment_intent.succeeded. If you don't see the event in the first tab then try logging out and back in again with the cli (stripe logout and stripe login)
this is weird....
CLI shows events, I see payments generated by CLI in my dashboard, but the server console is empty
yep, restarting helped 🙂
Hi team,
is it possible to show checkbox or something else option for asking save card for future payments while checkout on checkout page i am using Stripe\Checkout\Session::create API
basically i want to ask here because without customer permission we can not save card details
There's no tick box, instead you'd set up future usage: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
By providing that the payment method will be saved to the customer and some language will be displayed underneath the "Pay" button
https://www.youtube.com/watch?v=NqGEMYz89HY
This tutorial is a very cool thing.
Helped me a lot, so whoever else is struggling you might find this thing helpful
⚠️For the months of May and June, get your very own .TECH Domain and help children get their start in computer science!
https://go.tech/codewitherik
Setting up Stripe on your website has never been easier! In this web development tutorial we setup Stripe on a Vue.js app with Express.js in the background and use Stripe Checkout! Check it out!
👉...
i have saved card using below code. i want to charge/deduct amount after 1 month from saved card, how can i do this. please suggest code.
StripeConfiguration.ApiKey = System.Configuration.ConfigurationManager.AppSettings["Secret Key"];
var options = new SessionCreateOptions
{
PaymentMethodTypes = new List<string> {
"card",
},
Mode = "setup",
Customer = "cus_JvDa5g",//objRegInfo.CustomerId_Stripe, //"{{CUSTOMER_ID}}",
SuccessUrl = "http://localhost:3000/VedicMath/AccountDetails?session_id={CHECKOUT_SESSION_ID}",
CancelUrl = "https://example.com/cancel",
};
var service = new SessionService();
var session = service.Create(options);
hello please suggest
@kindred frigate Hey there. There's a great guide on charging a previously setup payment method here: https://stripe.com/docs/payments/save-during-payment#web-create-payment-intent-off-session
Learn how to save card details during a payment.
@kindred frigate Let me know if anything about that isn't clear!
stripe apple pay button is only visible on incognito tab. Anyone help me?
That sounds like some of your extensions is blocking stripe.js. Can you see errors in Console?
Thank you for replying me. Let me check
I have integrated this code. I want to view transaction details in Stripe Dashboard. Can you provide a link where i can see
You can click on "Payments" on the left side bar: https://dashboard.stripe.com/test/payments
I need help 🙏🙏
after making the payment, how do I get the customer to be redirected to a page on my website?
@vocal wagon Hey! Can you share some more details about your Stripe integration? How do your customers pay you?
@hollow prairie Create a product in stripe and then create it as a link... That link I placed it directly on a button inside my website...
This is going great customers with one click are going to pay. The problem is that I need the customers after making the payment to go to a page within my website.
to create a member account
@vocal wagon Ah, so you're using Payment Links?
yes
@hollow prairie before I had stripe connected directly to my WP MemberShip plugin.
but lately when I create the button from the plugin I get an error.
@vocal wagon Got it! Right now Payment Links don't have support for URL redirection unfortunately
So it is not possible for now?
@vocal wagon If you need that level of control you'd need to use Checkout directly: https://stripe.com/docs/payments/checkout
The quickest way to build conversion-optimized payment forms, hosted on Stripe.
@vocal wagon It's not, no. But I believe it's something we'd like to make possible in the future!
@hollow prairie it was very useful to be able to do this. redirect to a thank you page.
@vocal wagon Yep, you can do this with Checkout! But not yet with Payment Links. Checkout requires some code integration though
@hollow prairie Yes, I have seen that it can be done with a code.
@hollow prairie I'm not good at coding but I'll give it a try
@hollow prairie Thank you for your time and clarifying my doubts 🙏🙏
Hi @hollow prairie
@vocal wagon Np! Let me know if you have any follow-up Qs
I am facing one issue related to google pay and apple pay payment request button. I have implemented the request button successfully on my web but when the same request I am sending with mobile its not wokring thrwoing request failed
I have added the test card also inm my payment section of chrome browser
still this issue is coming can you please help me with that
@maiden meadow Can you share a specific error or request that is failing?
yes sure
let me share the screenshot
The above error is coming whenever I am trying to place my order via mobile chrome browser
@maiden meadow Are there any failed requests in your Stripe Dashboard logs?
@maiden meadow Are you able to add some breakpoints to your code to pinpoint where this error is being thrown?
@maiden meadow What you're seeing doesn't strike me as a Stripe error, so it's very hard for me to help from just that
okay
I have to check the dashboard
but if same request made on chrome browser of mobile it should be successful right?
@maiden meadow If it's a Stripe.js web integration, then yes it 'should' just work across mobile and non-mobile browsers. Sometimes things aren't that straight forward unfortunately!
Yes I have integrated with stripe.js following that api docs but still its throwing the error
@maiden meadow Is there anything in your Dashboard indicating a log?
i have saved 3 cards. i want set Primary Card in one card
@maiden meadow The error suggests whatever payment method you're using is invalid. Is this not a Stripe test card that will error regardless?
@kindred frigate What do you mean by a 'primary card'?
okay so I think its not accpeting the test card details may be
it means deduct amount from this card.
@kindred frigate Is this when using one-time payment with a specific customer?
@maiden meadow Which test card are you using?
i have save cards using below code
StripeConfiguration.ApiKey = System.Configuration.ConfigurationManager.AppSettings["Secret Key"];
var options = new SessionCreateOptions
{
PaymentMethodTypes = new List<string> {
"card",
},
Mode = "setup",
Customer = "cus_JvDa5g",//objRegInfo.CustomerId_Stripe, //"{{CUSTOMER_ID}}",
SuccessUrl = "http://localhost:3000/VedicMath/AccountDetails?session_id={CHECKOUT_SESSION_ID}",
CancelUrl = "https://example.com/cancel",
};
var service = new SessionService();
var session = service.Create(options);
return Ok(session.Url);
@kindred frigate So you're using Checkout to save a card, but how are you charging the card?
4242424242424242 visa one
using this code
var service = new PaymentIntentService();
var options = new PaymentIntentCreateOptions
{
Amount = 300 * 100,
Currency = "INR",
Customer = "cus_JvDa5g0miKLIjA",
PaymentMethod = "pm_1JHjs4A",
Confirm = true,
OffSession = true,
};
var paymentIntent= service.Create(options);
@kindred frigate Generally you can't set a default/primary card on a customer for a one-time payment
@kindred frigate You need to pass the pm_xxx object you want to charge when creating the PaymentIntent (as you are)
@maiden meadow That card shouldn't throw an error so it's unlikely related to that
yes. it means i can mange which card PaymentMethod pass to the API
Hey team! Had a question about a payment of an invoice. Its pending and everything looks ok but the name on the payment deducted from one of our customers looks off using sepa_debit.
Normally its on the name of Stripe Technology Europe Ltd. but this customer had the payment deducted by Stripe on the name of sofatutor GmbH which seems another company that is using Stripe. Looks like something is going wrong here, wanted to double check here.
@kindred frigate Yep, but you can't set a primary PaymentMethod on a Stripe Customer object for the purpose of one-off payments. There's this field (https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) but it only works for invoices/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.
So what sort of error it could be?
:question: @slim mesa 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
@maiden meadow Did you find anything in your Stripe Dashboard logs? https://dashboard.stripe.com/test/logs
@maiden meadow If there's nothing there relating to those failed requests then it implies that it's never reaching our APIs, so you'd need to debug your code and figure out which part exactly is throwing the error
Okay i will let you know tommrow right now I have no access for dashboard
Hi Guys, just had an alert from google play store regarding out app with the following message:
We found your app is using a non-compliant version of Stripe SDK which facilitates the transmission of collection of users’ installed packages information without meeting the prominent disclosure guidelines and/or privacy policy guidelines. If necessary, you can consult your SDK provider(s) for further information.
@maiden meadow Do you know your account ID? Or an ID of a PaymentIntent? I can look
@digital condor Hey! Which version of our Android SDK are you using?
I am using strip google pay method in my store and i changed my shipping method to all over the world but when i pay using gpay method when i choose address it displays we do ship to this country
currently on 'com.stripe:stripe-android:12.1.0' I assume we just need to upgrade to the lastest SDK?
How to update month and year of saved card
Anyone help me with this problem
@digital condor Our recommendation would be to upgrade to the latest version, yes. However if you need a 12.x.x hotfix without any breaking changes you can use 12.9.0: https://github.com/stripe/stripe-android/blob/master/CHANGELOG.md#1290---2020-05-15
@kindred frigate I'm not sure what that means?
How to update month and year for saved card. Ability to change credit card info when it is expired and an ability to change credit card info when user wants to do it
@hollow prairie I have one more issue that can i modify the validtions which are on payment request button form like for name and Year and month I want modify the validations can I?
legend, thanks very much. I will pass this to our guys
@sonic vessel Hello. I'm not sure I understand the issue exactly. Can you provide a specific error or example of what you're seeing?
Right now user is able to fill the numeric digits and special characters though request is not processing but still if I want to add some valitions at primary level?
@kindred frigate Take a look here: https://stripe.com/docs/api/payment_methods/update#update_payment_method-card
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
@maiden meadow We don't control that UI I'm afraid, that's handled by Google (in the case of Chrome)
can suggest in given code where i can pass month and year information
var options = new PaymentMethodUpdateOptions
{
Metadata = new Dictionary<string, string>
{
{ "order_id", "6735" },
},
};
var service = new PaymentMethodService();
service.Update(
"pm_1EUn5VJnvmXwwenzTDs9xSu5",
options
);
I'm trying to intall Stripe CLI. Although having run the exe (windows), my pc doesn't recognize the command stripe yet. What am I missing here?
It seems like running stripe.exe doesn't actually do any installs, is that correct?
@maiden meadow Not unless you're using, Elements no. With the Payment Request Button the card collection UI is handled by Google Pay or Apple Pay
okay
@sonic vessel This sounds like a WooCommerce issue, I would recommend speaking to them directly
@still bloom Hello. After running the .exe are you able to use the stripe command in the same directory?
Yes, but only in that dir
@still bloom Yeah unfortunately that's how it works on Windows currently. It's not a global package
i know in paymentMethodcardOption have a those parameter. but how can i do this code to update my card details.
var options = new PaymentMethodUpdateOptions
{
Metadata = new Dictionary<string, string>
{
{ "order_id", "6735" },
},
};
var service = new PaymentMethodService();
service.Update(
"pm_1JHjs4AoIJ2H4yQ2EE1uOBvT",
options
);
@still bloom Although, this looks relevant: https://github.com/stripe/stripe-cli/issues/696
in this code where i can put this code
@hollow prairie Below code is working fine for update card details. Thank you...
var options = new PaymentMethodUpdateOptions
{
Metadata = new Dictionary<string, string>
{
{ "order_id", "6735" },
},
Card = new PaymentMethodCardOptions
{
ExpMonth = 7,
ExpYear = 2030,
},
};
var service = new PaymentMethodService();
service.Update(
"pm_xxxxx",
options
);
return Ok(service);
@kindred frigate 🎉
Thanks for this I will come back with error logs if there will be any in dashboard
hi there , i have query regarding refund
when i pass the application fee when charge is created , Also when i refund this charge it return All amount including (stripe fee + application fee to customer from my platform account ?
how can i refund all amount except (stripe fee + application fee ) ....??
Also no deduction from my platfrom account, this refund is occur on connect account.
@smoky hedge Hey, do you have the ID of the PaymentIntent or Charge you're looking at?
I tried a stripe test for my Google/firebase cloud function, but I get the answer of a HTTP 302. Anyone has any experience with this?
my code is
var refunds = new RefundService();
var refundOptions = new RefundCreateOptions
{
PaymentIntent = paymentIntent,
RefundApplicationFee=false,
ReverseTransfer=true
};
var refund = refunds.Create(refundOptions);
??
@hollow prairie please ??
@smoky hedge Yep, looking
@smoky hedge Ok, so you're using destination charges. In these case you as the platform are the 'merchant of record' and are ultimately responsible for refunds/disputes on your platform. Because you passed the reverse_transfer parameter when creating the refund, the original transfer (amount minus the application fee) to the connected account has been reversed: https://dashboard.stripe.com/test/connect/transfers/tr_1JHp42GOBPjZ1Bk2YDLKgcvT
@smoky hedge The Stripe processing fees from the initial payment are non-refundable. You as the platform account will burden the cost of those
@sonic vessel As explained, you should speak to WooCommerce support directly
@still bloom What response were you expecting?
hi, Stripe support Alipay?
Hi, is it necessary to add customer id in create payment intent API
Hello devs, Please I'm trying to create ID verification session for a connected account via the API so I passed StripeAccount request parameter as usual but I got "This application does not have the required permissions for this endpoint on account ‘acct_XXXXXXXXXX’"
@vocal wagon Hey! Yes, we do: https://stripe.com/docs/payments/alipay
@echo coral Hello! It is not required, no. But useful in a lot of integrations where you want to save and re-use payment information, for example
mornin' folks
Ok, thanks @hollow prairie
@jaunty stag can you share the api request id where you get that error?
https://stripe.com/docs/api/request_ids
like req_123
and: hullo
Alright, hold on....
ok, my client's currency is CHF, I see that it is not mentioned in the documentation
@vocal wagon Correct I'm afraid. Doesn't seem like it's a supported currency right now
Would the request be logged under the main Stripe account or the connected Stripe account ? because I couldn't find it under the main account.
in the documentation it says:
If you have a bank account in another currency and would like to create an Alipay payment in that currency, you can contact support. Support for additional currencies is provided on a case-by-case basis.
how can i contact support?
@vocal wagon https://support.stripe.com/contact
If you're making the request authorized as the connected account, it would show for that, but you can also get it out of the response headers. ie, when you get that error, you should be able to look at the request-id header
Would anybody be willing to share their advice on how to integrate a POS solution with stripe. Taking online payments does quite do all the flow. My clients want the flow to also work with their point of sale (cash register). The terminal device isn't available in my country. Any advice???
Okay great! I found it, The request returned 403 status, hereis the ID req_WMN1ghCyNMWJNR
that mean , platform will pay stripe fee from their pocket to customer in order to cover full amount refund ?
this transfer is goes back to customer or platform account ?
Out of curiosity, which country @azure forge ?
You can sign up for updates when Terminal is available here:
https://support.stripe.com/questions/global-availability-for-stripe-terminal ("let us know")
and if there are betas run ahead of launch you might be contact for participation
hey guys, relaying from IRC: our Android developer was trying to upgrade our Stripe SDK to the latest. Previously we had a screen where we used the Stripe SDK to allow a customer to add payment methods like a wallet. The payment method was captured and the id was sent to the backend. The backend created a stripe.Customer for the requestee and used the attachPaymentMethod to stripe.Customer to attach it. Is this still valid ? Like the dev says there are no documentation about this anymore. We were using AddPaymentMethodActivityStarter.
Thanks @jaunty stag - looking into this. Is his happening for any connected account your try, or is it isolated to this one?
That's right, if you refund the full payment amount your platform would be covering the fees. If you reverse the transfer the transferred amount to the connected account is pulled back to your platform.
I don't know about anything being removed, so i would expect it to still work. Are you experience any problems with this?
I am seeking help for the tax calculation, I couldn't able to add auto tax calculate in my stripe invoice.
@vocal wagon works on the Android side and he says he was getting "Attempted to get instance of CustomerSession without initialization." on AddPaymentMethodActivityStarter(activity).startForResult().
It happens with any connected account.
Hi,
I'm updating a subscription but not getting any metadata with the payment_intent.succeeded event. Is this normal, or am I doing something wrong?
I'm doing it with:
await this.stripe.subscriptions.update(subscriptionId, {
cancel_at_period_end: false,
proration_behavior: 'create_prorations',
items: [{
id: subscription.items.data[0].id,
price: priceId,
}],
metadata: {
brandId: '123'
}
});
@proud junco Have you reviewed the documentation about Tax & Invoicing here, and is your account set up for Stripe Tax?
Do you have any examples of specific errors/problems?
https://stripe.com/docs/tax/invoicing
Learn how to automatically calculate tax on your invoices.
The webhok then fires payment_intent.succeeded, if it's a plan that requires an "upgrade", or more expensive than current.
But metadata is lost, it seems:
"metadata": {},
Hello team,
Previously we had PaymentConfiguration.init(context, KR.strings.stripe_key) at the application level and launching AddPaymentMethodActivityStarter(activity).startForResult()
Do we need to call CustomerSession.initCustomerSession(this, ExampleEphemeralKeyProvider()) before calling that AddPaymentMethodActivityStarter
Getting this Error: Attempted to get instance of CustomerSession without initialization.
If we need to call this CustomerSession.initCustomerSession() then what is EphemeralKey.....
Is this an API error, or an SDK error?
And which versions did you go from/to?
same for customer.subscription.created event
I think SDK bcoz we are not calling any API yet
Version 12.6.1/16.0.1
what thing i need to do, if platform don't want cover any fee (application and stripe fee) in refund, what i need to do via code ?, I am creating refund like
var refunds = new RefundService();
var refundOptions = new RefundCreateOptions
{
PaymentIntent = paymentIntent,
RefundApplicationFee=false,
ReverseTransfer=true
};
var refund = refunds.Create(refundOptions);
@hollow prairie Also , is this code is correct for refund ?
Looking into this for you ⏲️
hey! i'm wondering if there is a way to set up a redirect when a user goes thru the stripe checkout process? if there is a way to redirect back to the original site?
Thank you, I'll be waiting.
Do you work with @plain gale ? This seems like the same question. Or do you two both have the same question?
@daring lodge ??
aaah yeah we both are colleagues
We are. 🙂
Got it, thanks. The change you've made jumps several SDK versions spanning multiple years and breaking changes. You need to review the changelog and make sure you've handled any of the breaking changes noted in the migration guides:
https://github.com/stripe/stripe-android/blob/master/CHANGELOG.md
I'm not sure specifically about the integration pattern you mentioned, but its likely it changed in the 2+ years yes, and you may need to make some updates.
Hey quick question! I'm trying to test specific card responses, and I see there is a test card (ends in 0341) that attaches to a customer and fails afterward. I'm not able to attach cards that decline to a customer (which is good), but I was wondering if there might be a card number that attaches to a customer and then returns a different card error (like stolen_card). I don't believe I found one here https://stripe.com/docs/testing#cards-responses but thought I would ask anyway. If those are the only test card numbers available then I will find another way to test this behavior. Thanks!
Learn about the different methods to test your integration before going live.
Hello All
we are using Stripe payments on our shopify store
most of the payments being incomplete or canceled and stripe says to change confirmation_method from manual to auto , Sharing SS here please help how can we do that
@vocal wagon Ah yea it's not expected for such subscription metadata to appear on payment intents, no.
Please bear with me folks, just working through the backlog
Please review here:
https://stripe.com/docs/connect/destination-charges#refunding-app-fee
The default is for your platform to keep the application fee, if you set one. You can "cover" the stripe fees by ensuring you charge a large enough fee for this and then not refunding the application fee.
With Connect, you can create charges on your platform account, take fees, and then transfer remaining funds to your connected accounts.
Yep! this is what the success_url is for!
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-success_url
Example:
https://stripe.com/docs/payments/accept-a-payment?platform=web#redirect-customers
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Securely accept payments online.
No, the 0341 card is the only one design to attach then error like that today
Alright, we make application fee with higher amount, if i set attribute "refund_application_fee=false", then apllication fee will not refunded in any case ? customer get remaining amount out of application fee, am i right ?
@daring lodge ??
Turns out you cannot do this as a platform on behalf of your connected accounts. You should perform any identity verifications within the scope of your own platform account.
@rocky turret How are you creating these payments? I would have expected that shopify was doing this on your behalf, in which case you'd need to reach out to them. Are you performing API requests yourself?
Hello there. Can you help me, please? A company using your payment infrastructure took money from my card without my knowledge. I wrote to them. It told me to login with user account. I don't have a user account. My card was used without my permission. They couldn't return it because I don't have a user account. How can I find people who cheated me and get their username and password information? They took all my money and won't give it back.
We are getting "Invalid_request_error" when our customer tries to place an order on our store.
Any thoughts on how we can get this sorted?
Ooops! would there by provision to be able to perform Identity verification on conneced account's behalf in the future ?
@hollow prairie ??
@vocal wagon @fluid beacon @hollow prairie
Hello there. Can you help me, please? A company using your payment infrastructure took money from my card without my knowledge. I wrote to them. It told me to login with user account. I don't have a user account. My card was used without my permission. They couldn't return it because I don't have a user account. How can I find people who cheated me and get their username and password information? They took all my money and won't give it back.
Possibly! I'm really not sure, but at least you should be able to authenticate the "human" on the computer for your connected customers even as a platform before letting them register etc
Please don't spam handles like this
Be patient, I'm getting back to people roughly in the order they ask
: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
Okay. Thank you, I appreciate your time.
Yes, if you do that then I expect your platform would keep the fee and the charge amount would be reversed from the connected account (in effect you are decline to refund your application fees to the connected account), but I would encourage you to test this flow in test mode to ensure it behaves as you intend.
Do you have some example request ids? https://stripe.com/docs/api/request_ids
Have you gone to the linked article to read about India export rules?
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 guys - another (hopefully) silly question. I have onboarded a standard account, and I'm creating a checkout session with a payment intent with a description and some metadata - I want the connected account to be able to see some information about the transaction (e.g. line items, or metadata or description, or the customer or all of this).
This is what my checkoutConfig look like (stripe.checkout.sessions.create(checkoutConfig) - NodeJS)
{
payment_method_types: [ 'card' ],
client_reference_id: '231e7b09-e3ac-4507-a1ed-696688138ded',
customer_email: 'matt@******.co.uk',
line_items: [ { price_data: [Object], quantity: 1 } ],
mode: 'payment',
payment_intent_data: {
description: 'buying this the thing',
metadata: {
customer: 'A customer',
course_id: 107,
enrolment_id: '231e7b09-e3ac-4507-a1ed-696688138ded'
},
transfer_data: { destination: 'acct_1JGxxxxxxxx' },
application_fee_amount: 750
},
success_url: 'http://localhost:3000/stripe/callback/checkout/231e7b09-e3ac-4507-a1ed-696688138ded/success',
cancel_url: 'http://localhost:3000/stripe/callback/checkout/231e7b09-e3ac-4507-a1ed-696688138ded/cancelled'
}
But, nothing useful seems to come through to the connected account side - any ideas?
Yes, we did go through the articles already but didn't find anything useful. What can be done to get an order placed on our client's side? PLEASE ADVICE
but in test mode, he showing the full charge refunded, but when i look at fee using fee-id, they show button for refund that fee in stripe Dashboard, what does it mean ?
my payment id is "pi_1JHp42GOBPjZ1Bk2TfyjThxa", please have look ....!
Is "installment plans" on the Stripe roadmap for New Checkout or should I just code this in our app like we did already for legacy Stripe Checkout. For example: "3 easy payments of just $99" so you bill the customer 3 times only and then stop billing after the 3rd charge and no 4th charge."
Is that what you're referring to?
Thanks synthrider , No we are not making API requests it is by shopify.
I don't want code the logic if it is on the roadmap to simply pass in a parameter to Stripe.
@cosmic moat Yea this is somewhat expected, as there's a separation between the payment on your platform and the transfer payment to the connected account.
What you can do though is modify the payment received by your connected account after the fact to reflect the metadata there, too.
You can get the destination_payment by using expand to get the charges.data.transfer object, then update the destination payment (a charge) to set metadata/description there.
You can't use the customer ID because it belongs to your platform, but you could include eg name/email etc.
Ok but the rules about export payments are explained in a lot fo detail there and it depends on exactly what you're doing. Can you copy and paste on of those request ids please?
Got it, thanks. I would recommend reaching out to them for support then, as the correction involved changing the code that makes API requests to Stripe.
Hi guys. I was hoping i can get some help. I am very new here and but i love this stuff and i hope to contribute in the future. But right now i ran into a problem and i was hoping that maybe someone can help...
@rocky turret before you go, can you share an example of one of thos epayment ids? eg pi_1234?
@daring lodge ??
Hello guys first time here. As I understand it in React Native while using a native module bridge to interact with the native SDK from the JS code, it is not PCI compliant because we should not use the Javascript to send card information even if is not a network request and it only goes to the native module underneath. Has anyone dealt with this before and happens to know what the correct approach is to go about collecting and creating External Accounts from React Native?
So i m making this zap in zapier. And the essence is that i want to press a button in Airtable and it goes to stripe, creates an invoice that pull in the data from airtable. And i managed to do it. Like it actually works! The trouble i am running into is the making of the api call to do the tax part of the thing.
Step 1 - we use the webhook to lookup the record in airtable to pull in all the information about it
Step 2 - we make an API put call to Stripe, asking it to create an invoice for a customer (SEE Zap Support 1 screenshot). See Zap support 2 - Stripe screenshot for what the call looks like.
As you can see i am passing the customer ID, the amount (in cents) for that invoice, the currency, the description of the invoice item. If i run it as it. Its a success! Like it actually works like it should and creates an invoice for that customer in stripe. My problem is passing in the tax! What i want is also to tell stripe to add on the tax on top of that charge. (see Zap Support 3 - Stripe screenshot).
But when i try to do that (see Zap Support 4 screenshot) - it gives me the error (see Zap support 5 screenshot).
Then i thought, maybe that is too complex, can i just add the tax via a different call, so i tried to add a flat tax of 10%. (see Zap support 6). And then a different error occured (see Zap support 7) "The app returned "Invalid array".
The next 2 steps are just repeating the step 2 but with different parameters. So if we fix step 2, we fix the rest.
Thanks a lot for the help!
@daring lodge Please ??
Right, but was your application fee refunded? It looks like no.
yeah, but how can i get to know fee refunded or not via code ??
Some Buy Now Pay Later payment method are in fact already supported via CHeckout @viscid burrow 🙂 See here:
https://stripe.com/docs/payments/buy-now-pay-later#product-support
For future availability of specific payment methods/countries please reach out to support: https://support.stripe.com/contact
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Learn about buy now pay later methods with Stripe.
You can get the application_fee from the Charge within the Payment intent using expansion:
https://stripe.com/docs/api/charges/object#charge_object-application_fee
https://stripe.com/docs/api/expanding_objects
and the app fee will include a refunds hash
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.
@acoustic river This is not legal advice and you are responsible for PCI compliance, but the RN SDK is designed to only leverage our native SDKs underneath and should allow you the easiest path to maintaining PCI compliance:
https://github.com/stripe/stripe-react-native#features
https://stripe.com/docs/security/guide#validating-pci-compliance
@tall musk Do have access to the request ID generated by this? or, is there even a stripe api request id? is this an error returned by zapier or stripe?
so this i what zapier support said: "I'm sorry for the confusion on this one, and I don't mean to play a game of Hot Potatoes here but Stripe would be the best people to answer this question. The Webhook step is a pretty bare-bones integration, the errors that you're getting at the moment are coming directly from Stripe and not something that Zapier generates ourselves.
Since you're using the Stripe API, which is owned and maintained by Stripe to connect to Zapier. They'll have additional logs and internal notes that can help resolve these issues.
I've gone ahead and pulled the log files on the error we received from Stripe. Feel free to pass this along to their support team to take a look!
https://cdn.zapier.com/storage/files/26d0ca4c7a55d525aa67f92e5aa15c34.txt
https://cdn.zapier.com/storage/files/628d0854670774c13dbede27787f15d1.txt
Let me know if you need any help along the way, I'm happy to take a look for you!"
Okay cool - thanks - I think I get it! If this was a standard account connected via oauth, I think that would effectively make a direct charge? And therefore would get more data?
Anyone have tips for moving from webhook testing to a live endpoint?
Webhooks worked perfectly for me locally but now the endpoint I registered is only returning 404 errors
@vocal wagon hello
I'm able to see a successful 200 request, though, for each test webhook I send to the new endpoint
hi!
Yea, if that were a direct charge for a standard account they'd be able to see the payment intent metadata you put there without the extra step 👍
Can you find this error in your dashboard request logs?
https://dashboard.stripe.com/test/logs
@vocal wagon 404 means your endpoint isn't up? I would try isolating that first and making sure your webhook endpoint (the one in livemode) is up by making a simple HTTP Post request to it.
I am having an extra 5 cents added to the actual price and I am not sure why?
Can I give you the customer id?
For the react-native project, is there future plans for creating a BankAccountField component?
For external accounts to be used with the Connect feature, only debit cards and bank accounts could be used. As far as the docs go, I don't see a way to create those on the client (react-native).
hmm just an empty one?
@sage burrow hello, can you share the Charge ID? or Price ID? the Customer ID wouldn't be helpful
@elfin bay hello
@elfin bay you use CardField to tokenize a debit card, and you set up your own fields to collect a bank account for the Connect accounts.
@vocal wagon yes just an empty one is fine too, if that 404's that means your endpoint whatever url, does not actually exist there
hey @bold basalt 🙂
huh okay - how would you recommend fixing this? the URL should be there because of my url conf I think
and because it is the same endpoint that I used in testing
Link to the docs on the different options for Stripe Connect - which publishable key (the platform's or the Connected account) etc.
Do you have a link to the docs where that is explained?
@bold basalt Here is the charge id ch_0JGcKftC5CmKO3Cdj1ArhYkr
how exactly can I do this? I don't see a way to create a token for a bank account
@elfin bay looking
@viscid burrow I sent you the link in DM earlier: https://stripe.com/docs/connect/authentication#adding-the-connected-account-id-to-a-client-side-application
stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}',
});```
as the code snippet says, you pass the Platform publishable key.
Learn how to add the right information to your API calls so you can make calls for your connected accounts.
@vocal wagon
how would you recommend fixing this?
first I want to identify what the issue is. That is why I wanted you to verify that it is a 404, did you verify that is happening?
@elfin bay you use createToken() which can create a BankAccount ... though I think that may not be supported right now? https://stripe.dev/stripe-react-native/api-reference/interfaces/card.createtokenparams.html
Don't have my RN samples up right now, do you mind checking for me?
Documentation for @stripe/stripe-react-native
Well
as per @young ibex on https://github.com/stripe/stripe-react-native/issues/448#issuecomment-884654008 card details can't be sent over the JS thread which probably means that it applies to Bank Accounts as well
so I see no other way of creating bank account tokens
unless a BankAccountField is implemented? 🤷♂️
@elfin bay bank account details aren't subject to PCI rules though, so it only applies to card details
oh really?
@elfin bay yes
@elfin bay there's no BankAccountField in Elements or iOS/Android SDKs, which is why stripe-react-native doesn't have one either, you can build your own text input fields to collect that info
@bold basalt do you need more information?
@sage burrow oh missed you msg, see it now, looking
@bold basalt no worries! I cn se you are busy 👍
@bold basalt that's nice, I currently have my own bridge with the iOS/Android SDKs. I guess for the time being, I'll continue using that until the createToken supports Bank Accounts
thanks for the clarification, appreciate you 🙂
@elfin bay glad to help!
@sage burrow according to this event: https://dashboard.stripe.com/test/events/evt_0JGcKhtC5CmKO3CdBh9jZNhf
looks like there was a starting balance of $0.05 on the Customer: "starting_balance": 5,
which is where the 5c is coming from
How can I avoid to have a a starting balance for a customer? I am not sure whay they have a starting balanc. They shouldn't
@sage burrow https://dashboard.stripe.com/test/customers/cus_JuPxXndbIoXTlt/balance_transactions
looks like there was an Invoice for 5c created earlier that was too small, so there's no Charge created for that but a Balance created on to the Customer (i.e. they owe 5c plus the amount of the next Invoice)
@bold basalt I am wondering why the 5 cents invoice was created.
@bold basalt any suggestions how to avoid that?
@sage burrow it was this: https://dashboard.stripe.com/test/invoices/in_0JGc1xtC5CmKO3Cdu2YHlP5o
with some proration of unused time, so ended up at 5c of "used" time.
(I just clicked on the Invoice from the Customer Balance view).
@bold basalt you mean stripe charged them for the time between the trial ended and the time they paid?
please help
@sage burrow the first Invoice was $0 due to Trial. Then the trial ended, so it charged $588 for the full year. Then the Subscription was updated with billing cycle anchor reset, so the "unused" time was credit back to the Customer, meaning that the Customer paid $588 again but the credit of "unused time from prev Invoice" was applied, leaving over $0.05 difference owed, which went to Balance
@stiff grove hello, what do you need help with
@bold basalt Is there a way to prevent charging used time?
logging in to my account
@bold basalt I don't want them to be charged for that. Ho can I accomplih that?
my phone was stole and i cant log in account becuz I dont know my code
@stiff grove please reach out to Stripe Support at https://support.stripe.com/contact as they have options for account recovery there
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.
@sage burrow what behavior would you like in that case?
Like you want to charge $588, then $588 again after resetting the billing cycle anchor? That is what your code was doing so proration came into effect to off-set the second charge
@bold basalt They sign up with the default yearly plan $588 with a free trial of 15 days. in this case they signed up before the trial ended so there shouldn't be an additional 5 cents
@bold basalt iam not sure hat i am doing wrong
@munoz and if they pay after the trial ends that's ok i wanna charge them just the price plan not extra charges
hello, I'm wondering if there is any way to combine customer records in Stripe. I currently have some customers that were duplicated in error. I know I can shift payment methods to a single customer, but I'd like to preserve the payment history of the customer.
@spare hedge hello, it isn't possible to merge customers
@spare hedge or copy PaymentMethods over from one to another
i have a question about tiered pricing, anyone have time to chat briefly?
@digital raptor hello, sure go for it
okay -- context: subscription product, two sets of per-user pricing (starter / advanced). we'd like to implement user limits, and it looks like tiered pricing might be the way to do that, provided the up_to=inf is never provided for a fallback price.
so my question: what happens to tiered pricing if no up_to is provided for inf? or is there a better way to do subscription per-user pricing (on volume, not metered) with user limits?
@sage burrow just relaying back to you what happened on that Subscription, maybe it was intended or maybe not:
1/ Subscription was created with trial of 15 mins
2/ trial ended, first Invoice was charged for $588 (all expected so far)
3/ Billing cycle anchor was reset, resulting in unused time being credit back and a new $588 Invoice created due to new billing cycle anchor charge.
Your integration did 3/ above, so whatever is happening is expected. Like the scenario you described is different from what your integration did, you explicitly reset the billing cycle anchor.
@bold basalt Can I use a source as the default payment method for an invoice that is automatically charged? I want to send the invoice but automatically charge the customer's bank account already set up for ACH transfers. Customer.invoice_settings.default_payment_method
@bold basalt Is there a way to tell stripe through the api to not charge anything prior to resetting the billing cycle?
@bold basalt I just checked the call and I can confirm that I am setting 'proration_behavior' to 'none'. Is there anything else that I can do to accomplish what I want?
@sage burrow in this case the charge first $588 charge was because the trial ended. Trial was 15 mins, not 15 days.
The second Charge did not pass proration_behavior: none according to this request:
https://dashboard.stripe.com/test/logs/req_wf3JAACtMhK5YI
If you did pass that, it would result in $588 payment (once trial ends) and another $588 payment on billing anchor reset, no credit proration though
@quick harbor hello, source won't work for that field, do you have an ACH debit bank account attached to that Customer?
@digital raptor can you give me an explicit example, so I can wrap my head around your use-case better?
esp this part: " provided the up_to=inf is never provided for a fallback price."
@bold basalt can I check the logs without having access to dashboard. I have the privte and public keys?
@sage burrow request logs are only Dashboard accessible
@bold basalt so the reason they were charged the extra 5 cents is because the proration_behavior was not set to none in that call? Is that what you are saying?
@sage burrow "they were charged the extra 5 cents" -> they were credit back unused time of $587.95 for the original $588 (due to proration) and then charged $588 again, leaving over 5c due.
If you passed proration_behavior: none you would get two charges of both $588 and no credit. IF that is what you intended
@bold basalt
Product: Starter Access (Monthly Subscription)
Price (tiered): Tier 1 - up_to=5, unit_amount=1000
Product: Pro Access (Monthly Subscription)
Price (tiered): Tier 1 - up_to=30, unit_amount=2500
No other products or tiers defined. What happens when a customer tries to get their 31st Pro Access subscription--that is, increase the user count to 31?
@digital raptor I think (and could be wrong, you might have to test) you might need to create an up_to inf tier, the API might validate that.
You can "enforce" that a Customer can never go up to greater than 30 if you're only allowing them to update their tiers via your application code, so you control whether >30 is doable or not
@bold basalt no this i not what I intended. And they didn't receive a credit of 5 cents they were charged 5 cents. And when I look at the charges on my side it says they were charged only one time $588.05
hmunoz I am confused now
okay. so what i'm hearing you say is that this should happen on the app side. if that's wrong let me know--otherwise thank you for your time.
@sage burrow "And they didn't receive a credit of 5 cents they were charged 5 cents." -> they did not get credited 5c right, let me clarify. They got charged $588, then got credited $587.95, then got charged $588 again from the $587.95 credit, leaving over 5c due.
@digital raptor first I'd try creating a tier without an up_to inf tier, to see if that is doable, I don't know off hand, I think it has to be defined.
If it is required, then I would enforce in your code that a user can never do Pro Access Price greater than 30
@bold basalt I am gonna have to leave now. I still don't understand and I am quite confused now. Thank you for your time!
@bold basalt 'fiddle around and find out' is kinda my wheelhouse. 🙂
@sage burrow let me know if I can clarify, it helps to see this from the Dashboard, it makes it clear the sequence of events
Hey guys
When doing pending updates for subscriptions, and the payment fails but the customer has credit, I end up in a limbo-ish situation where the balance has been deducted from their customer object but no change was made to their subscription because the invoice was not fully paid.
It appears Stripe deducts the customer credit balance, issues an invoice and then stalls there when the payment fails
That's kind of a problem I don't really know how to solve
@vocal stump hello, I think that might be expected for now, I've heard that being a thing. let me double check myself
i'm getting this error when trying to pod install -> [!] CocoaPods could not find compatible versions for pod "Stripe":
In snapshot (Podfile.lock):
Stripe (= 21.7.0, ~> 21.7.0)
In Podfile:
stripe-react-native (from ../node_modules/@stripe/stripe-react-native) was resolved to 0.1.4, which depends on
Stripe (~> 21.6.0)
Also when i build i get -> /Users/ryanrebbas/Documents/imathtutor/node_modules/expo-constants/ios/EXConstants/EXConstants.m:4:9: 'ExpoModulesCore/EXConstantsInterface.h' file not found
@bold basalt It appears I'd have to listen for invoice.payment_failed, check if the event came from a manual request to change plans and then read the applied balance from that invoice, put it back on the customer and void the invoice?
I really hate that subscriptions require an invoice to be generated before charging, it really makes going the other way a hassle
@thorn anvil hello, reading one sec
Can I set a PaymentMethod id for the default_source of a customer object?
@junior ferry Set the https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method instead
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
@vocal stump I already set that parameter but I am trying to create a card token with a customer and I keep getting this error message: "The customer must have an active payment source attached."
Don't create card tokens, they're legacy. Create payment methods
I have to because I am integrating with Shopify and they require a token
@vocal stump
Ok. But no, you cannot set the source to a payment method. You can set the default source to a source
As far as I know
Haven't touched those things in a long time though
Not sure. I don't think card tokens are meant to support 3DS so you're pretty much building a sinking boat as far as I understand?
Disclaimer; I don't work for Stripe so you might want to wait for an official reply
It would be weird if Shopify did not support payment methods
Never worked with that though so I couldn't tell you
@vocal stump the shopify API is shit
I am not suprised
@thorn anvil 1/ you're using Expo right? so there's a couple of things here.
2/ Did you edit your Podfile manually? to 21.7.0?
no i didn't touch anything
@thorn anvil what about my question 1/
yes i am
@bold basalt Am I right to assume that I can use https://stripe.com/docs/api/invoices/object#invoice_object-starting_balance of a failed invoice (which has been finalized) to adjust the customer credit after voiding the invoice?
In what way are you trying to use it? To just verify how much of the balance was used by the invoice?
@dim hearth Yes
I want to move the applied balance back to the customer
I see now that that might not work out
@thorn anvil what steps are you following so far? do you have a link?
or what, it might because the invoice would not fail if the invoice amount was less than starting balance @dim hearth ?
i.e. no charge
im just trying to do pod install after installing stripe-react-native, what do you mean by a link? im not really following any link except the documentation on github
@thorn anvilExpo set up with Stripe's ReactNative integration is different, don't follow all the steps on the github repo.
You specifically need to do this: https://github.com/stripe/stripe-react-native#expo
which links to https://docs.expo.io/versions/latest/sdk/stripe/
you do not need to do pod install with Expo from what I know. Just start with a fresh Expo project and try from the steps linked above
I'd actually suggest using both starting_balance and ending_balance to calculate how much was actually applied to that particular invoice just to be safe, and then you can just create a new customer balance transaction for that amount. I can also confirm - what you're seeing is expected (albeit annoying) behavior.
Okay. How would you suggest I reverse this? Because the invoice does generate invoice.payment_failed even when the payment is completed a few seconds later when SCA is done
I can't tell if SCA will be done at all though - it might never happen if the user abandons the flow
so just wait 10 minutes?
@dim hearth
(and obviously also reverse on any future subscription update attempts if an open invoice exists)
to reset state before trying again
if they attempt within the 10 minute wait for isntance
Instead of listening for for invoice.payment_failed I'd listen for invoice.voided so you're only correcting the customer balance once the invoice has been voided. When the invoice is still open (but payment has failed), conceptually that invoice could still be paid at a later point.
Of course, but I wanted to listen for payment_failed to do the void action
And yes, but the user won't have access to the invoice ever
unless it's paid
I could of course split it up just to make the void logic more robust
so the void webhook always does this for any invoice with applied balance
Doesn't solve the "should I wait and then void it?" problem though
Followup; what happens to the pending_update hash on the customer if I attempt to change to a new subscription (say user tries again selecting a different plan for whatever reason) while an update is already pending? Just overwritten?
aaaand should I clear that when voiding the invoice or will that be done automagically?
Sorry for the barrage
@vocal stump
"Doesn't solve the "should I wait and then void it?" problem though" -> I mean, this is really up to you and your integration. Pick an amount of time that you think is reasonable, and go with that (sorry for the vague advice, this really depends on how you're handling invoices that require SCA. for example, if you send your customer an email to complete SCA that could take MUCH longer). Also something to note, pending updates expire after 23 hours anyways and at that point the invoice is voided. So you can just rely on the invoice.voided event that comes in at that point to correct the balance.
"what happens to the pending_update hash on the customer if I attempt to change to a new subscription (say user tries again selecting a different plan for whatever reason) while an update is already pending? Just overwritten?" -> When you make another request to update the subscription to existing pending update will be overwritten, new payment will be attempted, and the expiration will be reset
"should I clear that when voiding the invoice or will that be done automagically?" -> when you void the invoice i believe everything wil be resolved automatically
sorry that took a while - been a while since i've worked with pending updates. With all that said, I would really suggest just relying on the 23 hour automatic expiration of pending updates that will void invoices for you.
Okay
Those are good news
However
I will have to manually void and reset the customer balance if the user attempts to purchase again within the 23 hour window
Otherwise they will not be using their credit as expected because it has been applied to an invoice not yet voided
@dim hearth
Yes, if you want to be sure the customer balance is applied to the new invoice if another update is attempted before the 23 hour window then you would have to do that - it's should be too bad though. Just add logic before your update request to check if the subscription already has a pending update, if it does then you void the invoice, and correct the customer balance.
@vocal stump ^^
@junior ferry Hi there! Sorry, I'm just catching up. Are you still having issues getting things to work?
Thanks
hello stripes! quick q - if I'd like to add a consumer-defined 'tip' space in my checkout form, what would be the best way to do this?
I am having trouble with creating a source with a card token: const source = await stripe.sources.create({
customer: data.customer_id,
usage: 'reusable',
token: token.id,
}
I keep getting unknown praramter: token
Hi! What's the proper way to assign the "trial_period_days" value.
Hey!
How does one bring the user on session to verify the payment intent generated by an invoice?
Currently when calling stripe.invoices.pay() it says that the payment requires further action before it can be completed successfully.
I was thinking about running stripe.paymentIntents.retrieve() on the PaymentIntent generated on the invoice generated by stripe.invoices.finalizeInvoice() and send back a secret to the client for verification. Can you confirm a paymentIntent in this way before paying the invoice?
Hello! Just to check - when you say "my checkout form" do you mean a custom checkout form that you've built, or Stripe's Checkout page?
custom checkout form I've built 🙂
[C#] Hello, I have a file that I'm pulling down from AzureStorage and converting it to an image, using ImageConverter, then I'm converting it back to a MemoryStream trying multiple different ways, from converting it to a byte array back to a memory stream, to using a second memory stream to read it.
I'm doing this using FileCreateOptions and setting the File to be the stream.
Every time I'm getting this message: "We don't currently support filet ype: application/octet-stream". I'm converting the image to a specific format using Image.Format but it doesn't matter what I try I'm constantly getting this error message.
This is for setting business logo and icon for Stripe Connect users
Hello! Can you be a bit more specific? The general answer to that is that you just pick an integer number for how long you want your trial to be, but I'm guessing since you asked you're curious about something more specific?
@dim hearth Yes I am still having some issues. From my understanding I will need to start using sources in order to create a customer token even though I have been using payment methods
Hmm... that's a bit strange. Do you have a request ID I can take a look at?
I have it setup as "trial_period_days: 7,"; but now that I've added it in. My checkout refuses to load.
trial_period_days: 7,
@dim hearth req_HlWMFUpr5xfhfa
Why do you need to start using sources? Did you get that specific guidance from Shopify?
@dim hearth
Shopify uses tokens to complete checkouts and I was using payment methods but I don;t see a way to generate tokens from saved payment methods: https://shopify.dev/custom-storefronts/checkout#stripe
hello guys, my stripe account is from Brazil there is any possibility to recurring a Debit Card from other country every month automatic?
Yes, that's a totally fine way to handle next actions required on an invoice 👍
Gotcha, so that would just be something you add in an additional input field in your form. Depending on if you're working with invoices or payment intents for one-off payments, you would either use the tip amount as a new invoice item or add it to the final total when creating the payment intent
Hello! Give me a few minutes to finish helping some other folks and then I'll look into this!
Awesome, thanks
Do you have a request ID I can take a look at? I've just tried this on my own account and I see it working fine
Dashboard isn't generating a PI or a request.
Is there any specific place it has to be in?
@bold basalt are you still around? I verified the issue from before
still getting a 404 with an empty post req
@dim hearth
Here is another failed request for creating a source: req_N9gzJ0qOneQlh3
Gotcha - I think I see your issue. You shouldn't be passing in customer when creating a source like that. Setting customer when creating a source is only used when cloning (https://stripe.com/docs/sources/connect#cloning-card-sources) sources for Connect
Just pushed a simple code change; I'm getting 502's now.
If they requests were making it to stripe you would be able to see them on your dashboard - are you seeing anything in your server logs?
I don't have access to the server logs; only thing I can see are the console errors. I also checked again; requests aren't making it to stripe.
Hello! Can you clarify your question a bit - are you asking whether it's possible to charge a debit card on a recurring basis? If so, that should be doable with Stripe Subscriptions (https://stripe.com/docs/billing/subscriptions/overview)
Mm... without the server logs it's going to be tough trying to confirm what's going on - just so I can check, do you have an account ID handy and I can try and see what's going on (no promises though)
Yeah; lemme grab it.
acct_1IpFAvDd9uihyzuj
In case anyone else knows a solution: my webhooks endpoint was working as expected in testing but now that I've updated the endpoint to my staging server instead of a local server, webhooks events are getting 404 error in response. The path is exactly the same as it was before -
I was using
localhost:8000/api/myapp/stripe/webhook/
now I'm using
Have you changed your secrets?
Yes - I updated the whsec value when I registered the live endpoint
Do you mind sharing a small code snippet that shows how you're creating the file and calling stripe?
So this is the current impl:
as you can see from the commented out code, I've tried a lot of different stuff 😂
I've also tried it without the cast from memStream to Stream
and the cloud storage service is an azure blob
Found the issue! trial_period_days is nested within subscription_data (https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-subscription_data), which your requests are not doing
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Ah! Let me go and try and fix that; and Ill be back if there's more issues.
Are you seeing any logs on your server that give any clues about what's happening?
I'm just getting the file upload snippet
unfortunately not, it just appears the url is incorrect
which doesn't quite make sense to me
this is the file upload
all I know is that all webhooks return a 404, and the problem isn't for a lack of connection to stripe because I can still complete the checkout process on my app as normal
In the Stripe dashboard for a webhook, clicking 'Failed' in the Webhook Attempts section shows a spinner for awhile, then it fails. Is that going to be fixed at some point?
you've not created a connect endpoint instead of a regular one or vice versa? I've done that before.
I'm not seeing the same behavior on my own dashboard - I would suggest writing into support so they can look further (https://support.stripe.com/contact)
Hmm...I have an Account Endpoint in Test mode
I assume that's a regular one?
Yeah it is, I think
Is your Staging one in test mode?
yep!
the account is not yet activated
I'm using a test account for this and have a live account which is activated and everything ready to go when the code is ready
Do you have an event ID I can take a look at? Going to try and see if there's anything on my end that indicates what's wrong
evt_1JHt9bDBs6ED6M9vDP6f5DD9
try this
Quick question - have you tried just passing fileStream directly in to FileCreateOptions (instead of stream)
Yep, that's when I went down this rabbit-hole of converting to an image and then back to a stream.
This is the exact exception I get: {"We don't currently support file type: application/octet-stream. Try uploading a file with one of the following mimetypes: image/gif, image/jpeg, image/png"}
(I just tried it again)
@dim hearth
I successfully was able to create a source and copy it to a connected account. I am getting an error when I try to create a token from a customer like so:
const token = await stripe.tokens.create({
customer: data.customer_id
}, {
stripeAccount: '{{Custom_Account_Id}}',
});
return token;
Error: You provided a customer without specifying a source. The default source of the customer is a source and cannot be shared from existing customers
I did like you said
Now I'm getting this error
@dim hearth
req_NACrS66elT41lF
@thorn anvil looking
Sorry about that. Please forget about subscription. Let's start from beginning. Is it possible to charge a foreign debit card? Example: I'm selling a service in Brazil, I'm using my brazilian stripe account. The user who will pay is from another country and would like to pay using debit card. Is it possible?
@thorn anvil can't say, that looks unrelated to Stripe's react native set up. I'm not the most familiar with ReactNative and Expo in general, personally haven't run into this.
@thorn anvil I'd recommend following the steps mentioned there in that error, as it seems to be just your Expo app set up related and not related to usage of the Stripe ReactNative SDK
Hmm... yeah I see what you're saying. This feels like something wrong with the heroku deployment of your backend, but I don't know enough about that to say what specifically
Do you have any docs on when downloadAsStream is doing?
Yes, that should be totally fine!
the container name is just asking it to get it from a public bucket
Back up - are you trying to clone sources from a platform to your connected account? Why are you trying to create a token of a customer?
the underlying type of the Stream is BlobReadStream
@dim hearth
https://stripe.com/docs/api/tokens/create_card
I am trying to create a token using a customer's default_source
But you already created a token earlier - why are you creating a token, generating a source from that token, and then converting it back to a token?
@dim hearth
I am doing that because I want users to be able to use the sources at a later date
This way they wont have to input their info every time
The first token is created from the card info which then I create the reusable source with. The second token should be created from the reusable source
I am having a problem processing payments in my school
@light hound Hello! How can we help?
i installed it using expo and i'm getting this error Could not find the following native modules: stripe-react-native. Did you forget to run "pod install" ?
Quick question - is there an endpoint to see spending on an Issuing card in a month?
or relative to spending control
Or like you have a limit of $500 a day and knowing if you are approaching that
Thanks!!! The user whos is going to pay needs a stripe account? Please could you give me the link of API manual to get it done?
@exotic scaffold I'm not very good with .NET, but I think you need to use FileStreamResult so you can set the MIME type (which I think is referred to as the MediaTypeHeader): https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.filestreamresult
my students are getting a "payment failed" error message when attempting to purchase my online course
If you are trying to copy the source from the platform to the connected account and get a token out of oit, you need to also set card to the customer's default source. This is not Stripe's API, it's shopify's so I'd really suggest asking their team what the recommendation is for dealing with saved payment methods like that.
@dim hearth
So I would generate a token like so?:
const token = await stripe.tokens.create({
card: source,
customer: data.customer_id
}, {
stripeAccount: 'connect_account_id',
});
Yes, that should work
@pliant lichen Not that I know of. I think you'd need to track that on your end by listening to various Issuing events.
@dim hearth awesome thank you. Hopeully that token works with the Shopify api. Their api is a mess
@bold basalt So can i not create an invoice that automatically charges a customer using the connected bank account via ach?
@thorn anvil I don't think you had to run pod install with Expo ... now I'm confused and maybe I'm misremembering... You've done all the steps under https://docs.expo.io/versions/latest/sdk/stripe/ ? also edited the app.json file?
Yeah sorry for the back and forth answers - I've never actually seen that API before, and it's not super clear to me how to do everything.
@quick harbor by connected bank account you mean the external account used for Payouts on the connected account?
If so, no that's not possible today
No, I created it as a source and attached it to a customer not connected account @crimson needle.
Ah so you mean ACH Debit, not related to a connected account?
In that case, yes it just works. You can pay an invoice with a specific BankAccount ba_123 attached to a customer
@crimson needle Yes, so to clarify. Once I create a source for a bank account and connect it to a customer, I can send a customer an invoice that automatically collects from their ba via ach? Do i need to include this in the invoice object, or set the invoice default payment field for a customer?
you don't "send an invoice" in that case. You create an Invoice and you pay it via that bank account and pass source: "ba_123" to pay it https://stripe.com/docs/api/invoices/pay#pay_invoice-source
Yeah I've tried that too. I'll try it again though and fiddle with it and see what I get
Afk now, but will possibly return tomorrow
I'm located at the border between Denmark and Sweden - can work in both places.
@azure forge I'd recommend talking to our support team instead https://support.stripe.com/contact
I keep getting this error no matter what directory not found for option '-L-L/Users/ryanrebbas/Library/Developer/Xcode/DerivedData/imathtutor-conivnbweaqkwldniopviygvmimp/Build/Products/Release-iphoneos/AppAuth'
ld: warning: directory not found for option '-L/Users/ryanrebbas/Documents/imathtutor/ios/Pods/Stripe/InternalFrameworks'
ld: library not found for -lAppAuth
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@thorn anvil what command are ou running to get that exact error? Can you share your terminal output?
also be careful as I think you have your real name/identity in that error
yea i know, i'm building my project for ios, thats the only error i get, the others are warnings
cc @bold basalt as I know you were working with them
@thorn anvil 1/ just to take a step back and confirm something, what version of stripe-react-native are you on? (from your yarn.lock or package-lock.json files)
2/ and what version of Expo are you on?
3/ what point are you getting this error? like on building with Xcode? running expo run:ios ?
how do i connect my APIs
@light hound Hello! What do you mean by "connect my APIs"? Are you a developer writing the entire code yourself to use Stripe or are you using a third-party platform or plugin instead?
@thorn anvil also what is AppAuth? afaik it isn't an internal framework used in the iOS SDK, is that something you're using in your ReactNative app?
"@stripe/stripe-react-native": "0.1.4", "expo": "^42.0.0", running on xcode
I'm using a 3rd party platform, learnworlds. to sale my online course. they informed me that my api is restricted which is the reason why stripe is giving me an error message
not sure might be firebase?
@thorn anvil can you try running expo run:ios and see if that works, rather than running through XCode?
and yeah AppAuth-iOS doesn't seem to be used in the Stripe iOS SDK but probably Firebase? https://github.com/firebase/firebase-ios-sdk/search?q=appauth&type=commits
HELLO
same error ❌ ld: library not found for -lAppAuth
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
› 2 error(s), and 3 warning(s)
Failed to build iOS project. "xcodebuild" exited with error code 65.
:question: @light hound 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
@thorn anvil did you add the firebase iOS SDK to your Expo project?
Hi just curious if in the stripe hosted checkout page, if there's multiple line items, is there a way to delete an item from the list? let's say the user changed their mind about one product but still wants to purchase another. I noticed you can only update the quantity but not remove the item, instead you need to cancel the whole order and start again
hmmm you should be able to bring the quantity down to 0 for any line items, 0 is even the default for minimum https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-adjustable_quantity-minimum
what isn't possible is
1/ remove the last line item
2/ remove the last recurring price in subscription mode
Hello - newbie here. Does anyone have any experience using pagination for a customer's subscriptions?
@frosty mural sure, what's blocking you?
@crimson needle I've read the api docs, but I guess I'm just not really understanding how to access the next page of subscriptions using a customer's id.
What's your programming language?
using php
Nice! I had the minimum set to 1, I see that setting it to 0 gives your a prompt to remove it! Thanks again
@frosty mural so you have a customer that has more than 10 or 100 subscriptions active at once?
@velvet latch yay!
@crimson needle Right now - more than 10. I honestly don't know if I will ever have one with more than 100.
okay so what you want is to use Automatic Pagination https://stripe.com/docs/api/pagination/auto?lang=php
$subscriptions = $stripe->subscriptions->all([
'customer' => 'cus_123',
]);
foreach ($subscriptions->autoPagingIterator() as $subscription) {
// Do something with $subscriptions
}```
It will paginate automatically for you
@crimson needle Oh! Ok. that seemed way too simple! Thanks. 🙂
let me know if you encounter some issues
@crimson needle will do! thanks again...
one more thing, im using the "list all products" feature on a simple site using php, and I want to use the parameter to only list active products but not sure where to put it, im using php and here's an image to what I'm referring to
you put it in the array, it's a parameter at the same level as limit
so like this? $stripe->prices->all(['limit' => 5, 'active' => true]);
gotcha!
new to the platform. how do I generate reports in a format that's legible? it's only coming off as html in notepad.
reports are exported in CSV not HTML, not sure what you see in Notepad but you want a spreadsheet software to open those reports
thanks @crimson needle
Hi there, what is the best way to process an early renewal payment of a subscription before the renewal invoice is auto-generated?
@inner trail that's mostly impossible unless you change the billing cycle to start now (but the future invoice will be a month from now instead of a month from the expected next invoice date
Thanks, that's unfortunate. I'm able to see the upcoming invoice but I guess there is just not a way to create it early.
Is it a possible workaround to process a one-time payment / one-time invoice and extend the subscription current_period_end date somehow?
Technically yes but it will be a bad idea, it will hurt your metrics and future upgrade/downgrade and proration
We are working on what we call a pre-billing API and it's in a small private beta. No clear timeline but we want to ship this publicly in the future at least
I need to add some custom data to a Stripe charge so that I can automatically fulfill their orders based on the "line items" (as I think Stripe calls them). How can I do this with a payment intent?
@noble frigate There's no "line items" on Charge or PaymentIntents. Only on a Checkout Session. Are you using Checkout?
I'm using Stripe Elements to create a custom flow, I followed the tutorial seen here. https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
That sounds like exactly what we need. We've been a long time customer since the early age of Stripe, any way we can get access to private beta so we don't have to hack around the current limitations : )
@noble frigate okay so there's no line items support in this API in that case. You could use https://stripe.com/docs/api/metadatada but it's limited in size. You're likely better off storing this in your own database instead
Hi, looking to start an online business in the UAE shortly. Its a tutoring company which requires payments from parents/students to tutors prior to each individual lesson. Money needs to be held for 24 hours after the lesson is completed before releasing to the tutor. Our company takes a certain commmision fee per lesson. Our web developers mentioned that Stripe cannot carry out all these automatic functions in the UAE right now. Is this the case? If so, when will you be able to do this? Regards 🙂
I don't think we can give access for now but let me ask internally first
@crimson needle so there’s no built in support for automating fulfillment of orders if you use stripe elements? How do people typically approach this then for example assigning subscription roles to users automatically after purchase?
@vocal wagon I'd recommend talking to our support team directly about this instead about what we support in the UAE: https://support.stripe.com/contact
I don't really understand the use-cases I'm sorry. Also if you use Subscriptions/Billing then you don't create the PaymentIntent yourself, we do for each Invoice which has line items
@crimson needle thanks
Hi all. I'm creating a subscription with payment intent with payment behavior of "default_incomplete". No problem. But before the user "checks out" they can apply a coupon, and so I'm attempting to update that subscription with the associated coupon. Works great. BUT, when they proceed with payment, the coupon is not applied to the first invoice. It's applied to the next upcoming one. What might I be doing wrong?
@inner trail we're not ready to add more people to the beta for now sorry
My use case is to automate the fulfillment of an order after a payment is processed through stripe. The docs mention this a ton and this is incredibly common, so I know it’s possible in just wondering how to do it best with stripe elements
Thank you for the update. In general, what can we do to become beta eligible for features in the future?
So if a user purchases a special privilege on the website, I want to automatically assign that privilege to their user account after the purchase is completed
@inner trail we don't really have a process for this I'm sorry.
@noble frigate I'm sorry you've lost me. Where do our docs mention this a ton exactly?
I'm really confused by what you're trying to do. PaymentIntents are used to collect a payment successfully. Fullfillment is something you own on your end today
But Is still don't know if you're using Billing for example
Yes, that all makes sense. I know that I need to handle fulfillment on my end, but I need to know exactly what product they purchased when a payment intent succeeded
Hi
@noble frigate that information would live in your own integration, not on PaymentIntent
@rotund marten hello
I am adding stripe webhook using Stripe::WebhookEndpoint.create I see that i have 10 webhooks already configured. But it is throwing an error saying i am over the limit.
Stripe::InvalidRequestError: You already reached the limit of 16 test webhook endpoints.
i see only 10 webhooks in the stripe test dashboard
can someone help me
Do you have an example request id (req_123) I can look at?
sure one min
it's likely that you have 16 endpoints but we only show 10 in the UI
you could use the API to confirm: https://stripe.com/docs/api/webhook_endpoints/list
i am not seeing any request id as it is throwing error only
is there a debug option i have to see more logs when i do Stripe::WebhookEndpoint.create ?
Hello I am trying to accept U.S and Canadian cards I followed this tutorial: https://stripe.com/docs/payments/without-card-authentication and I need help fixing some errors here is my code: https://replit.com/@KaviGupta1/US-And-Canadian-Cards-Stripe#client.js
Just wondering quickly. Is there any plan to implement more local payment gateways in the near future. More specifically thinking about Vipps in Norway
@crimson needle Stripe::WebhookEndpoint.list.data.size returns 10
yes you can paginate https://stripe.com/docs/api/pagination or increase the limit limit
oh got it. Is there a way to increase my endpoint limit ?
no the limit is 16 and it can't be increased. There shouldn't be any reason to need more than 16. Did you maybe forget to delete odler endpoints?
@spark surge we do always work on adding more payment methods for sure, but no timeline for that one at least
ok thanks for your help @crimson needle 👍
@kind python looking. You seem to get a 404 on the /pay call. No idea why and I never understand repl.it as a UI so please bear with me as I try to debug this
Ok
Ah okey, is there anyone planned currently. And is even Vipps on the list?
@spark surge I don't think it's on the list but we don't really talk about internal timelines publicly. I'd recommend registering your interest with our support team: https://support.stripe.com/contact
@crimson needle I know i can create a subscription with tiered pricing and metered usage to create an automatic weekly invoice. What if I want to create a weekly invoice with this subscription, but ALSO add another invoice item based on a sum of individually calculated transactions monitored during the week. They must be calculated individually in our backend so I can't just meter volume and multiply by one of the pricing models represented in Products.
you can add an invoice item to the invoice created each week/month. Create a webhook handler, use https://stripe.com/docs/api/invoiceitems/create to add the item to the new invoice
Ohh, i see. Does the period of the invoice item need to align with the period of the invoice?
No it doesn't have to though you can set it to what you want
@kind python okay so it seems like you created a basic HTML5 repl so it doesn't run your server code at all. It just loads index.html and runs with it. So when you hit /pay, it doesn't know what to do with it, there's no server running
You have to re-do a new repl and make sure to choose Node.js. Then you need to properly serve your view files (html, js, css). Usually you'd use something like https://expressjs.com/en/starter/static-files.html though I don't know how familiar you are with Node and Express yourself.
I made a really quick hack (thanks to @mighty hill showing me) and you can see https://replit.com/@radqdqdqqqdqd/EntireIvorySpreadsheets#index.js is working fine now
I have a question, can I subscribe to a plan a user to connect?
@maiden fractal Can you try to reword your question differently? Sorry the words mean a few different things so I'm not sure what you are asking
Is it possible to do this without listening for the invoice.upcoming event. If i create an invoice item, it will automatically be added to the existing or next created invoice right?
You can create an invoice item, it'll be pending and then will be pulled into the next invoice when it's creatd
thanks!
I subscribe a user to a plan, then I try to use connect with that same user, is it possible?
what do you call "a user" ? What does "use connect" mean?
When you subscribe someone to a price (better API than Plan) you have a Customer, which is the person paying.
An Account is the person that can receive funds because you accept payments on their behalf
i know but im trying to connect an email and subscribe this mail in a plan same time but after 3 minute this mail is eraser from connect account
@maiden fractal I'm sorry, I am not following. I think you might have a lot more details than what you're asking for now
What are you seeing, what is your code, what error(s) do you get?
-I have a plan of 3 dollars a month
-subscribe this email test@test.com
-Then I connect this same email test@test.com to connect
-Disappears in a minute from connect table
Okay how are you connecting the account exactly? Are you using OAuth?
Okay so I assume your code is incorrectly disconnecting the account right after connection. Do you have an example account id where this happened?
yes
can you share that account id?
acct_1JHyEhR4G4xoyGGY
Within the context of MOTO
if I were to create a Customer, then create a PaymentMethod with the card details, then link the Customer and PaymentMethod
then, later, create a PaymentIntent with this PaymentMethod with the MOTO params
is this same as creating a Customer, then create a SetupIntent with the card details and MOTO params
then, later, creating a PaymentIntent with that SetupIntent
Are these approaches technically different? Both seem to work.
yep you disconnected the account right after connecting it. There's a bug in your code.
My advice here is to stop the whole approach. Ignore OAuth entirely it's deprecated. Create the Express account via the API https://stripe.com/docs/api/accounts/create and then use AccountLink for onboarding. Basically follow the guide at https://stripe.com/docs/connect/express-accounts
😱
the new way is way easier @maiden fractal
so since it's likely a new integration, starting fresh is likely best
@stuck ginkgo MOTO should be used when someone gives you card details over the phone. so in the flow number 1, it doesn't make sense to say MOTO on the next payment intent right? It should be when you collect card details so the SI flow is best
As a test is it possible to use postman to request a payment intent from stripes server?
@thorny vault yep
mmmm OK. Sounds gud
@crimson needle The usage api requires a subscription item id. If i'm currently updating usage using this api and someone on my sales team wants to update the pricing for the metered billing, will i now need to update the usage api with the new subscription item id?
I want to meter usage and then give my internal org the ability to update pricing on a subscription without having to update software to reflect new ids.
Depends how you do this really. If you add a separate price id then it will have its own subscription item id yes. If you change the price on a subscription item id, you'll have to clear_usage on change I think
the easiest is to test all of this in Test mode
Good afternoon! I have a question about the discounts on an invoice
I see there are 2 fields discount and discounts, but the docs only list discounts as a parameter to be sent. Do I need to create a coupon and add that to the discounts? Or could I just pass a number to the discount field to subtract that value from the invoice?
@vestal trench you can't pass discount yourself. Ignore it, it's an old property. Just use discounts
@crimson needle great thank you, and to do that I would have to create a coupon and pass that id correct? I couldnt just pass something like 20% correct?
Correct
thank you!
Where is the documentation listing the requirements for communicating with stripe's PaymentIntent server?
@thorny vault https://stripe.com/docs/api/payment_intents/create has everything you should need. We don't have docs for Postman specifically though we have https://github.com/stripe/stripe-postman
Hello there !
I can't get past this error :
No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe?
Everything was working fine until i changed my secret api key
I changed it everywhere but my code is crashing at everytransaction
Everything is happening here :
Stack trace does point to :
at Object.verifyHeader (/var/www/yoghiit.fr/api/node_modules/stripe/lib/Webhooks.js:117:13)
at Object.constructEvent (/var/www/yoghiit.fr/api/node_modules/stripe/lib/Webhooks.js:12:20)
the API key doesn't impact signature verification. Only the webhook secret matters
are you sure you're passing the correct value for endpointSecret? You likely want to log it to compare
it has been hours since i am on it, i don't even remember if i logged it, i will do it right away
Thank you for your speed answer !
@simple dagger because you're using express, make sure that you haven't set up a body parser before this route