#dev-help

1 messages · Page 122 of 1

lost turtle
#

In that case, I can't send money back to the customers unless they create Connect accounts?

bold basalt
#

@lost turtle yes to support paying users you need to use Stripe Connect. Again, would recommend reading through all the Connect docs very thoroughly, it is a complex topic and a lot goes into deciding how to use Connect

mossy wren
#

@dim hearth Okay, so from what I'm hearing for our scenario is I would need to (1) create a subscriptionSchedule that just sets from_subscription , then updating that very same newly created object to have a phases.items.price as well as a start date? (sorry about the late reply)

sage acorn
#

Hi all. Hoping someone can assist me. I'm using Stripe CLI to test my webhooks integration. stripe listen --load-from-webhooks-api --forward-to localhost/API/Billing/Webhook but when the events occur, it's trying to post to the wrong url: [404] POST http://localhost/API/Billing/Webhook/API/Billing/Webhook ... like it's doubling up on the end there. Anyone seen this before?

daring lodge
#

@sage acorn Interesting, that seems unexpected. But, I think the forward-to spec is to provide a full URL

sage acorn
#

@daring lodge I've tried that as well.

#

If it's helpful, the only events I'm listening for at the moment are customer related (i.e. customer.created)

dim hearth
daring lodge
sage acorn
#

@daring lodge That's correct

#

The mocked events work fine. This is only occurring when using the --load-from-webhooks-api

#

Only other info I can think of is environment, which is windows. Just installed the CLI today.

daring lodge
sage acorn
#

@daring lodge looking closer at the docs... I think this is the culprit! The flag works by loading the endpoints defined in the Dashboard through the Webhooks API. It parses the path and event mapping for each defined endpoint, then appends that path to the --forward-to path provided while maintaining the event list for each endpoint.

daring lodge
#

Let me see if i can get it to behave similarly on my machine

sage acorn
#

Hah! That was it. To properly forward events from webhooks: stripe listen --load-from-webhooks-api --forward-to http://localhost and that's it!

daring lodge
#

yea i think the full url with http[s]:// is expected, so theres probably somerthing weird happening when thats missing

#

this error seems to suggest that its OK to use a relative path sometimes, but should be blocked for loading form the api

sage acorn
#

What it does, according to the docs is look at your webhooks you have setup in the dashboard, grabs the trailing URL, and appends it to what you set in the --foward-to which is why I was getting a doubled up URL

naive kettle
#

I am working on recreating existing subscriptions after a migration (that Stripe will perform). I am wondering what is the way to prevent any disruption for existing customers. What I’d like to achieve is:

  • customer has a subscription set to renew in 10 days
  • Stripe will migrate customer data and payment methods today
  • I will recreate the subscription on the new account today
  • Customer will see the renewal and will be billed on the new account in 10 days
    Is this code to recreate the subscription enough to achieve the above?
Stripe::Subscription.create(
        customer: customer_id,
        billing_cycle_anchor: old_billing_cycle_anchor,
        items: [{ plan: plan_id }],
    start_date: old_billing_cycle_anchor
)
daring lodge
naive kettle
#

@daring lodge ok. I have a ticket open already. Will ask there. Thanks.

mossy wren
#

Hi Stripe folks. I'm having issues with creating a SubscriptionSchedule, specifically with the start/end dates of phases.
I have created a SubscriptionSchedule with from_subscription to an existing subscription. Following that, I am attempting to update the newly created SubscriptionSchedule. I keep getting different errors for having invalid start/end date for one of the phases.

My goal is:

  • Keep the existing price ($0) all the way until the end of the current billing cycle, and
  • At the beginning of the new billing cycle, switch over over to a new price (paid).
#

An example of an error I'm getting is: "The subscription schedule update is missing at least one phase with a start_date to anchor end dates to."

daring lodge
#

But given your last message, does that makes sense based on your code? Are you missing the start_date as indicated?

vocal wagon
#

hello guys !

#

i have one important question! I need to build a website for an association, I read that Stripe can have special offers for association, but if people give 50$, i will never receive 50$ right ?

bold basalt
#

@vocal wagon hello

daring lodge
bold basalt
#

@vocal wagon there are Stripe fees involved with each payment yes, I don't know much about how pricing differences for special set ups etc

daring lodge
#

(this should include the start date of the existing/current phase)

vocal wagon
bold basalt
#

@vocal wagon sorry it isn't clear to me what you need help with, can you clarify?

solid sigil
#

Hi! Is the stripe-signature header always included with all webhook events? I've got an incoming event and I'm not seeing the signature, which is causing issues. The event is account.application.authorized.

tropic talon
#

Hi stripe no longer lets me capture payments by default, they sit in uncaptured when using the api, it never used to do this and its not been touched on our end.

vocal wagon
#

@bold basalt I need to know if Stripe can have no fees with donations for associations

bold basalt
#

@solid sigil hello, yes it should have the signature in the header. Is that on a new webhook endpoint? or an existing one?

#

@tropic talon can you share a PaymentIntent or request ID? Stripe wouldn't automatically change behavior like that esp for something this major

#

@vocal wagon ah ok for that please talk to Support at https://support.stripe.com/contact they can help with fee and pricing qs

solid sigil
vocal wagon
#

ok thx

tropic talon
#

I know it shouldn't but it did lol, when i rang them they helped me accept the payments but not fix the issue lol

#

I'll have to send it tomorrow when i am on the computer

bold basalt
#

@tropic talon yeah if you can share a request ID I can tell you what happened, how are you integrated? Checkout? PaymentIntents?

tropic talon
#

I got a paymentintend error

#

So i think PaymentIntent

dapper badger
#

When is the stripe fee taken? Before or after the conversion and in what currency? Default or Foreign?

bold basalt
#

@solid sigil shows on my end it was sent

#

@solid sigil that it had the Stripe-Signature header

tropic talon
#

Do u guys all work for stripe? I'm just curious

solid sigil
bold basalt
#

@tropic talon the Stripe Admins and Stripe tagged folks do, yes

tropic talon
#

Oh nice!

dapper badger
#

Hi There, When is the stripe fee taken? Before or after the conversion and in what currency? Default or Foreign?

mossy wren
#

