#dev-help

1 messages Β· Page 129 of 1

sick talon
fair geyser
#

ok. that works.

#

How do I set auto_advance=false on an upcoming subscription invoice?

#

Or, alternatively, can I set my usage period to the first day of the month to the last day of the month, but bill on the 5th?

vocal wagon
#

Hey guys, i have a probleme with payments, cards are decline and it doesn't appear in the dashboard. All cards are decline. Do you know what to do?

sick talon
#

What's the request id from the developer logs where you get that error?

#

Is that view coming from the Stripe SDK or is it from somewhere else? I'm not super familiar with FPX.

atomic locust
#

just setup new account. Downloaded the library from github. Can someone point me to what I need to include in php in order to use Stripe?

sick talon
# fair geyser ok. that works.

You'll always have a new invoice created on the first day of the next billing period. You can't edit the upcoming invoice as your options are automatic payments or sending an invoice https://stripe.com/docs/api/subscriptions/update#update_subscription-collection_method

sick talon
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

coral hinge
#

@sick talon To streamline the front-end, with the cancel_url is it possible to call my back-end and redirect user?

sick talon
rough spire
sick talon
sick talon
# rough spire Can you tell me where can i found it??
coral hinge
#

there is a webhook for notify that?

sick talon
sick talon
rough spire
#

cus_JuDEtE5G4cp5HR

nocturne thistle
sick talon
rough spire
#