@daring lodge I don't have immediate access to the request ID. Let me see if I can set that up. Meanwhile, this is what I have for my subscriptionSchedule update params:

                {
                  proration_behavior: "none",
                  end_date: stripeSubscription.current_period_end, <<<< from current Subscription
                  items: [{
                    price: existingPrice!.id, <<<< Customer's active Price
                  }],
                }, {
                  proration_behavior: "none",
                  start_date: stripeSubscription.current_period_end, <<<< from current Subscription
                  items: [{
                    price: activeStripePrice.id, <<<< Price we want to switch to
                  }],
                }
              ],```
tropic talon
bold basalt
#

@dapper badger fee is taken when a charge is captured and the balance transaction is created. Try creating a Charge in test mode for different currencies and see how the fees are taken

dapper badger
#

The Stripe fee would be taken before the conversion, and would be in the default currency?

#

Thanks!

tropic talon
#

Would be cool if stripe had there own ecommerce solution like shopify, like a platform to create stores themselves too

solid sigil
# bold basalt <@!562753959245119511> that it had the Stripe-Signature header

Man, I'm really banging my head against the wall. If you look at one of the recent event (evt_1JBq0eKVQGv4EdBV6SuTuhAL) responses, you'll see at the top of the response I'm outputting whether the Stripe-Signature header is present. Earlier, I dumped all the headers and didn't see it. If I use Postman and set some random value as the header, it works. 😕

bold basalt
#

@solid sigil wait which webhook endpoint are you referring to here? Can you send me a redacted url or the webhook endpoint ID?

solid sigil
#

I only have one webhook endpoint set up: we_1A8FA7LyXkL8xusLhjw4gjXN

bold basalt
#

@solid sigil hmm looking more ...

daring lodge
#

Ahh ok it seems to be complete @mossy wren -- but please do try to get the request ID from the headers, from your stripe dashboard logs, etc and @bold basalt can take a look at the exact request & error (or whoever is online later when you can get that).

mossy wren
#

@daring lodge Great. Regarding the request ID, is it also found in the error response as well?

bold basalt
#

@mossy wren yes it would come back in the header of the response

mossy wren
#

@bold basalt Got it. It is: req_0PfGTujBt3SM4B

bold basalt
#

@solid sigil have you revealed the webhook endpoint secret for your endpoint? I think you need to do that first

solid sigil
#

@bold basalt I'm not sure what you mean by "revealed"? As in within the Stripe admin UI?

#

@bold basalt Oh, I think I see what you mean. I think we're using the wrong secret when constructing the Webhook object.

bold basalt
#

@solid sigil yeah you have to reveal the secret in the Dashboard UI first I think

solid sigil
#

Ah! Yup! I'm seeing it now. Thank you!

bold basalt
#

@mossy wren I could be wrong but I think you're missing a start_date in your first phase?

mental oriole
#

@bold basalt I emailed stripe over 24 hours ago because my account was wrongly closed and I haven’t gotten any response

#

I’ve been waiting like 2 days now

bold basalt
#

@mental oriole ah I see, yeah unfortunately this channel wouldn't be the right channel to raise this with, the Support team would be the right one to talk to here, I'd say wait a bit more. We don't have account related access in this channel and also aren't the right team to help with account related questions, sorry!

sage burrow
#

Help needed with legacy specific error : billing_cycle_anchor cannot be combined with trials in this version. Consider upgrading to version 2018-02-05, where this is supported.

bold basalt
#

@sage burrow hello, what do you need help with? you can make a request on a different API version, depending on the API library you are using

sage burrow
#

@bold basalt, wondering if I can accomplish the same thing without needing to upgrade to a new version

mossy wren
#

@bold basalt If I include the start_date, I get a different error 💩
"You can not modify the start date of the current phase."
Am I putting in the wrong start date? I was initially marking it as "now"

bold basalt
#

@sage burrow what API library are you using server side to make requests?
you don't need to upgrade your entire default API version, you can make a single request on a particular API version too, depending on what library/language you're using

sage burrow
#

@bold basalt I see. I am using php composer to manage this. Do you know if I can use both libraries with composer?

bold basalt
#

@sage burrow you won't need to upgrade your library either

sage burrow
#

@bold basalt great then! awesome! thanks a lot!

bold basalt
#

and make an API request on 2018-02-05 to update that Subscription

#

@sage burrow do keep in mind that there would be changes in the response shape that is returned to you so handle those accordingly

sage burrow
#

@bold basalt sounds good! thanks!

bold basalt
#

@mossy wren try this, from the SubSchedule, pass the existing current phase's start_date and end_date as-is in your update request

lost turtle
#

Just want to make sure I have this correct. In for example a piggy bank app where a user can store their money, they should click a "connect with Stripe" button to create an express connect account in order to deposit and withdrawal?

bold basalt
#

@lost turtle so yes that will create an Express account for that person, you also have to create a payment page where end customers will come in to pay the Express accounts piggy bank. You then create a Destination Charge for $X where you transfer up to $X to the Express accounts balance.

#

@lost turtle also I'm not an expert at this but do double check with Stripe Terms if this is a supported use-case with Stripe

lost turtle
#

The piggy bank has an express account too?

#

We created a Standard account for the platform

bold basalt
#

@lost turtle the piggy bank account is the Express account.

lost turtle
#

And the customer?

bold basalt
#

@lost turtle Customer is a Customer. J

lost turtle
#

Oh, the customer doesn't need an account? Their piggy bank does

vocal wagon
#

Hi everybody,
Do you know if there is a way to filter charge by payout id?
Thanks for your help ?

dim hearth
# vocal wagon Hi everybody, Do you know if there is a way to filter charge by payout id? Thank...

You can list all Balance Transactions and specify payout (see https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) - The charge associated with the balance transaction will be found at source (see https://stripe.com/docs/api/balance_transactions/object#balance_transaction_object-source)

dim hearth
lost turtle
#

Interesting

#

So,

  • they save payment methods inside the express account
  • the express account isn't theirs
  • they don't have to create the express account
  • they can store money in the express account and get it back out

?

dim hearth
lost turtle
#

Ok. We've already implemented firebase login (it's a RN app). So they should go to payment settings and click a "connect with stripe" button and create an express account?

lost turtle
#

Nice

#

And if piggy banks are shared between users (they are more like savings jars that users help fill, like gofundme), then what about the "backend" accounts?

#

Should there just be one central stripe account for the app where everybody's money goes to?

dim hearth
lost turtle
#

Ok, good call. I'll check that with support

#

platform account, which the funds are routed to on their way to the express account

This part I don't understand -- where are they routed from and to?

#

Why not from the customer's express account to the platform, and then that in reverse when they withdraw?

#

Sorry I know this is probably all in the docs, but I think I have to understand the basics of my use case first, so then reading the docs will make sense to me

#

Otherwise I would read the docs and try to make my own plan based on that ... it would be easier to go in reverse & start with the plan and then read the docs 🙂

dim hearth
# lost turtle Sorry I know this is probably all in the docs, but I think I have to understand ...

Really, I think it would be more beneficial to read the docs - connect has a lot of different aspects and limitations, and if you get boxed into a plan early it's likely you'll have to change it once you have a better understanding of how connect works. I'd suggest starting with the very basics of what your integration needs to do (which you already know), read through the docs, and then try and model what you need on top of what stripe offers.

For your earlier question - the reason I described the funds as first going through the platform is because that's how destination charges work (you can see charts showing the flow of funds here https://stripe.com/docs/connect/destination-charges)

lost turtle
#

Yeah

#

Thanks for the help

river kestrel
#

Hello all. I just wanted to know if it is possible to accept Apple Pay only (i.e. reject all other payment methods) via Stripe? Thank you!

dim hearth
river kestrel
#

Awesome, thanks Karbi!

#

Btw, I really like that you guys are now on Discord 🙂

tacit badger
#

Hello, even though I have a support issue, I'm only a customer, and Support is unwilling to hear my case. I want to make sure I understand what has happened from a technical standpoint, since it seems to be the only way of resolving the issue faster at this rate. Is that acceptable?

dim hearth
errant sky
#

Hi everyone! Hope you're all doing well. I am attempting to test a local webhook (following https://stripe.com/docs/payments/checkout/fulfill-orders). I have CLI installed, I am getting the responses in the console fine, however I am unable to get to the point of verifying events are coming from Stripe. The line $sig_header = $_SERVER['HTTP_STRIPE_SIGNATURE']; is where it is dying, saying HTTP_STRIPE_SIGNATURE is an undefined index. I also tried running on a live server and was getting the same error.

tacit badger
# dim hearth Hello! You're totally welcome to ask, but depending on the question I may not be...

Okay, so I am a customer of proxy service, who uses Stripe as their payment processor. I have attempted to make a purchase today numerous times. All of which were declined. However, the most important point against this is that my banks were unable to see that any transaction request came in. The merchant said the error code indicated it was denied for "unknown reasons". This is why this issue is so baffling. Since I have used different banks and no one else I know is having these issues, i think there may be a customer account generated, in order to integrate invoices to the user accounts on the main site. As such, my "customer account" may have had a flag set on it. Is this the correct logic as to what may have happened?

meager oasis
#

By the sounds of it, it sounds like radar blocked the transaction

#

that would be my immediate assumption

tacit badger
dim hearth
meager oasis
#

At it's core, it's looking for things that may be irregular or out of the ordinary for a transaction, before it even goes to the bank for authorization

#

(With the goal of preventing Disputes for fraudulent card use before they appear)

tacit badger
meager oasis
#

Not necessarily

tacit badger
#

unless the merchant is lying to me, the specific description was "The card has been declined for an unknown reason."

meager oasis
#

A stripe Radar flag internally is essentially saying to the merchant, "hey we didn't let this go through because this looks really weird"

stark tide
#

that's not a stripe error message

meager oasis
#

^

tacit badger
errant sky
meager oasis
#

that sounds like the merchant isn't handling the error properly on their ernd

tacit badger
#

it was a description of the error code

stark tide
#

there's presumably some translation layer in front of that - who knows what that error actually means

#

gotcha

tacit badger
#

they did not tell me the exact error code

stark tide
#

err, sorry, actually

#

that is a stripe error code

tacit badger
#

furthermore, i used that card just days ago, and it went through just fine

stark tide
#

my mistake

dim hearth
tacit badger
stark tide
errant sky
tacit badger
#

so assuming it's any one of these. how should I or the merchant go about getting this to bypass radar

meager oasis
#

There's no gurantee that it's radar

#

that's just my suspicion

tacit badger
#

as it's being denied before hitting the bank

dim hearth
tacit badger
#

is there any way i can pull the charge ids from the payment link?

dim hearth
tacit badger
#

alright then. with this, i have enough info to dig into them

dim hearth
dim hearth
#

Do you mind putting the output here (stripping out anything you think is sensitive) to see if I get any clues?

#

@silk lark This is a channel for technical/developer questions and our rules explicitly prohibit spam/self-promotion so I've deleted your last message. If you continue to violate the rules you'll be banned from the channel

dim hearth
#

@errant sky Also want to mention - I don't believe that output is from Stripe sending the webhook event. We send those in post requests to your endpoint, and that output has REQUEST_METHOD=>GET

vocal wagon
#

hi, Iam nex with stripe. My websit eis ok, and everything ok. When I try to make a payment, (bay card or apple pay) : it doesn't work. The payment is stopped.
I tried with 3 credit cads but none works. Any solution ?

errant sky
dim hearth
errant sky
#

hmm yeah I see the get in there now

vocal wagon
dim hearth
vocal wagon
#

ok, I see that :
État de PaymentIntent : requires_payment_method

dim hearth
dim hearth
vocal wagon
dim hearth
# vocal wagon I see that : "id": "in_1JCv5GLXvLg5O5d4TiZCHoP3"

You have failing requests on your account saying that you cannot make live charges - I'd suggest contacting support at https://support.stripe.com/contact and them to fix this for you

errant sky
dim hearth
lucid raft
#

That looks like the event is forwarded successfully to the handler.

#

Are you seeing any errors in your PHP code or they are not called at all?

#

The POST returns 200 so meaning it is running correctly

errant sky
#

its failing at catch(\Stripe\Exception\SignatureVerificationException $e) for invalid signature

lucid raft
#

ooo

bleak breach
#

That screenshots suggests that you are returning a 200 back to the CLI though

#

Make sure that you're using the webhook signing secret given to you by the CLI rather than the one from your dashboard

errant sky
#

thats the whsec_?

bleak breach
#

Yup

errant sky
#

Ah, so I think that might have ultimately been the issue and I had fixed it without realizing when I followed the steps in the guide again from scratch.... think I have that all set now 😛 thanks guys

mossy wren
#

Hello Stripe! I've a question about Subscription & SubscriptionSchedule.
If I have a SubscriptionSchedule that was created with from_subscription and subsequently updated it with new phases, what will happen to the original Subscription's billing period if I am to delete the associated SubscriptionSchedule at a later time?

bleak breach
#

@mossy wren When you say "delete" do you mean release or cancel?

mossy wren
#

@bleak breach Actually, I'd like to know which one I should use. Here's what we're trying to achieve:
The scenario is this. A User is subscribed to a $0 Price plan. The Product Owner of that Subscription decides to increase the Subscription from free plan to plan with fee. By default, Stripe resets the billing period; however, we would like to have the User finish the the billing cycle at $0, then start billing them at the new plan with fee beginning the next billing cycle.

I was able to achieve this by creating SubscriptionSchedule. However, the problem now is when the Product owner decides to set the plan price back to $0; the plan with fee remains in place even if I updated the User's Subscription object (subscription.items[].price) with the new $0 price.

#

My instinct is to cancel/release the SubscriptionSchedule, but not sure if I'm on the right track.

#

I also wonder if the end_date from Subscription is altered because of the SubscriptionSchedule.

bleak breach
#

I think you're on the right track. By releasing the Subscription Schedule the subscription will continue on with the settings from the last used phase. Then you could update the released subscription to be on your free plan

#

Difference is that canceling the subscription schedule will also cancel the underlying subscription, releasing stops the schedule but the underlying subscription continues

mossy wren
#

Perfect, I'll go ahead and work with releasing the Subscription Schedule. Thank you so much.

weak briar
bleak breach
weak briar
#

Of course!

const paymentIntent = await stripe.paymentIntents.create({
  amount: Math.trunc(args.amount * 100),
  currency: 'usd',
  // Verify your integration in this guide by including this parameter
  metadata: { integration_check: 'accept_a_payment' },
});
bleak breach
#

Are you attaching a customer to this PI at any point?

weak briar
#

Hmm, possibly, but maybe not on purpose?

const billingDetails = {
  name: name,
};

const curUser = firebase.auth().currentUser;
if (curUser) {
  billingDetails.email = curUser.email;
}

const result = await stripe.confirmCardPayment(props.clientSecret, {
  payment_method: {
    card: elements.getElement(CardElement),
    billing_details: billingDetails,
  }
});
#

(This is the frontend)

#

I add an email to the billing details for reference

#

I'm not sure if this ends up attaching a customer or not

rugged coyote
#

Hi @all here....i have days trying the webhook integration for subscriptions. I have try at least 10 diferent templates, with all the templates i got error 500. I have write also to the support staff from the hosting company, but their have no clue why it is happen.....can anyone here give me a hook...

bleak breach
bleak breach
weak briar
#

Hmm okay. Strange. I'm pretty sure I'm not doing anything else

bleak breach
weak briar
#

I'll try to find one, sure

#

@bleak breach pi_1H8jO1IOTcCTLqtf0ifVeqrS should be one. This person emailed me about it

#

(It's a bit old, hopefully that's not a problem)

restive patrol
#

Hello! Can anyone help me to add stripe api code into wix embed? Cuz it needs to enter the HTTPS.

#

Something like this

bleak breach
bleak breach
# weak briar <@!849111733481504780> `pi_1H8jO1IOTcCTLqtf0ifVeqrS` should be one. This person ...

Hmm that shouldn't have shown up as "recurring". Would you be able to write into support? This will require more investigation and I want to make sure you get a response: https://support.stripe.com/contact

weak briar
bleak breach
#

Yep that should do the trick

weak briar
#

Cool. Will do. Thanks for the help!

bleak breach
#

You can tell them that you spoke to Stripe engineers on Discord and they are the ones who told you to write in

restive patrol
#

But seems like I can't find it in my dashboard.

#

Is it correct?

meager oasis
#

It would be under products

#

generate a product first, then from that products page you can create a Payment Link

#

though i'm genuinely confused as to why this dashboard seems so... Off...

restive patrol
#

Yeah found that!
thanks

tranquil bough
#

I’m trying to use the prebuilt ui (multi-step) outlined the link below@stripe/stripe-react-native
@stripe/stripe-react-native
https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet-custom

However, not sure how to pass the cart details for validation, and after validation, should I save the cart details and tie it to the payment intent id on the server database or can it be passed with the web hook payment complete event.

I’ve seen mentions of stripe checkout for web which I’m not using here hence the cart in my situation has extensive details and modifiers.

bleak breach
tranquil bough
# bleak breach The React Native SDK isn't really meant for cart manipulation, that's something ...

so I want to make sure i'm not reinventing the wheel. My plan is to include the cart details when calling the backend to create / update the payment intent, It'll be validated, creates the payment intent, then saving the cart details along with the payment intent id in our database. Once the payment hook is successful, the cart details will be published to our backend workflow. Does that sound right?

#

previously when we used tipsi-stripe, the cart was passed along with the card token to our backend, which is validated, token charged, and then goes straight to our order processing work flow, now with the payment intent the processes have to be separated

restive patrol
lucid raft
#

When you pass setup_future_usage in your payment_intent creation, Stripe will validate and setup the card. Then you can simply pull the payment_method from the Payment_intent and saved it to a customer.

tranquil bough
lucid raft
#

@tranquil bough I might misunderstood your ask. You are referring to Card Details. Have you consider using the metadata

tranquil bough
lucid raft
#

yeah, before you calling confirm payment, you may conduct an extra call to update the payment_intent with metadata https://stripe.com/docs/api/metadata to include the cart information. Then you don't need to worry about the data synchronisations as the PaymentIntent will be the source of truth where you can get the cart infor and the payment status

tranquil bough
lucid raft
#

👍

zinc radish
#

To answer your question

#

Which option do I use to link to my app

#

For example when they open the app I want them to be able to tap the photo icon and it take the, to y stride checkout

#

Please help me connect the dots

lucid raft
#

It has a step by step guide on how you can achieve that. What the screenshot you are showing is more for web implementation although you could potentially show a page in a webview;

tranquil bough
lucid raft
#

what is your cart structure? you can have multiple key value pairs. Are you storing the JSON string in a single key<>value pair?

#

or your product name is longer than 500 characters?

tranquil bough
#

it's a ntested json object, e.g. large pizza, details, extra pepperoni, no sauce etc...

#

can also be multiple items and multiple vendors

#

in one cart

#

Metadata is useful for storing additional, structured information on an object. As an example, you could store your user's full name and corresponding unique identifier from your system on a Stripe Customer object. Metadata is not used by Stripe—for example, not used to authorize or decline a charge—and won't be seen by your users unless you cho...

▶ Play video
lucid raft
#

ooo, I think you can

  1. either store an ID pointing to your internal DB so that you can get the long details out
  2. or you can be creative in terms of representing the JSON object
    e.g.
    {pizza: {details: {extra Pepperoni: true, sauce:false}}} to
    pizza.details.pepperoni: true
    pizza.detaisl.sauce: false
#

something like that

tranquil bough
#

yeah, was trying to avoid that 🙂

#

just dump the cart into strip, and i'll get it with the order confirmation

#

but now i have to keep a copy of every cart/payment intent into the server

lucid raft
#

I don't think there is out of the box solution on the API. You will have to maintain the mappings somehow as you cannot really simply dumping the JSON into stripe API.

rich onyx
#

I'm having trouble using the Android SDK after user logout. The behavior I see is that when a user logs out of the current user session and logs back in with a new session, the Android SDK remembers the previous stored payment method from the previous user session. I cannot figure out how to properly close/clear the PaymentSession (https://stripe.dev/stripe-android/com/stripe/android/PaymentSession.html). Is there any guidance on handling this case?

dreamy karma
#

HI team,
please review the screen shot i want to display discount after my tax so it's possible i am using checkout session

$session = \Stripe\Checkout\Session::create([
'payment_method_types' => ['card'],
'payment_intent_data'=>[

                                'transfer_group'=>mt_rand(000000000,999999999),
                                 
                            ],
                       
                            'line_items' => [[
                                'price_data' => [
                                    'currency' => 'gbp',
                                    'product_data' => [
                                        'name' => $brief->title,
                                    ],
                                    'unit_amount' => $invite->budget*100,
                                ],
                                'quantity' =>1,
                                 'discounts' => [[
                                'coupon' => 'ojOJ4wnc',
                              ]],
                                ]],
                                'mode' => 'payment',
                                'success_url' => url('/').'/order/success?session_id={CHECKOUT_SESSION_ID}&invite_id='.$value.'&brief_id='.$invite->brief_id.'&pr_id='.$invite->pr_id.'&title='.$brief->title,
                                'cancel_url' => 'https://example.com/cancel',
                            ]);
north ether
#

Hi Team, While retrieving the Dispute we are getting chargeId starts with 'ch_' is there any way that we can get 'py_' Id for charge.

#

When We are trying to get Dispute for connected Account we are getting 0 disputes

#

?

meager oasis
bleak breach
#

@dreamy karma VAT is calculated before discounts, as @meager oasis said

north ether
#

Hi @bleak breach @meager oasis , While retrieving the Dispute we are getting chargeId starts with 'ch' is there any way that we can get 'py' Id for charge.
When We are trying to get Dispute for connected Account we are getting 0 disputes
?

bleak breach
north ether
#

Ok

north ether
#

Hi @bleak breach is there any way to calculate payement exchanges rates ?

odd fjord
#

any instruction on how to run this inside a wordpress site

#

I have setup on local but having issues with setting up on siteground server

north ether
#

Hi @bleak breach @meager oasis
Actually when I am retrieving charges with Stripe-Account = connectedAccountId header then I am getting payment exchange rate only when I am expanding "expand[] = data.source_transfer.source_transaction.balance_transaction" in that case when I use limit 100 then facing "ERROR: First error: Error while communicating with one of our backends. Sorry about that! We have been notified of the problem. If you have any questions, we can help at https://support.stripe.com/."

bleak breach
bleak breach
dreamy karma
bleak breach
dreamy karma
#

@bleak breach you can consider + 20% tax on 2000

north ether
meager oasis
#

You can't legally collect VAT before you apply a discount, because at that point, you're technically miscalculating VAT.

dreamy karma
meager oasis
#

You can't legally do that.

bleak breach
# north ether Request Id : req_vVsyXUHHRV4BpP

This particular request failed due to the error "This property cannot be expanded (source_transfer). You may want to try expanding 'data.source_transfer' instead.". It's because the return object is a "list". you should try expand: [ 'data.source_transfer.source_transaction'] instead

meager oasis
#

That's the issue, because VAT has to be charged on the accessible amount. All VAT must be calculated after any discounts, otherwise it's a miscalculation of VAT, and at the end of the year when you file with HM Revenue, you're going to face a whole new nightmare of VAT issues

#

Stripe won't allow you to do anything that can potentially be illegal, or incorrect

bleak breach
dreamy karma
#

@meager oasis got it and one more thing i also want to charge stripe processing fee to client so how i can do that as you know that i am using Session checkout

bleak breach
bleak breach
#

Yep, looks like it worked, no?

north ether
#

Its worked but some times I am facing communication issue

frank mountain
#

@young ibex I can't seem to dismiss the keyboard on outside tap for the CardField component. I saw your answer here https://github.com/stripe/stripe-react-native/issues/334 but the link you mentioned doesn't show the CardField nor the StripeContainer. can you clarify your response please? thanks!

meager oasis
#

I'd also like to point out @dreamy karma that passing on the stripe fees may be illegal

north ether
meager oasis
#

under the new European directive PSD2, merchants are prohibited from charging consumers may not charge consumers additional fees for paying via credit or debit card. It applies to customers whos bank or card issuer, as well as the processor (I.E. Stripe Payments) are both located in the EEA

#

PGoal = Principal transaction amount (The charge after vat, in this case, 2340GBP)

#
  • the fixed fee
#

divided by 1-(percent fee you pay stripe)

dreamy karma
meager oasis
#

let me sketch this out in scope really quickly here

dreamy karma
meager oasis
#

I am not a lawyer, so i'd strongly recommend that you do bring the PSD2 directive up with your actual lawyer

meager oasis
#

I think the UK is now outside of the EEA, post brexit

#

Not sure about that though

#

Nope!

#

post brexit, the UK is no longer part of the EEA

#

(as always, confirm with your legal representative)

dreamy karma
#

@meager oasis can you sketch the formula according to this
2000
discount is 50
VAT is 400

dreamy karma
meager oasis
#

Let me find a notebook and sharpie quickly

dreamy karma
bleak breach
meager oasis
#

As I said before, vat has to be calculated based on the accessible amount

#

which is the amount following any discounts, rebates, and otherwise reductions in price

#

you cannot discount VAT. ever.

#

i'll show you how if we calculate it your way afterwards

#

or rather, the why that doesn't work

dreamy karma
odd fjord
#

any instruction on how to run this inside a wordpress site
I have setup on local but having issues with setting up on siteground server

meager oasis
#

I've just realized my phone is dead and I wouldn't be able to take apicture of this if i wanted to

#

let me open up photoshop quickly

dreamy karma
meager oasis
#

The accessible amount is the actual amount of the product

#

after all discounts, rebates, and anything else to modify that price

#

If it helps, think of it this way

#

Pretend VAT doesn't exist for a second (wouldn't it be nice?)

#

Now do all your price calculations

#

we start at 2000 GBP

#

apply the 50GBP discount

#

we're now at 1950GBP

#

that's our Pre-VAT total.

#

we take that number, and multiply it by 0.20 to get the amount of vat to be charged

#

that's 390GBP in VAT

#

Altogether, we have our total Transaction of 2340. How much the business is to receive, inclusive of VAT

dreamy karma
meager oasis
#

Still working on it

tranquil idol
#

Good afternoon, I'm afraid I've a stupid question. Is there a way to process a token generated from a different platform. My case: we have 2 platforms (a legacy one, and the new one). We would like to interchangeably process token generated from the other platform (while we are migrating everyone on the new platform). I'm pretty sure it's not doable for obvious reasons, but I'd rather double check.

#

oops wrong channel

meager oasis
#

So in the UK, you're presented with an interesting dilemma

bleak breach
# tranquil idol Good afternoon, I'm afraid I've a stupid question. Is there a way to process a t...

All objects created by Stripe can only be manipulated by the account that created them. The only way around this is to use Stripe Connect, which allows one account to make API requests on behalf of another. In your case it sounds like you'd want to share PaymentMethods between accounts, which can be done via Connect: https://stripe.com/docs/payments/payment-methods/connect#cloning-payment-methods

meager oasis
#

European Cards (Including the UK) pay a fee of 1.4%+20p, while non European cards pay a fee of 2.9%+20p

#

I'll make an equation for both

tranquil idol
bleak breach
#

That's not possible unless you connect the two accounts together

dreamy karma
tranquil idol
bleak breach
#

Yup! It would just be Standard Connect

odd fjord
#

any instruction on how to run this inside a wordpress site
I have setup on local but having issues with setting up on siteground server

tranquil idol
tranquil idol
odd fjord
#

any instruction on how to run this inside a wordpress site
I have setup on local but having issues with setting up on siteground server

#

@bleak breach

meager oasis
#

@dreamy karma For EU cards

#

@dreamy karma For non-EU cards

winter moat
#

HI there.

#

I need to do an export of my connected account with the dashboard;
The tools returns an error "Whoops! Something went wrong with your export. We're looking into it now, so please try again in a few minutes, or get in touch with our support team."

bleak breach
bleak breach
winter moat
#

thanks @bleak breach !

#

bye!

dreamy karma
#

@meager oasis thanks and i talked with owner of project about discount and VAT and she said

2000 GBP is project price
because freelancer is UK registered business so the VAT @20% is 400GBP so the freelancer is not giving discount , platform want to give 50GPB discount to client. freelancer don't want to loss money.

meager oasis
#

That's

#

Hm.

#

Who's collecting the VAT, you or the freelancer

#

who collects the VAT, and who pays the bill

dreamy karma
meager oasis
#

the freelancer

dreamy karma
#

we have 3 role
client
plaform
connected VAT account

meager oasis
#

Stripe Checkout in any case will not apply the discount after VAT

quaint tangle
#

hello, I will need information, a creator speaks French?

meager oasis
#

Ouai Je parle Français

dreamy karma
meager oasis
#

Mais je ne travaille pas pour Stripe

meager oasis
quaint tangle
#

ah mince, sait-tu si on utlise tripe pour une boutique en ligne, comment cela se passe, ils nous ouvrent un compte en banque et nous envoie une carte de crédit directment?

meager oasis
#
  1. Calculate VAT before sending the transaction to stripe
meager oasis
quaint tangle
#

ok super merci beaucoup!

odd fjord
odd fjord
meager oasis
odd fjord
#

subscriptions

#

fixed price monthly

#

I have setup one of repo on local

#

and it is working

#

but how to move this to siteground hosting?

#

with a live url

#

instructions are only for local setup

bleak breach
dreamy karma
#

@meager oasis thanks for your help

odd fjord
#

I know how to setup on wordpress site as such using various plugins

#

but I am not going to setup a wordrpress site, will be linking another site with this for payment only

#

so user will click a button on site A and land on landing page with subscription option

#

buy it and redirected back to Site A thank you page @bleak breach

vocal wagon
bleak breach
#

@odd fjord I'm not sure what your question here is. You need to be more specific in what problem you're facing

teal cobalt
#

Hello! We manage to get objects, but when we try to update the record (add metadata), we get an error.
parameter_unknown - {"metadata":{"Tax":"11.82", "Source":"Lens_spaces", "Products_SKU_List":"LENS-SPACE-MO"}}

Can you tell me what we're doing wrong? We tried to update a charge using Apex. Application - Advanced Rest Client

bleak breach
teal cobalt
#

Here's another try. req_jw8oY4KQxzlpxX @bleak breach

bleak breach
#

Here's what you passed to the Stripe API:

{
  {"metadata":{"Tax":"11.82", "Source":"Lens_spaces", "Products_SKU_List":"LENS-SPACE-MO"}}: null
}

It looks like you stringified your metadata before sending. You'd want your request to look like this:

{
  "metadata": {
    "Tax":"11.82", 
    "Source":"Lens_spaces", 
    "Products_SKU_List":"LENS-SPACE-MO"
  }
}
odd fjord
bleak breach
#

Same issue with that second request @teal cobalt , here's what you sent:

{
  {metadata:{Test:"test"}}: null
}
bleak breach
livid blade
#

I created a webhook that gets triggered on payment_intent.succeeded (so far everything is fine)

I'm using Checkout session for the payments and send a few metadata infos but in my webhook i dont get these infos, do I need add another event to get these kind of infos?

bleak breach
odd fjord
#

site ground hosting

livid blade
# bleak breach Welcome back! What did you attach the metadata to, the Checkout Session object? ...

ty, I'm using the NodeJS API wrapper and the stripe.checkout.sessions.create method there i pass the metdata like below

      const session = await stripe.checkout.sessions.create({
        payment_method_types: ['card'],
        line_items: [
          {
            price_data: {
              currency: 'usd',
              product_data: {
                name: product.name,
              },
              unit_amount: product.price * 100,
            },
            quantity: 1,
            tax_rates: [...taxIDs],
          },
        ],
        client_reference_id: user.ID,
        customer_email: user.email,
         metadata: {
          userID: user.ID
        },
        mode: 'payment',
        success_url: `${process.env.HOSTSERVER}/index`,
        cancel_url: `${process.env.HOSTSERVER}/cancel.html`,
      });
#

with payment_intent.succeeded event i confirm the payment process and update the DB but I need more infos to do that

bleak breach
# livid blade ty, I'm using the NodeJS API wrapper and the stripe.checkout.sessions.create met...

I recommend listening to the checkout.session.completed webhook event instead, that way you can get the metadata directly from the event payload. If you listen to payment_intent.succeeded it's harder to link that payment back to the Checkout Session. The Session will have the PaymentIntent ID included that you can then retrieve if you need more info: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_intent

livid blade
#

I wasn't sure about if checkout.session.completed gets triggered both canceled or succeed

#

I have a broke english i hope you understand me ✌️

bleak breach
#

No worries, it's a common misconception. There is no "checkout failed" event, only "checkout succeeded" which is checkout.session.completed

livid blade
#

thats awesome ty

teal cobalt
vocal wagon
#

alguien sabe por qué no me permite verificar mi cuenta???

cerulean pineBOT
#

: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

livid blade
#

I have an question but it's not about programming,

How does Stripe handling using fake Credit Cards? in my country there exists something like "3D secure" thats sending a OTP to the card holder via SMS does stripe support something like that?

The question why I'm asking is I will sell web scripts over my website and its possible that they get leaked and mostly leakers uses fake cards so i want protect me against them

meager oasis
#

AH. Fraud Prevention.

#

Stripe not only supports 3DS, it may be required in some cases. When a transaction is initiated, and stripe asks the issuing bank "are the funds available", in some cases, the bank will force 3DSecure before the transaction will even go through

#

Stripe also offers Radar, which prevents fraud before it even hits the bank

livid blade
meager oasis
#

Stripe Checkout is the optimal condition for stripe radar

livid blade
#

ty ^^

bleak breach
#

When using Checkout, we have built in mitigations to prevent card testing. One such mitigation is that if we detect card testing on your account we automatically enforce a CAPTCHA on the Checkout page for your account

teal cobalt
bleak breach
#

your code is inserting the whole block { "metadata": { "Tax":"11.82", "Source":"Lens_spaces", "Products_SKU_List":"LENS-SPACE-MO" }} as the key, with a value of null

vocal wagon
#

I'm very sorry to ask this. I'd like to know what webhook event I should listen too when a payment fails and need attention from the user to either change their card or confirm sca. Is there any documentation on this?

bleak breach
vocal wagon
#

We're using our own integration with PaymentIntents and Setupintents

#

and we have a subscription service too

bleak breach
vocal wagon
#

thanks @bleak breach

#

@bleak breach Great stuff, I've been reading around and I think 'invoice.payment_action_required' and 'invoice.payment_failed' are two events I can listen too that would help me to prompt our users on whether we they need to take action. At this point should I consider the subscription not active in that case and make sure they do not get the product?

Have I got the idea of how those events are supposed to be used correct? And does the requires_action state do more than identify whether sca has failed? For example does it enter that state when the card has expired

bleak breach
#

If it's anything but active or trialing I wouldn't give access to your product

#

invoice.payment_action_required specifically means that the payment hasn't failed yet, just delayed because the user needs to get back on-session to complete the payment (likely due to 3DS). If the payment method were expired you'd get a invoice.payment_failed as it'd be a hard decline

vocal wagon
#

@bleak breach That's brilliant, thanks

#

@bleak breach Sorry to bother you again. Is is better to listen to the event that triggers when a subscription enters the subscription.past_due status rather than both of the above invoice events?

#

because doesn't a sub transition into the past_due status when either of those events are trigger anyway

bleak breach
vocal wagon
#

@bleak breach ok so could I listen to the 'invoice.payment_action_required' event for when sca failed (to being the user back on session to confirm) at this point the subscription might still be active, right? And the past_due subscription change when all payments attempts have been exhausted to bring the user back on session still to perhaps update their payment method

crimson needle
#

@vocal wagon the past_due status happens after the first failed payment. But otherwise yes what you said is what I'd recommend

remote warren
#

hello everyone
how to change the email template on stripe?

crimson needle
#

@remote warren you can't really tweak the template beyond a few things like the language or the logo

remote warren
#

so any other way to send custom emails when Successfully Billed (Recurring)

rigid ridge
#

Hey! If I set auto_advance to True when finalising an invoice, it should proceed to charge the payment method associated to the payment intent, right? Because now it stays in "incomplete payment" and I am using sepa...

crimson needle
#

@remote warren we recommnd just using our official emails which any merchants use today! And otherwise you'd really build your own email integration instead

#

@rigid ridge The payment doesn't happen immediately, it happens one or two hours after finalization unless you call https://stripe.com/docs/api/invoices/pay yourself
Also it's possible that it can't be paid (hard to say but if you have an example invoice id in_123 I can look)

remote warren
#

@crimson needle i want to send custom text in email any other way to do that custom code anything..

crimson needle
#

@remote warren what do you mean "that custom code anything"? Are you a developer yourself?

vocal wagon
blissful bear
crimson needle
#

@vocal wagon there's no "past due event" though. There's customer.subscription.updated where many things can be updated and sometimes it will be the status to past_due but I would absolutely listen to both invoice.payment_failed and invoice.payment_action_required

#

@blissful bear what do you call presentApplePay exactly?

peak flame
#

Hello, can I ask question about webhook here?

crimson needle
#

@peak flame sure thing!

blissful bear
peak flame
#

When I do: stripe.exe trigger invoice.payment_succeeded , I get some 401 status, why?

crimson needle
#

@blissful bear sorry you're a bit cryptic, what is useApplePay()?

peak flame
#

No signatures found matching the expected signature for payload

crimson needle
#

@peak flame it could be many things in your code but usually it means you are not verifying the signature properly in the code. Maybe you have the wrong secret? Or maybe your code is not properly using the raw payload we send and instead some modified version. What programming language do you use? What's your framework?

peak flame
crimson needle
#

I'd recommend starting to log things in that code: do you get the right secret? Do you get the right signature? what's in the raw payload?

peak flame
#

I am not getting 401 for all requests.

#

There are 200 status too.

crimson needle
#

sure but logging the raw payload would help

peak flame
#

Around 4 request has 401 status

crimson needle
#

one thing that can happen sometimes is an encoding issue

peak flame
#

@crimson needle payload is json , i think

crimson needle
#

@blissful bear ah so you're using the React Native SDK, that's the piece of information I was missing. Looking

#

@peak flame I know it's always json, but you need to proactively dump all the values so that we can debug this

crimson needle
#

@blissful bear not yet but I am looking into it

meager hawk
#

in iOS at least you do it by calling StripeAPI.jcbPaymentNetworkSupported = true , but I'm not sure about React Native yet

blissful bear
crimson needle
#

yeah I don't see any support in the code for the various networks

#

seems like a missing feature request

peak flame
crimson needle
#

hum why are there so many? which ones are failing? You said it was only 4 so I'm confused

peak flame
#

I have printed after: $payload = @file_get_contents("php://input");

crimson needle
#

sure but why are there so many? Can you just do one unique one that returns a 401 and nothing else? Can you also confirm you get the signature and the secret?

peak flame
#

Here are six json, I think when SignatureVerification exception occurs

crimson needle
#

I'm sorry, I am trying to help you debug just one unique one if possible

#

Right now I have zero idea what it could be unfortunately, the only way is to go step by step, log the secret, log the signature, compare it to what I see on my end and advance slowly

exotic rain
#

Hello everyone
how can i update the subscription with new price on specific date?

crimson needle
rigid ridge
#

is it possible to retrieve the actual bank name on sepa_debit payment methods or just the bank code?

peak flame
#

@crimson needle Should I log endpoint secret?

#

This is the endpoint secret: whsec_uj.................Mm

cosmic tide
#

Hi, I think I already know the answer to this, but worth a shot.
We didn't have a particular webhook enabled, roughly 20 or so payments have gone through before we noticed. Is there a way to retrospectively get the payment_intent.succeeded webhook to be sent out for those payments?

fickle vessel
#

Guys some doubt regarding stripe ACH Payments

We have our main stripe account where we have lot of connected accounts.

If we opt to go with Plaid integration do each of our connected accounts need to connect their account to plaid? Do each one of them need to have a plaid account?

crimson needle
#

@rigid ridge yeah don't share the secret here but make sure it's the correct one. Does it match what you get on an event that is successfully parsed? Do you have an event id that works and one that fails so that I can compare them?

#

@cosmic tide no that's not possible though if they are less than 30 days old you could use the Stripe CLI to force re-send them (but you need to look up the event id in the Dashboard)

#

@fickle vessel depends on your integration. But usually no, you connect your own account (the platform) to get bank account details there instead (and you pay the Plaid fee)

cosmic tide
#

just so I know I'm following, even through the Stripe CLI, I CANNOT force it to resend a webhook it never sent initially?

rigid ridge
fickle vessel
crimson needle
#

@rigid ridge I never asked about a bank name?

#

@cosmic tide you can and it should work

cosmic tide
#

I'll take a look thanks

crimson needle
#

@fickle vessel not really. You can collect bank account details in your account first and then clone that bank account to the connected account if you use Standard accounts + Direct charges

peak flame
#

@crimson needle It looks, when 401 status, the endpoint secret is null or empty, what should I do?

#

$endpoint_secret = getenv('STRIPE_ENDPOINT_SECRET');

crimson needle
#

@peak flame ah nice okay so that explains the issue. I'm not sure what you can do, this looks at the environment variable in your server right? So something is not set up right with your localhost

rigid ridge
fickle vessel
vocal wagon
#

Hello there. I am new here. I've got an issue with a client's Stripe account. They are already using their Stripe account for another application (not developed by us) and we are integrating our application to work with that account. We've created an additional secret key and a webhook with a signing key and payments are being handled fine, however we are getting continual webhook failures - upon investigation these failures are due to the payments they're taking from the other application are connecting to the webhook. How do we stop that?

crimson needle
#

@rigid ridge ah yes sorry, got mixed up with the names I'm sorry

#

And no we don't have the bank name in the API for SEPA Debit today unfortunately just the bank code

#

@fickle vessel it isn't really an issue right? It's really common for platforms to "vault" all customers themselves to share between connected accounts.

#

@vocal wagon that's totally expected today. All events for all activity on that account is sent to all webhook endpoints. You should create a completely separate Stripe account if you want to separate the traffic/data

fickle vessel
vocal wagon
crimson needle
#

@fickle vessel you can always delete the customer right after otherwise

fickle vessel
peak flame
#

@crimson needle Thank you. I have statically put the $endpoint_secret="whsec_...." instread of $endpoint_secret = getenv('STRIPE_ENDPOINT_SECRET');

crimson needle
#

@peak flame ah yeah that works too!

#

@blissful bear sorry for th delay. The feature is not supported just yet, I recommend opening a github issue directly on the library!

peak flame
#

@crimson needle But why did you want to see $payload? What happens with $payload?

crimson needle
#

@peak flame you had mentioned that it worked fine for all events except a handful. So it's rarely an issue with the environment variable in that case (otherwise it just never works). And the payload can often be mis-handled, for example it loses the extra new lines, or replaces " with ' and such. Any character changing in the entire payload would change the signature. And when only a subset of events fail, it's usually a specific character being poorly handled/encoded in that event. For example it's common if you have an accent in a description like récurrent and your server is not configured to use UTF-8 properly

royal turtle
#

Hi guys, quick question: When using the setup_future_usage parameter in the confirmCardPayment function, from what I understand on_session is for when your user is in your checkout flow and just choosing to use the same card again, and off_session for when you want to charge the card while they're not using the app. Am I understanding this correctly, or do I need to use off_session since I am creating the paymentIntent on my backend?

crimson needle
#

@royal turtle it's not exactly that. The parameter is here to indicate not how you are charging the customer right now but how you will charge them again in the future. Will they always be in your app/website for the next payment and always confirming "on session" or do you need to sometimes charge them out of band where they are not around ad won't be able to do 3DS and you'll plan to pass off_session: true at that point?

gilded patrol
#

good for diy recurring payment logic iirc

royal turtle
#

I will never be charging them without their direct consent. Their card will just be displayed in the checkout flow as a payment option so they don't have to re-enter their details.

peak flame
#

@crimson needle How can configure server to use UTF-8 properly?

#

How can I

crimson needle
#

@royal turtle in that case you want setup_future_usage: 'on_session' like you originally planned and you were correct!

#

@peak flame you don't have to do anything, there's nothing saying it doesn't work since the webhook issue was unrelated and was just a bug in your code.
It was just a possible root cause to your problem

fossil crystal
#

Hi, with our previous provider SagePay we used to be able to take 115% of the original authentication (for modifying delivery rates etc and increasing price marginally). Is there any room for maneuvering with Stripe and if so by what %? Thanks

peak flame
#

@crimson needle When I type: stripe.exe trigger invoice.payment_succeeded , why does it request these extra following events:
payment_method.attached, customer.source.created, customer.created, customer.updated, invoiceitem.created,
invoice.created, invoiceitem.updated, charge.succeeded, invoice.paid, invoice.finalized, invoice.updated, payment_intent.succeeded, payment_intent.created.

worthy tapir
#

Hello everyone, I have a problem with my STRIPE account:

Stripe does not accept my payments anymore and has blocked my account because of a high number of disputes.

On this account I have 90% of my customers who pay a subscription which is still in progress. But I can't collect these outstanding subscriptions anymore.

Is it possible to clone the customers and clone the payment source of this account which is blocked with STRIPE CONNECT to sub-account ?

Can I import my customers and their payment sources who have an ongoing subscription, to a stripe sub-account in order to continue the subscriptions and continue to collect?

Thank you

royal turtle
#

@crimson needle If the card needs authenticating when using on_session, the stripe element handles this like normal? The bit that is confusing me is that in the docs it mentions that the flag is used for failure states, and that you have to handle the failure state yourself with off_session, but then never mentions anything about what happens in on_session. Sorry if this is obvious, or I missed it in the docs.

crimson needle
#

@royal turtle yes it just works. And I'm not sure where you're reading but it doesn't mean that, it's really just about future payments, and if the next payment is on session it will work the same as the current one and do 3DS as needed

cerulean pineBOT
#

:question: @worthy tapir Have a non-technical question, account issue, or need one-on-one support?
We wish we could help, but this community is focused on developers and technical discussions. Our support team will be able to assist you better than we can: https://support.stripe.com/contact

royal turtle
#

@crimson needle Okay that's perfect. Thank you for your time.

crimson needle
#

sure thing!

exotic rain
peak flame
exotic rain
#

but i have a error on 'Item' attribute

crimson needle
#

@exotic rain you can just share code here instead of a screenshot. What's your question?

#

ah looking

peak flame
#

I am trying to understand how these events work.

exotic rain
# crimson needle <@!702201921339129867> you can just share code here instead of a screenshot. Wha...

Stripe.apiKey = stripeApiKey;
SubscriptionScheduleCreateParams params = SubscriptionScheduleCreateParams.builder()
.setFromSubscription(stripeSubscriptionId)
.setStartDate(startingDate.toEpochMilli())
.setEndBehavior(SubscriptionScheduleCreateParams.EndBehavior.RELEASE)
.addPhase(
SubscriptionScheduleCreateParams.Phase.builder()
.addItem(
SubscriptionScheduleCreateParams.Phase.Item.builder()
.setPrice(subscriptionPlan.getStripePriceId())
.setQuantity(1L)
.build())
.setIterations(1L)
.build())
.build();
SubscriptionSchedule schedule = SubscriptionSchedule.create(params);

hollow prairie
#

@peak flame Hey! This is somewhat explained here: https://stripe.com/docs/cli/trigger

These test webhook events are based on real API objects and may trigger other webhook events as part of the test (e.g. triggering payment_intent.succeeded will also trigger payment_intent.created).

#

@peak flame So because you're triggering invoice.payment_succeeded, there needs to be a customer created, an invoice created, a payment intent created, etc, etc

peak flame
#

How will I know the dependant events or dependant requests of an event?

#

@hollow prairie ^

crimson needle
#

You can't really know beyond experience I'd say, but it doesn't matter, you should listen to the events you care about, not every single event

#

@exotic rain I'm still looking, sorry, typed params in java can be finicky sometimes, trying to find the right incantation

#

@exotic rain ``` SubscriptionScheduleCreateParams params =
SubscriptionScheduleCreateParams.builder()
.setCustomer("cus_123")
.setStartDate(SubscriptionScheduleCreateParams.StartDate.NOW)
.setEndBehavior(SubscriptionScheduleCreateParams.EndBehavior.RELEASE)
.addPhase(
SubscriptionScheduleCreateParams.Phase.builder()
.addItem(
SubscriptionScheduleCreateParams.Phase.Item.builder()
.setPrice("price_123")
.setQuantity(1L)
.build())
.setIterations(12L)
.build())
.build();

  SubscriptionSchedule schedule = SubscriptionSchedule.create(params);