Sure const handlePayPress = React.useCallback(() => { post("/wallets/setup-payment") .then(({ data }: any) => { console.log(`data`, data); confirmSetupIntent(data.client_secret, { type: "Card", billingDetails: { name: state.name }, }) .then(({ setupIntent, error }) => { console.log(`la respuesta`, setupIntent); console.log(`error`, error); // onExecutedAction?.(); // onClose(); }) .catch((error) => { console.log(`El error`, error); }); }) .catch((error) => { console.log(`error`, error); }); }, [state, confirmSetupIntent, onClose, onExecutedAction]);

sick talon
fair geyser
#

Is there a delay between the end of the billing period and the invoice creation time? Is it settable?

sick talon
rough spire
#

confirmSetupIntent

sick talon
fair geyser
#

ok. thanks

sick talon
rough spire
#

seti_1JGOv1CCX02HFf0NyDWKYKPY

atomic locust
sick talon
# rough spire seti_1JGOv1CCX02HFf0NyDWKYKPY
            type: "Card",
            billingDetails: { name: state.name },
          })```
I would expect there to be card  details passed when trying to confirm. There isn't a payment_method already attached to that SetupIntent so you'd need to pass in something when confirming it.
rough spire
#

Card details is passing through CardField component

sick talon
# rough spire Card details is passing through CardField component

Yes but unless we're doing something unusual in the React library, you need to pass that resulting card to your confirmation step. https://stripe.com/docs/js/deprecated/confirm_setup_intent shows the example with payment_method if you've already turned the card into a PaymentMethod, but you can also use a Token.

sick talon
atomic locust
#

(index):7146 crbug/1173575, non-JS module files deprecated.

sick talon
#

(might also not be a PHP error but a VSCode one -- I'm not at all familiar with that specific one)

atomic locust
#

@sick talon besides the library are there server prerequisites that I should be checking?

sick talon
atomic locust
#

So, just PHP 5.6.

#

I was hoping the error was a pre-req that I didn't have

fair geyser
#

I would like the subscription to be monthly but have it start and end at 5PM on the first day of the month. Using your iframe, when the subscripition is created, it sets the billing_cycle_anchor of the subscription to 'now'. Is there a way to setup the iframe to set the billing_cycle_anchor to what I want? Or do I have to do this via API afterwards per subsription created?

sick talon
sick talon
fair geyser
#

checkout

sick talon
fair geyser
#

Ok. But I want to be able to bill them for usage in that window. (metered billing)

sick talon
fair geyser
cobalt plaza
#

Using the API, how can I create a subscription that tries only once to charge the customer, and sets the subscription status to incomplete if the charge fails?

#

Be default, once a charge fails, it is retried again. But I want no retries

sick talon
rough spire
#

Hey @sick talon This stupIntent works seti_1JGPaVCCX02HFf0N0rzkMCwp_secret_JuE2VhoghhmgobIIy1WWVi2RcKvscEB but i can't find it on dashboard

rough spire
#

Found it

cobalt plaza
#

@sick talon Can you confirm you are looking into it? No rush, just for my info

sick talon
rough spire
#

@sick talon Those marked ones works perfectly, but the unmarked one does not works, i really do not know whats the problem cause the process is the same in both ways.

sick talon
sick talon
bold basalt
#

@rough spire hello, is this React or ReactNative

rough spire
#

I'm using stripe sdk v0.1.12 cause the latest one has troubles in my implementation.

dapper dome
#

Hello gents, a quick question if you can, regarding the Stripe Terminals.
We just received the Wisepos E - but it did not come with any manual, nor is one available from the docs.. So we're a bit stuck.
Does anyone know how to use it? It's just sitting on the "Stripe payments" splash page, and you can swipe left to go to Settings but that's blocked by some "Admin PIN"
The stripe terminal sdk is also unable to connect to it (tried bluetooth/internet)

bold basalt
#

@rough spire so basically there must be some error in your parameters when you confirm the SetupIntent, the SDK is returning a generic error instead.
I'd check: 1/ log out the parameters you're passing to confirmSetup() 2/ make sure you're using the right API keys (cause you mentioned you cannot see a SetupIntent in your Dashboard, so you might be logged into the wrong Dashboard if you have multiple accts)

#

@dapper dome hello, reading

#

@dapper dome sounds like a reader with incorrect reader software/firmware/setup on it, I'd flag to Stripe Support at https://support.stripe.com/contact , mention that you came here and I routed you there and requested a new reader.

dapper dome
#

Thanks @bold basalt, i'll forward the enquiry there. Would you mind directing us to any documentation regarding usage?

bold basalt
#

@dapper dome sure one sec

atomic locust
#

it's including a vendor/autoload.php file. However, I don't see where that file is included

#

i.e. there isn't a vendor folder in the downloaded zip file

dapper dome
#

I'm not from Stirpe @atomic locust but sounds like you need to install composer and make composer install the dependencies

atomic locust
#

I installed the strip library via the github link. There isn't a vendor folder there or an autoload file. So the example they have isn't going so well. πŸ™ƒ

dapper dome
bold basalt
dapper dome
#

@bold basalt Says not found for me - let me check with my coworker

bold basalt
#

@dapper dome gotcha, yeah make sure the Stripe account you're on is logged in, into the docs page. It could be that your account wasn't given access to that doc, I can probably get that fixed though

dapper dome
#

@bold basalt We've ordered Wisepos readers last week, so if it's account wide then we don't have access. They're possibly sent automatically now (as we can order them through the dashboard)

bold basalt
#

@dapper dome can you send me your account ID? I can check if it has access to the docs or not. My read of things is that if you have dashboard access to order WisePOS E, you should be able to see that doc

rough spire
# bold basalt <@!327652513681506305> so basically there must be some error in your parameters ...

@bold basalt I update react native stripe SDK to 0.1.4 and now it's showing me this error
error {"code": "Failed", "declineCode": null, "localizedMessage": "There was an unexpected error -- try again in a few seconds", "message": "No valid API key provided. Set `STPAPIClient.shared().publishableKey` to your publishable key, which you can find here: https://stripe.com/docs/keys", "stripeErrorCode": "", "type": "invalid_request_error"}

acoustic yarrow
#

Hi guys its been 15 days and my refund is still not given back to me . What should i do ?

bold basalt
#

@acoustic yarrow those questions are answered by Stripe Support at https://support.stripe.com/contact. For context, this channel can help if you have a coding/technical integration related question with Stripe's API.

#

@rough spire sounds like your integration isn't setting the publishable key properly, to StripeProvider? (the error is coming from the native stripe-ios but I'm speculating)

#

@dapper dome ah thanks for acct ID, looking

cosmic moat
#

Hi all - i'm new here, i've tried to find the answer to this, but don't seem to see it on here.
If i have used connect to link an account in any of the following ways:

  • onboarded as a new express account
  • onboarded as a new standard account
  • linked existing account (standard or express) via oauth
    As a platform, for how long after the transaction can the platform process a refund with reverse_transfer? The intention is to refund a transaction if it later transpires that the service being paid for has not been delivered - e.g. in 30 or more days from the transaction.
    Thanks! And apologies if this has been answered elsewhere
bold basalt
#

@dapper dome is that the same account you ordered the reader from? I don't see it having the gate that gives it access to the docs and dashboard to order. Just wanted to check

#

@cosmic moat there's no limit (from the API) to when you can reverse a Charge, the reverse_transfer depends on what Balance lives on the Connect account and whether it is sufficient to recover the full transfer

dapper dome
#

@bold basalt strange, we have an order here: thor_1JDnGiAgEyoKVYmmYNLLY6fa

cosmic moat
meager ibex
#

Hi there, i connected my shopify store to stripe payments. Stated there it was 2% fees, but why at the end of my payout the fees was 8%? any idea why?

bold basalt
#

@dapper dome thanks! that was helpful, maybe things have changed and the gate isn't required for Dashboard access. Give me some time, asking internally to check and try giving you access to docs atleast

#

@meager ibex hello, that is not a question I can answer here, you should talk to Stripe Support about pricing and fee questions: https://support.stripe.com/contact
This channel can help if you were building a Stripe integration.

#

@cosmic moat it returns an error

golden sparrow
#

Hi Guys,
Today on production I received this event twice. (KLARNA) but with a different event-id, therefore my system processed it twice and a user ended up having two orders but has payed only one. Any suggestions on how to avoid this in the future?

open crystal
honest pollen
#

Hi guys,

I used https://stripe.com/docs/api/tokens/create_card to generate a card token sucessfully. I want to use this token for https://stripe.com/docs/api/charges/create. I am not sure what value I pass in to charges.create for the source. Is it the whole token object, the id, or ?

golden sparrow
rough spire
vocal wagon
#

You specify this param in your session.create

bold basalt
#

@golden sparrow can you send me the event IDs for both events?

golden sparrow
bold basalt
#

@honest pollen you pass source: tok_123 so just the Token ID. But since you're integrating, why use Charges? Those are legacy, PaymentIntents and PaymentMethods are the recommended integration now

honest pollen
bold basalt
#

@honest pollen one sec sending you the right doc. Do you want a really custom integration? Or getting something up and running quickly?

bold basalt
honest pollen
#

ok ty

golden sparrow
bold basalt
#

@golden sparrow yep seeing that, give me a sec to dig more

vocal wagon
#

what will be the value of the fee field (in cts) ? From what i've understood we dont really have the amount until the beginning of the next month ?

#

from what you said, I underdstand that we will have the right value of the fee (computed from network fee, stripe fee, etc..) but not the breakdown. This is not what i've read earlier stating that the exact value of the fee can be computed by stripe only later (not only the breakdown but also the total amount)

bold basalt
#

@vocal wagon hello! wsw isn't around, IC+ is not my best topic but my understanding was that there won't be a fee on the BT, you get a monthly report with all the fees. I would recommend reaching out to Support at https://support.stripe.com/contact as they can help with it better since they're more informed on that

vocal wagon
#

@bold basalt my AM told me that you guys will have the answer on that actually

bold basalt
#

@vocal wagon ah I see, yeah our team has the answer for most other integration questions, IC+ is something our team doesn't typically deals with, so I wouldn't have the most confidence in my answer (full disclosure)

vocal wagon
#

"there wont be a fee on the BT" -> will it be zero ? will it be null ? will it be an approximation ? will it be the same as of now ?
a bit confused and unfortunately we cant test that beforehands

#

okok, do you have the contact of the team that may have the answer ?

#

we have a dedicated account manager (no need to support then) but even him does not know :/

light hawk
#

With a subscription schedule with multiple phases and end_behavior: "cancel, will subscription.cancel_at_period_end automatically become true when the subscription moves into its final phase?

bold basalt
#

@vocal wagon I can get you an answer, just juggling a few things. If you're still on, can answer your questions (just be a min)

#

@vocal wagon you're already here so I don't want to redirect you further

vocal wagon
#

sure no problem

bold basalt
#

@light hawk hello, yes I believe so

light hawk
#

@bold basalt thanks πŸ™‚

#

@bold basalt do you know if that's done based on whether the final phase ends before on when the current period ends? or just if the subscription is in the final phase?

rough spire
#

@bold basalt Error was mine, i was initializing stripe sdk only when i create the connect account on my platform. Solved.

bold basalt
#

@light hawk I don't know actually, I'd recommend testing it out and seeing

#

@rough spire ah nice, glad you found it

#

@vocal wagon getting you an answer, one sec

light hawk
#

πŸ‘πŸΌ

rough spire
#

Thank you very much! You guys are very helpful

vocal wagon
#

@bold basalt still here πŸ™‚

bold basalt
#

@golden sparrow checked internally, a rare issue on our end that is slated for a fix soon (no exact timeline yet as it is a bit complex) but has been flagged before and your case is the same.

golden sparrow
#

Or anyway to avoid this? Or should I build my own workaround?

bold basalt
#

@golden sparrow I don't think there's a clean way to avoid this, like you could check if you've already recorded this PaymentIntent internally and handle this being a "false duplicate".

golden sparrow
honest pollen
#

I am trying to test using cc data found here: https://stripe.com/docs/testing

When I am using my secret key I always get this error "message": "Your card was declined. Your request was in live mode, but used a known test card.",

How do you recommend I test my integration?

vocal wagon
bold basalt
#

@golden sparrow yep flagged your case to the team too, appreciate you sharing. Yeah it is hitting those two payment methods mainly

#

@vocal wagon for IC+, the fee_details field will be an empty array
So you'll see fee_details: [] instead of any of the sub hashes there

#

@honest pollen you're using a test mode card but live mode API keys. Are you testing? or doing live mode payments? like your API keys are mismatched

honest pollen
#

I probably have to update my dashboard. I am just testing. Not ready for live mode payments

bold basalt
#

@honest pollen so that means that you're using your live mode API key server-side

#

@honest pollen the Dashboard toggle is only to display the test mode data, or live mode data. The API keys tell Stripe whether you mean to create a live mode or test mode charge

#

@honest pollen so your client-side code is using test mode API publishable key, your server-side code is using a live mode API key

honest pollen
#

So I need to get a new server-side test key

bold basalt
#

@honest pollen not new necessarily, your server-side code needs to use your test mode key , right now it is using live mode key

honest pollen
icy anvil
#

@honest pollen there are two keys for each mode, one publishable key and one secret key

#

@honest pollen so there are four keys in total, and you want to be using the test mode secret key server-side

honest pollen
#

got it ty

icy anvil
#

np!

vocal wagon
#

Hi sorry, I messaged you in private. Getting an error when doing the session.create:

vocal wagon
light hawk
#

@bold basalt we tested this and it seems cancel_at_period_end isn't always true when in the final phase of a schedule with end_behavior: cancelβ€”is this a bug?

bold basalt
#

@light hawk can you share a SubSchedule ID and I can look?

languid tulip
vocal wagon
#

Yes, it is redirecting to the url actually, but lands on an error page:

light hawk
#

@bold basalt sub_sched_1JGRTEHdNCWQy1fozJ6q95IT

#

@bold basalt may have been deleted since then

#

I can try to get an active one

languid tulip
light hawk
#

lmk if that's good enough or if you need an active one

vocal wagon
#

Yes i am. Connected acct in the header of the session create

#

along with the platform's sk

#

and FYI the url in the browser is good too

light hawk
languid tulip
#

Are you doing that as well?

vocal wagon
#

Yes StripeJS is initialized with the publishable key + Connected Account

vocal wagon
languid tulip
vocal wagon
#

I can provide the req ID if you wish

#

the keys are that of the platform. Connected Account is...well Connected Account

#

Platform's sk key in the header server side / pk key for StripeJS

languid tulip
#

Looking further @vocal wagon

vocal wagon
#

my question on that is still :

  • does it change from now ?
  • is the right value (from what i understood stripe does ot have it until the end of the month so it would be strange)
  • is it zero ?
bold basalt
#

@light hawk so this Subscription wasn't cancelled at period end though, right? It was cancelled today, period end was 1 month from today.

light hawk
#

@bold basalt I see the canceled_at on the subscription, but status is still active (for both the subscription and schedule)β€”which confuses me even further!

bold basalt
#

@vocal wagon

what about the value of the fee field please ?
fee would be 0

does it change from now ?
no it should stay the same

my understanding is that all the fee stuff says the same as I mentioned above, until you get the IC fees later in a report

wanton python
#

I changed this to Terminal.getInstance().getSimulatorConfiguration().update = SimulateReaderUpdate.REQUIRED but it errors at 'update' with "update has private access".
I also tried setUpdate() thinking maybe it was a getter setter situation, but no luck "symbol not found".

bold basalt
#

@wanton python hello, looking

#

@wanton python what version of the iOS SDK are you on?

wanton python
#

Android SDK v2.0.0

bold basalt
#

@wanton python looking

languid tulip
# vocal wagon Platform's sk key in the header server side / pk key for StripeJS

Hmm okay I really can't think of an issue here other than there being mismatched keys. Can you show me a short code snippet for how you are initializing Stripe and passing the Account header client side (obviously with sensitive data removed)? Also... as a note we recently started returning the redirect url server-side on session creation (https://stripe.com/docs/payments/accept-a-payment#redirect-customers) so you don't even have to use stripe.redirectToCheckout anymore... you could just use that redirect url itself and this would clean things up here if you want to use that instead.

bold basalt
#

@light hawk oh wait maybe I misread this then

light hawk
#

@bold basalt looking at the stripe docs, it looks like canceled_at can also be an updated-at timestamp

#

so I don't think the subscription was inactive at that time

languid tulip
vocal wagon
languid tulip
#

You client-side code should look something like:

, {
     stripeAccount: 'acct_1123’,
   }
);```
vocal wagon
#

I'm checking this stripeJS init now... I did add the Stripe-account but maybe code no good. I use a special no code framework and everything else works fine. Browsing thru the JSON file now...

vocal wagon
vocal wagon
#

right now it is not zero unfortunately, we pay fee haha

bold basalt
#

@vocal wagon I interpreted your question as "once I get IC+ fee report, does the fee on the BalanceTransaction change to reflect that" and I was answering that, that no it says the same

Can you share the Charge or BalanceTransaction ID where you get a non zero fee? I think we're mis aligned

languid tulip
vocal wagon
#

@bold basalt IC+ is not activated yet so it not zero yet

atomic locust
#

trying to get sample checkout app working from the stripe.com site.

#

getting an error: (Network error [errno 77]: error setting certificate verify locations:

vocal wagon
#

but thanks i have my answer : once IC+ is activated on our stripe account, then we have zero and i'll update our backend accordingly

atomic locust
#

Anyone familiar with what this might mean?

bold basalt
#

@vocal wagon yep ^ that is what I'm referring to

#

@atomic locust hello, where are you getting this

atomic locust
#

the error or the sample app?

wanton python
vocal wagon
#

@bold basalt sorry just thought of that right now : what about the dispute fees ?

#

i guess this wont change but confirmation would be nice πŸ™‚

bold basalt
#

@vocal wagon haha can ask internally, again this is the edges of my IC+ knowledge but can get you an answer

#

@wanton python still looking

vocal wagon
#

thx a lot !

atomic locust
vocal wagon
#

from what i understood it not really covered by the IC+, but our business team has just negociated the fee at the same time so maybe it is somehow linked to the IC+ change

#

not sure

bold basalt
#

@atomic locust the error, where are you getting that from and at what point

#

@vocal wagon I believe the Dispute fee doesn't change either .. but again double check me on that, I'd recommend sending your question via email to Support at https://support.stripe.com/contact
Let them know you have detailed IC+ questions and you already asked here in the Discord developer chat
There are Support teams who are better informed on this who can get you the answer

#

@atomic locust sorry tagged the wrong person earlier

atomic locust
bold basalt
#

@atomic locust are you running this locally? or on a server somewhere

atomic locust
fair geyser
#

If I have metered billing and I want to change the subscription billing anchor, can I set the trial period end and still charge for the usage during the trial period. My general use case is I want to set the subscription to go from the 1st at 5pm to the 1st of the next month at 5pm, and I put in my daily usage record for 7pm

mighty hill
#

@atomic locust What version of PHP are you using?

atomic locust
mighty hill
#

@fair geyser No, I don't think that will work. To clarify, you want to add usage outside of the billing period?

fair geyser
#

No. Let's say they sign up on the 15th. I want to charge from the 15th to the end of the month, and then from then on charge monthly on the 1st

#

And this is metered billing, not fixed fee

mighty hill
#

@atomic locust Has the sample code been modified at all?

atomic locust
mighty hill
#

@atomic locust The error you're seeing indicates curl, which PHP uses to make HTTP requests, is unable to find information vital to validating HTTPS certificates, so the secure request to the Stripe API is failing. Do you have any unusual certificate settings or configurations at the OS level? What OS are you using?

fair geyser
#

Do you mean waiting until the exact moment when I want the start to be and then issuing a change to the billing_cycle_anchor to 'now'? I guess so, but it seems really hacky.

fair geyser
#

It would be super nice if I could say billing_cycle_anchor =xxx where xxx is between now and the current next billing cycle date.

mighty hill
atomic locust
mighty hill
#

@atomic locust How did you install PHP? A removal and reinstall may help.

#

@atomic locust What about the PHP error log on the server?

fair geyser
atomic locust
mighty hill
#

@fair geyser Subscription Schedules allow you to schedule changes to a Subscription ahead of time (which sounds like exactly what you want to do). See here for adjusting the billing cycle anchor specifically: https://stripe.com/docs/api/subscription_schedules/create#create_subscription_schedule-phases-billing_cycle_anchor

atomic locust
mighty hill
#

@atomic locust Have a look in php.ini on your server for the error_log setting and see if it's writing PHP errors to a log somewhere, then look there for details about what went wrong.

atomic locust
mighty hill
#

@atomic locust On the Ubuntu server.

vestal trench
#

Good morning! Just have a quick question about invoices and prices. I see that a Price is required to create an invoice. However I don't want it to be recurring. If I leave out that parameter is it equivalent to a 1 time thing?

mighty hill
#

@vestal trench Yep!

vestal trench
#

thank you!

mighty hill
#

@vestal trench Step 3 there talks about the one-off nature you're asking about.

vestal trench
#

ah ok great. Definitely want to trigger it from the API though so was just double checking that parameter

atomic locust
mighty hill
#

@atomic locust I recommend configuring one, then trying again on the server.

vestal trench
#

@mighty hill If im understanding correctly I should be able to create an invoice from the API and allow our finance people to finalize it and send the email from the dashboard

mighty hill
vestal trench
#

yup! actually already on that page

mighty hill
#

@wanton python Were you able to get the Terminal simulator update configuration working?

#

@light hawk Did you have an outstanding question about that Subscription?

atomic locust
mighty hill
#

@atomic locust Not sure what you mean, can you clarify? Are you saying you set error_log to reference a log file but PHP isn't creating a log file?

mighty hill
#

@wanton python I'm not very familiar with Android, but how can I help?

atomic locust
mighty hill
#

@atomic locust Make sure the user/process running PHP (likely something like www-data or similar) has read/write access to the location you specified for the log file.

#

@atomic locust What does your error_log line in php.ini look like now?

#

@atomic locust Oh, and did you restart Apache and PHP after making the change?

atomic locust
mighty hill
#

@atomic locust Okay, so what does that line look like?

wanton python
#

@mighty hill The docs are out of date for how to setup SimulatorConfiguration using java SDK
Here was my original post: #dev-help message

atomic locust
mighty hill
#

@atomic locust You should probably set it to the full path to a log file. Typically it's something like /var/log/php/error.log

#

@wanton python I'm not sure what you mean when you say the docs are out of date. The docs mention Terminal.shared.simulatorConfiguration.availableReaderUpdate but that's a generic way of referring to where to set that configuration, not actual code that works on any particular platform/language.

mighty hill
#

@atomic locust How are you restarting Apache/PHP after making the configuration change?

mighty hill
#

@atomic locust Is PHP running as an Apache module or using FPM?

mighty hill
#

@atomic locust If you're using FPM you would need to restart PHP separately from Apache.

wanton python
#

trying to set the update property directly via .update gave an error of "private access"

mighty hill
#

@wanton python I don't think you want getSimulatorConfiguration(), but let me check the Android docs to see what that actually does...

atomic locust
wanton python
mighty hill
wanton python
#

oh ok this is what I was using

mighty hill
#

@atomic locust What are the permissions and ownership of the directory where the log file exists?

atomic locust
#

drwxr-x--- 2 root adm 4096 Jul 23 13:52 apache2

mighty hill
#

@atomic locust What user is PHP running as?

mighty hill
#

@atomic locust Apache/PHP is running as some user on your server, what user is it?

atomic locust
wanton python
atomic locust
mighty hill
#

@atomic locust The Apache log only has Apache errors, not PHP errors.

mighty hill
#

@atomic locust The user you're logged in as has nothing to do with the user Apache/PHP is running as.

mighty hill
#

@atomic locust If you haven't changed the configuration it's probably www-data, so it makes sense the log file doesn't exist as www-data doesn't have access to the location you're specifying.

atomic locust
mighty hill
#

@wanton python Looking. Might take me a bit, as I said not that familiar with Android or Java. πŸ˜…

wanton python
mighty hill
#

@atomic locust I don't recommend that, no. Hang on...

#

@atomic locust What version of Ubuntu are you using?

atomic locust
mighty hill
stark tide
#

fwiw, ubuntu 16.04 is EOL as of april, and no longer receives security patches - it might be wise to upgrade to 20.04

atomic locust
mighty hill
#

@atomic locust Here's what I recommend:

  1. Create the log file: touch /var/log/php/error.log
  2. Change ownership of the file to www-data: chown www-data:www-data /var/log/php/error.log
  3. Change permissions: chmod 644 /var/log/php/error.log
wanton python
mighty hill
#

@atomic locust After that make sure error_log is pointing to /var/log/php/error.log in php.ini, restart Apache, and then see if errors start to log there. You can write to the log file manually using error_log() in PHP to test it.

#

@wanton python What line of code threw that error?

atomic locust
#

[23-Jul-2021 14:25:24 America/New_York] PHP Parse error: syntax error, unexpected 'stripe' (T_STRING), expecting ',' or ';' in /var/www/html/stripe/create-checkout-session.php on line 7

mighty hill
#

@atomic locust Okay, so you've got a syntax error on or near line 7 of that file. Sounds like you probably forgot a ; at the end of a line.

atomic locust
mighty hill
#

@atomic locust That's Node code, not PHP.

wanton python
mighty hill
#

@atomic locust Node/JavaScript syntax is completely different from PHP, which is causing the error.

atomic locust
#

error:

#

[23-Jul-2021 14:29:35 America/New_York] PHP Fatal error: Constant expression contains invalid operations in /var/www/html/stripe/create-checkout-session.php on line 6

mighty hill
#

@atomic locust What's line 6 of that file look like?

atomic locust
#

the error actually looks like what I had on my local computer

#

[23-Jul-2021 14:31:31 America/New_York] PHP Fatal error: Uncaught Unexpected error communicating with Stripe. If this problem persists, let us know at support@stripe.com.

(Network error [errno 77]: error setting certificate verify locations:
CAfile:
CApath: /etc/ssl/certs)
thrown in /var/www/html/stripe/lib/HttpClient/CurlClient.php on line 575

atomic locust
mighty hill
#

@atomic locust Let's back up. You just shared three very different PHP errors with very different causes. Are you sure the code you're using hasn't been altered other than changing the API key?

atomic locust
#

this does not exist. When I spoke to someone on stripe.com support chat, they said that needs to be changed to load the init.php file. Which I have done

mighty hill
#

@atomic locust You're not using Composer to install the Stripe PHP library?

wanton python
atomic locust
mighty hill
#

@atomic locust Why aren't you using Composer?

wanton python
atomic locust
mighty hill
#

@wanton python Unfortunately I'm not sure. I can try asking internally, hang on...

light hawk
#

@mighty hill sorry didn't see your message until nowβ€”the question is, is it a bug that subscription.cancel_at_period_end is false on this subscription even though the schedule has end_behavior: cancel and is in the final phase? #dev-help message

mighty hill
#

@light hawk Sorry, got pulled away for a minute, let me catch up, hang on...

thorn bone
#

hey guys,...

Im a little bit struggling to test a renewal...
I have, in my side, a logic that checks for "billing_reason"... if it is "subscription_create" I create a new contract on my side.. but if it is "subscription_cycle" then I find the contract with customer_id and renew it

Howe can I test payment_succeeded event with subscription_cycle as billing_reason?

mighty hill
#

@light hawk No, this doesn't seem like a bug to me. cancel_at_period_end is an explicit parameter on the Subscription itself that is not being set at any point in time for this Subscription. The Subscription will be canceled at the end of the phase, which happens to be the same as the period, but the cancelation is going to be driven by the Subscription Schedule, not the cancel_at_period_end property on the Subscription.

#

@thorn bone Hello! You would create a Subscription and then wait for it to cycle.

thorn bone
mighty hill
#

@thorn bone You can create a Subscription with a lower period (one day) in test mode.

thorn bone
mighty hill
#

@wanton python Okay, someone recommended this:

Terminal.getInstance().setSimulatorConfiguration(new SimulatorConfiguration(SimulateReaderUpdate.UPDATE_AVAILABLE, new SimulatedCard("4761739001010119")));

What happens if you try that?

wanton python
mighty hill
#

@wanton python Awesome! Sorry it took so long to find the answer.

wanton python
#

no problem at all, thanks for being here to support

atomic locust
#

@mighty hill Any further thoughts?

mighty hill
#

@atomic locust What version of the Stripe PHP library did you install?

atomic locust
mighty hill
#

@atomic locust Can you create a new file that includes the Stripe PHP init.php file and then has this code:

$stripe = new \Stripe\StripeClient('sk_test_YOUR KEY');
$customer = $stripe->customers->create([
  'description' => 'Test Customer',
]);
echo $customer->id;
#

@atomic locust If you then run that file on your server does it work as expected?

ember epoch
#

Hi im wondering if the limit on the virtual cards are per card or total

mighty hill
#

@ember epoch Hello! Which limit are you asking about specifically?

ember epoch
mighty hill
#

@ember epoch That's where your Issuing cards are listed... still not sure which specific limit you're asking about? Are you talking about the spending limit shown on a specific card?

ember epoch
#

yes

mighty hill
#

@ember epoch That limit is specific to that card.

ember epoch
#

ah ok thanks

atomic locust
mighty hill
#

@atomic locust You need to change sk_test_YOUR KEY to your test key.

atomic locust
mighty hill
#

@atomic locust The entire contents of the file would look something like this:

<?php
// TODO: require Stripe library here
$stripe = new \Stripe\StripeClient('sk_test_YOUR KEY');
$customer = $stripe->customers->create([
  'description' => 'Test Customer',
]);
echo $customer->id;
atomic locust
#

[23-Jul-2021 15:53:15 America/New_York] PHP Fatal error: Uncaught Unexpected error communicating with Stripe. If this problem persists, let us know at support@stripe.com.

(Network error [errno 77]: error setting certificate verify locations:
CAfile:
CApath: /etc/ssl/certs)
thrown in /var/www/html/stripe/lib/HttpClient/CurlClient.php on line 575

lavish oasis
mighty hill
#

@atomic locust That is really strange. How did you download and install the Stripe PHP library?

#

@lavish oasis Hello! What's your question about that?

lavish oasis
#

I'm wondering that after we transfer the data... do we still have the "live tokens" to keep billing those customer?

#

hello Rubeus!

#

I can't say much, but we own a big Stripe account and we're gonna purchase a company 😬

#

and we're looking to see what's gonna be the best way to incorporate them

mighty hill
#

@lavish oasis I'm not very familiar with the process, but I believe it's a copy, not a move. You can ask the person working on your migration to be sure though.

lavish oasis
#

we're gonna contact Support on Monday along with the CFO

mighty hill
#

@lavish oasis The support document you linked to says as much:

This process is a copy, not a migration, so all of your old data will remain in your old account. We recommend keeping the original β€œold” account around so you can access the legacy data there if you ever need to reference it.

lavish oasis
#

they'll assign a migration "specialist"?

mighty hill
#

@lavish oasis Not sure of the specifics honestly. Support can provide those details.

lavish oasis
#

πŸ‘

mighty hill
#

@atomic locust Right, but you didn't use Composer, so how did you actually install it on your server?

atomic locust
mighty hill
#

@atomic locust Oh, yeah, that won't work. You can't just copy init.php and lib and expect it to work. You need all of it.

#

@atomic locust I strongly recommend you use Composer to install the library, but if you can't or won't use Composer you need to copy the entire library, not just parts of it.

atomic locust
#

so the original sample app now generates this error:

#

[23-Jul-2021 15:53:15 America/New_York] PHP Fatal error: Uncaught Unexpected error communicating with Stripe. If this problem persists, let us know at support@stripe.com.

(Network error [errno 77]: error setting certificate verify locations:
CAfile:
CApath: /etc/ssl/certs)
thrown in /var/www/html/stripe/lib/HttpClient/CurlClient.php on line 575
[23-Jul-2021 16:00:22 America/New_York] PHP Fatal error: Uncaught (Status 400) (Request req_0CJ7YAkFqJ8qry) In order to use Checkout, you must set an account or business name at https://d$
thrown in /var/www/html/stripe/lib/Exception/ApiErrorException.php on line 38

#

Note: the code you provided, now has out of: cus_JuJBFEEkFRuvzA

mighty hill
atomic locust
mighty hill
#

@atomic locust Yay! Glad it's working!

atomic locust
atomic locust
mighty hill
#

@atomic locust That certificate is part of the Stripe PHP library and is required to be used as-is in order to communicate security with the Stripe API. You should not need to do anything special with it, and it will be updated when/if you upgrade the Stripe PHP library.

#

@atomic locust I strongly recommend using Composer to install and upgrade the library so you don't have to worry about the details.

somber sundial
#

Hello Stripes! Quick q - can I add multiple bank accounts to receive payouts in both CAD and USD for my Canada-based Stripe account?

sick talon
sick talon
somber sundial
#

cool, thanks @sick talon !

vestal trench
#

Good afternoon! Im back to ask another question for invoicing. Essentially I am being told that we want create an invoice with just one item. Is it reasonable to chain this flow together with webhooks? For example, create a price > create invoice item on price.created > create invoice on invoiceitem.created.

sick talon
lavish oasis
#

@mighty hill just contacted support, seems like we get a full export of customers with all their payment information, so we just need to recreate their subscriptions.

#

thanks a lot!

vestal trench
#

@sick talon I guess I just wasn't sure if I could guarantee the price was created before I made a call to create the invoice item, and so on

sick talon
vestal trench
#

@sick talon well thank you. that makes this a lot less complicated

somber sundial
#

Another question for y'all... Can the comms for invoices from Stripe Billing be whitelabeled? I.e. have my company email domain for the invoice, remove Stripe branding for the invoices, etc?

light hawk
#

@mighty hill thanks

sick talon
novel nacelle
#

Hi, I need some help from sales team.. anyone please?

cerulean pineBOT
#

:question: @novel nacelle 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

novel nacelle
#

Thanks

#

I already sent that request

#

However I would like to register my company on 24th of July

#

I know it’s tomorrow and a Saturday, don’t know if anyone call me from the sales team ASAP (+351936846594)

crimson needle
#

@novel nacelle this Discord is for developers with questions about their code. We can't help with account specific questions here, you need to talk to our support team

#

also you just shared your personal phone number publicly here, you should edit your message

novel nacelle
#

I understand that, sorry

#

Any channel for the sales team?

crimson needle
#

no, Discord is only for developers questions. You won't be able to reach the sales team in a rush like this. You should just talk to our support team really and ask your questions to them https://support.stripe.com/contact

novel nacelle
#

Ok thanks, but there’s only e-mail and form request, like the previous century? πŸ˜…

crimson needle
#

we have live chat and phone support for existing users

#

I'd recommend creating and activating your account first which can be done easily in the Dashboard

atomic locust
#

Using $checkout_session = \Stripe\Checkout\Session::create([.... is there any options for customizing the resulting page of $checkout_session->url? i.e. the content, etc?

crimson needle
wide token
#

Hi there, this is an odd question but is it possible in test mode to create a charge in the past?

crimson needle
#

@wide token no, it's not possible. Definitely something I've seen asked before when you want to simulate funds availability or historical data but we don't have a solution yet

wide token
#

Darnit. Thanks anyways.

icy anvil
#

obviously won't help with the "historical data" use-case but can help if you need some Available Balance for something

crimson needle
#

for sure but it's rarely why this is asked

icy anvil
#

(i'm sure @crimson needle knows this :P)

#

makes sense, just thought I'd mention it since funds availability was mentioned, i may have misunderstood

crimson needle
#

nah I'm glad you clarified, it's not always easy to see all the possible reads of a question πŸ™‚

vocal stump
#

Cheers guys

#

nickdnk here

crimson needle
#

Hey nick, long time πŸ™‚

vocal stump
#

Yeah, haven't touched Stripe in a while (things have just been working)...I have an Apple Pay related question that I don't really understand. According to https://stripe.com/docs/apple-pay?platform=ios#client-side, calling the completion block with a client secret should dismiss the Apple pay sheet, however, my server does not return a client secret because the payment does not require 3Ds

#

So the Apple Pay sheet hangs around and times out

#
func applePayContext(_ context: STPApplePayContext, didCreatePaymentMethod paymentMethod: STPPaymentMethod, paymentInformation: PKPayment, completion: @escaping STPIntentClientSecretCompletionBlock) {
        
        purchaseRequest = NyxRESTHandler.upgradeIdentity(identityId: identity.id, upgradeRequest: .init(paymentPlan: selectedPaymentPlan.id, paymentMethodId: paymentMethod.stripeId, paymentPlansLastEdit: membership.paymentPlansLastEdit), onComplete: { result in

            switch (result) {
            
            case .canceled:
                completion(nil, ApplePayError.canceled)
            
            case .error(let error):
                
                completion(nil, ApplePayError.paymentError(error: error))
            
            case .success(let scaResponse, _):
                
                completion(scaResponse?.clientSecret, nil)
                
            case .connectionError:
                
                completion(nil, ApplePayError.connectionError)
            
            }
            
            return true
            
        }, asTask: purchaseRequest)
        
    }
#

so the inner call here is our API call

#

and we call the completion block of the Stripe SDK in our completion block, passing a client secret if one was returned by our server

#

But one is not returned as the payment intent does not go to requires_action

#

the payment goes through and everything plays out as expected on the backend

crimson needle
#

but your code should create the PI without confirming it

#

you should confirm client-side instead

vocal stump
#

Hmm, we don't do this anywhere on web where we use Apple Pay

#

I always just send a payment method

#

created with apple pay

crimson needle
#

that's strange, it's not the recommended flow as far as I know

#

let me ask my team

vocal stump
#

Also the docs say I should not create the PI on the client as that would allow the client to set the price

#

Which makes sense

crimson needle
#

sure you create the PI server-side, get the client_secret and confirm client-side

vocal stump
#

okay yea

rapid imp
bold basalt
#

@vocal stump hello, one sec looking

vocal stump
#

Also, the clientSecret is nullable in the completion block

#

in the Stripe SDK

rapid imp
#

I ignore the client_secret route in my app. I just make a payment method and pass true to the confirm parameter serverside.

vocal stump
#

Yeah the ideal flow for us is to provide the payment method from the client and let the server do the rest, passing a client secret back to the client if needed

#

which it does not seem to do in this case, it just completes the payment

bold basalt
#

@vocal stump what do you mean by

however, my server does not return a client secret because the payment does not require 3Ds
your server creates a PaymentIntent , it should have the full PaymentIntent object in the response, which has a client_secret field. So can you clarify that part?

vocal stump
#

Yeah I only send back the client secret if the payment intent goes to requires_action

#

but it does not

#

so I just confirm it

#

on the server

#

and webhooks do the rest

bold basalt
#

@vocal stump oh I see, you're kind of using STPApplePayContext in a non intended flow

vocal stump
#

I should note that all of this works

#

the client is just confused

crimson needle
#

@rapid imp mostly because it's never been the recommended flow. We recommend to create the PI first and then confirm the PI client-side instead.

vocal stump
#

As usual I'm the edge-case guy

#

So what does this mean in practice? I don't see 3DS on the payment even though it's Apple Pay

#

it just looks like a normal payment

#

Is this expected?

rapid imp
vocal stump
#

See pi_1JGW8TLj11Ytqxjbq244nG6u

#

For details

rapid imp
icy anvil
#

the idea is that PaymentIntents are created first, and then PaymentMethods are attached to them later. that's kind of the key difference between the PaymentIntent flow and the older Charges flow

vocal stump
#

I do that, just on the server

#

several people are typing...

crimson needle
#

@rapid imp there are many cases where this makes sense. Legacy integrations with mobile apps creating tokens upfront that can't be updated, the need to validate card brand securely server-side requiring PaymentMethod creation and server-side verification, etc.
But for a vanilla/normal integration it's definitely not recommended

bold basalt
#

@vocal stump yeah that is expected, Apple Pay doesn't mean 3DS.
I think STPApplePayContext won't work for what you're trying to do here (i.e. only confirm client-side if the PaymentIntent requires_action) as STPApplePayContext was built for client-side confirmation so it expects to have a PaymentIntent in a non succeeded status to confirm

vocal stump
#

So what would you recommend I do to make as few changes as possible?

#

Is there something else I can do on the client?

#

I mean I can just not confirm the intent if the payment type is apple pay, and then always send back the client secret

bold basalt
#

@vocal stump " I mean I can just not confirm the intent if the payment type is apple pay, and then always send back the client secret" -> that would be the right way to use STPApplePayContext yeah

rapid imp
vocal stump
#

I just have to inspect what kind of damage this would do to our web integrations

bold basalt
#

@vocal stump you're already using webhooks so you still hear of successful payment the same

#

@vocal stump you don't have to change web

vocal stump
#

Same API

#

so yes I do

bold basalt
#

@vocal stump why

vocal stump
#

app talks to the same server?

icy anvil
#

b/c they share the same backend, is what he's saying

vocal stump
#

it's the same endpoint

icy anvil
#

i mean, obviously you could special-case iOS if you really just want to fix this one bug

bold basalt
#

@vocal stump on web, you choose when you confirm. With STPAppelPayContext, you don't, it confirms under the hood. So you can keep all your integrations the same, only STPApplePayContext has to change (and your endpoint obv)

vocal stump
#

"and your endpoint obv" -> Web client has to know of this

#

Was just my point

#

I need to make sure the web integration is prepared to handle it, but I think it should be

crimson needle
bold basalt
#

@vocal stump if it is just one additional parameter that only STPApplePayContext passes and your endpoint handles (otherwise remains the same) then the web frontend doesn't change right? Like yes it could, I was thinking from the perspective of getting the minimum required work to get the iOS side working differently

vocal stump
#

Yeah then I would need to pass something like auto_confirm: false

#

to tell the server to not confirm

#

from the iOS app

#

and let web do what it always did

bold basalt
#

@vocal stump yep, just trying to save you more work!
the alternative (that only changes on the iOS client side which I don't recommend) is to not use STPApplePayContext and instead integrate with PKPaymentAuthorizationViewController manually which I don't recommend

vocal stump
#

I fairly adept in Swift so it might be easier

#

I'll have a look at those options

#

Thanks

icy anvil
#

the general flow of most of the client libraries is to confirm on the client side

crimson needle
#

@bold basalt still feels like a bug conceptually that the SDK doesn't have a way to dismiss the UI no?

icy anvil
#

so that your server doesn't have to have any business logic about which kinds of payments require confirmation, as that may change

vocal stump
#

@icy anvil Having that logic in one place instead of three (iOS, Android, Web) might be an advantage though

icy anvil
#

in this case that logic is contained in the Stripe libraries aiui

vocal stump
#

Which don't (with all due respect) seem to be working in this case

#

as koop says

bold basalt
#

@crimson needle you could say that, just that the component was built in mind to tightly couple with "payments" specifically. It does dismiss the UI, after it confirms the PaymentIntent for you, which in this special case we wouldn't want to do.

vocal stump
#

@bold basalt I don't understand why the callback takes a nullable clientSecret then?

#

shouldn't this be non-optional if it doesn't work without one

rapid imp
# crimson needle kind of, you can still do a lot synchronously, webhooks are more a failsafe

So if using ApplePay locally to confirm an intent, technically we could just do a few more API calls to kick off those operations, for example currently after a payment intent serverside I do extra things

let stripe = req.stripe
// Specify the business owners stripe account to create a direct charge.
stripe.paymentIntents.headers.add(name: "Stripe-Account", value: businessOwnerConnectAccount)
                    return stripe.paymentIntents.create(amount: totals.total,
                                                        currency: .usd,
                                                        applicationFeeAmount: totals.appfee,
                                                        confirm: true,
                                                        confirmationMethod: .automatic,
                                                        errorOnRequiresAction: true,
                                                        metadata: ["business_id":"\(payload.businessId)",
                                                                   "business_owner_id": "\(payload.ownerId)"],
                                                        paymentMethod: checkoutRequest.paymentMethodId,
                                                        expand: ["payment_method"])               

                    .flatMap { intent in
                        switch intent.status {
                        case .processing, .succeeded:
                            // After it's successful update an appointment in the same API call
                            // This makes sense because of how UI should be reflected after this API call.
                            var checkoutToUpdate = checkoutRequest.checkout
                            checkoutToUpdate.completedAt = Date()
                            checkoutToUpdate.paymentIntent = intent.id
                            let last4 = intent.$paymentMethod?.card?.last4 ?? ""
                            let brand = intent.$paymentMethod?.card?.brand?.rawValue.capitalized ?? ""
                            checkoutToUpdate.paymentDetails = PaymentDetails(last4: last4, name: brand)
                            var appointmentToUpdate = foundAppointment
                            appointmentToUpdate.checkout = checkoutToUpdate
                            appointmentToUpdate.completed = true
            
                            return req.appointmentRepository.updateAppointment(appointment: appointmentToUpdate)
#

waiting for webhooks or confirming a payment intent locally would impact the UX specifically for my case.

crimson needle
#

@bold basalt but there's no alternative since you discourage the other approach so it seems broken. As much as we want confirm client-side, many people do it server-side to save a roundtrip

vocal stump
#

Is this because of the "eirther the secret OR the error is null" approach ?

#

In my case I pass nil to both when I have no client secret

bold basalt
#

@vocal stump yep that case, where clientSecret is null if you pass error

vocal stump
#

Hmm okay

#

That's fair

#

This needs better documentation though

#

Or I need to read it more thoroughly. That's not unrealistic either.

#

But touching on the 3DS point. Does this mean that there is no liability shift when using Apple Pay?

#

Because this might mean we need to scrap it

#

Our business case is very sensitive to chargebacks

#

Nightlife and such, people get drunk, get thrown out from clubs or never get in etc

icy anvil
vocal stump
#

"Except VISA"

#

haha

#

Like it's a minor detail

rapid imp
#

Small little company ive heard

icy anvil
#

although there will still be some apple pay cards that don't support 3DS, right? I'm not very sure of the actual numbers, but my understanding is that 3DS is only present on a minority of transactions

#

the apple pay wallet thing is kind of orthogonal to that

vocal stump
#

@crimson needle @bold basalt Would you consider modifying the iOS SDK to allow for nil clientSecret and nil error? I mean, it works, the SDK is just confused and times out.

#

i.e. just skip and go to success if clientSecret is nil

#

Good talk

#

πŸ˜†

crimson needle
#

sorry that part I don't know, I don't understand the iOS SDK much. Deferring to @bold basalt but I agree it should fail gracefully IMO

vocal stump
#

I'd prefer just "work" instead of "fail gracefully", but yes πŸ˜„

#

I see that this might be a problem if the SDK expects the client secret to be requires_confirmation and not requires_action

crimson needle
#

yeah I meant "work" in that case I guess

vocal stump
#

Haha, fair enough

jolly sparrow
#

hello, is it possible to create a "test" dispute from the stripe dashboard or anywhere else? im trying to test some webhooks associated with the charge.dispute.closed event.

vocal stump
jolly sparrow
#

ahh, i didnt think to use a test card that generates a dispute

#

nice, thanks

vocal stump
#

Welcome

unreal ingot
#

What is the significance of a LookUp Key for a price object?

#

I was thinking of using it to stick something like Amazon's ASIN into it

crimson needle
#

@unreal ingot it's mostly a way to have your own IDs for Prices in the API

#

say you have a Price gold but in Stripe it's price_123, now you need a mapping of gold to the right price_123. With lookup keys you can set gold as the lookup key on Price_123 and then call the https://stripe.com/docs/api/prices/list API with lookup_key: 'gold' and get the right Price id back to then use it

unreal ingot
#

You mean 'gold' is the nickname

#

Eh, nvm I see what you mean

bold basalt
#

@vocal stump sorry was helping with something internally

Would you consider modifying the iOS SDK to allow for nil clientSecret and nil error?
technically it is a bug, in that that seems to be a no-op code path right now, so the payment sheet times out!
I can inquire if it would be something we support, i.e. no clientSecret and no error being a "successful dismissal" of the payment sheet though it seems very contradictory to how the component was built

vocal stump
#

Cool

#

I just think it would make sense since everything works except the client. I could understand if this was never going to work server-side either

#

It would save me a lot of headache, because I think I would need to send the Account ID back along with the client secret and init the SDK using the stripe account

#

this is for a direct charge on a connected account

#

When confirmed on the server I do that on the server

bold basalt
#

@vocal stump you're cloning PaymentMethods? I think you are if I recall our convo months ago

vocal stump
#

Yea

#

sowhen returned to the client the client needs to init using the stripe account header

#

OR the public key of the connected account

#

otherwise the payment intent is "not found"

bold basalt
#

@vocal stump gotcha, well you still need to send the stripe account client-side for calling completion though, no? to confirm if it requires_action, no

vocal stump
#

Hm, yeah I might

#

But will it ever for Apple Pay?

toxic lagoon
#

I have a problem with my account number I can not register in Stripe it is only 16 digit's Stripe is asking 17 what I have to do

cerulean pineBOT
#

:question: @toxic lagoon 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

bold basalt
#

@vocal stump you'll have to yes, you have your iOS SDK initialized with the Platform publishable key but you're sending it a PaymentIntent client_secret of the Connected acct to confirm...

vocal stump
#

YeahI meant will Apple Pay ever give requires_Action ?

#

Given people use their faces

bold basalt
#

@vocal stump but wouldn't you be doing that for regular non Apple Pay cards anyways?
if they require_action, you're passing the stripe_account ID client-side anyways?

vocal stump
#

@bold basalt Yes, I would

#

Just clarifying for Apple Pay specifically since I can't modify the behavior of that part

#

Sorry but the doc for the iOS SDK is really hard to navigate

bold basalt
#

@vocal stump one sec remembering how you'd do it (I am 80% sure you do it on STPAPIClient singleton instance)

vocal stump
#

Cool

bold basalt
#

@vocal stump and STPApplePayContext uses that singleton under the hood to make API requests

vocal stump
#

so I just nil that after it's done, yes?

bold basalt
#

yes

vocal stump
#

Cool

#

Thanks

#

I think I can make this work, but I need to be able to set confirm: false for subscription update and creation

#

To prevent the payment intent from confirming

#

Don't see it on create either actually. What am I missing here?

#

@bold basalt Gondor calls for aid (I took away the baby, yes)

crimson needle
#

@vocal stump you want default_incomplete for payment_behaviour

vocal stump
#

I have that to pending_if_incomplete ?

#

Can I use default_incomplete for updates ?

#

I can't do default_incomplete when updating as a failed payment attempt will then mess up the subscription, no?

#

Use default_incomplete to transition the subscription to status=past_due when payment is required and await explicit confirmation of the invoice’s payment intent.

#

I dont want to do that

crimson needle
#

honestly you've lost me completely at this point. Might be worth taking a step back and re-explaining it all in one message

vocal stump
#

User is on a subscription, user wants to change to a different plan. I want to use pending updates, but I can't confirm the intent on the server'

#

How proceed

#

If I don't use pending updates I will mess up the cycle if the payment fails

crimson needle
#

I don't think you can proceed, that's just not possible in that case

vocal stump
#

Unless you update the iOS SDK :)))

crimson needle
#

Β―_(ツ)_/Β― I think that part we exhausted already and we're already flagging to the team maintaining those (you can also file a github issue!)

vocal stump
#

Sure I was just confirming that there is no other solution to this problem

#

For Apple Pay that is

#

I can still do regular card payments no problem

#

with SCA and all

#

Edge-case guy strikes again, keeping you on your toes

crimson needle
#

lol

vocal stump
#

I could also just fork the SDK and hotfix it

#

At my own peril, obviously

crimson needle
#

or open a PR

vocal stump
#

That too

#

Question

#

If I create a PaymentMethod using Apple Pay, say for 100 dollars, and I use that to change to a sub but only 50 is charged due to proration

#

will that be a problem?

crimson needle
#

it's hard to say, it's up to Apple/the banks there and the answer is mostly "it depends"

#

but overall it's still a common flow

vocal stump
#

Yeah cause otherwise I have to do another round-trip to get the actual price, which might drift and be off by cents if the user is slow

#

which kind of defeats the purpose

#

or of course I need to lock in the proration time

crimson needle
#

there's no time drift since you can specify proration_date

vocal stump
#

Never trust the client!

#

haha

#

Which means i would need to maintain state on the server for when it happened

#

a lot of work instead of just putting the full price into Apple Pay

crimson needle
#

fair

vocal stump
#

We're doing charges up to like 5,000 dollars for this, so I'm a little worried about things not checking out 100% and banks being like "this looks weird, better decline"

crimson needle
#

cc @bold basalt do you have recommendation here?

bold basalt
#

@vocal stump don't have a great answer for this, it really depends as koopa said, like you need to keep the real charge amount 1-to-1 with what you display on your Apple Pay payment sheet.

vocal stump
#

I'd say that sentence kind of contradicts itself a little. "It dpeends" but I also "need to have it 1:1 " ?

#

I'm leaning more and more towards dropping Apple Pay entirely

bold basalt
#

@vocal stump to clarify, the "it depends" part was "I don't know, it depends on how much banks care if the displayed amount is off compared to the charged amount"

vocal stump
#

Aha

bold basalt
#

@vocal stump Apple Pay is amazing though, so easy to pay, you'd be losing on conversion

vocal stump
#

I would hope that it's only a problem if the charged amount is larger, but you never know

#

I know

#

But for these amounts people will get out their credit card anyway

#

Apple Pay is really good for small, quick things

#

We will still use it, just not for this exactly maybe

mighty hill
#

As someone who has an Apple Card and gets more cash back if I use Apple Pay, I get really annoyed when places don't support Apple Pay. πŸ™‚

vocal stump
#

Yeah maybe

#

Moot point anyway until the SDK is modified to support it though. I'll have to wait for that anyway.

#

as right now I can't even complete a charge without breaking all of the sub logic as discussed above

minor cipherBOT
#

πŸ‘‹ Messages in this channel are unlikely to be seen by Stripe engineers on weekends. If you have urgent questions then you should reach out to Stripe support directly at https://support.stripe.com/contact

smoky ledge
vocal stump
#

All gas stations I ever went to you go in an charge the exact amount after filling up

#

But I get the analogy

smoky ledge
#

My point is; they usually preauth 100 to make sure you have enough to cover the gas but yeah

vocal stump
#

I'll get to work on trying to modify the SDK to allow for what I want, then open a PR and see what people say

compact isle
#

Your account isn’t eligible
Unfortunately, your business isn’t eligible to use Stripe because it doesn't meet our Terms of Service. If you think this may be a mistake, please contact us.

#

How can I contact you about this problem?

smoky ledge
#

From Apple's examples of use case. Seems like they don't have a problem with it.

I'd suspect there's probably a rule somewhere preventing you from showing them 100 USD then authorizing 1000 later.

languid tulip
vocal stump
#

@bold basalt I can't figure out how to run the SDK locally at all. I'm used to doing development pods and you seem to be using carthage. Would you agree that this code would be sufficient or do I need to do something more. In here: https://github.com/stripe/stripe-ios/blob/13af941a6682bb4dda4debb7c3b110840b2b0c0b/Stripe/STPApplePayContext.swift#L401?

// If both clientSecret and error is nil, we assume the payment intent was confirmed on the
// server and that we do not need to do anything else.
if (clientSecret == nil && intentCreationError == nil && self.authorizationController != nil) {
    handleFinalState(.success, nil)
    return
}
#

Just before I make an absolute fool of myself on GitHub

#

This could probably be cleaned up a little with regards to the existing guard statement

#

But from a functional perspective

bold basalt
#

@vocal stump sorry had left for the day, on paper looks like that might work (but haven't looked deeper), feel free to create a PR, there might be feedback but that is fine

vocal stump
#

Okay cool, just wanted to know if I was way off base here

#

Have a nice weekend and thanks @bold basalt

mighty hill
vocal stump
#

Yeah I use cocoapods, but I tried linking it as a development pod and it did not run

#

Anyway I submitted the PR now, so we'll see if this is a viable soluation

brittle ridge
#

Hello again everyone! I hope everyone is having a nice start to the weekend. So I have tested my accept a one-time payment with iOS stripe integration and after having to debug a bit everything is working well. I wanted to ask if deploying the backend server to Heroku using the free tier option would be a viable option. I am creating an app for a small educational institution that uses user auth so no more than 100 people will be using the app. Considering this and the fact that I am only using the server to accept payments, would this option work - at least for the time being?

icy anvil
#

depending on how long your backend takes to boot up, it might lead to errors or timeouts in your app

#

you'd probably want to figure out which error message it returns and handle it appropriately

#

and it may be unacceptably slow for users

#

some of this depends on your backend platformβ€”node js will generally be faster to start up then java, for example

brittle ridge
#

@icy anvil Thank you so much ! I'm afraid that I have no backend experience so things have been a bit hectic. I've been googling different vps services for awhile now but there is so much information and jargon that I have no idea where to begin. And I coded the server in java. Are there any resources you might be able to recommend, just as a starting place?

icy anvil
#

hmm

icy anvil
#

it's really the simplest option and saves on a ton of hassle

brittle ridge
icy anvil
#

that could work also, but you'd have to manage the OS and all the sysadmin and deployment details yourself

#

keep everything up to date, make sure to update the OS daily to remove security vulnerabilities, make sure that the app server is running all the time, make sure it reboots if the power goes out, etc

brittle ridge
#

That sounds incredibly tedious. Heroku manages all of those things for you?

icy anvil
#

yeah

#

there are other platforms that do similar things, but Heroku is definitely the simplest in my experience, especially if you're using Java

brittle ridge
#

All of the information you provided is really helpful. Thank you so much for helping to clarify things!

icy anvil
#

no problem!

slender wharf
#

Hi, I finally solved the problem.
The problem was that I was using the stripe api inside a foreach loop.
It was solved by looping with for.

Why doesn't even an error occur in a loop with a callback such as foreach? ??

The number one reason why it took a long time this time was that the error log was not output.

vocal wagon
#

hi

#

i get that error "You cannot accept the Terms of Service on behalf of Standard and Express connected accounts " when i want active account

#

connected express account

#

stripe.accounts.update(id, {
tos_acceptance: {
date: Math.floor(Date.now() / 1000),
ip: "192.168.1.1",
},
})

#

this is my code

flint vessel
#

when filling out the server.js how do you set up "YOUR_DOMAIN" so it isnt using localhost?

#

i am trying to build a checkout that i can use on my website so after ppl fill out a form they can press button to purchase the product that will use stripe checkout

#

i dont see any steps in the checkout guide on stripe website..

#

or do I leave it localhost and it will run using customers local host as domain?

vocal wagon
#

Hello! It seems that I cannot save card details while using the pre-built stripe checkout.
even when I am creating a session type payment with both customer id and futurePayments: "off_session".

Is there any work-around to fetch the card details without using the client Elements way that documentation provides?
Is there any specific field in any stripe api which returns the payment details for client side calls with payment id?

minor cipherBOT
#

πŸ‘‹ Messages in this channel are unlikely to be seen by Stripe engineers on weekends. If you have urgent questions then you should reach out to Stripe support directly at https://support.stripe.com/contact

opal flax
#

Hello, I'm getting this error response and activated the account but still getting same error message anyone facing this issue
{ "error": { "code": "testmode_charges_only", "doc_url": "https://stripe.com/docs/error-codes/testmode-charges-only", "message": "Your account cannot currently make live charges. If you are the site owner, please activate your account at https://dashboard.stripe.com/account/onboarding to remove this limitation. If you are a customer trying to make a purchase, please contact the owner of this site. Your transaction has not been processed.", "type": "invalid_request_error" } }

fallen parcel
#

you can switch between dev & production mode, they have separate keys

opal flax
#

yes, I'm using the production keys and everything was working before

#

To make sure I'm on live mode I tried to add the Test card but got declined error message which is expected

tawny flower
#

has anyone had any success with "allow_promotion_codes" in TypeScript?

slate elbow
vocal wagon
#

hey there

#

does someone know where the whmcs modules are for IDeal

slate elbow
cosmic anchor
#

Hi i am Attempting and seemingly failing to integrate Apple Pay into my app. I have setup correctly on Stripe and Apple Developer, but i cannot make any attempt at my integration work.... I have followed the docs but again no success. I think i am getting stuck up on the payment itself. I can create the Apple Pay Button and start the flow but i never get to the point where the payment context is presented for Apple Pay. Anyone have any tips ? Or know what i am missing> Thanks

cobalt plaza
#

Hi, is there support on the weekends?

candid ridge
#

helli

#

hi

mortal abyss
#

how do you contact support. i have been unable to sign in and unable to contact them for help

hot sierra
#

Hi
I'm trying to retrieve the subscriptions of a customer (he has 2)
so I call $stripeCustomer = Customer::retrieve(
$user->stripe_id,
['expand' => ['subscriptions']]
);

however the returned customer object does not contain any subscriptions

what did I miss ?

hot sierra
fierce flume
#

I am developing the payment part of a marketplace, and I have several questions: - when the customer pays, I need to transfer his share to the seller, to charge marketplace taxes and to be able to return the total amount to the customer in the event of a dispute. Today, I create a PaymentIntent by clicking on the checkout, which is then in status pending and I empty his basket. I question Stripe (front side) with the payment intent identifiers and as soon as I have the answer, I call my API again to record that the payment intent went well or badly, and then I redirect to / orders. Is it a logical process? Is there not a way to keep the user's cart in case the payment goes wrong? The problem with PaymentIntent is that I don't have a handle on the state. And I can't use Charge because I need to manage the 3d secure .. it's complicated! Can someone enlighten me on the exact process? If the customer requests a refund, what actions should my code take?

split birch
#

Whenever i create a Bank account token using plaid/stripe integration and proceed to use this to create a Stripe bank account for my customer it keeps on returning the No Such token error.
Now i have gone through other questions posted here that suggest to check if the environments match i.e if my stripe keys are test keys and if my Plaid is in Sandbox mode.
They are both in test modes but it still fails.

PLAID_ENV = sandbox
const client = new plaid.Client({
  clientID: PLAID_CLIENT_ID,
  secret: PLAID_DEV_SECRET,
  env: plaid.environments[PLAID_ENV],
  options: {
    version: '2020-09-14', // '2020-09-14' | '2019-05-29' | '2018-05-22' | '2017-03-08'
  }
});```

My stripe is using the Stripe Test keys. I confirmed the accounts are linked. 
Any help figuring out why it still returns this error would be appreciated
minor cipherBOT
#

πŸ‘‹ Messages in this channel are unlikely to be seen by Stripe engineers on weekends. If you have urgent questions then you should reach out to Stripe support directly at https://support.stripe.com/contact

icy anvil
icy anvil
# fierce flume I am developing the payment part of a marketplace, and I have several questions:...

rather then emptying the cart when you create the PaymentIntent, why not keep the cart around until the PaymentIntent is marked as succeeded?

Additionally, instead of relying on the front-end to call your API with the result of the payment intent, which may be insecure, it's better to rely on webhooks from Stripe to tell your backend about the state of the payment intent (and the client-side can also separately handle the success/rejection state based on what it gets back from Stripe)

fierce flume
# icy anvil rather then emptying the cart when you create the PaymentIntent, why not keep th...

thanks for your answer @icy anvil

i empty my cart here because if i have to wait stripe webhook on checkout page i depend of stripe server time. also, i have already add stripe webhooks but if my api route is down ( for diverses reasons ) all of my checkouts are "pending" for life. if i decided to clear cart only on paymentintent sucess, in previous cases my customer keep his cart but it will be redirect to orders list ( it's not really logic )

what do you think ?

cosmic anchor
fierce flume
cosmic anchor
# fierce flume thanks for your answer <@108027823121301504> i empty my cart here because if i...

i think a good idea for you to follow is to write down your flow. i think you have your wires crossed with cart and confirmation order. You should not have any issues with uptime of your server or however you communicate with Stripe otherwise this will cause issues for your customers like it is for you and often you will only get 1 chance to do right, so i would look into improving your server and having better uptime. You could keep the user on the checkout page with a modal payment controller over it while the payment processes then empty cart after you have a success from Stripe. Again you need to think about your flow. Think about it as if you were the customer jsut going to the shop to buy something. What you are doing is taking the goods from the store without confirming payment or even worse you are taking the goods off the customer because the payment has not been confirmed. Webhooks could be your friend and help mitigate this problem. But get some paper and pen and draw your flow jsut words and arrows to dictate how you will mvoe your user through the purchase.

fierce flume
# cosmic anchor i think a good idea for you to follow is to write down your flow. i think you ha...

Thanks for your answer @cosmic anchor. I already have a complete workflow for charge and cart.. but i have fuzzy actions to make interface with stripe. in an ideal word, i just have to call stripe to make a Charge ( with my backend ) and when stripe answer, i continue the charge processus.

But with payment intent it's more complicated, i have a lot of reasons to break this process while the customer pay. My server is really big, but we are not safe from a breakdown and my job is to prevent this...

cosmic anchor
#

nobody is safe from breakdown.

fierce flume
#

I cannot use Charge object from stripe because i have to support 3d secure ( asynchrous ) so i have to work with Payment intent it is obligatory. Now, when my payment intent have to be created ?

cosmic anchor
#

you may have a working flow but you are telling us your flow is not working as expected which means your flow is not working..... if basket is empty before charge is confirmed this is your error not on Stripe or on server. You can observe the status using webhooks and then divert customer out of the payment flow once this is received.

#

so create your PI as soon as you have all the required data and then once user has chosen payment method it is then how i understand it that you let the customer pay for this PI

#

sounds like you need to be using Destination so you can take a platform fee and then send the rest on to the receiving user.

fierce flume
#

Okay, so when my customer click on payment button, i have to wait stripe webhook with a "spinner" on ui ?

#

if my customer lost his internet connexion, or if server go down, or webhooks get error 500, my customer have paid but his order is "pending"

icy anvil
#

that's the same as with your current approach though

fierce flume
#

i don't really like, it's not secured

icy anvil
#

i empty my cart here because if i have to wait stripe webhook on checkout page i depend of stripe server time
You have to wait for Stripe servers in both cases, but you don't need to use the webhook to show the order status to the user, you already have the order status locally

i have already add stripe webhooks but if my api route is down ( for diverses reasons ) all of my checkouts are "pending" for life.
You'll have this same issue for your API route ("I call my API again to record that the payment intent went well or badly")β€”it's going to be a problem with or without webhooks

#

Anyway, the question of webhooks is not really relevant here, you can use synchronous flows as well if you want to

fierce flume
#

In addition, I work with React on the front side, and the cart is not recovered with each click on the site. So if the user browses and his order is validated 10 minutes later (due to delays, webhook retry or other), he will still have his basket on the frontend side and I would not be able to listen to the backend at less than putting up Mercury. it fzit a lot ...

icy anvil
#

I brought it up only because if you rely on the client to tell you when things are going well or badly, then the client is allowed to lie to you

#

you need to fetch the actual payment status from stripe

fierce flume
#

sorry for french, guys

fierce flume
#

The issue here is asynchrouns needed by 3d secure. With 3d secure we have necessary a payment intent and not an instant charge

#

so many cases to manage for escape breakdown

rapid imp
#

I’m confused about what exactly is the problem with waiting for a confirmation for 3D secure. Might be how your application is architected

fierce flume
#

The problem is that 3d secure creates a payment intention which starts as "pending" and which can remain so indefinitely for dozens of reasons. Without 3d secure, I could have used stripe "Charge" which would have allowed me to follow the simple diagram shown above, without webhooks, without having recalled my backend a second time

#

3d secure work fine on my marketplace, i just have a problem with "trigger" events of payment intent status update on frontend, and on backend

rapid imp
#

That guide I linked has example flows of how to handle things you’re concerned about.

#

Displaying iframes, redirects etc.

fierce flume
#

okay i maybe see a solution @rapid imp thanks

#

i maybe can create my paymentintent in frontend

#

or confirm in backend and it solve all of my issues

rapid imp
#

Yep that sounds like a plan

vocal wagon
#

bjr

rotund star
#

I just start working with the Stripe CLI. Is this possible?
I create a subscription on July 24th and my webhook captures the charge.succeeded.
Now.. Can I use the CLI to Time travel on that subscription and capture the Aug 24th invoice.payment_succeeded

If this is possible, can someone please share a snippet on how to do it. I cannot find this in the docs.

icy anvil
rotund star
#

@icy anvil okay thank you for the help.

willow aurora
#

In order to mitigate double-charge risk, we're migrating from Sources and Charges to Payment Intents in our app checkout flow. One Payment Intent for each of our carts. To create subscriptions from our application's shopping cart, we're creating a single Stripe subscription per shopping cart prior to collecting the customer's payment method, saving the subscription's latest invoice payment intent, then confirming the invoice payment intent after collecting the customer's payment card data. We've hit a bit of a snag when creating new subscriptions when they have a trial_end as no payment intent is returned for the first invoice (trial). These subscriptions become active immediately, before we collect the customer's payment method. Is there a way to create subscriptions with trial_end with an initial inactive state? Or is there a recommended way to handle trial subscriptions during checkout, again with the main goal being prevent two subscriptions being created or a double-charge?

valid merlin
#

Hello. I've the following doubt. Are there some way to void a payment operation ?

stark tide
#

@valid merlin you'd refund the paymnet

valid merlin
#

It's the only way?

stark tide
#

@willow aurora isn't the fundamental problem here that you have to create a single subscription? if you create two subscriptions in the non-trial path, don't you end up with the same problem where they have two independent payment intents?

valid merlin
#

a void operation would be synonym of refund the whole charge

stark tide
#

@valid merlin I'm not clear on the distinction you're drawing between void & refund

valid merlin
#

refund could be partial

stark tide
#

you'd do a full refund in that case

willow aurora
#

@stark tide we'd like to not have an active subscription with a trial prior to confirming the customer's payment card data

stark tide
#

if you don't specify an amount for the refund, the refund is assumed to be full

#

@willow aurora you'd need to collect the payment information & attach it to the customer prior to creating the subscription, then

#

the subscription model doesn't require a payment method to create a trial subscription, because that's not always the behaviour you want

#

you can't use the subscription creation in stripe as an enforcement mechanism to require payment details

willow aurora
#

@stark tide in a world where we collect the payment method prior to creating the subscription with a trial, seems like we lose the benefit of a single Payment Intent per shopping cart using confirmCardPayment client-side. Which was the setup we were hoping for to cut down on potentially calling create subscription multiple times in the cart. I may be incorrect.

stark tide
#

that's just pushing the problem one step upstream, though, right?

#

the semantics of the payment intent guarantee that you only capture the same payment intent once

#

but that means you have to make sure you only create a single payment intent (ie: only create a single subscription)

willow aurora
#

right

stark tide
#

you already have to enforce that you only have a single subscription (eg: by using api keys)

willow aurora
#

Riddle me this if you do't mind. Could I create a subscription with no trial (incomplete subscription status by default at this point), then update the subscription with the trial and payment method in the same request?

unreal ingot
#

Is there a way to query via the api to get all products, including the connected account vendor's products ?

stark tide
#

@willow aurora not in the same request, unless I'm missing something

#

the trial_end is a property of the subscription, but the payment_method is a property of the customer

#

you can't update them both in the same API requset

#

(though you could update them both in the same request to your server, just as two requests to the stripe api)

#

@unreal ingot you can't list objects across >1 account at the same time, no

willow aurora
#

@stark tide thank you for your time. for now we will try creating a Setup Intent, then creating the subscription last using this Setup Intent.

stark tide
#

πŸ‘

unreal ingot
pale surge
#

hi @meager hawk and @mighty hill, I have a very specific question to ask that I need your support on please

pale surge
#

@fluid beacon, could I have a few minutes of your time?

minor cipherBOT
#

πŸ‘‹ Messages in this channel are unlikely to be seen by Stripe engineers on weekends. If you have urgent questions then you should reach out to Stripe support directly at https://support.stripe.com/contact

vocal wagon
#

iwnt to create it with flutter or node

#

Hi, Just starting my online store part of my school project. doing planning atm. using .net . are you able to point me to resources for what kind of stuff should be developed on a online store prior to integration

tawny flower
#

does anyone know how to set allow_promotion_codes to true in TypeScript?

hollow nebula
#

What is the difference between PaymentIntents and Invoices.

I am trying to understand which webhook event I should listen to find failed payments on my subscription. I see charge.failed , invoice.payment_failed and payment_intent.payment_failed when I use the Stripe CLI and try to generate stripe trigger invoice.payment_failed event

flint vessel
#

question, if i create product in stripe then use stripe payment link is that using stripe checkout? as in will it be covered with chargeback protection?

meager mural
#

Hello, there is one way to create subscription without a product/plan?

rotund star
#

@icy anvil
I figured out a workaround to test future subscription invoices. Also seems like a good way to get all customers on the same payment schedule.

  1. Create the subscription
  2. Save it in your database
  3. Update that subscription to a trial for the following month
  4. Go into Stripe dashboard and end the subscription trial
  5. Capture the charge.succeeded and invoice.payment_succeeded with webhook & CLI

Here are the steps: (Working in Laravel / PHP)

/*
 * Creating the UNIX Timestamp.
 * This will grab today's date and make a UNIX Timestamp for the following month on the 1st
*/
$this->now                  = Carbon::now()->setTimezone('America/Chicago');
$this->firstOfNextMonthUnix = Carbon::parse($this->now)->addMonth()->startOfMonth()->setTime(8, 0, 0, 0)->timestamp;

/*
 * Creating the Subscription In STRIPE.
 * This will charge the full price of the subscription immediately
*/
$subscriptionStripe = $stripe->subscriptions->create([
    'customer'               => auth()->user()->stripe_id,
    'default_payment_method' => $paymentMethod->id,
    'items'                  => $items,
    'metadata'               => [],
]);

/*
 * Add the newly create subscription in your database.
*/
$subscription = Subscription::create([
    'stripe_id'                => $subscriptionStripe->id,
    'stripe_payment_method_id' => $paymentMethod->id,
    // etc...
]);

/*
 * Update the Subscription
 * This will update the subscription to a trial
 * The next invoice will end on the 1st day of the following month
*/
\Stripe\Subscription::update($subscription->stripe_id, [
    'default_payment_method' => $subscription->stripe_payment_method_id,
    'trial_end'              => $this->firstOfNextMonthUnix,
    'proration_behavior'     => 'none',
]);

Now you can go into your Stripe dashboard or use CLI and update the subscription trial to end now.
This will allow you to test for the next months subscription

icy anvil
#

makes sense

rotund star
gray orchid
#

Hi there, can someone help me connect afterpay to my stripe?

#

I am so vonfused

#

confused*

rotund star
gray orchid
#

@rotund star Thanks for that. I am just confused. It says afterpay can be accepted on my website - I have activated it as a payment method but I have never actually put in my merchant ID if that makes sense?

#

As in, I have an afterpay merchant account but squarespace/ stripe has never asked me for my ID

#

does it just work? and then get paid into my nominated bank account?

#

This comes up and at the checkout you can pay but I don't know if there is anything else I need to do

rotund star
gray orchid
#

Okay cool! Thanks a lot, I appreciate it. Sorry, im new to this, whats the test key?

rotund star
#

I've never used square space but I'm assuming there is a place for you to put in your Stripe API keys. Make sure you're in test mode in the Stripe dashboard and get them from here. See image.

gray orchid
#

ohh yes I see what you mean

rotund star
#

you will probably need both keys. Then when you make a test payment you will see it in your Stripe dashboard. @gray orchid

gray orchid
#

oh okay, that makes sense- thank you so much, ill have a play around and let you know if I need help!

icy anvil
#

@vocal wagon "express account" simply means an account created using stripe's forms

#

you can have a "custom account", which is an account created using your own forms, but it's not recommended because the forms are very complicated to build

vocal wagon
#

Hello, I am using stripe elements, got help here with the script some year/s ago. However has got 3 incomplete payments where 3d authentication were correct but payment failed. Clients got strange error message and on my stripe dashboard I have the message from Stripe: payment_intent.requires_action
What can I do?

rotund star
vocal wagon
#

@rotund star thanks. How do I know wich api version I am using? Or do you mean this: js.stripe.com/v3/ ?

rotund star
vocal wagon
#

thanks @rotund star

rotund star
#

@vocal wagon Your API seems fine. You might check you code against this here: https://stripe.com/docs/payments/payment-intents/migration
I'm just guessing tho, maybe someone more experienced can help you with that error. payment_intent.requires_action
I'd probably try and recreate the error in my test environment first, then start working to fix the issue from there.

vocal wagon
#

ok thanks

rotund star
vocal wagon
#

@rotund star The strange is that the authentificacion gives ok.

sterile bough
#

Hi guys

#

I am using stripe subscription for recurring payments, now i want to deduct the price define from admin side, e.g my product price is 200$ and i want to do recurring payment every day but to deduct my define price like 20$ every day

#

How can i acheive that?

#

please help

vocal wagon
#

I suppose that's not the link as I want to test 3D secure. Any other link?

minor cipherBOT
#

πŸ‘‹ Messages in this channel are unlikely to be seen by Stripe engineers on weekends. If you have urgent questions then you should reach out to Stripe support directly at https://support.stripe.com/contact

vocal wagon
#

@rotund star I have done several tests with 3d secure in test environment and on Strips page I get a 404 invalid request errror....404 ERR
GET
/pi_1JH2eeENH9yxwaKGVLzgjmg6

#

@rotund star Unrecognized request URL (GET: /pi_1JH2eeENH9yxwaKGVLzgjmg6).

fast moss
#

Hello I need help in intigrating mandates in setup intent api?

icy anvil
#

@vocal wagon the test cards work with any CVC and any future expiration date

icy anvil
#

specifically it would be good to know what the value of last_payment_error is

grizzled urchin
#

Hi, My name is Abir and I am co-founder of Superfans. It's a international paid community platform. I have a question about our payment method. Could you please assist me with an answer?

Our company website is registered in Bangladesh. Our service is for global people. So, Our customers will pay us from all over the world.

We want to use Stripe as our payment method.

Can we use your service on our website? If so, can you please help me guide through the step?

I appreciate your help so much. Thank you!

vocal wagon
#

@icy anvil Do you mean this error in the live payment?

#

@icy anvil also in the live I get incomplete and that I need to do something, however the 3D autentication ok. The test error get's the same.

icy anvil
#

@grizzled urchin Hi, this chat room is for debugging specific technical issues with integrating Stripe. For questions about a new account, you'd be better off talking to Stripe Support: https://support.stripe.com/contact

unreal ingot
vestal shale
#

Hi, to be able to prevent access to certain areas of a webportal, I need to know which Products a customer has purchased? For subscriptions its clear, but how do I get purchased products paid with one time payment? thanks for a tip. I thought this was the order API, but that got deprecated, and somehow IΒ΄m not sure, whats the replacement. Thanks!

vocal wagon
#

@icy anvil It says payment_intent.requires_action and incomplete. On other payment I get requires-action then payment_intent.payment_failed. Thanks

#

@icy anvil look at the errormessage the clients get on the screen while after doing the 3d authentification.

icy anvil
minor cipherBOT
#

πŸ‘‹ Messages in this channel are unlikely to be seen by Stripe engineers on weekends. If you have urgent questions then you should reach out to Stripe support directly at https://support.stripe.com/contact

stark tide
copper panther
#

In order to use Stripe Checkout for a connected account, is it required that the product be created in Stripe previously or can we process a charge and store the transaction Id on our server. There is no need for us to create products/plans in Stripe but we want to use the pre-built checkout. We're a bit confused on this end. To recap >> one-time desination charge on connected standard account >> we want to use Stripe checkout (pre-built) to capture charge but want the product info to come from our server and not be replicated in Stripe. Thanks in advance!

sudden whale
#

Hello

#

I have a question

#

What role should I give to a closer

#

so he has limited access, but only allowed to send invoices and take payement

daring gust
#

Hey man, anyone can help me. How to implement stripe on codeigniter 4?

#

Anyone can send me some refrence

stark tide
daring gust
#

How to implement stripe on codeigniter 4 ?

stark tide
copper panther
#

Great! Thank you. If we implement the pre-built checkout I'm assuming it will automatically be SCA compliant. do you have info on that? Thanks again

stark tide
gentle reef
#

Hi can anyone help me I am trying to create a simple stripe subscriptions integration and I can't seem to find where to get the customers next payment date of their subscription

stark tide
gentle reef
#

I thought that as well but what if the customer's subscription is canceled -- that field will still be populated right?

stark tide
#

@copper panther yup, it should just work with SCA

gentle reef
#

I want the actual date of when the customer will next be charged - not just when the subscription period ends

stark tide
#

@gentle reef that's fair - you could also use the upcoming invoice endpoint for that subscription, or you could special-case inactive subscriptions

gentle reef
#

@stark tide oh ok so I guess that would just be the "period_start" field on the upcoming invoice object?

stark tide
#

yup

gentle reef
#

however I don't know how well that will work as looking at the documentation a upcoming invoice only seems to be generated a few days before the actual invoice is generated

stark tide
#

no, you can preview the upcoming invoice at any point

gentle reef
#

oh ok that's great - so whenever I receive a invoice.paid event I cant just fetch the next upcoming invoice from the api

stark tide
#

even after the invoice.created event would also be fine

#

the upcoming invoice logic doesn't care about existing (including existing unpaid) invoices

gentle reef
#

then that's great - thanks

stark tide
#

np!

vocal wagon
#

@icy anvil No, I am using https://js.stripe.com/v3/ elements. I know that when I implemented the script the 3D were working well.

#

Hello sir my name is gibsom mitras my stripe Account is on hold

#

I sent my documents for verification and my payment link is paused somebody help

unreal ingot
#

Does it cost money to request for a Stripe API Rate limit increase?

stark tide
#

@unreal ingot: no, it more depends on why you want the extra qps

#

eg: if you're spending a ton of qps polling fetch/list methods, I'd probably advise switching to webhooks instead, because it's more efficient

vocal wagon
#

What are are the options for payment_status in session response? Just paid and unpaid? I can't seem to find them in the docs

stark tide
vocal wagon
#

perfect, thank you

stark tide
#

np!

vocal wagon
#

How exactly does unpaid work? It says The payment funds are not yet available in your account.. So if I have a checkoutToRedirect, if they try to buy the item with their card, would it return unpaid if say they dont have the balance to pay for the item in their own account in such that the transaction failed? If not, could it mean that the payment was successful but I haven't received the funds yet? Can I use paid as an indication of successful checkout and unpaid as unsuccessful in every scenario?

#

@stark tide

unreal ingot
#

Is there anything for a Stripe shopping cart?

unreal ingot
#

Is there a way to update the price via the unit_amount, etc...

#

And how does one utilize transfer_lookup_key?

stark tide
#

@vocal wagonunpaid is any state in which the payment is not completed

#

the semantics are that funds are guaranteed once the session is paid (modulo disputes)

#

@unreal ingot stripe doesn't have a shopping card, no

#

price amounts aren't mutable - you'd create a new price (and optionally deactivate the old one)

unreal ingot
#

Woah, i think i bugged my entire stripe account

#

I tried to do an update on a Price object

#

And now i cant even see connected accounts anymore

stark tide
#

try a hard refresh of the tab?

unreal ingot
#

naw i had to delete that account

stark tide
#

well, it's definitely gone now I guess

#

re: lookup_key, I'm honestly not sure what that's useful for

#

it doesn't seem like you can refer to prices by lookup keys in any context except price listing

#

you can definitely wipe the lookup key off the old price with transfer_lookup_key, but I'm not sure what good it does you

pliant shard
#

any advice on clearing out test data? like a reset on all of it? accounts, purchases etc?

stark tide
#

(fair warning: it can take a little while if you've got a lot of testmode data on your account, and you can't use testmode on your account while it's happening)

pliant shard
#

thanks so much @stark tide that is very helpful!

stark tide
#

np!

shadow verge
#

About 45 minutes ago our Stripe integration raised about 100 of these errors:

Stripe::APIError: Invalid response object from API: "Envoy doesn't have route that matches the provided authority: 'bapi-srv.service.envoy'; see https://go/envoy-errors" (HTTP response code was 421)

Anyone have a clue what this means? It was encountered fetching Stripe Connect events (Stripe::Event.retrieve(event_id, stripe_account: account_id)) Things seem to be working again, but I'm curious if anyone knows what happened.

stark tide
#

looks like there was an incident from roughly 20:28 to 20:34 UTC :/

#

these requests would have failed very early on in the request stack, so there won't be any request IDs

#

also means that these are safe to retry, though

#

all of the requests which failed with that 421 error did not persist any changes

shadow verge
#

Thanks @stark tide β€” yeah, was digging through logs but saw no request ID. Assumed it was happening before hitting Stripe's processing logic.

stark tide
#

the incident is mitigated as of this time

shadow verge
#

We operate a fairly high-volume Connect platform, so I always get a bit nervous when I see a pile of Stripe errors I've never seen before πŸ˜…

stark tide
#

understandable :/

#

this is not a good look for us - sorry about the disruption here

shadow verge
#

All good! It happens πŸ™‚

#

We have pretty good retry mechanisms in place, so it's not really a problem. It's more of a problem (and more likely) when my code is broken πŸ˜†

vocal wagon
#

Is there a way to trigger an unpaid event ?

split birch
#

Hello folks, I'm posting this again. Please I'll really appreciate any help I get

#

Whenever i create a Bank account token using plaid/stripe integration and proceed to use this to create a Stripe bank account for my customer it keeps on returning the No Such token error.
Now i have gone through other questions posted here that suggest to check if the environments match i.e if my stripe keys are test keys and if my Plaid is in Sandbox mode.
They are both in test modes but it still fails.

PLAID_ENV = sandbox
const client = new plaid.Client({
clientID: PLAID_CLIENT_ID,
secret: PLAID_DEV_SECRET,
env: plaid.environments[PLAID_ENV],
options: {
version: '2020-09-14', // '2020-09-14' | '2019-05-29' | '2018-05-22' | '2017-03-08'
}
});

My stripe is using the Stripe Test keys. I confirmed the accounts are linked.
Any help figuring out why it still returns this error would be appreciated

languid tulip
languid tulip
vocal wagon
#

@languid tulipSo for a given payment ( I am using redirectToCheckout ), I have the payment_status in the response. I was wondering if there was a way to trigger an event either through the CLI or a certain test card that will return a response with payment_status as unpaid

languid tulip
vocal wagon
#

yes

languid tulip
# vocal wagon yes

Then the session would just not be completed if payment fails and your promise would resolve to an error message. The only time you would get something similar to an unpaid outcome would be if the customer is using an async payment method in which case you would listen for checkout.session.async_payment_failed.

#

Sorry to clarify, your promise would resolve to an error if you didn't redirect successfully.

#

Are you asking if you can tell if a customer initiates a checkout session but does not complete it successfully?

vocal wagon
#

"The only time you would get something similar to an unpaid outcome would be if the customer is using an async payment method" -- when would an async payment method need to be used? Is it something that I need to enable on my side to allow for async payments? In that case, would be it safe to say all responses I get then would be paid?

#

I just want a better understanding of when unpaid occurs to see if I need to handle something on my side. Would it be safe to assume then all all payments when checkout is completed would be considered paid in most cases?

#

@languid tulip

split birch
languid tulip
vocal wagon
#

Oh so checkout.session.completed would always indicate a successful payment?

languid tulip
languid tulip
vocal wagon
#

Thanks~

languid tulip
split birch