cosmic tide
crimson needle
#

@cosmic tide what's blocking you exactly?

cosmic tide
#

I can see how to trigger new events, but I'm wanting to retrigger one that's already occured

exotic rain
crimson needle
#

@exotic rain With my exact code or with yours?

exotic rain
crimson needle
#

@exotic rain can you try mine first?

exotic rain
cosmic tide
crimson needle
#

@cosmic tide okay @meager hawk mentioned it works if you explicitly use --api-key sk_live_123 when you use the command I shared

#

otherwise it errors for reasons that I don't know :p

#

@cosmic tide also which version of stripe-java are you using?

#

sorry @exotic rain ^

#

mixing up everyone today 😦

cosmic tide
#

I'll give that command a try

#

thanks

#

appreciate the help

crimson needle
#

sure!

fallen bluff
#

Hey everyone, I'm new here so sorry if I repeat a question that's already been answered.

noble yarrow
#

Hi team, I'm iOS Dev from ShearShare team. We were previously using Older Stripe SDK prebuild UI. Now, we are migrating to use PaymentSheet. I followed the doc link :https://stripe.com/docs/payments/accept-a-payment?platform=ios&ui=payment-sheet-custom But I'm facing some issue there.

I'm using Stripe SDK via:
pod 'Stripe', '~> 21.6'

And in code,

var configuration = PaymentSheet.Configuration() configuration.merchantDisplayName = "ShearShare Inc." configuration.customer = .init( id: stripeCustomer?.customerId ?? "", ephemeralKeySecret: stripeCustomer?.ephemeralKey?.secret ?? "" )

Now , then
`PaymentSheet.FlowController.create(paymentIntentClientSecret: stripeCustomer?.paymentIntentClientSecret ?? "",
configuration: configuration) { [weak self] result in
switch result {
case .failure(let error):
print(error)
case .success(let paymentSheetFlowController):
self?.paymentSheetFlowController = paymentSheetFlowController
paymentSheetFlowController.presentPaymentOptions(from: onController) {

              }
        }
      } `

Now, I'm able to see the PaymentSheet UI, I fill the card details and check mark the "Save this card for future ShearShare inc. payments"
And, then does the final payment as:

paymentSheetFlowController.confirm(from: onController) { paymentResult in // MARK: Handle the payment result switch paymentResult { case .completed: print("Payment succeeded!") case .canceled: print("Canceled!") case .failed(let error): print(error) } }
Now, I get "Payment succeeded!".

Then, I re-initiate the payment flow, but I'm unable to see filled card in "Saved card section".

Could you please help me on this.

fallen bluff
#

I can't seem to figure out how to setup a payment plan. I want to charge someone $315, but allow them to pay in 12 installments. Can I do that with Stripe without having to do any coding/automation?

sterile night
#

It would be lot of help and thanks in advance!

crimson needle
split karma
#

Hello. Here: https://stripe.com/docs/connect/manual-payouts I found out that if the owner of Stripe Connect Account doesn't payout money 90 days after that money becomes available, that money will go back to the Stripe "main" Account. We need to handle this in an application, but I'm not sure what's the best way to do this. We thought about having a webhook event handler that would manually send money back, but I couldn't find a webhook event for that. Also, the payout schedule option can't be anything but manual for business reasons.

crimson needle
#

@sterile night what exact error do you get, can you share more details first?

#

@split karma the money won't go back to the main Stripe account, that never happens automatically. But you are not allowed to keep money that long, you have to pay it out first. I'd recommend just chatting with our support team instead https://support.stripe.com/contact/email as it's not a question about code and more around the rules and regulations for the flow of funds

fallen bluff
sterile night
#

Sharing screensshot

crimson needle
#

@fallen bluff you can I guess but that means collecting card details manually and such which I wouldn't recommend. Sorry this Discord is more for developers asking questions about their code usually

sterile night
#

@crimson needle

#

Why I am getting webhooks error

#

I am new in Stripe integration

split karma
crimson needle
#

@sterile night but webhook errors are unrelated to your web integration itself. I can't see anything in that screenshot unfortunately either. Do you have an event id evt_123 or PaymentIntent id pi_123 I can look at?

#

@split karma no it doesn't do that either, it just stays in your balance and we contact you to fix it

peak flame
#

I have tested a webhook locally typing: stripe.exe trigger invoice.payment_succeeded , but in projects's code, how does it call or trigger an event?

crimson needle
#

@noble yarrow sorry for th delay, I don't know our iOS SDK so I'm waiting for someone on my team to look

meager hawk
#

@noble yarrow hi! let me catch up 👀

sterile night
#

👍

crimson needle
#

@sterile night you shouldn't share a client_secret like that, it's... secret for a reason 😅

peak flame
#

When and how an event is triggered?

#

I have tested a webhook locally typing: stripe.exe trigger invoice.payment_succeeded , but in projects's code, how does it call or trigger an event?

sterile night
crimson needle
#

@peak flame your code makes API requests and those API requests trigger events. You create an Invoice and you get invoice.created as an event

meager hawk
#

@noble yarrow so, two things : are you sure you're using the same cus_xxx Customer ID the second time when you re-initiate? That depends a bit on how your app and backend do authentication and get the Customer ID and what your "stripeCustomer" model is and how that works, I would think. Secondly, can you share a pi_xxx PaymentIntent ID for the second attempt?

peak flame
#

When is invoice.payment_succeeded triggered?

crimson needle
#

ignore that one, it's old, use invoice.paid instead

fallen bluff
crimson needle
#

@fallen bluff great!

#

@sterile night the script doesn't really matter yet. Let's take this one step at a time. Did you write the entire code yourself? Because the logs seem to indicate you are not using any of our official client libraries, and it sounds more like when you install a third-party PHP / Wordpress plugin

#

Also your code currently is 1/ creating a PaymentIntent, 2/ Creating a Token. And then it does nothing else

sterile night
crimson needle
#

Okay so did you write the webhook handler yourself? You added a webhook endpoint but it returns a 404 as if that URL doesn't exist

#

And where is your code broken? Like what do you see when you debug it? Add logs at each step client-side to figure out what's preventing your code from confirming the PaymentIntent successfully

sterile night
crimson needle
#

but you did set up a webhook. You manually added it yourself to your account.

peak flame
#

When is invoice.paid triggered by code?

crimson needle
#

Also you just shared your exact code with your hardcoded API key that you should roll immediately even if it's just test mode

#

@peak flame That's a bit of a weird question and kind of the same as before. Did you read the doc I shared? That event is sent when an invoice is paid. Invoices are usually paid async based on the default payment method assigned to them. So there isn't really "code" for it. But you seem quite lost on the overall products and what you're trying to do which makes it tricky to help answer your questions
What are you really trying to answer?

sterile night
crimson needle
#

but that isn't really the issue you have since your code is creating the PI successfully

peak flame
#

When do we need a webhook? Must we need webhook for every stripe project?

crimson needle
#

oh boy :p

#

@hollow prairie is taking over for me and I'll let them explain/help i have to run

exotic rain
hollow prairie
#

@peak flame Webhooks are useful for being notified of events that are happening in your Stripe account, such as successful payments etc. More here: https://stripe.com/docs/payments/handling-payment-events

One example of webhook functionality would be order fulfilment upon a successful payment (the payment_intent.succeeded event)

split karma
hollow prairie
#

@exotic rain Hey! I'm taking over for @crimson needle, let me catch up!

#

@exotic rain Can you share the code on that specific line the exception is referencing?

peak flame
#

@hollow prairie So is it must to have a webhook of every stripe project?

hollow prairie
#

@split karma Via email, yep!

crimson needle
#

@exotic rain what version of stripe-java do you use too

hollow prairie
#

@peak flame Well, it depends. Most Stripe integrations utilise webhooks, but they aren't required. What is it you're trying to do exactly?

peak flame
#

I have some code with webhook, I am trying to understand it.

crimson needle
#

(no screenshot we can't run that code @exotic rain )

#

My code that I tried locally is ``` SubscriptionScheduleCreateParams params =
SubscriptionScheduleCreateParams.builder()
.setCustomer("cus_123")
.setStartDate(SubscriptionScheduleCreateParams.StartDate.NOW)
.setEndBehavior(SubscriptionScheduleCreateParams.EndBehavior.RELEASE)
.addPhase(
SubscriptionScheduleCreateParams.Phase.builder()
.addItem(
SubscriptionScheduleCreateParams.Phase.Item.builder()
.setPrice("price_123")
.setQuantity(1L)
.build())
.setIterations(12L)
.build())
.build();

  SubscriptionSchedule schedule = SubscriptionSchedule.create(params);
peak flame
#

I am trying to understand which part of code is triggering invoice.payment_succeeded or invoice.paid.

#

It is a PHP stripe code

#

So far I have tested webhook from terminal locally

#

By running: stripe.exe trigger invoice.payment_succeeded

hollow prairie
#

@peak flame Yes, but what is it you're actually building with Stripe? A Billing app?

peak flame
#

And I think, it creates some dummy request

#

I am trying to understand existing code.

#

I think, it is a billing app.

split karma
exotic rain
# crimson needle (no screenshot we can't run that code <@!702201921339129867> )

SubscriptionScheduleCreateParams params = SubscriptionScheduleCreateParams.builder()
.setFromSubscription(userSubscription.getStripeSubscriptionId())
.setStartDate(SubscriptionScheduleCreateParams.StartDate.NOW)
.setEndBehavior(SubscriptionScheduleCreateParams.EndBehavior.RELEASE)
.addPhase(
SubscriptionScheduleCreateParams.Phase.builder()
.addItem(SubscriptionScheduleCreateParams.Phase.Item.builder()
.setPrice(subscriptionPlan.getStripePriceId())
.setQuantity(1L)
.build())
.setIterations(1L)
.build())
.build();
SubscriptionSchedule schedule = SubscriptionSchedule.create(params);

hollow prairie
#

@peak flame Yes the CLI just generates dummy objects to simulate the events. In a real world scenario, your application would trigger those events via your Stripe integration

#

@exotic rain Which version of stripe-java are you using?

peak flame
#

How can I check my code? Which part of my code is triggering invoice.payment_succeeded or invoice.paid event?

hollow prairie
#

@peak flame That's hard to pinpoint without knowing your application/integration. But those events would be triggered upon successful payment of an invoice. Either somebody signing up to your service for the first-time and entering payment details or a recurring off-session payment

#

@peak flame Are you using Stripe Checkout, or your own payment flow with Elements?

peak flame
#

"Are you using Stripe Checkout, or your own payment flow with Elements?" how can I check that?

crimson needle
#

@exotic rain that's the issue, it's too old, from a time where the property was named Plans not Items

#

you should upgrade to the latest

exotic rain
peak flame
#

@hollow prairie "Are you using Stripe Checkout, or your own payment flow with Elements?" how can I check that?

crimson needle
#

@exotic rain but why? Schedules are exactly what you want. the right next step is to upgrade stripe-java to the latest. If you can't, you need to use the syntax from that older version where you likely want SubscriptionScheduleCreateParams.Phase.Plan.builder() instead

peak flame
#

In code, there is option to add a Card.

hollow prairie
#

@peak flame Checkout is a hosted solution (https://stripe.com/docs/payments/checkout) as opposed to Elements which are preconfigured UI components for you to build your own payment flow.

I'm having a hard time understanding where you are with your Stripe integration and where I can help! So when you refer to your code, what exactly is that?

craggy sand
#

Hey all!,
I have a doubt about the response of stripe after made a confirmCardPayment with wrong billing details (for example wrong city).

Can anyone help me find this response errors?
I need to do different events depending on the stripe error.

hollow prairie
regal dune
#

Hi, I'm developing adding bank account as a payment method (ACH Debit) for customer via Plaid. And now, I'm facing an "bank_account_exists" error when I add the second bank with a difference institution. In my understanding, it's because of Stripe always create the same test bank account, isn't it? So, my question is how can I test adding multiple bank accounts via Plaid in development environment?

craggy sand
hollow prairie
hollow prairie
#

@craggy sand Also worth noting that a billing address mismatch with the payment method might not result in a failure/error

craggy sand
regal dune
#

@hollow prairie Yes, I've tested with accounts in that document but by creating it directly on Stripe dashboard

#

But now, I want to add difference cases ACH account number via Plaid, is it possible?

craggy sand
hollow prairie
#

@craggy sand What do you mean by 'Stripe user data account'?

craggy sand
#

I want to know which are that errors

hollow prairie
#

@craggy sand Yeah a mismatch in data provided there to what is on the card is not guaranteed to return an error. That's ultimately on the issuing bank to determine whether or not to authorise the payment

craggy sand
#

and how i add more security for a transaction for example, name, city, state,country, zipcode

hollow prairie
#

@craggy sand As for the specific error messages, they aren't documented anywhere. You should instead just rely on the code

craggy sand
#

street address: 91 2nd Ave, New York, NY 10003, United States

#

for example

hollow prairie
#

@craggy sand I'm not sure what you mean? If you're using Elements w/ Stripe.js, then Radar is working to prevent any fraudulent transactions if that's your concern

#

@craggy sand You'd need to handle any address validation in your own application

#

@regal dune Sorry for the delay, just checking on something for you

sick talon
cyan tinsel
#

Hi all, hope you are doing great. I have a use case which I am not sure if it's possible. Any idea if we can have early payment but begin the subscription from a specific date. So for e.g. if a user renews the yearly subscription today which was actually due on 1st August and would like to ensure that the customer still gets 15 days completed and we get paid early as well the same amount. so the subscription payment due will be on next year 1st august, rather than the date today. Consider cases of if a user was not on recurring subscription and planning to auto-renew subscription and also if he was already subscribed and paying early.

sick talon
soft mist
craggy sand
#

What i mean is that behind that picture that i show to you i made a stripe.confirmCardPayment with this info:

I know that for example if the card is invalid, then in the result it shows to me Ex.: "The card’s security code is incorrect. Check the card’s security code or use a different card"

I want to know if something similar is returned to me when, for example, the city that is in billing details is wrong

sick talon
hollow prairie
#

@craggy sand The card errors are handled by the Elements component you're using, we can validate card details that way. When you provide billing details in the confirmCardPayment function, they're sent to Stripe via an API call which ultimately is sent to the issuing bank with the rest of the transactions details.

Any error returned there would be in the Promise chain of the confirmCardPayment function. Details on those errors are here: https://stripe.com/docs/api/errors

cyan tinsel
craggy sand
hollow prairie
#

@craggy sand Nice! Let me know if there's any other questions 🙂

regal dune
#

@sick talon For using Plaid to collect and verify customer's banking info, the system will receive Stripe bank account token directly from Plaid, then use it for creating a payment method. However, the bank account token from Plaid always create the payment method with the same routing number and account number, so I receive this error from Stripe API

#

I want to add many payment methods into a customer via Plaid on my platform

#

I understand that on the production that use the real banking info will be work, but I want to test it on my development environment too. Is it possible?

sick talon
# cyan tinsel Yes, something like that, is it possible?

You'd create the Subscription with billing_cycle_anchor set to the start of the first full billing period. Try it in test mode and you'll see what happens on the initial invoice. https://stripe.com/docs/api/subscriptions/create#create_subscription-billing_cycle_anchor

sick talon
regal dune
#

Yes i am

#

via Plaid

#

I can do it on Stripe dashboard with difference account numbers this document provided
https://stripe.com/docs/ach#testing-ach

#

But I'm not found Plaid test data to do it with Plaid pop-up

sick talon
exotic rain
regal dune
#

Got it, I've seen.

#

Thank you!

cyan tinsel
sick talon
sick talon
soft mist
#

@sick talon Thanks!! I'm migrating subscribers that are stripe customers, I have their renewal date but how do I create stripe subscription without charging/invoicing them until there renewal date?

sick talon
#

there are a couple different options there, try them in test mode to see which one has your desired effect

soft mist
#

@sick talon exactly what I needed! Thanks!!!

balmy yacht
#

When generating a session url to the the customer portal page , how long is this url valid for?

sick talon
#

Trudog — Today at 10:08 AM
Question: re: test data invoicing. We are in the process of integrating Stripe's metered subscriptions into our web service. In production we will be invoicing monthly, but for development we are using daily so we can work through the entire process more expeditiously. daily is ok, but it would be better if we could trigger the invoices to run at a specific time instead of waiting for 9pm every day which is the time of day when the original subscription was created.

Is there a way to do this?

@wraith hound for testing purposes if you don't care how long the actual period is, you can change the billing cycle anchor once all the usage has been updated https://stripe.com/docs/billing/subscriptions/billing-cycle#changing

wraith hound
#

excellent! thank you.

sick talon
dusky musk
#

Hi I am a new member. I am working with a client developing their eCommerce platform. They sell clothes. They has recently partnered with another organisation and have created a single branded product. For just this product they would like to set-up revenue share. Looking at the connect accounts I can documents that describe this but nothing that idicates that it can handle a revenue share from just one specific product. Using Wordpress/Woocommerce as the sales plaform with Stripe payment gateway. Has any one set-up something similar and can provide some advice?

sick talon
dusky musk
#

Revenue share - they are selling a branded jacket for £600. My client will keep 70% of the £600 and pay the remaining 30% to their business partner. It is one product, all their other products they keep the full 100%.

sick talon
dusky musk
#

That would be the plan. My client's Stripe account would collect the customer payment then transfer thr 30% to a connected account.

sick talon
dusky musk
#

The client is the platform (their website) - I assume that is what you mean?

sick talon
# dusky musk The client is the platform (their website) - I assume that is what you mean?

OK so if the client is the Connect Platform account, and the partner is connected to that platform, then you would look at what the revenue share is for the given product (or if it's 0) and set either transfer_data[amount] or application_fee_amount appropriately https://stripe.com/docs/payments/connected-accounts

sick talon
dusky musk
#

Thank you. I am new to Stripe at this level. Can I pass a unique product code into the system from Woocommerce - would it then be used as a parameter withing Stripe?

sick talon
dusky musk
#

Okay, understood.

toxic quartz
#

hello there,

I am updating the subscription and if 3D Secure card is used then stripe first send the invoice.payment_failed webhook. Now if the subscription is rolling over to next month then at that time if somehow charge is failed then also stripe give invoice.payment_failed so just wanna know how to determine the difference in between those two

lone flower
#

Hello, I am a dev at Stitch and we are using the Stripe api to extract customer data. Currently, we are missing some balance_transaction objects using created as the replication key. We keep a bookmark each sync and query with a look-back window of 5 min (record ['created'] > bookmark-5min).
We miss some objects where the created time is within a few seconds of the bookmark, even though we keep a look-back window.
Do some balance_transactions objects take longer to become available to the api? Do you have any suggestions about how we could avoid this? Thank you

sick talon
sick talon
torn stratus
#

Hello community! I'm trying to create a test for P24 payments, I wonder, is there a way to confirm a P24 payment programmatically ie (with mandate or other mechanism)?

river portal
#

hello guys
how much stripe charge when we transfer money from stripe token to our stripe account?

in case of stripe
apple pay and google pay

sick talon
sick talon
# river portal hello guys how much stripe charge when we transfer money from stripe token to o...

https://stripe.com/pricing has the overview and the support team can answer specific questions about fees via https://support.stripe.com/contact

toxic quartz
lone flower
sick talon
pure island
#

Hi @sick talon i am trying to get the card object using this: https://stripe.com/docs/api/cards/list i'm using typescript and graqhql. do you know what's the type of the promise i should use in this case please for the query resolver?

fathom tapir
#

hello there,
I just want to know that how much amount does stripe charge for a transaction/transfer for all payment methods. I just need the exact figures, not a web link. please help me.

sick talon
cold valve
sick talon
sick talon
# cold valve Hello, is there a way to customise the text in the "Pay Now" button to a custom ...
fathom tapir
#

so where I can get my answer if I can't get it here?

fathom tapir
sick talon
cold valve
pure island
#

ok so just an async function that has this inside: const cards = await stripe.customers.listSources(
'cus_AJ6mUWjfoelHlJ',
{object: 'card', limit: 3}
); what type should i use for this promise?

sick talon
sick talon
abstract compass
tranquil nacelle
#

The connect onboarding docs are a little unclear. It says to check the charges_enabled flag of the accounts object to see if an account is fully onboarded. Then the paragraph ends by saying you can check the account’s details_submitted flag to see if the user has completed the onboarding process. Which is it and what’s the difference?

sick talon
sick talon
abstract compass
pure island
sick talon
sick talon
pure island
sick talon
tranquil nacelle
sick talon
tranquil nacelle
sick talon
lone flower
# sick talon I'm not sure what you mean by not always available at their credited time. What ...

The created time is an attribute on the balance_transaction object and we are querying using the created attribute.

This might be a better example of our issue:

  • a balance_transaction object was created at 22:30:47.000000
  • The starting bookmark of the sync it should have been received on was 22:30:46, just one second before.
  • With the look-back window, we synced records from 22:25:46 -> 23:01:42, but missed the one created at 22:30:47.000000.

would the latency between our request be long enough to miss this record?

abstract compass
sick talon
sick talon
# abstract compass This is our first time implementing Stripe, so this is a bit confusing. Looking ...

Once the PaymentMethod is set up, update the Customer (of the Subscription) to set Customer.invoice_settings.default_payment_method https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method

vocal wagon
#

Hey we are implementing Stripe Connect Express and now we need to handle the refunds. We don´t really get what " reverse_transfer". Not even with the description:
optional, default is false
CONNECT ONLY
Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).

A transfer can be reversed only by the application that created the charge.

Maybe someone can help me out. Kind regards

abstract compass
sick talon
abstract compass
vague lava
#

Hello, I have a question about a Webhooks event. I want to take an event that tells me that the person has renewed his subscription, and thus update my database. Thank you.

sick talon
tranquil nacelle
sick talon
zenith kite
#

Hi, got a question about Connect and Destination charges. Is there anyway to hold the payment to a standard connected account until an event has occurred on the platform? Not a fan of separate charges and transfers, one of the main reasons being no visibility in terms of the platform fee.

vocal wagon
bold basalt
#

@zenith kite hello

#

@zenith kite you need to have manual payouts on the Connect account to do that. So funds stay in the Connect account balance and are paid out when you manually make a request to create a Payout.

vague lava
bold basalt
#

@zenith kite oh wait you mean store funds on the Platform? before transferring to the Connect acct?

tranquil nacelle
lone flower
bold basalt
#

@lone flower hello, one sec (turbo had to step away)

vocal wagon
zenith kite
vocal wagon
#

@vague lava the webhook event invoice.paid does point to the subscription object that's been renewed.

vague lava
#

invoice.paid is sent every time the person pays, but is this event sent at the end of the cycle?

bold basalt
#

@lone flower can you bring me up to speed real quick? you're listing BalanceTransactions within a timerange? and not getting a particular BT?

#

@zenith kite so there's a couple of things here ... where do you want to store the funds, Platform level or on the Connect acct?

vocal wagon
#

@vague lava if invoice.paid 's data.object.subscription has a value and data.object.status == 'paid' i think it's safe to presume and infer that that subscription has been fully paid and renewed for that cycle.

bold basalt
#

@vocal wagon turbo had to step away, hello! Can you bring me up to speed?

vocal wagon
# bold basalt <@456226577798135808> turbo had to step away, hello! Can you bring me up to spee...

Of course i can. I will repeat the question for you.
Hey we are implementing Stripe Connect Express and now we need to handle the refunds. We don´t really get what " reverse_transfer". Not even with the description:
optional, default is false
CONNECT ONLY
Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).

A transfer can be reversed only by the application that created the charge.

Maybe someone can help me out. Kind regards

lone flower
# bold basalt <@!864870631643283457> can you bring me up to speed real quick? you're listing B...

Yes, this is the example I gave earlier:

  • a balance_transaction object was created at 22:30:47.000000
  • The starting bookmark of the sync it should have been received on was 22:30:46, just one second before.
  • With the look-back window (5 min), we synced records from 22:25:46 -> 23:01:42, but missed the one created at 22:30:47.000000.
  • the request was made around 23:01:16

we are sometimes missing records when they are created close within seconds of the range we request
when we repeat the request about a week later we do get the missing record

zenith kite
# bold basalt <@!144073952388579328> so there's a couple of things here ... where do you want ...

Ideally, before the order is confirmed, on the platform account (cannot be included in our own payouts) until the order is confirmed, at which point we'd transfer the money to the connected account. This sounds like a good use case for separate charges and transfers, but the problem with that is there is very little visibility in regards to fees on Stripe, so it means more development work on the platform side to make fees more visible, on top of moving from destination charges to separate charges and transfers.

bold basalt
#

reading over both, one sec

#

@vocal wagon and you are using Destination Charges right?

#

@zenith kite holding funds on the Platform is really only do-able with Separate Charges and Transfers. Manual Payouts (on both Platform and Connect acct) prevent funds from being swept away in automatic payouts so manual payouts cover that for you.

#

@lone flower ah I see, what I'd recommend is this:
1/ run your BT listing script and share the request ID for that request
2/ autopaginate and write the responses to a file
3/ send over the ID of the BT that you expected to see in the response but did not get back
4/ write in with the above 3 (i.e. request ID, the full responses and the missing BT ID) to Support and they can help you have a look at it
is https://support.stripe.com/contact the Support link

zenith kite
bold basalt
#

@vocal wagon so what a Destination Charge does is, it charges the Customer for $10 for example and you choose to Transfer say $8 to the Connect acct and keep $2 on the Platform.
Refunding the Destination Charge allows you to reverse the $8 Transfer to the Connect acct to recover the funds back from the Connect account.

#

@vocal wagon so that reverse_transfer param controls that

toxic quartz
#

hello there,

is there way in which I can roll up my testing subscription manually and check with the card which fails the charge on next cycle

stray skiff
#

Currently using the node api to create external accounts for my connect accounts, and for countries such as singapore, japan and hong kong, for example, how do I add in the extra details such as the account clearing codes, branch codes and things like that? Do I just have to hyphenate them into the routing_number value? Especially for the Japan accounts which need bank name, branch name, all sorts of values

thorn bone
#

hey guys, is there a place I can understand, for sure, the lifecycle of events?
Im looking for an event when the first purchase is successfully finished... not invoice.payment_succeeded (since it happens is renewals)

Im thinking about https://stripe.com/docs/api/events/types#event_types-customer.subscription.created but Im not sure it it happens only when payment is succeeded...

Can you help?

bold basalt
#

@toxic quartz yes you can use the pm_card_chargeCustomerFail PaymentMethod that attaches to a Customer but fails a charge. You can create a Subscription on that Customer then

#

@thorn bone hello, invoice.payment_succeeded also happens on the first initial payment, really anywhere an Invoice is paid which happens on the first initial payment too.

toxic quartz
bold basalt
thorn bone
bold basalt
#

@toxic quartz ah I see , yeah so create a successful Subscription on a good PaymentMethod like pm_card_visa then attach pm_card_chargeCustomerFail to the Customer and set it as the default_payment_method on the Subscription, then change the billing_cycle_anchor to now to "simulate" the Subscription taking a new payment.

#

@stray skiff coming to your question, one sec

lone flower
stray skiff
bold basalt
stray skiff
#

But for the fields that places like Japan needs, would I just do like branch_name:xx, bank_code: 123 or whatever?

thorn bone
#

@bold basalt but even with that there is still a question: I want to trigger contract creation on my end when user pay through a checkout link...

so as I understood, in this case, when checkout is finished and succeeded, invoice.payment_succeeded will be triggered, but it will be triggered in renewal as well...

how can I differentiate them!???

I need a differentiation in first payment and the renewals

bold basalt
#

@stray skiff yes

stray skiff
#

There's subscription renewal webhooks you can use @thorn bone

stray skiff
balmy yacht
#

Is it possible to use the Stripe's Checkout page in conjunction with a subscription schedule? ie add a recurring monthly product but with only 12 iterations

bold basalt
thorn bone
jolly bone
#

I’m having trouble logging into my stripe account to release my funds

stray skiff
#

@jolly bone you'll want to contact actual stripe support, this is just for development help

jolly bone
#

I have contacted stripe support and it was very unhelpful

bold basalt
#

@balmy yacht hello, you can have Subscription create done by Checkout, then on the webhook event, update the Subscription via a SubscriptionSchedule

#

@jolly bone as the other user mentioned, account and login support is handled by Stripe Support at https://support.stripe.com/contact?skip_login=true
This channel doesn't have account related access sorry

#

@thorn bone did my response answer your question? the billing_reason field on the Invoice?

thorn bone
#

thanks

bold basalt
#

@thorn bone how does it feel cubersome? doesn't it help you identify if an Invoice was created due to the first Subscription creation, or a recurring Subscription renewal?

light urchin
#

Hi all! Long time Stripe developer here. Quick question: is there a way to get total connect processing volume via the API?

languid tulip
#

Hi @light urchin! What type of Connect charges are you using (Direct, Dest, Separate Charge & Transfer)?

light urchin
#

Separate Charge and Transfer (I believe)

#

When I log into our Stripe account and see total volume, that's the number I want to get on a per month basis.

languid tulip
#

Just to clarify, the "total volume" is on your home Dashboard for your account or specifically "total volume" for Connect Accounts (as in you want to know the volume you have transferred to your Connected Accounts or the total volume you are processing regardless of it being transferred to Connected Accounts or not)?

light urchin
#

Total volume for Connect Accounts. So all the accounts that are using our application.

languid tulip
light urchin
#

Oh this looks promising!

#

Thanks @languid tulip

languid tulip
#

Let me know if you run into any issues!

rigid ridge
#

is it possible that failed invoices automatically cancel subscriptions on test environment? I have set subscriptions to be cancelled after 4 retries, but using the test account ES9121000418450200051332 automatically cancels the subscription...

bold basalt
#

@rigid ridge hello, can you share the Subscription ID for that?

rigid ridge
#

sure, sub_Jqt6cx9YzcBrft

hollow nebula
#

I am trying to connect to stripe-mock in my local using the following docker command.
docker run --rm -it -p 12111-12112:12111-12112 stripemock/stripe-mock:latest

I am using Stripe SDK for NodeJS (Typescript). This is how I am trying to connect to Stripe in my code.

  'sk_test_123',
  {"apiVersion":"2020-08-27","protocol":"http","host":"http://127.0.0.1:12111","port":"12111"},
);

However I am getting this error.
'getaddrinfo ENOTFOUND http://127.0.0.1:12111'

Any idea what I am doing wrong here? 🧑🏻‍💻

open crystal
#

hi- i wish to attach some metadata to a Stripe Checkout Session Line Items. I don't see that this is supported, and receive a InvalidRequestException when trying to attach metadata. is this expected?

languid tulip
dim hearth
dim hearth
rigid ridge
open crystal
#

@dim hearth PHP environment- i create a Session and redirect to Stripe's hosted payment page that shows line items. Upon successful payment the customer is redirected to a success page. my server is waiting for a 'checkout.session.completed' event which then converts the Session to a order record on my server (transaction info, line items, etc). the line items do not contain any useful information to help me identify which product it matches on my local database- so i thought to attach some metadata (SKU#) so i can find it

vocal wagon
#

How do taxes work with selling online products (in my case online documents) as a personal seller. That is, I have no physical presence. I can't seem to find a clear answer

hollow nebula
#

@dim hearth Got it. We need to set the host as localhost. Thanks for your help

thorn bone
dim hearth
open crystal
#

ah, ok. i will experiment with that. thanks

dim hearth
vocal wagon
#

Thanks though

languid tulip
normal onyx
#

Hello everyone! Is there a way to have dynamic product/subscription names? I've got two hosting use-cases where it'd be great to have "example.com hosting" or "example.com domain renewal" in the subscription/invoice versus "Web Hosting" or "Domain Renewal" – especially because customers can have multiple sites/domains.

languid tulip
# rigid ridge oh, okay... and how could I set it so that it didn't cancel the subscription if ...

Unfortunately we don't support splitting these settings by payment method. So, in this case you would need to change your Subscription settings to not cancel after retries (I'd recommend using 'mark unpaid' instead) and then listen to the subscription.updated event to check on the paymentmethod type used and then handle the cancellation manually for cards (using https://stripe.com/docs/api/subscriptions/cancel) when all retries have been used or allow for a different paymentmethod if it was a SEPA payment attempt.

dim hearth
languid tulip
#

@rigid ridge to be clear, this is overall not something I'd really recommend and I'd just cancel the subscription for SEPA and have them start a new one with a different payment method.

rigid ridge
#

Okay, and how could I block that SEPA from being used again? by detaching it?

rigid ridge
#

okay, thanks!

normal onyx
normal onyx
dim hearth
rigid ridge
languid tulip
normal onyx
# dim hearth How are you displaying the subscription - through the billing portal? or through...

We display customers' active services through our own UI, so it's definitely possible to show the domain stored in metadata there. We would like to leverage Stripe's subscriptions and invoicing, though, so we need to show the domain on those invoices and payment screens. That way customers know exactly what they're paying for and don't wind up with multiple invoices/receipts that say "web hosting" or "domain renewal" for example.

dim hearth
normal onyx
dim hearth
# normal onyx Appreciate the help!

So looking at what's available on the subscription I'm not seeing anything that'll work - descriptions are determined at the product level (either the product name or description) and to accomplish what you want you'd need a different product for each of your customers with their domain information. Personally, I'd just continue on with adding this information in your metadata (or maybe as metadata on the customer) and add the logic on your end to display this information in your UI

shut sigil
#

Hi team! I'm working on an invoicing integration at the moment and occasionally will find that when creating a draft invoice with invoice items > $0 and amount_paid == $0 the amount_due is $0 even though the total is equal to the amount of the invoice items. Any thoughts on what circumstances could arise that would cause this?

tranquil nacelle
#

What is the recommended way to create a test account for connect that has test charges enabled?

cinder field
#

Hi all, I want to create a checkout button on my website where I can collect different payment amounts with an automatic surcharge/tax. HELP

dim hearth
# shut sigil Hi team! I'm working on an invoicing integration at the moment and occasionally ...

When the amount due on the invoice is below the minimum allowed charge for the currency I believe we'll say the amount due at that time is $0, and we'll apply it as being due on the customer's credit balance. This will accumulate and be included in the next invoice for the customer until the amount due on the invoice goes above the minimum allowed charge for the currency (https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts).

cinder field
#

Do anyone have a code that I can just plug in to my website for that?

tranquil nacelle
vocal wagon
#

Hello guys how can i make a form that people can upload image and after they pay money. i can receive that photo into my gmail?

languid tulip
cinder field
#

I'm new to property management and we want to collect rental payments off of our new website.

tranquil nacelle
vocal wagon
#

yes

tranquil nacelle
cinder field
tranquil nacelle
shut sigil
cinder field
#

Yes, never had to create something like this before

cinder field
dim hearth
languid tulip
cinder field
#

I see that I have o create product first to create a payment link.

#

I8

tranquil nacelle
# vocal wagon help me 😦

When the image is uploaded you can create a product for it in stripe via api. Then create a checkout session for the user and for the product and direct them to the checkout url. Use webhooks to see when the payment has succeeded and trigger the email to you

tranquil nacelle
tranquil nacelle
dim hearth
cinder field
tranquil nacelle
tranquil nacelle
shut sigil
# dim hearth Hm... this is super strange. Do you have another one where the invoice hasn't be...

Sorry this is the only one I've been able to find. It's deleted because we have an internal checksum system in prod. If the draft invoice's amount_due does not match the invoice total we expect we delete. We are expecting it to equal 115.50 so we delete. I have been thinking about using the invoice.total field as a fallback, but want to understand why the amoun_due is $0 before making that change.

viral spoke
#

Hi,
I would like to subscribe and sign up at the same time. The background is that a user must complete the subscription to be able to log in. I had thought that I can somehow query whether the user who is about to log in has already subscribed. If he hasn't, the server will reject him or redirect him to the Register page. Do you have any tips on how I can check if the user already has an active subscription running?

cinder field
dim hearth
tranquil nacelle
# cinder field Okay, so nothing can be done automatically

I'm not sure what you mean by automatically. Somewhere the platform has to know about the individual charge amounts. You can definitely dynamically calculate fees like taxes. If you're doing this to recurrently charge rent, you may want to look at the subscriptions api, set up a subscription for a renter with their tax rates and fees added and then they can get charged automatically and manage their own accounts

shut sigil
dim hearth
# viral spoke Hi, I would like to subscribe and sign up at the same time. The background is th...

Hello! There are a number of different ways you can do this - one way is that you take whatever identifier you're using for users on your end and map that to the Stripe customer ID. You can then list all subscriptions for the customer (https://stripe.com/docs/api/subscriptions/list#list_subscriptions-customer) to check if they have any active subscriptions

tranquil nacelle
viral spoke
#

Thanks. I gonna test it.

languid tulip
split birch
#

Hi, I would like to know how to process a payout to a bank account token generated for a customer using Plaid. I need this so users can withdraw to their bank accounts from my app.
I already have a Plaid integration set up and know how to generate the bank account token with stripe/plaid. I'm stuck on how to use this token to pay a customer.
I hope you can help, thanks.

tranquil nacelle
normal onyx
viral spoke
tranquil nacelle
dim hearth
# split birch Hi, I would like to know how to process a payout to a bank account token generat...

Each of your customers will need their own connect account, and you would add the plaid bank token as an external bank account to be used for payouts (see https://stripe.com/docs/api/external_account_bank_accounts/create and https://stripe.com/docs/connect/payouts-bank-accounts#multiple-accounts)

cinder field
tranquil nacelle
viral spoke
dim hearth
dim hearth
viral spoke
split birch
cinder field
tranquil nacelle
cinder field
tranquil nacelle
dim hearth
tranquil nacelle
# cinder field Users specify the amount to pay

Then the path of least resistance would be to create 3 products, one for each amount and subsequently three stripe payment links. Place those three links on your site and let the user choose which to click to pay.

viral spoke
dim hearth
dim hearth
# viral spoke yes, they do.

Okay, so then what I would suggest is that when they go to register you check whether they already ahve an associated Stripe Customer object by making a request to list all customers with that particular email (https://stripe.com/docs/api/customers/list#list_customers-email). If there are no customers with that email then you know that they have never subscribed and you can have them go through the subscription flow. Depending on what you want, you can also take it a step further and confirm that the returned customer has an associated subscription as well.

proud saffron
#

I have an issue with invalid credit card details being entered for subscriptions with a free trial using the hosted checkout page. Does anyone know how to force Stripe to verify the credit card details entered are valid?