#dev-help

1 messages · Page 132 of 1

bleak breach
#

If for instance you did something like router.use(express.json()) before setting up the webhook route then that'll break the webhook signing

simple dagger
#

endpointSecret is correct and corresponding to what i have on my stripe dashboard

bleak breach
#

If you log request.body do you get JSON or a javascript buffer object?

simple dagger
#

I have no other occurence :/

simple dagger
#

Do you have an idea why it would stop working out of nowhere ?

bleak breach
#

That's what I'm trying to determine 🙂

simple dagger
#

logging request.body just give me an object
don't know if it is json or js buffer object
i am not very experienced, do you have an idea to check this easily ?

bleak breach
#

Let's start with the basics, how are you triggering an event? Via your code or via the Stripe CLI?

simple dagger
#

I am triggering it with a transaction I make in test mode, and watch the result in my shell connected with ssh to the server the site is on

#

so it is from the code directly on the server

#

triggered by hand with a test transaction

bleak breach
#

Can you paste exactly what you get from console.log(request.body)? If the body is raw and not encoded, you should get something like this:

<Buffer 7b 0a 20 20 22 69 64 22 3a 20 22 65 76 74 5f 31 4a 49 31 4a 52 48 79 4b 6d 57 73 53 41 51 49 38 61 4f 7a 7a 76 76 69 22 2c 0a 20 20 22 6f 62 6a 65 63 ... 3327 more bytes>
simple dagger
#

{
"id": "evt_1JI1ECE92nPnQcOibCKQUQLO",
"object": "event",
"api_version": "2020-03-02",
"created": 1627434392,
"data": {
"object": {
"id": "cs_test_1234567890...",
"object": "checkout.session",
"allow_promotion_codes": null,
"amount_subtotal": 1000,
"amount_total": 1000,
"automatic_tax": {
"enabled": false,
"status": null
},
"billing_address_collection": "auto",
"cancel_url": "",
"client_reference_id": null,
"currency": "eur",
"customer": "cus_Jvt0sJQCcZLzt6",
"customer_details": {
"email": "",
"tax_exempt": "none",
"tax_ids": [

    ]
  },
  "customer_email": "",
  "livemode": false,
  "locale": null,
  "metadata": {
    "type": "CREDIT",
    "nbr_credit": "1"
  },
  "mode": "payment",
  "payment_intent": "pi_1JI1E1E92nPnQcOisgsagqPA",
  "payment_method_options": {
  },
  "payment_method_types": [
    "card"
  ],
  "payment_status": "paid",
  "setup_intent": null,
  "shipping": null,
  "shipping_address_collection": null,
  "submit_type": null,
  "subscription": null,
  "success_url": "",
  "total_details": {
    "amount_discount": 0,
    "amount_shipping": 0,
    "amount_tax": 0
  },
  "url": null
}

},
"livemode": false,
"pending_webhooks": 1,
"request": {
"id": null,
"idempotency_key": null
},
"type": "checkout.session.completed"
}

#

this is what is logged

bleak breach
#

That means that the request was JSON parsed before it reached your /webhookCredit endpoint

#

You likely have a express.json() somewhere in your code before you defined that route

simple dagger
#

that is what is was going to send you :

#

const express = require('express');
const expressPino = require('express-pino-logger');
const HTTP_CODE = require('http-status-codes');
const bodyParser = require('body-parser');

const logger = require('./logger');
const authenticateRouter = require('./routes');

const app = express();

app.use(expressPino({ logger }));

app.get('/status', (req, res) => res.sendStatus(HTTP_CODE.OK));
app.use((req, res, next) => {
if (req.originalUrl === '/webhookCredit') {
next();
} else {
bodyParser.json()(req, res, next);
}
});

app.use('/', authenticateRouter);

module.exports = app;

#

---this is what i have in my code and the only occurence of a bodyParser.json

bleak breach
#

That seems correct, but your request body is still being JSON parsed. Can you try commenting out other middleware like app.use(expressPino({ logger }));? Perhaps that's doing unwanted things

simple dagger
#

it still does not work 😦
i think it is a problem I am having with my test environment
it is very late here where i live so i am going to sleep and see about it tomorrow
thank you very much for your help tonight nonetheless

sage burrow
#

I am having a charge with an extra 5 cents that I would like to have help with. I wanna know how to modify the code in order to prevent that additional 5 cents from being charged

hollow nebula
#

I want to get the payment due date from an invoice which I get through invoice.payment_failed. In the Invoice documentation, it says as in the image. Does this means, I will get null

golden cosmos
sage burrow
#

@golden cosmos yes sure I can give you the charge id ch_0JGcKftC5CmKO3Cdj1ArhYkr

#

I am no sure where the error is coming from actually. That's what I would like to know. The price is a yearly plan of n amount of $588. I don't have access to dashboard myself but in the code I can confirm that I am sending the request with no proration

golden cosmos
sage burrow
#

@golden cosmos that default plan comes with a trial of 15 minutes (for testing purposes) and I subscribed to th same default plan before the trial expires.

stark tide
#

@sage burrow when an invoice is paid, the starting balance owed/due to the customer is included with the invoice

vocal wagon
#

hey all

sage burrow
#

@stark tide i am trying to figure out why they have an owing balance. They shouldn't. Must be something in the code that i am doing wrong.

vocal wagon
#

I am trying to figure out how to get the product ID from the PaymentIntent delivered through the webhook

#

It doesn't seem to be listed anywhere in the PaymentIntent object

stark tide
#

@sage burrow I'd start by looking at the events relating to that customer, to track why they had a $0.05 balance

vocal wagon
#

I feel like I'm missing something obvious

hollow nebula
#

@golden cosmos How can I get the date that the payment should have been made?

sage burrow
golden cosmos
stark tide
#

@vocal wagon if you're using checkout, you'd get the line items (and the product) from the checkout_session events

golden cosmos
#

@stark tide is correct and this customer had a negative balance of 5 cents before the invoice was created

sage burrow
#

@golden cosmos I don't have access to dashboard but I do have the api keys so can check through the api

vocal wagon
#

@stark tide Thanks.. but I don't seem to be getting the line items in the checkout_session event

stark tide
#

you'd need to query the checkout session from the api & explicitly expand the line items - they won't be populated by default on the event

vocal wagon
#

thanks

stark tide
#

np

sage burrow
#

@golden cosmos they shouldn't have a negative balance because they paid before the trial expires.

golden cosmos
#

@hollow nebula you would have to calculate the due date from status_transitions.finalized_at in the
invoice.payment_failed event. The final due date would depend on your account settings.

sage burrow
#

@golden cosmos and even if it expires I would like to be able to not charge them for the regular price. I am not sure why they have a negative balance

stark tide
#

@sage burrow you should be able to list the CustomerBalanceTransactions for that customer to find out what created the $0.05 balance

hollow nebula
#

@golden cosmos

The final due date would depend on your account settings

Which setting? I am hoping the date would match the date of the subscription renewal date

golden cosmos
#

@sage burrow what happened was that previously, you attempted to invoice this customer for $0.05 (in_0JGc1xtC5CmKO3Cdu2YHlP5o). However, this was smaller than the minimum amount allowed by Stripe, so Stripe added this amount to the customer's balance to be added to a subsequent invoice instead.

vocal wagon
#

@stark tide Sorry, I tried this: $session = \Stripe\Checkout\Session::retrieve($event->data->object->id,['expand'=>['line_items']]);

#

but it doesn't work

#

I get the session, but not the line items

stark tide
#

@vocal wagon do you have a reference request ID?

vocal wagon
#

where would i find that?

stark tide
sage burrow
#

@golden cosmos I didn't but stripe automatically did and in the description it says "Unused time on Basic Bundle Yearly Default Plan (900 bookings per year) after 24 Jul 2021". Any suggstions on how to prevent this from happening?

golden cosmos
vocal wagon
#

@stark tide req_iwhEeP45QjXN5t

stark tide
#

@vocal wagon are you sure you've got the right request there? that wasn't made by a php client running the code you linked above

vocal wagon
#

@stark tide sorry, let me check again

hollow nebula
#

@golden cosmos Thank you for the help 🍻.

Just to clarify, I only need to find the date that the charge is supposed to be done. Since I am using subscriptions, that date should be the subscription renewal date. I didn't change my invoice settings, so charge _automatically will be the default configuration. Can I use status_transitions.finalized_at to get that date from the webhook event?

sage burrow
#

@golden cosmos I thought I am already doing that but maybe there is a bug in my code. Thanks!

vocal wagon
#

@stark tide OK, its: req_Jovdh4SLJyRUM0

stark tide
#

@vocal wagon the expand parameter is not being set in that request; are you sure that the code you pasted above is what your server is running?

vocal wagon
#

This is the relevant code block:

#

$session = \Stripe\Checkout\Session::retrieve($event->data->object->id,['expand'=>['line_items']]);
$ttd->write_log(json_encode($session));
$ttd->write_log("ReqID:".$session->getLastResponse()->headers["Request-Id"]);

#

@stark tide OK, I figured it out

#

$session = $stripe->checkout->sessions->retrieve($event->data->object->id,['expand'=>['line_items']]);

#

works

#

but $session = \Stripe\Checkout\Session::retrieve($event->data->object->id,['expand'=>['line_items']]);

#

does not work

#

Apparently accessing the class directly through \Stripe\Checkout\Session does not accept the extra parameters

stark tide
#

yeah, I think I see what's going on here

#

the array param accepted by retrieve is intended for a different type of options

#

and apparently by default will ignore unrecognized options

#

I think there isn't a way to pass in request parameters to retrieve with the static function call style

bleak breach
#

There is, but it's not well explained

#

You'd do:

\Stripe\Checkout\Session::retrieve([
  'id' => $event->data->object->id,
  'expand'=>['line_items']
]);
vocal wagon
#

@bleak breach thanks

#

laters guys

#

widgets to sell, and all that

#

thanks @stark tide @bleak breach

sage burrow
#

Is there a way to speed up the time needed for a payment to show in the test environment?

hollow nebula
#

Let's assume a customer has multiple credit cards in the customer portal. When charging for the subscription, the charge fails on default payment card. Will Stripe try to use the other cards of the customer in that scenario?

bleak breach
bleak breach
hollow nebula
#

@bleak breach Thanks 🙏

sage burrow
#

@Paul, Awesome! Thanks!

#

As you can see the charge still doesn't show and the invoice is still only showing in upcoming

bleak breach
#

Those are links to api.stripe.com, did you mean to send a request ID instead?

sage burrow
#

@bleak breach my bad I understand that you probably won't be able to use those. I don't have access to dashboard. Basically if you check that customer id you can see that the charge still doesn't show even though i used the card 4000000000000077

bleak breach
#

It would help if you told me exactly what you're trying to do and if you got an error or if you have a request ID

sage burrow
#

@bleak breach I don't have a request id. In my test environment. I sign up a customer to the default plan and then pay before the trial expires. The price of the default plan that i kept is $588 I am expecting to show but it still doesn't. Usually it takes around an hour. I was wondering if there is a way to make it appear immediately to speed up troubleshooting in my test environment.

bleak breach
# sage burrow <@!849111733481504780> I don't have a request id. In my test environment. I sig...

For starters you're creating a customer/subscription in a very old, deprecated manner. I recommend you use the /v1/subscriptions endpoint to create your subscriptions: https://stripe.com/docs/api/subscriptions/create

smoky ledge
#

How could I grab customer data from a checkout session?

I'm trying to create a new customer based off checkout details to assign a customer ID.

bleak breach
sage burrow
#

@vocal wagonl I am aware of that. Even though the subscription is created using an old version I was able to use a the latest version when they subscribe (pay). That's the only call that is upgraded now. We are intending to upgrade all the calls in the future.

bleak breach
#

When an invoice is created it sits in the "draft" status for approximately an hour before automatically transitioning to the "open" status, where it can be paid. This is true for all invoices except the very first one created when you create a subscription without a trial period. Even if you create a trial period that ends a few minutes into the future (as you did here) the first invoice after the trial will still have that 1 hour grace period before finalizing. You can circumvent this in your test code by manually finalizing the invoice: https://stripe.com/docs/api/invoices/finalize

#

Alternatively you can create a subscription without a trial period, in which case the first invoice will immediately be created, finalized and paid.

sage burrow
#

@vocal wagonl! Awesome! very clear now!

#

@bleak breach I contacted you (not you) guys here today twice for another issue. And I think I found a solution by myself. Do you want me to share that with you to confirm and if it is really the right solution to maybe share that with the team?

bleak breach
#

Sure, if you don't mind sharing what the original issue was

sage burrow
#

Yes sure. Basically I had an additional 5 cents added to the second invoice the one that is generated after they paid (they were still in the trial period)

#

@vocal wagonl and I didn't want that 5 cents to show

#

@vocal wagonl I mean didn't want it to be charged

#

It seems that i is not charged now. And if my fix is correct that was an error in my code: a parameter that I was sending an that I shouldn't.

bleak breach
#

Ah yes I saw that, which parameter was that?

sage burrow
#

@bleak breach lt me check in my git history

#

@vocal wagonl I was sending this: "payment_behavior" => "pending_if_incomplete"

#

@bleak breach Let me know what you think!

bleak breach
#

I think it's more related to what type of proration behaviour you were passing in

sage burrow
#

@bleak breach judging by the upcoming invoice amount it i not there anymore

bleak breach
#

but if it works the way you want it to then great!

sage burrow
#

@vocal wagonl can you confirm that it works? All i need to check is the upcoming invoice amount? I am still waiting for the charge to show. And yes that's the only field that I changed (removed), I was already sending 'proration_behavior' => 'none'

smoky ledge
#

Is this still the proper way to use Tax ID Collection?

bleak breach
sage burrow
#

@awesome! thank you! You guys are the best support team!

smoky ledge
bleak breach
#

Also is this for a new customer or an existing customer?

smoky ledge
#

New Customer;

#

and lemme grab the error

#

The period is triggering it.

#

The one between collection and enabled

bleak breach
#

This is the correct syntax:

tax_id_collection: {
  enabled: true,
},
smoky ledge
#

Ah; thanks.

tranquil idol
#

Good afternoon gentlemen, Quick question regarding card testing / Stripe connect and Radar rules: Is there a way to automatically require 3DS after multiple credit card failed for a specific destination id?

bleak breach
sage burrow
#

@bleak breach it still doesn't work

bleak breach
#

@sage burrow Are you setting proration_behavior to none?

sage burrow
#

Yes I do Unless I have some bug in the code ... I cannot find a past request id without having access to dashboard, right?

bleak breach
sage burrow
#

@bleak breach I need to create a new account and log that then. By the meanwhile I noticed something and I am not sure if it is related. In this charge ch_0JI4XvtC5CmKO3CdBla3IRc0 I see a stripe processing fee of 2088. Is this related?

bleak breach
sage burrow
#

@bleak breach 👍

bleak breach
#

When you update the subscription you have to pass in 'proration_behavior' => 'none' to not carry over unused time to the next invoice

empty vessel
#

Hello! We have a customer who's unable to go through the payment process via Stripe due to "system error" when adding her Dutch postcode. Any ideas how we can resolve this?

sage burrow
#

@vocal wagonl that's what I thought I was doing but maybe I have some bug. Here is the request id for the last customer i created and paid req_aj1UOHdA2fNdXM

#

Can I see the detais of this request using the api?

dense rover
#

Hello everyone

could you help, with question below.

Is it possible to make everyday recurrent payment, but if user make some action, the payment on that day should be cancelled?

sage burrow
#

@dense rover you man a daily subscription where a certain amount is charged to the user everyday?

dense rover
#

@sage burrow
the amount of the charge is same everyday, but if user for example solve the task during the period, the amount shouldn't be charged

sage burrow
#

@dense rover , the second part of your question is to not charge them a certain day. Can you elaborate on that. Would that be only a particular day or a couple of days?

#

@vocal wagonl are you still there?

dense rover
sage burrow
#

@dense rover I am not sure. I came here to ask for help too. Maybe it is better to wait for stripe official staff

smoky ledge
#

You probably wouldn’t be able to use subscriptions for this use case; as if they meet their task; it’ll end the subscription and require you to make a new one.

#

The best thing to do imo; would be to keep a default card on their customer profile and if the task isn’t completed by whatever time; it’ll begin a charge.

sage burrow
dense rover
sage burrow
#

@dense rover no stripe keeps the card on file. You have to choose charge_automatically for billing

smoky ledge
#

What he said I believe is correct; but it’s better to double check with Support.

#

or probably someone here

sage burrow
#

@dense rover I agree with @smoky ledge

dense rover
smoky ledge
#

What he said about charge auto;

#

It’s always best to double check though as I don’t have the full specifics of your business and some other things

dry hatch
#

hi @dense rover let me see if I can help

sage burrow
#

@dry hatch when you finish I need help too

lucid raft
#

krm I can help with your question

lucid raft
#

There is no way to retrieve it from API

sage burrow
#

Ok I was troubeshooting an issue that I have with @bleak breach . Last thing I wa asking is if I can see the details of a request id through the api

lucid raft
#

And since you initiated the request, you should know the request content.

maiden meadow
#

@lucid raft can I add some validations on google form fields which is rendering when I am clikcing on payment request button in my application

dry hatch
# dense rover ok, but at the charging time, the user have to confirm the payment ? or it will ...

Can you elaborate more on the question? I see you are using a subscription already? And you can pause and resume the subscription as in the link https://support.stripe.com/questions/how-to-pause-or-cancel-subscriptions

sage burrow
#

@lucid raft yes I know the content but now i am doubting. Can you check if I sent proration none?

maiden meadow
#

can anyone help me with that

lucid raft
maiden meadow
#

Yes google pay

lucid raft
#

@sage burrow do you have access to your dashboard?

sage burrow
#

@wsm that's my problem. I am the developer I have the private and public keys but no access to dashboard

#

@wsm This request req_aj1UOHdA2fNdXM should have proration_behavior set to none

lucid raft
#

@sage burrow yup, it is correct, it is set to none

sage burrow
#

@wsm awesome! thank you for confirming that!

lucid raft
#

@sage burrow np, but As long as you send the parameter following the API and using our PHP SDK, you should be assured those parameters are sent.

#

@maiden meadow what kind of validation you want to do ?

sage burrow
#

@wsm I know but several stripe agents here told me I am not sending it

maiden meadow
sage burrow
#

@wsm do you wanna look at my original issue maybe?

lucid raft
#

@maiden meadow unfortunately no, those are Google Payment Sheet which does not have that capability. What error are you encountering when creating payments thorough Stripe?

#

@sage burrow Sure, sorry, can you share your issue again ?

dense rover
maiden meadow
sage burrow
#

@lucid raft sure. But I am confused now because the last charge doesn't have the same issue

dry hatch
sage burrow
#

@lucid raft this charge has an extra 3 cents that I wanna know how to prevent ch_0JI4XvtC5CmKO3CdBla3IRc0

#

@lucid raft but the last customer for which the charge already shows at this moment doesn't have this issue ch_0JI4iItC5CmKO3CdXz9v6xx2. I am not sure if ti is an intermittent issue or a small fix that I did.

#

@lucid raft do you know why the first one has an extra 3 cents and the second doesn't?

dense rover
dry hatch
sage burrow
#

@lucid raft maybe it is because the second charge invoice is still in draft status and a couple of cents will be added when its status gonna change?

golden cosmos
sage burrow
#

@golden cosmos Awesome! Thank you!

brave kite
#

Hi Stripe team,
Currently we are using stripe payout method.
Our developer is facing this issue .please try to support in this

{
“error”: {
“code”: “more_permissions_required”,
“message”: “The provided key ‘sk_live_Us**6BJG’ does not have the required permissions for this endpoint on account ‘acct_1GENjnxxxxxxxS’. Having more permissions would allow this request to continue.“,
“type”: “invalid_request_error”
}
}
@dry hatch

dry hatch
golden cosmos
#

@sage burrow It's a similar issue to the $0.05 issue you raised earlier.

brave kite
sage burrow
#

@golden cosmos correct and I just confirmed with @lucid raft that I am sending the parameter to tell stripe i don't want prorations

golden cosmos
dense rover
sage burrow
#

@alex no. I created a subscription with a free trial ad then paid for the same default plan before the trial expires and in this last call i am sending proration none

#

@golden cosmos 'proration_behavior' => 'none'

#

@golden cosmos do you see any difference between these 2 charges ch_0JI4XvtC5CmKO3CdBla3IRc0 and ch_0JI4iItC5CmKO3CdXz9v6xx2. The second one seem to be working but I am not sure why

golden cosmos
#

looking into it!

dry hatch
dense rover
sage burrow
#

@golden cosmos the roblem is still there I just got a new charge ch_0JI63HtC5CmKO3CdaddDjZAT

dry hatch
sage burrow
#

@golden cosmos and for some reason the one after it has the right amount ch_0JI65BtC5CmKO3CdtlhxzJyd

#

@golden cosmos I am going crazy 😩

golden cosmos
#

sorry, give me a while more, subscriptions are complicated

sage burrow
#

@golden cosmos I know! Of course , take your time!

brave kite
dry hatch
brave kite
dry hatch
sage burrow
#

@golden cosmos I am sorry it is 2:28 in my timezone. I have to get some sleep. ?If you find something please send it to me. I think discord can send messages even if the user is not online ... Thank you for your help!

golden cosmos
#

sure, sorry about how long this is taking!

#

@sage burrow ch_0JI4iItC5CmKO3CdXz9v6xx2 / cu_0JI3UrtC5CmKO3Cds6bDZKOi /sub_JvvLtowk3geY3w - this all works fine because no changes were made to the subscription.
ch_0JI4XvtC5CmKO3CdBla3IRc0 / cus_Jvv9SGxCr7ujar / sub_Jvv9Os3AzJQE9t - looking at this particular subscription, there was a request (req_xZSqLvvcxcXMsq) made to set the billing_cycle_anchor=now but proration was not set to none in this request. Hence, proration occurred.

hollow nebula
golden cosmos
brave kite
hollow nebula
#

@golden cosmos The problem with billing_cycle_anchor is that, when we try to change it, it tries to immediately charge the credit card. Since the card I am using is going to fail when charging, it doesn't let billing_cycle_anchor to be updated.

I am currently using invoice.payment_failed in Stripe CLI, but the problem is it is creating a new customer, new invoice item etc. So I can't really use the CLI event

golden cosmos
hollow nebula
#

@golden cosmos If you have a suggestion to use the CLI, but use one of the existing customer, and subscription, then it would be nice. But I don't know whether that is possible.

golden cosmos
#

@hollow nebula let me think about what workarounds are possible (if any), will get back to you in a bit

brave kite
golden cosmos
#

@hollow nebula i tried attaching that card (4000000000000341) to a customer, then i created a subscription on the customer, it is generating an invoice.failed_payment event. Is there some other requirements for the scenario which you're looking to replicate or would this work for you?

hollow nebula
#

Actually, if that works, it is great. I was trying to do this on an existing subscription. Let me check quick. Thanks for the quick response 🎉

golden cosmos
#

@brave kite it's one external bank account per supported currency for a connected account

hollow nebula
#

@golden cosmos I tried and I get this error

golden cosmos
#

@hollow nebula you would need to do it via the API

hollow nebula
#

Oh, got it

brave kite
golden cosmos
#

hello @brave kite sorry, i was wrong before. You can have more than one bank account per supported currency for a connected account. I'm not aware of any limit to the number.

drowsy glen
#

Heya, if you try to create more than 250 line items for an invoice. What happens to the item you're adding? Does it appear on the next invoice?

Assuming that my payload looks like:

        {
          customer: customerId,
          currency: 'AUD',
          description: `lorem ipsum dol sit amen`,
          quantity: orderCount,
          unit_amount: 0
        }

for a call to const invoiceItem = await stripe.invoiceItems.create({

hollow nebula
#

I have an invoice.payment_failed in my Stripe test data. Can I trigger that same event using CLI, so that I can test it on my local?

tight parcel
#

hi there!
Getting back to this thread, I've managed to add a card successfully with the checkout session, but the new card is not automatically added to default method.
Is there a simple way to do it or do I need to add the code myself?

brave kite
crimson needle
#

@brave kite there's no limit to this today. You can add 200 if you want. You can also easily test this in Test mode with a loop adding the same bank account details for example to confirm
While there's no limit, it doesn't make sense that you'd have 1M bank accounts for Payouts

bleak breach
golden cosmos
crimson needle
#

@golden cosmos the error is if you add it to an existing invoice. Their code is just creating a pending invoice item, so no error

#

it'd just stay pending until the following invoice

#

so if you had 1000 pending invoice items, the first invoice would get 250 and leave 750, the next 250 and leave 500, etc.

golden cosmos
#

aaah, whoops, sorry about that @drowsy glen . What @crimson needle said is right ^

lapis pollen
#

Hello!
Case: a user buys a product on the site using Stripe for payment (a subscription will be created). The user should be able to specify a start date for this product, for example the day after tomorrow. What wll be the best way to create a subscription with a future date (so that this user was charged only on the day after tomorrow) Thanks.

hollow nebula
golden cosmos
hollow nebula
#

@golden cosmos Thank you so much 🎉

tight parcel
# bleak breach If you provide `payment_intent_data.setup_future_usage` settings Checkout will a...

Hi Paul, thanks for replying.
I'm doing a checkout session on "setup" mode only, there is no payment_intent called.
I don't understand how I can use this on my specific checkout_session, can you clarify please?
here is the code:
checkout_session = stripe.checkout.Session.create(
payment_method_types=['card'],
mode='setup',
customer=customer.id,
success_url='http://localhost:8000/',
cancel_url='http://localhost:8000/',)

bleak breach
golden cosmos
lapis pollen
#

Thanks @golden cosmos

golden cosmos
#

you're welcome!

tight parcel
# bleak breach So in setup mode the PaymentMethod should be automatically attached to the custo...

I'm basically trying to call dj-stripe's native function to check if a customer can be charged (https://github.com/dj-stripe/dj-stripe/blob/be38f17afff568bd6f2758a9a438bdce9e040900/djstripe/models/core.py#L1156) but it's returning me False after adding the 4242 4242 4242 4242 card.
That's when I noticed the card was not set as default payment method.
On closer inspection it should still pass the function as True, if it is a valid payment source, or could it be the 4242 4242 4242 4242 card is not considered a valid payment source, but a real one will?

bleak breach
hollow nebula
#

Hello again, I tried to retrieve my customer which has an active subscription, and two attached credit cards. Here's a part of the Customer object I received.

  balance:0,
  currency:'sgd',
  default_source:'card_1KI3NnC8JwuaUdU2wijO15EI',
  email:'email@email.com',
  id:'cus_GtkNGeNrwu2wq3',
  default_payment_method:null,
  invoice_settings: {
    custom_fields:null,
    default_payment_method:null,
    footer:null,
  }
  ...
}

I was expecting default_payment_method or invoice_settings.default_payment_method would not be null. However, I see that default_source contains the ID of the default credit card I have for this customer.

Is this normal. Can I always rely on default_source ?

bleak breach
tight parcel
bleak breach
# hollow nebula Hello again, I tried to retrieve my customer which has an active subscription, a...

This means that this customer at some point had a Source attached to it (https://stripe.com/docs/sources). That's an older API that's largely been replaced by PaymentMethods. For an active subscription there's 3 places you'd find which payment method is being used:

  1. On the subscription itself if it was set when the subscription was created: https://stripe.com/docs/api/subscriptions/create#create_subscription-default_payment_method
  2. The default invoice payment method on the customer (if set): https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method
  3. The default Source on the customer: https://stripe.com/docs/api/customers/object#customer_object-default_source
#

If you don't set a default_payment_method when creating the subscription, Stripe will first look at the customer's default invoice payment method. If that's not set it'll use the default_source of the customer. And finally if that's not set it'll error

hollow nebula
#

Very clear @bleak breach . Thank you 😊

vocal wagon
#

Hi Guys, my Name is Leon! I just joined a few moments ago and need a little help from you guys...

bleak breach
#

Hi Leon!

vocal wagon
#

First of all im using Webflow, i connected Stripe to Webflow, but would like to connect Stripe now with pico (trypico.com) but it does not show me my account. It shows just the atlas account wich i created just to explore... i wanna use the normal account but it does not show up. So the question is why?

#

Hi @bleak breach nice to meet you

#

is it possible that it wont work, because im already connected with webflow?

latent jolt
#

Hi, I'm using hosted_invoice_url from the invoice object. It is displaying the "Payment date" one day advance on the url along with tenure that the subscription of that invoice

bleak breach
vocal wagon
#

no i dont see my Stripe account when i wanna connect with pico.

latent jolt
bleak breach
vocal wagon
#

see, just atlas account is showing

bleak breach
#

@vocal wagon hold on, so you have 2 accounts, one regular one and one created with Atlas right?

vocal wagon
#

yes! correct. And the regular one is already connected with webflow.

bleak breach
#

That's expected then, you can only connect your account to one platform at a time

vocal wagon
#

oh okay so i gonna try this now, thanks a lot!

latent jolt
#

Can anyone help me on the isssue?!

bleak breach
latent jolt
#

It should be : :

bleak breach
#

Ah I see, it might be that the hosted invoice is showing the time in your browser specific timezone, but the PDF shows the timezone of the Stripe account

latent jolt
#

But both are from the same timezone!

bleak breach
#

Can you share the invoice ID? Looks like in_123

latent jolt
bleak breach
#

Thanks, having a look

orchid ice
#

Hello,@Paul I changed the customer service phone number (skype), why can customers still call the owner phone number of the registered stripe?

cerulean pineBOT
#

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

crimson needle
#

@slim mesa those can't be set as the default payment method. Since this is not a public feature, it shouldn't be discussed here where it's a public chat. Please talk to our support team for help instead https://support.stripe.com/contact

bleak breach
#

@latent jolt This appears to be a bug on Stripe's end, sorry about that! We're looking into it now but don't have a timeline on when it'll be fixed just yet

latent jolt
dense moss
#

Guys weird situation here: i've created a checkout session. Problem is that if someone try to checkout with SEPA debit and it fails and will later reuse the same checkout link to try again the checkout.session.completed event doesn't get fired. This is especially a problem if it tryes to checkout using card because the checkout.session.completed event is the only event we got to see if it's being paid or not.

#

Am i missing something?

bleak breach
crimson needle
#

@dense moss do you have an example link I can look at? This should be impossible

bleak breach
crimson needle
#

let me try

dense moss
#

Also worth noted that if i try again with a card or a success sepa debit the payment actually get's added to the connected account found

#

This is what my webhook situation looks like now...i'll send another screenshot after you try

crimson needle
#

yeah this definitely shouldn't be happening. Let me investigate for a bit, thanks a lot for the report

dense moss
#

Ok thanks

crimson needle
#

Yeah something is definitely wrong. My guess is that it's purely a Test mode bug since async failure for SEPA takes multiple days and a Session expires after 24 hours. So you don't have to worry about this happening in Live mode, but it's still a bug that we should fix

dense moss
crimson needle
#

yes

dense moss
#

Oh...that's unfortunate 😄

crimson needle
#

Sessions automatically expire after 24 hours and you'd need to create a new one, you'd do it when they are on session basically

#

@dense moss okay I reported the issue to our engineering team working on Checkout. It will likely take some time to fix since it's Test mode only

vocal wagon
#

Hello Guys,

is there any way to set "shouldInitCustomerSessionTokens = false" from AddPaymentMethodActivityStarter in android SDK ?

Was using version 12.6.0 and upgrade this to 12.9.0 bcoz I got an email from google that stripe sdk is not compliant. So upgrading sdk to make it compliant with google play.

Now I'm facing an issue...to initialise CustomerSession.

was calling this:
AddPaymentMethodActivityStarter(activity).startForResult( )

and got this error after updating to version 12.9.0 "Attempted to get instance of CustomerSession without initialization"

crimson needle
#

@vocal wagon what email did you get from Google? We've heard reports of problems yesterday and so it depends what they told you. You might need to upgrade to a much more recent version

vocal wagon
crimson needle
#

someone on my team is looking into it as I don't know our Android SDK well, cc @lucid raft

vocal wagon
drowsy glen
# golden cosmos <@!427540133261082626> you'll actually get an error if you try to create an invo...

Heya, thanks (sorry for the slow follow) I read @crimson needle s message as well, makes sense.

Yes our business is going to have invoices with more than 250 lines. The business has asked if this is an adjustable limit?
Even with condensed invoices, we're probably going to have several customers who have more than 250 line items per invoice, and the business would like to send 1 invoice per month...

crimson needle
#

@drowsy glen no it's not adjustable, it's a real limit. We recommend "grouping" line items into one larger item otherwise

drowsy glen
#

Grouping being just us adjusting the description and amounts, or is there an API feature grouping that I've missed?

crimson needle
#

there's no API feature. Instead of having 10 small line items, you'd find logic to group on your end and just create one item for the sum of those 10 smaller items
There's no way to go above the 250 limit which is already really high

drowsy glen
#

Alrighty :)
Thanks kindly, I'll take this back to the team and see what we can do :)
Thank you.

neon linden
#

hey got an invoice specific question

#

from what I understood, invoicing works like this:
1: create customer, get id
2: create invoiceitem(s) with customer id
3: create an invoice with customer id
so what im guessing is that the invoice will pick up all the existing invoice items?

#

what happens if I fail in creating one of the multiple invoice items?

crimson needle
#

correct

#

not sure what you mean, why would you fail?

neon linden
#

lets say one of the requests was invalid

#

or a connection issue

crimson needle
#

But you can pass an existing invoice id on Invoice Item creation so the flow I recommend is more
1/ Create Customer
2/ Create first Invoice Item
3/ Create an Invoice (to pull in the Invoice Item)
4/ Create all the other Invoice Items and pass invoice: 'in_123' to add them to that invoice

lucid raft
# vocal wagon yes I get it from google, and if I upgrade to any other most recent version I st...

Catching, unfortunately on 12.9.0, it seems that we set the function to internal as internal fun setShouldInitCustomerSessionTokens which mean you could not call it anymore like

AddPaymentMethodActivityStarter.Args.Builder()
            .setShouldInitCustomerSessionTokens(true/false)

You can try to initialise the CustomerSession by calling
CustomerSession.initCustomerSession(this, MyEphemeralKeyProvider())
basically following up basic integration path here.
https://stripe.com/docs/mobile/android/basic#set-up-customer-session

Give it a try and let me know if that works

neon linden
#

im guessing there's no way to create an invoice with invoice items included in one call right?

neon linden
crimson needle
#

Yeah it's just not how our API works for now

vocal wagon
kindred frigate
#

I have saved more than 2 cards using below code. I want to set default to any one. how can i do.

        var options = new SessionCreateOptions
        {
            PaymentMethodTypes = new List<string> {
              "card",
            },
            Mode = "setup",
            Customer = CustomerId_Stripe,//objRegInfo.CustomerId_Stripe, //"{{CUSTOMER_ID}}",
            SuccessUrl = "http://localhost:3000/VedicMath/AccountDetails/3",
            CancelUrl = "https://example.com/cancel",
        };

        var service = new SessionService();
        var session = service.Create(options);
plain gale
crimson needle
#

@kindred frigate what does "I want to set the default to anyone" mean?

lucid raft
#

@plain gale let me check

#

Do you have more code on how you make use of the AddPaymentMethodActivityStarter?

vocal wagon
vocal wagon
kindred frigate
lucid raft
#

Yeah, I am not sure if that works in that way as AddPaymentMethodActivity is for you to add payment method to the customer, and you will need a customer session for that. But let me check if there are major changes on that support for v12.9.0

#

@vocal wagon ^

gilded carbon
#

Hey,
I'm having a question about the asynchronus payments: I followed this tutorial: https://stripe.com/docs/checkout/integration-builder
In the PayPal API I first prepare and then execute the transaction and get a response if the execution was successful. This way I know that the customer actually has gone through PayPal.
I don't see with this Stripe example. What is preventing a customer to just go to the success.html page or in other words, how do I check that the customer completed the transaction. Is this actually possible or do I have to wait for the callback handler for a success / failure event. If so, how long does this take?

vocal wagon
gilded carbon
#

No, I don't want to use PayPal with Stripe, I want to switch to Stripe from PayPal and just used it as an example

crimson needle
#

Ah gotcha I misunderstood what you meant. It's on you to build some logic on the success page to identify the customer, associate them with a paid checkout session and only let them through if so

gilded carbon
#

How do I verify, can I just recheck the PaymentIntent? Does it update after the transaction is complete?

crimson needle
gilded carbon
#

Can I query the CheckoutSession immediately after the customer returns to the success page or would it be better to wait for the event callback?

crimson needle
#

You can query immediately!

#

@kindred frigate I'm looking into it, sorry for the delay

gilded carbon
#

Thank you very much

neon linden
#

btw, if you delete an invoice, does it delete all related invoice items?

cosmic moat
#

Another related question - I am getting an error when I try to make a direct charge for an account I have onboarded, creating a new payment session via checkout.session.create

Something went wrong
The specified Checkout Session could not be found. 
....

This is what i'm sending:

{
  payment_method_types: [ 'card' ],
  client_reference_id: '231e7b09-e3ac-4507-a1ed-696688138ded',
  customer_email: 'matt@*****',
  line_items: [ { price_data: [Object], quantity: 1 } ],
  mode: 'payment',
  payment_intent_data: {
    description: 'Thing',
    metadata: {
      enrolment_id: '231e7b09-e3ac-4507-a1ed-696688138ded'
    },
    application_fee_amount: 250
  },
  success_url: 'http://localhost:3000/stripe/callback/checkout/231e7b09-e3ac-4507-a1ed-696688138ded/success',
  cancel_url: 'http://localhost:3000/stripe/callback/checkout/231e7b09-e3ac-4507-a1ed-696688138ded/cancelled'
},
{
    stripeAccount: 'acct_xxxxx'
}

the payment intents are showing in the connected account.

To make a direct charge, do I have to have connected via OAUTH rather than the onboarding to make this work? I have a feeling it is to do with api keys on the connected account?

crimson needle
#

@neon linden if they were pulled into the invoice yes

neon linden
#

oh alright good

kindred frigate
#

what is mean DefaultSource in CustomerService?

var options1 = new CustomerUpdateOptions
{
DefaultSource = CardId
};

                var service2 = new CustomerService();
                Customer customer1 = service2.Update(CustomerId_Stripe, options1);
crimson needle
neon linden
#

I think I got a good enough system setup, i'll be back when it fails :lol:

crimson needle
#

@kindred frigate ignore DefaultSource.

neon linden
#

thanks for the help koopa

lucid raft
# vocal wagon Yeah please let me know how can I achive my use case to use only UI component. ...

Yeah, it seems that we changed the implementation in v12.9 to use AddPaymentMethodViewModel which requires an instance of CustomerSession. Saying all that, since you are not attaching to the payment method, can you try creating a dummy CustomerSession by

  1. create a dummy EphemeralKeyProvider not actually fetching any keys
  2. init a CustomerSession with CustomerSession.initCustomerSession(activity, myDummyEphemeralKey, false) <-- the false telling the SDK not prefetching the key without calling any backend code
  3. do what you are doing now
#

let me know if that workaround works.

kindred frigate
crimson needle
#

@kindred frigate I am still looking into your question already. Please wait while I figure it out

kindred frigate
hollow prairie
#

@kindred frigate Hey there, taking over from @crimson needle

#

@kindred frigate You're using PaymentIntents, right?

vocal wagon
#

Hey 🙂 I’m using stripe connect (with payment intent, which has a charge id buried in the object) and am coding the refund process, I’ve seen in the docs both the charge id and the payment intent id used can be used for creating the refund, for stripe connect, is using the charge id or payment intent id best when creating a refund, or does it not matter? 🙂

hollow prairie
vocal stump
#

Hey. Is there an easy way to distinguish if invoice.voided came from pending_update on a subscription expiring or if the invoice was voided manually? I'm trying to handle both cases properly without duplicating the balance adjustment as we talked about yesterday if a subscription update consumes credit on a customer object and then fails payment.

vocal wagon
vocal stump
#

I know I can attach metadata to the invoice but I'd like to have as few calls as possible

vocal wagon
hollow prairie
#

@vocal stump Hmm, that's a good question. Have you considered checking the Subscription object from the subscription ID field returned on the Invoice object?

vocal stump
#

@hollow prairie How would that help?

#

I know it's for a subscription in all cases

#

So yes, this would obviously be useful if I were invoicing without subscriptions, but I'm not

queen stratus
#

Hi @hollow prairie I am using @stripe/stripe-react-native Package
I am entering Card Details I am getting object Like
{"brand": "MasterCard", "complete": true, "expiryMonth": 8, "expiryYear": 25, "last4": "6614"}
If i pass this to create Token i am getting Error Like
{"code": "Failed", "declineCode": null, "localizedMessage": "Card details not complete", "message": "Card details not complete", "stripeErrorCode": null, "type": null} this. But i am getting complete is true from object.

hollow prairie
#

@kindred frigate You'd need to manage the 'default' payment method association yourself. There's no way to do this currently with PaymentIntents

#

@vocal stump You could then check relevant fields (such as pending_update) on the related Subscription object

#

@vocal stump There's no way to differentiate the root cause of the invoice.voided event from just the Invoice object, from what I can tell

#

@queen stratus Hello, can you provide some more context? Perhaps the code you're calling that is erroring, or a specific request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request

vocal wagon
#

Hey, Can someone help me with how I can delete a coupon from a subscription?

hollow prairie
#

@vocal wagon Hello. Via the API?

vocal wagon
queen stratus
vocal stump
#

@hollow prairie But if I look at the subscription object after I receive the invoice.voided webhook, then there won't be pending updates because those are removed when the invoice is voided. It seems I would have to look at subscription.updated and inspect the changed properties to chech if pending_updates were removed and then fetch the invoice from latest_invoice?

hollow prairie
#

@vocal wagon In the Dashboard, click 'Update subscription' from the actions button in top right. You can then remove any active coupons from the line items (see screenshot)

vocal wagon
hollow prairie
#

@vocal stump That seems like it could resolve your use case, yep. Give it a try and let me know

latent ferry
#

Hey. I'm trying to implement Apple Pay through Stripe payment in my Grossiery Shopping Flutter mobile application. Currently I'm using same flow for credit cards and native payment and it looks like that CreatePaymentIntent(server) -> Create token(client) -> CreatePaymentMethod(client)-> ConfirmPaymentIntent(server). But when I'm trying this flow on production for Apple Pay I'm getting PlatformException(cancelled, Cancelled by user, null) all the time. I'm struggling to find any documentation from Stripe that describes the correct flow for Native Payments. I would appreciate any help

hollow prairie
queen stratus
hollow prairie
#

@latent ferry Otherwise I'd recommend writing in with details on your specific issue to https://support.stripe.com/contact

latent ferry
latent ferry
queen stratus
hollow prairie
#

@queen stratus <CardField /> or the Payment Sheet are the preferred RN integration patterns

neon linden
#

when creating a webhook, is it better to do it in the application or in the dashboard? currently what I'm doing is:
1: on startup fetch all hooks
2: if one with the same url matches, exit
3: if not, create a hook
is this the preferred way? also, if secrets are only returned on creation, this kinda makes this approach bad

#

I'd have to manage sharing the secret around myself

latent ferry
hollow prairie
#

@neon linden That's a bit of a vague question. Sure, you can handle webhook creation programmatically but as you've identified the secret is only returned on creation. So I guess it depends on what exactly you're trying to do?

neon linden
#

if I have a bunch of server instances, I'd have to share that state somehow, which just complicates stuff needlessly, when I could just ask the person in charge of the stripe account to just set up the webhook, or do it myself on postman and add the secret as an env field

vocal stump
#

@hollow prairie I think it's going to work. Take a look at evt_1JHtYpLj11YtqxjbZfdIMicS. I can check the previous_attributes of this, determine if pending_updates was set to null and fetch the latest_invoice from that hash, then apply the difference in ending_balance and starting_balance of that invoice to the associated customer if the invoice I retrieve does not contain metadata I manually added if I made the balance adjustment and voided the invoice on my own.

tribal cloud
hollow prairie
#

@neon linden Are you a platform setting up webhooks for your connected accounts? We'd advise against storing the webhook secret

neon linden
#

im not sure that's what I'm doing, I just wanna validate invoice payment webhooks

hollow prairie
#

@neon linden But why is there a need for multiple webhooks if there's just a single account?

neon linden
#

oh it's a single webhook, it's just possibly created on startup

#

if it doesn't exist

#

e.g 4 servers startup, first one doesn't find a webhook, creates it, tho I guess that wont work if they all start up at the same time 🤔

hollow prairie
#

@vocal stump That looks like a solid approach to me. Do you have a flow to test it?

neon linden
#

this just keeps sounding like a bad idea the more I think about it

vocal stump
#

@hollow prairie Yeah I can trigger it, but it's really complicated to try out because of the edge-casey-ness of it. Anyway, I think I should probably not expect the previous_attributes to contain latest_invoice given that latest_invoice would only change if a new invoice was issued, not if the latest one was just voided?

hollow prairie
#

@tribal cloud Hello. Yeah that's not available via the API currently I'm afraid

vocal stump
#

I think I'd have to actually ignore the webhook if it does contain latest_invoice on previous_attributes as that would indicate a new payment attempt/subscription update was made and that it was not just an expiration of pending updates

#

This might mean I can ditch the metadata actually

#

Hmm

hollow prairie
#

@neon linden Sorry, I'm just really struggling to understand the use case specifically around '4 servers startup'

vocal stump
#

but that would also fire if I manually void the invoice without issuing a new invoice

#

Metadata must stay

neon linden
#

just 4 instances of the same server, just scaling up, but nevermind

#

there's too many issues with the programmable approach

hollow prairie
#

@neon linden Ah, I get you. And as they startup they'll likely have a new unique host URL for which you may need to create a Stripe webhook

#

@vocal stump 🤯

vocal stump
#

@hollow prairie Yeah it's a little complicated but I think this might work as I can boil it down to: previous_attributes will only contain pending_updates and latest_invoice if this update to a subscription was in attempt to change the plan/billing anchor etc. If the update was due to expiration of a pending_update then previous_attributes would not contain latest_invoice. Correct?

hollow prairie
#

@vocal stump Confirming

echo coral
#

Hi, i've integrated apple pay with stripe, apple pay button only shown in incognito tab but not visible in normal tabs. Anyone help me to find the reason...?

hollow prairie
#

@echo coral Hello, is there anything indicating an error in your browser console?

rocky turret
#

Hello Stripe Devs.
Can we update the PaymentIntent's " capture_method " through webhook for the event Payment_intent_created ??
it is auto by default and we want to capture manually so we want to do this way.
Looking for your kind response.
Thanks.

sick talon
# rocky turret Hello Stripe Devs. Can we update the PaymentIntent's " capture_method " through...
#

(or updating it before it's confirmed/authorized if using manual confirmation)

prisma plover
#

I'm getting these errors in the console when I submit a payment shared-1dc0c40cf7d4fb07884881e9ad16afe3.js:1 POST https://api.stripe.com/v1/payment_intents/pi_1JICFwCyXYWYeNtPfDzgcstb/confirm 402 and Failed to load resource: the server responded with a status of 402 () The payments are going through fine in the test dashboard but it's bothering me I am getting these errors in the console. Any ideas what is causing it. The only time it happens is when i use a test card number that returns an error response like "card declined"

sick talon
#

(a 402 is what you would expect when you use a test card that causes the payment to fail)

vocal stump
#

@hollow prairie Roger that

prisma plover
#

@sick talon ah ok, so when a payment is unsuccessful you will receive a HTTP error code in addition to the response with the payment intent and error?

sick talon
vocal wagon
#

Hello Stripe Devs,
Do you know if there's a way to directly create charges and receive funds on a bank account without having the funds stocked for seven days into Stripe ? Thanks a lot

sick talon
# vocal wagon Hello Stripe Devs, Do you know if there's a way to directly create charges and r...

You'd want to talk to the support team via https://support.stripe.com/contact and they can advise on that. Also see https://stripe.com/docs/payouts#standard-payout-timing

vocal stump
#

@hollow prairie But wait. What if I issue a new invoice because the pending_update is applied within 24 hours of a subscription ending? What happens to pending_updates when the subscription changes cycles?

sick talon
vocal stump
#

Uhm, no? Pending updates are for changes to the subscription, not when a new cycle begins? When going to a new cycle, the subscription goes to past_due if the payment fails, but without making changes to pending updates, no?

sick talon
vocal stump
#

So if you have pending updates say 4-5 hours before a sub goes to the next cycle, and that payment fails for whatever reason, then what happens to thos pending updates when the sub goes to the next period?

sick talon
vocal wagon
#

hi, I have a problem with some payments. sometimes 1 cent is missing before the processing fees. can you please explain why ?

vocal stump
#

Yes, that was expected, but what happens to the pending_updates attribute? @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

vocal stump
#

Is it cleared? Because it won't make any sense to apply that when a new cycle has begun, will it?

#

The cycle changes regardless if the payment fails or not

#

it just goes to past_due if it fails

sick talon
vocal stump
#

Okay and that brings me back to my problem

#

Say you create pending updates 4 hours before sub changes, then sub changes, goes to past_due - but now with 2 unpaid invoices. Then after 23 hours I get a subscription.updated webhook that tells me the pending_updates were cleared. How do I know which invoiceE?

sick talon
#

which includes the current period end, as you guessed

#

I'm specifically asking what you meant by specifically updating within the last 24 hours. There won't be any different actions during that time, it's just like any other part of the billing cycle.

vocal stump
#

"This time is set to either the trial end time or the current period end, whichever comes first. If these times are greater than 23 hours from the time the update is made, the expired_at time is calculated to 23 hours after the update call was made."

sick talon
#

Ah ok

vocal stump
#

So that answers the question

#

So I will have a 1 hour window to handle this

#

Given the above example

sick talon
#

Where are you getting that hour from? Do you mean the time between an Invoice being created and finalizing, or something else?

vocal stump
#

Yeah you're right, I will just get a subscription updated event which includes in previous_attributes a non-null pending_update and the new billing cycle?

sick talon
#

You'd want to test your specific scenario in testmode and see exactly what that event contains.

vocal stump
#

and I will, but I like to test out my ideas before I spend time coding them 😄

sick talon
#

You could use the CLI to create the Subscription and its pending updates, then the events will fire on that real timeline.

vocal stump
#

I know. I plan to test it, I was just trying to rubber-duck my way through what might happen

#

It seems this should work though

#

What I was worried about was ending up in a situation where I had two open invoices; one for pending updates and one for a cycle renewal

sick talon
#

Yeah, that's the intention of it expiring when the cycle ends.

vocal stump
#

Makes total sense I had just not seen that. I thought it was 23 hours all the time

tired onyx
#

Hey guys! Creating an auction platform with my team where we'll use stripe as the payment processor, we need a little guidance on setting up the structure of capturing a user's credit card info. Is there a way to validate a user's credit card info when they sign up on the site on the actual registration form?

tired onyx
#

we can't use this because we can't create customer because we haven't user yet

#

we have some other fields on the register form not only credit card and we need to validate all the data first

sick talon
tired onyx
#

checking

#

The problem is every time when guest user opens our site we should init register form with $intent->client_secret and for this we should create customer object. So every time we guest users just open our site we will add new customer object in stripe. Seems it's not good.

sick talon
#

If you do need that single page architecture, just delete the Customers that go unused. There's no harm in having Customers that don't get a payment method attached.

tired onyx
#

Ok. We have 'add card' checkbox on our register form and I can create customer when user checks this checkbox but what if user just leave a page? So sometimes we will get empty not attached customers objects.

fathom quest
#

I tried providing tos_acceptance.date while creating connect account, later I realized it has to be seconds.
It is supposed to be timestamp in second?

I am using javascript, so I believe

const date = Date.now() / 1000;

Is this supposed to be right?

sick talon
fathom quest
#

Alright, thanks for the confirmation

shy estuary
#

So isn't a problem if we will get new customers sometimes that won't be used?

#

It's about shooshtime last question

thin isle
#

@sick talon
Hi, I have a couple of questions regarding custom payment flow.
I can't find a place where I could insert quantity of a sold item(s) in my request to Stripe API

sick talon
sick talon
thin isle
shy estuary
sick talon
shy estuary
#

Ok, thanks

sick talon
thin isle
icy anvil
# thin isle and soooo if I need quantity more than 1, have to do like `amount = bag.price * ...

PaymentIntents is just about collecting money from a user—everything else has to be managed by your own code, so there's complete flexibility, the only thing that matters is the amount you're charging. If you're looking for a more fully-managed experience, you can consider using Stripe Checkout to present a pre-built interface with cart items to the user. There's less flexibility, but it's easier to get up and running

shy estuary
#

One more question. Should I use stripe js library for making HTML elements? We have own design for card inputs. Is it possible to apply custom design through that js lib?

icy anvil
sick talon
shy estuary
#

What If I want validate all register form data first including card and then create user (on our side) and add card as payment method through stripe API? Is it possible? I'm interesting the case when user submits form and card will be validated/added successfully in stripe but other user data will have errors. Should I just show user fields with errors and some info that card was validated/added successfully? And maybe add ability to remove added card here?

icy anvil
sick talon
reef gazelle
#

HI! Currently we're leveraging stripe subscriptions to drive our product. Up until now, we had 1 product, representing the single "plan", which is a single product in Stripe. Our usage calculation is a little more complex than what Stripe supports, so we've been doing it on a separate system and then updating the invoice for each customer at month end.

We're now adding 2 other "tiers" (represented as separate Stripe products) that our customers can switch to mid-month. The problem we're having now, is that when the product switch happens, an invoice for the period that they were on the previous product is generated and finalized immediately. Is there any way I can defer this from happening to the end of the month? We'd ideally like to have a single invoice for all product changes during that period, so we can do our own "pro-ration" calculation of usage on tier x for period y to z, added to the calculation of usage on tier a for period b to c, etc.

sick talon
# reef gazelle HI! Currently we're leveraging stripe subscriptions to drive our product. Up unt...
shy estuary
# sick talon You should disconnect the idea of a Customer (the object in the API) from the ac...

Yep but as I understand it adds credit card to stripe through js api if card will be valid (stripe.confirmCardSetup()). But I want only validate it and then if all data (credit and user) will be fine I will save it (user data into local db and card into stripe). Is it possible? Because If some user data will be invalid and card data will be ok (card will be added) that how can I show card data to user again? What if user wants to change cc data during user data errors checking?

reef gazelle
sick talon
vocal stump
#

@sick talon I have a really hard time testing my problem, because when updating a subscription I cannot set the billing_cycle_anchor to anything but now or unset, which means I can't simulate myself into a situation where:

  1. I have a pending update on a sub, failed due to 3DS or whatever
  2. The sub changes billing cycle within the next reasonable number of minutes/seconds
  • simulating a situation where you create a pending_update less than 23 hours before a sub changes cycle.
#

I tried using trial_end but I can't get it to do what I want

reef gazelle
sick talon
vocal stump
#

I suppose, but that means 24 hours between each attempt. I guess that will have to do though.

sick talon
# shy estuary Yep but as I understand it adds credit card to stripe through js api if card wil...

The nature of entering card details is that you can't arbitrarily retrieve them after you've validated them with Stripe. You need to use Stripe.js to send us the card details and attach the resulting PaymentMethod to a Customer object which validates the card. After that, if you need to discard that PaymentMethod, you can detach it from the Customer. Then you can create and attach a new one if you need to.

sick talon
vocal wagon
#

Hi

#

I need help. Someone online?

#

I work with .net

sick talon
sick talon
sick talon
reef gazelle
#

Cool, I'll play around with this a bit more. Thanks for your help @sick talon

fair geyser
#

Is there a way to get the usage records of a specific metered-billing subscription? For example, if I make usage records for each day, I'd like to get these back for the current billing period.

sick talon
vocal wagon
#

Hey guys, quick question , with the React Native Stripe SDK, is it possible to take a photo of a credit card and get the input immediately into the card field component?

fair geyser
#

This seems to add up all of the values going into an invoice into a summary that has total_usage. I would like each individual usage record for each day. Am I missing something?

sick talon
fair geyser
#

How does the stripe UI get it?

sick talon
sick talon
fair geyser
#

Yes, the dashboard. Ok. thanks. Having this info in the API would be very helpful ... is there a place I can leave feature feedback?

sick talon
#

If it does, great, but it's not a priority as it hasn't been too heavily requested in the past (we do track when folks ask for it).

fair geyser
fair geyser
#

My main fear is that if I push an incorrect usage record, it will be hell to find it (and fix it). I guess it will have to be manual.

vocal wagon
#

Hello, i need a help, for my app i want to save the cards. But for that i need a token id, how to generate the token id , i used to generate it using paymentRequestWithCardForm in tipsi stripe. But i am not understanding how to do it here. Thankyou in advance for any type of help

sick talon
vocal wagon
sick talon
sick talon
vast quest
#

Hi everyone! I was hoping for some assistance with getting an account verified. I'm from ChowNow and we use Stripe as our merchant processor. I have a client who is refusing to give the last four digits of his SSN to get him verified. I have photos of his ID, but Stripe won't let me verify without his SSN. I wanted to see if there was any work arounds for this? Also, couldn't find a support number so that's how I ended up here lol

vocal wagon
sick talon
# vast quest Hi everyone! I was hoping for some assistance with getting an account verified. ...

The support team is who you want via https://support.stripe.com/contact (if you're logged in and it's available in your region, chat/phone support will be an option there)

vast quest
#

amazing, thank you!

sick talon
# vocal wagon thanks a lot, i hope this can be implemented with class component as well instea...

I'm not familiar enough with React Native to know if that's possible, but the underlying documentation is at https://stripe.dev/stripe-react-native/api-reference/interfaces/setupintent.html and https://stripe.dev/stripe-react-native/api-reference/modules.html#confirmsetupintent

ebon tree
#

Hi, does anyone know if the bacs payment page supports a description of the price like on a card payment page?

sick talon
ebon tree
#

@sick talon entering sort, acct number etc

sick talon
ebon tree
#

@sick talon just the default checkout, i'm curious as the default card payment checkout has this information.

sick talon
ebon tree
#

sure. one moment

vocal wagon
#

with what method can I request Stripe whether a payment intend is paid?

#

like, I have the payment intend id pi_1JIF1aLbltT6ZhnQif6uItOt

#

how do I check the status?

#

I use .net

sick talon
vocal wagon
#

Cool, thank you!#

ebon tree
#

@sick talon card payment page

#

@sick talon bacs page

vocal monolith
#

I'm using the stripe node package and want to inspect if a charges.create request is returning an idempotent cached response. The typescript type definitions make it seem like the Stripe.Response<Stripe.Charge> has a headers attribute on it, but the response does not contain the header information.

Is there a way to do this?

dim hearth
ebon tree
#

@dim hearth thanks!

valid torrent
#

Hi! I have a question. I add subscription for product - ID#xxx. Then i add subscription schedule with from_subscription: #xxx, and then i cancel this schedule with prorate:false and create new subscription id#yyy with add_invoice_items: price_id** . Why do stripe create two invoices - first after schedule canceling in status scheduled and second - invoice for payment for subscription id#yyy? Customer id - cus_Jw716AhiQGVx8R

rancid wadi
#

Hi!

I have a question
I'm implementing Strip to React + AWS serverless project.

I'm mainly using this https://stripe.com/docs/checkout/integration-builder as a guide to start.

So I've made an endpoint on my server for this.

I've made a button to go to the Stripe checkout page.
But when I press the button it always tries to go to that specific URL
/create-checkout-session but I always get the cannot POST /create-checkout-session error, which is correct since I don't have made the page. But I thought the prebuilt Strip checkout page would open on the checkout.stripe.com/.. URL and my endpoint was to create the checkout session and then redirect to a success or fail.

<form action="/create-checkout-session" method="POST"> <button type="submit"> Checkout </button> </form>
This is my button, just similar to the Prebuilt Checkout Page sample. When I press it i get the cannot POST error and my network tab shows it trying to load a document.

I'm not sure what is the best way to debug this.
How can I go to the Stripe prebuilt page by pressing this button,

Is it the Stripe session that 'builds' the checkout page?

dim hearth
dim hearth
dim hearth
valid torrent
#

@dim hearth Invoice must not create after schedule canceling. I set prorate:false for it

vocal monolith
vocal monolith
hazy flare
#

Hey all - if I want to create a subscription with a trial (no $ right now), should I do this with a SetupIntent or a PaymentIntent?

dim hearth
dim hearth
# valid torrent <@!845165114360856596> Invoice must not create after schedule canceling. I set p...

Are you cancelling the subscription at a specific date and not at the end of the billing cycle? If so, cancelling a subscription through a schedule like that will ALWAYS generate a proration. The only way to cancel a subscription at an arbitrary time w/o prorations is to cancel the subscription immediately and setting prorate: false (https://stripe.com/docs/api/subscriptions/cancel#cancel_subscription-prorate) or by cancelling the subscription at the period end

vocal monolith
valid torrent
dim hearth
dim hearth
dim hearth
# ebon tree <@845165114360856596> thanks!

For the screenshot you sent over of BACS debit in Checkout, is this in setup or payment mode? When I make a Checkout session in payment mode for bacs I do see price descriptions reflected

dim hearth
valid torrent
#

@dim hearth Thanks a lot for help!)

dim hearth
hazy flare
#

@dim hearth, ah... I see now. And if I want to allow a user to add a payment method that could later be used with a subscription, I should do this with a SetupIntent? Or are Setup and PaymentIntents totally separate from subscription stuff?

valid torrent
#

@dim hearth Its all right, it works!

vocal stump
#

Can I update metadata on a voided invoice?

dim hearth
vocal stump
#

Cool just trying from dash

#

thx

#

It shouldn't be necessary though as a webhook for invoice.voided should only ever arrive once

#

so I might be overengineering this

#

I deduplicate webhooks based on event ID

#

I'm just gonna add it for tracking purposes anyway

dim hearth
vocal stump
#

Is there a way to add/remove balance from a Customer without explicitly setting the value? Thinking if two requests come in a the same time you'd want them both to have effect, not just the latest one.

dim hearth
dim hearth
# vocal stump Is there a way to add/remove balance from a Customer without explicitly setting ...

Typically through the API you're not setting a total balance for the Customer - you would control it through a Customer Balance Transactions that contributes to their total balance (https://stripe.com/docs/api/customer_balance_transactions/create)

hazy flare
#

@dim hearth, ok, so I create a SetupIntent for a subscription that has an initial trial, and a PaymentIntent for a subscription that has no available trial.

vocal stump
#

@dim hearth That sounds like what I should be doing

velvet latch
#

Trying to understand the product object, is the price always going to be null?

  "id": "prod_JrHjqz4O743OfG",
  "object": "product",
  "active": true,
  "created": 1626373184,
  "description": "30 items",
  "identifiers": {},
  "images": [
    "https://files.stripe.com/links/MDB8YWNjdF8xSXVEM25MdUJteU9wbzZSfGZsX3Rlc3RfcHhzR3NJSFlpTkZscnlzYUlzV2piWThy00iN42Slse"
  ],
  "livemode": false,
  "metadata": {},
  "name": "22Cal",
  "package_dimensions": null,
  "price": null,
  "product_class": null,
  "shippable": null,
  "sku": null,
  "statement_descriptor": null,
  "tax_code": null,
  "unit_label": null,
  "updated": 1626373184,
  "url": null
}```
dim hearth
vocal stump
#

@dim hearth I'm using static methods in the Stripe PHP library, but there is no CustomerBalanceTransaction::create(); method as with other resources. Is this intentional or an oversight?

#

I notice the syntax in the docs has changed to using instances of the Stripe client

#

I can do CustomerBalanceTransaction::retrieve('xxyy'); though

hazy flare
#

@dim hearth - thanks so much, sorry, I missed that Subscriptions did this for you.

dim hearth
dim hearth
night kite
#

hallo, is the clientSecret enough to confirm a payment server side?

vocal stump
#

@dim hearth Thanks. There it was.

night kite
#

I am using the flutter_stripe plugin to generate a clientSecret with an apple pay flow

dim hearth
night kite
dim hearth
vocal monolith
#

@dim hearth thanks Karbi. I also see it in my debug logs. I'm going to submit an issue for the node/typescript library about the documentation being incorrect.

One final question: If the response header has an original-request value does that mean it's returning an idempotent response? There is not idempotent-replayed attribute so I'm confused if this is returning an existing idempotent response

dim hearth
ebon tree
dim hearth
night kite
dim hearth
worn oyster
#

Hey Guys, have you ever encountered this issue?
Your platform needs approval for accounts to have requested the transfers capability without the card_payments capability. If you would like to request transfers without card_payments, please contact us via https://support.stripe.com/contact

dim hearth
dim hearth
worn oyster
#

Yes, I've tried but just got the response for waiting..

dim hearth
thin isle
#

@dim hearth
Hi, how can I use data from webhook?
Let's say I want event.data.object.receipt_url on client side?

minor plover
#

Hello, I have a question about payouts.

dim hearth
dim hearth
minor plover
#

Hello, I have a question about payouts. One of my customers made a transaction on 7/27 but when i go to payouts it says 0.00. I'm wondering why is that, when will the payout amount show up?

dim hearth
thin isle
minor plover
#

Thank You

frail basin
#

help please!

#

i have a business, where i charge customers cards over the phone( they give me their card) but one customer is from the USA, i am from UK, it keeps saying card declined is it because my account is in GBP and his currency is USD?

dim hearth
frail basin
#

yes plz add me so i can send u the ifnformation

dim hearth
frail basin
#

can i sen you the invoice number?

#

its draft

dim hearth
frail basin
#

how do i find that

#

in_1JIGrPE4L67ugHJvx6fdEWfd

#

this?

dim hearth
frail basin
#

ok great i was testing paymnet for him cuz ive never received usd before

#

but it got declined(also his card is from USA and USD , but i was charging in GBP from the UK)

thin isle
#

@dim hearth
Because the only place where I can see this receipt is in the server console.
Right after webhook was fired...
And so I can't figure it out how can I get this receipt again

dim hearth
dim hearth
vestal trench
#

Good morning! I am having some problems trying to apply coupons when creating an Invoice. I tried the following Stripe::Invoice.create({ customer: customer_id, discounts: [{ coupon: coupon_id }] }) only to receive an error that says NoMethodError: undefined method 'keys' for nil:NilClass. Is anybody able to point out my mistake here? Thanks!

silk salmon
frail basin
#

karbi is there a way to make sure this doesnt happen again in the future and all my usa customers do not get declined ?

#

because i dont know if this is gonna keep happening for each of my customers

dim hearth
# frail basin karbi is there a way to make sure this doesnt happen again in the future and all...

This is not related to the country or currency at all, it's something specific for that cardholder. If you see it happening repeatedly, you should contact support (https://support.stripe.com/contact) and they can take a deeper look

sage burrow
#

I don't have access to dashboard. I do have the public and private keys. Can I access the details of a request through the api? Otherwise is there a way to have limited access to dashboard so that I can see request details without seeing the client's financial information

frail basin
#

ok thanks

#

is it because the name i put was 'test'?

dim hearth
frail basin
#

does it have to match the account owner

dim hearth
frail basin
#

ok thanks

dim hearth
thin isle
sage burrow
#

@dim hearth I am using php I know how to get the reuest id $customer->getLastResponse()->headers["Request-Id"]. I am not sure how to get all the request details. Can you show me how?

frail basin
#

We ran into some issues verifying your account details. Please correct the following items. Otherwise, payouts or charges could be paused.

dim hearth
frail basin
#

@dim hearth could it be this why i got payment declined from him? We ran into some issues verifying your account details. Please correct the following items. Otherwise, payouts or charges could be paused.

dim hearth
sage burrow
#

@dim hearth makes sense. Is there a way to have reuest's details. A request that was made yesterday?

dim hearth
sage burrow
#

@dim hearth 👍

dim hearth
rough finch
#

Please, help, I think I've done everything I can, but I cannot get statement_descriptors on subscriptions to show the proper Connected account, even when using on_behalf_of.

sage burrow
#

@dim hearth ho about the other option. Is there a way to get access developer access to dashboard so that I see past requests details without having access to the client's financial info?

dim hearth
rough finch
dim hearth
sage burrow
#

@dim hearth awesome! Thanks!

thin isle
dim hearth
# sage burrow <@845165114360856596> awesome! Thanks!

So did a quick test - Developer access will allow you access to general account information (business address, website, things like that), but won't give access to any of the payouts/bank accounts scheduling. Will that work?

dim hearth
vestal trench
#

Good morning! I asked before, but there was some intense conversations going on. I am having some problems trying to apply coupons when creating an Invoice. I tried the following Stripe::Invoice.create({ customer: customer_id, discounts: [{ coupon: coupon_id }] }) only to receive an error that says NoMethodError: undefined method 'keys' for nil:NilClass. Is anybody able to point out my mistake here? Thanks!

sage burrow
#

@dim hearth, Yes as long as I have no access to sensitive info ...

frail basin
#

@dim hearth hey hes saying that everytime the charge is from a different currency his bank usually declines

silk salmon
dim hearth
#

@rough finch That particular subscription wasn't created with setting on_behalf_of. Is that intentional? Or did you send over the wrong subscription?

thin isle
vestal trench
#

and nvm looks like this is an error on my end somewhere. It is definitely creating the invoice with the coupon

dim hearth
pulsar loom
#

hello, I'm wondering if its possible to move a card from one customer to another across accounts. Thanks in advance.

rough finch
little bone
#

Hey, do you have any advice around using old Stripe API versions? We're currently on 2019-05-16 and intend to stay on this for the next few months until we move to go modules (as per your recommendation in the docs). Is there anything we should be aware of in using this API version for a single platform standard connect integration?

frail basin
#

@dim hearth how does stripe even know what your website is from the website link you provide?

dim hearth
dim hearth
dim hearth
dim hearth
rough finch
dim hearth
dim hearth
pulsar loom
little bone
dim hearth
thin isle
rough finch
pulsar loom
dim hearth
dim hearth
# thin isle Sorry but I can't see receipt in there...

Shoot - that's my mistake again. There's so many people in here right now I'm mixing things up. The receipt_url lives on the Charge object, not the Payment Intent. My suggestion is to add an endpoint to your backend that takes in a Payment Intent ID, retrieves the associated Charge, and then responds with the receipt_url. You would make that request from your frontend after confirming the payment intent. Does that make sense?

frail basin
#

what about my question i asked before all thesep

#

peopl

#

@dim hearth

frail basin
rustic dirge
#

Does anyone have a resource for best practices on if a subscription price needs to change after someone has subscribed to it? For example, Subscription A is $10/month and next year, the client decides they want offer that subscription at $15/month. It looks like it's not possible to update a subscription that has already been subscribed to ...

dim hearth
# frail basin this

I don't have a lot of insight into how the onboarding process works/what goes into checking every account. I really would recommend you contact support for your questions - this channel is focused on technical questions about using Stripe's API, and we're not equipped to answer questions about accounts/declines

thin isle
frail basin
#

@dim hearth you know my secret key and publishable key, can i use these keys on multiple domains even though its different to boarding url?

thin isle
#

@dim hearth
Will stripe automatically send an email receipt to a customer?

dim hearth
dim hearth
frail basin
#

is there live support

#

on stripe

#

because the website email support is so slow

dim hearth
dim hearth
thin isle
dim hearth
thin isle
#

@dim hearth
And why is it so ugly? Can I customize it?

dim hearth
rustic dirge
frail basin
#

@thin isle is that on your website?

thin isle
rustic dirge
dim hearth
# thin isle <@!845165114360856596> And why is it so ugly? Can I customize it?

You can disable collecting the postal code with the card element by setting hidePostalCode https://stripe.com/docs/js/elements_object/create_element?type=card#elements_create-options-hidePostalCode

You can also customize the style of the element: https://stripe.com/docs/js/elements_object/create_element?type=card#elements_create-options-style

dim hearth
rustic dirge
lyric night
#

Hi, I am hoping to get some info about Stripe connect.

  1. What is the payout cadence of Stripe Connect? Can we use stripe connect to support daily (or more frequent) payouts to merchants?
  2. What does stripe connect pricing typically look like if we are already using several other stripe services?
dim hearth
fast mantle
# lyric night Hi, I am hoping to get some info about Stripe connect. 1) What is the payout cad...
  1. For Express and Custom, yes. You can set the payout schedule with the settings hash on the account in the API: https://stripe.com/docs/api/accounts/object#account_object-settings-payouts-schedule
  2. The full pricing is here: https://stripe.com/connect/pricing

Stripe Connect is everything marketplaces and platforms need to get users paid. Connect helps marketplaces like Kickstarter, Postmates, Instacart get sellers, crowdfunders, contractors, drivers, handymen paid. Connect works internationally and even helps generate 1099-Ks.

solemn pawn
dim hearth
solemn pawn
#

but i have to much balance in my test account

rustic dirge
# rustic dirge Blerg. Okay.

So the flow would be:

  1. Client requests a price update
  2. I create an update price as per the Upgrade/Downgrade docs
  3. We choose to prorate it or not
  4. I find every customer that has signed up to that sub and manually swap them to the new plan, which will start upon renewal of their period end date.

Does that all sound accurate?

dim hearth
#

@solemn pawn Also can you send over the request ID

solemn pawn
dim hearth
rustic dirge
dim hearth
dim hearth
# solemn pawn https://www.screencast.com/t/ViYKTvXdIy this my code

Yeah the issue is that you're specifying source_type: bank_account when creating the payout, but you have not balance of that type. If you look at a recent balance.available event like evt_1JI9xsPuh7WLCm7fPOD3FOyC you only have balance of the 'card' type, not 'bank_account`

dim hearth
jaunty wind
#

Can anyone help with this issue. Subscription via WooCommerce - card was declined so customer added a new one and then we tried to push through the renewal again btu get this error.

mighty hill
#

@jaunty wind Hello! I can tell you why that error happened (WooCommerce attempted to use a Payment Method not attached to a Customer twice), but I can't tell you why WooCommerce tried to do that. I recommend you reach out to WooCommerce support for help.

jaunty wind
#

What do you mean, the payment method is not attached to the customer?

#

It shows in their account

mighty hill
#

@jaunty wind It's not attached to the Customer inside Stripe.

jaunty wind
#

It is though

mighty hill
#

@jaunty wind I can't speak to what WooCommerce is displaying as we (Stripe) don't own or control that code.

#

@jaunty wind Do you have the Payment Method ID?

jaunty wind
#

where would that be

mighty hill
#

@jaunty wind It would start with pm_

#

@jaunty wind I don't know where it would be in WooCommerce.

#

@jaunty wind To be clear, we are not WooCommerce support and cannot help with WooCommerce itself. We can only help with Stripe.

jaunty wind
#

Of course

#

customer added a new card in her account on woocommerce

#

and it shows this in stripe

mighty hill
#

@jaunty wind Can you share the Stripe Payment Method ID or the Stripe Customer ID?

jaunty wind
#

Sent it to you

mighty hill
#

@jaunty wind Sent it to me? What do you mean?

jaunty wind
#

I DM'd you the customer id

mighty hill
#

@jaunty wind I have DMs disabled; it shouldn't be possible to send me a DM.

jaunty wind
#

cus_J4aXrpmNDvCEqk

mighty hill
#

@jaunty wind Thanks! Taking a look...

#

@jaunty wind Have you only seen this error with one customer or with multiple customers?

jaunty wind
#

Just this one

mighty hill
#

@jaunty wind After that WooCommerce attempted to use it, but doing so failed because it was detached. Detached Payment Methods can no longer be used.

jaunty wind
#

The card is in the customers account though?

mighty hill
#

@jaunty wind Not anymore, it was removed from their account.

#

@jaunty wind WooCommerce detached it using the request linked above.

jaunty wind
#

It shows in their account

mighty hill
#

@jaunty wind Yeah, again, I cannot speak to what WooCommerce is showing you. It sounds like WooCommerce is showing you the wrong thing, as the Payment Method was clearly detached from the Customer by WooCommerce.

#

@jaunty wind I recommend you reach out to WooCommerce support and ask them what WooCommerce is doing, why it's doing it, and why it's showing you what you're seeing.

jaunty wind
mighty hill
#

@jaunty wind Ah, okay, so it looks like WooCommerce switched them to a new Payment Method.

jaunty wind
#

Yeah cause the customer removed the old card and added a new one

mighty hill
#

@jaunty wind You are able to see these logs I'm linking to, right?

jaunty wind
#

So remove the old order

#

and put through as an ew order perhaps

mighty hill
#

@jaunty wind Just so I understand, why are you asking about WooCommerce here when we can't help with it? Why not reach out to WooCommerce support?

#

@jaunty wind Don't get me wrong, I want to help if I can, but asking us to help with WooCommerce is like taking your Apple laptop to a Microsoft store and asking them to fix it. 🙂

jaunty wind
#

No worries

#

thanks

#

Good to know this Discord exists though!

granite star
# dim hearth Unfortunately, I can't do anything to help on my end (we don't deal with account...

Hey Karbi. My name is Jonnie (aka Dash#3448). I'm the employer working with devs @worn oyster and @silk salmon. Thanks for your reply on this. I hear what you're saying regarding account-specific issues like this - please allow me to explain. We've been struggling for weeks now to get a resolution to this issue through the usual channels, which has now become an urgent issue for our business, as we have teachers who are now long overdue to be paid out. We've also had, to put it mildly, some difficulty in the past 6 months connecting with support agents who actually understand the issues we are dealing with. Yesterday I spoke with a premium support salesperson Gifford Delle who apologized for this situation and invited us to this discord for the specific purpose of helping us resolve the connected account payout issue that is in front of us right now. We urgently need your help to resolve this issue to get our teachers paid The traditional channels are not working. We've been waiting for more than a few days, with no reply, and no indication that we will receive a reply. Meanwhile we are in danger of this issue causing harm to the business because our teachers are not being paid. Can we please talk with you about what we're experiencing and see if there's any light you can shed on the matter? It's not necessarily account-specific so much as a global issue with how this is even done. One way or another, we need some help. Thank you!

slow sorrel
#

Hello. If we integrate Stripe and Calendly, would we be able to use an affiliate link or discount code if someone signs up for a specific event?

Ex: We have a webinar. Jay (3rd party) is promoting our webinar. Can we give Jay a specific link so that her customers would get a discount and Jay would get a % of the sale if they buy through that link?

icy anvil
daring lodge
daring lodge
granite star
granite star
granite star
silk salmon
#

Hey @daring lodge @granite star is correct, we don't seem to have a way to enable it on our side. It should be a trivial thing to do, but we're not seeing a way to do it

wheat aspen
#

Hi folks 👋 . I'm doing a gem upgrade and in doing so updating from 2019-02-11 to 2020-08-27. I'm finding that there's a difference preventing the creation of a subscription on a plan with a trial when there's no payment method. I could do this before no problem. Now however I'm getting a SetupIntent with a status of requires_payment_method despite there being a trial on the plan.

#

The subscription gets created, but my library validates the SetupIntent, which raises an error if is has the status requires_payment_method with no payment method present.

silk salmon
#

@daring lodge to give additional context, the issue we're having is related to sending payment to accounts located in France. It looks like we need those accounts to be recipient accounts, but all accounts connected to our stipe are full accounts. So every time we call the create stripe account API, it fails and we get an error that looks like, stripe.error.InvalidRequestError: Request req_UU1EF4qjgT2EEA: Your platform needs approval for accounts to have requested the transferscapability without thecard_payments capability. If you would like to request transfers without card_payments, please contact us via https://support.stripe.com/contact.

#

Furthermore, there doesn't seem to be a way to change them through the dashboard

daring lodge
silk salmon
#

@daring lodge so we need to wait until they get back to us? We've been trying to escalate this in any way we can, as @granite star mentioned. And we can't get our teachers paid until this is resolved 😕

daring lodge
daring lodge
granite star
daring lodge
wheat aspen
#

Can that status on the SetupIntent be safely ignored if the subscription is trialing?

daring lodge
wheat aspen
daring lodge
#

Can you share a link to the code you're using / looking at? I am curious what it is trying to do by default

craggy shoal
#

Hi there ! I'm using the API, and since one month i've added a trial mode. But since one month, i also noticed many failed payments after the trial ends ("do_not_honor", "insufisant founds", etc etc), and many of them are from the "Revolut" bank. Is there someone in there who got the same problem ? Is there some specific stuff to do with API ?
Thank you all

mighty hill
#

@craggy shoal Hello! I wish I could help, but this chat is focused on developers and technical questions; we can't help with decline issues here. Our support team will be able to assist you better than we can: https://support.stripe.com/contact/email

craggy shoal
#

Arf, Ok. I just went there, but i didn't get a "helpful" help unfortunately, that's why i would like to know if it was a technical problem

daring lodge
proven cape
#

Getting so frustrated. Who can help me?

old cypress
#

Hello! When a subscription is created with a product that has a trial period, does the field current_period_end get automatically populated with the trial end date?

proven cape
#

I need to contact stripe yet it says 1-3 days to verify my account and they stopped sending my payments so now i have $0.

#

Should i switch to a different company? This is ridiculous.

crimson needle
#

@proven cape this Discord server is for developers with questions about their own code/integration. We can't help with account specific asks. I understand you're frustrated but talking to our support team is the best path forward

proven cape
#

What if i cant even get ahold of them?

crimson needle
proven cape
#

Im trying to sign in but do not the know 6 digit code.

crimson needle
#

@craggy shoal it's unlikely to be a technical issue and more that this bank declines the charges for your account. Talking to our support team and providing example charge ids will allow them to loog into this with you

#

@old cypress hello! Yes it should assuming the trial is applied. We usually recommned not using trials on a given Product. Instead, set the trial explicitly on Subscription creation via trial_period_days

proven cape
#

Where can i get my two step code? Tried to sign in a different way but says 1-3 days. I dont have that time.

craggy shoal
old cypress
crimson needle
#

@old cypress I recomment against a fallback. Our API basically ignores default trial on the Product/Price unless you explicitly set trial_from_plan: true on Subscription creation (as of a few years ago)

old cypress
craggy shoal
crimson needle
#

Sorry I can't help much more with account-specific declines here 😦

#

you should have your customers push on their bank (Revolut) to explain/justify the declines

craggy shoal
#

Yes

drifting gorge
#

Hi, please can someone guide me with the correct syntax to create a new customer with an address... here is my code

var options = new CustomerCreateOptions
{
Description = accountNo,
Email = slEmail,
Name = name,
Address = new AddressOptions
{
City = address[3].ToString(),
Line1 = address[0].ToString(),
Line2 = address[1].ToString(),
PostalCode = postcode.ToString(),
State = address[4].ToString()
}
};

But i get the error address[] was null even though I have populated an array called address[]

brave magnet
#

Hi, I've been working with the Stripe checkout-single-subscription (https://github.com/stripe-samples/checkout-single-subscription) project to create a simple checkout page for a product I am working on. At the moment, I am presented with an initial "Select Plan" page, which I want to get rid of. I want the end user to head directly to the checkout page. Is there any way to change this workflow? I noticed much of the code is hidden and not accessible by developers for this project and was wondering if there were any workarounds for this.

crimson needle
#

@drifting gorge can you be more specific about the error? What is throwing what exact error?

#

@brave magnet what do you mean by the code is "hidden"? All the code is available on that github repo. You can change and tweak anything you want in it.
And you would change the implementation to remove the client-side step to select the Price and instead create a Checkout Session for the right Price and then directly redirect to the URL for that Session which is available in the url property in the response

drifting gorge
#

This is how it appears. I don't know what it thinks is null...

crimson needle
crimson needle
opal ibex
#

Hi! I've got two platforms on the same site, both using connect to onboard standard accounts. Is it possible to create a SetupIntent & PaymentMethod with Platform A, then use the PaymentMethod to create a PaymentIntent for a standard account under Platform B?

wooden lake
#

Hello all! When attempting to create an order (stripe.Order.create) in the test/dev environment, I receive the error stripe.error.CardError: Request ************: Order creation failed while contacting the provider. However, if I remove “country” from the “shipping” parameter (shipping.country), the order creates successfully. I would remove the shipping param completely, but there are some products that are "shippable". The test customer has the test card 4242…..4242 associated with it.
This is not a problem in production, just in development. (I should also say I just learned the Orders API is deprecated, not sure if that is related to my problem...) Anyone have any insight regarding this?

old cypress
#

@crimson needle so I can explain to my team, can you please share where I might get into trouble by using the trial period from a price object, rather than setting on a subscription explicitly on create?

wooden lake
#

Oops sorry @opal ibex , didn't mean to send that yet and step on toes

drifting gorge
crimson needle
# opal ibex Hi! I've got two platforms on the same site, both using connect to onboard stand...

It's possible but it would be really complex. At a high level you'd have to basically collect/store the info in platform A. Then you'd clone the PaymentMethod to the platform B via https://stripe.com/docs/payments/payment-methods/connect and then you'd use the API keys of platform B to then clone again onto the connected Standard account under Platform B
And you'll have to have connected Platform B to platform A via OAuth.

So while it's possible, it's fairly uncommon and not something I'd recommend

crimson needle
opal ibex
#

thanks @crimson needle , is it possible to have the platforms connected for us via customer service?

wooden lake
crimson needle
# old cypress <@!845112453587271710> so I can explain to my team, can you please share where I...

It's not about "getting in trouble". It's about the fact that we ignore default trials entirely and have for multiple years (since https://stripe.com/docs/upgrades#2018-05-21). So you can put a trial on a Product and then you create a Subscription and the trial is ignored and you're confused by why until you discover that trial_from_plan: true. We discourage this pattern and recommend setting the trial on a per subscription basis

crimson needle
crimson needle
crimson needle
crimson needle
#

thanks let me see what I can find

#

@wooden lake okay so with your implementation of Orders, we call a "callback" on your server and we send all details about the Order and you respond with tax details. That's calculation your own server/code does
Right now the request that errors we basically send you all the details and your own code crashes and respond with a generic 500 error. That's why we're returning an error
You likely want to look into your own logs for those callback requests to figure out why you crash with the country

wooden lake
#

Ok! Thanks for a nudge in the right direction @crimson needle . I'll do some snooping in the logs and see what I can find.

crimson needle
#

Sounds good!

rustic dirge
#

General dev question: is this an appropriate place to ask WP Full Stripe API integration questions as well?

crimson needle
#

@rustic dirge we're unlikely to be able to answer as the plugin is built by third-party developers that are not in this server. You can always ask in case there are other users of that plugin but you would get more luck contacting their support team directly

rustic dirge
weak briar
#

Not sure exactly if this is dev help but is the list of requirements to make Google Pay show up during checkout available anywhere? I have customers from Germany that don't have credit cards and I'm not sure if it's possible for them to pay with Google/Apple pay.

opal ibex
winged cipher
#

Is this the right place to ask - are there any api/services available for card issuers like Chase to directly provision their card into a merchant's wallet for a particular customer? This merchant is using Stripe. For eg if Wells Fargo just issued a new credit card to a customer, then WellsFargo wants to add that credit card into same user's Lyft account. Lyft is using Stripe for payment processing.

crimson needle
opal ibex
crimson needle
#

That is... not a thing

opal ibex
# crimson needle That is... not a thing

ok, another quote "once you onboard a platform-profiled account to a different platform, it wouldn't be able to cater to its own connected account. You can, however, still onboard connected accounts to the NA account."

#

NA account being the Platform A

crimson needle
#

yeah but that's just wrong/incorrect information 😦

#

I'm sorry for the confusion. You're trying to do something quite advanced/uncommon and the person you are talking to seems confused. I'd recommend to ask that they escalate to email

opal ibex
#

ok thanks @crimson needle, will do

brave magnet
crimson needle
vestal trench
#

good afternoon! I am using the ruby gem to create some discounts on an invoice. When I create the invoice it does create it, and it correctly applies the discount, however, from there I get an error returning from the gem. Would someone be able to take a look at my request and see what im doing wrong?

tawny flower
atomic locust
#

checkout session. Are any of the API parameters related to what is actually shown on the checkout screen?

#

for example, can the customer's name or any other information be displayed in checkout?

crimson needle
atomic locust
slate elbow
#

how exactly would i send a custom trial ending email 7 days before the trial ends? the customer.subscription.trial_will_end event is fired 3 days before it ends, but VISA requires me to give 7 days of notice before a trial ends

atomic locust
#

The example I found shows some parameters for product_data which seem to be reflected on the page. So that is why I am asking to determine what can be passed that is displayed on the page

crimson needle
#

@atomic locust gotcha, then no all the customer details won't be reflected on the page itself

atomic locust
#

Also, can the email address be prefilled or do they have to enter that each time?

crimson needle
#

customer_email can be used to pre-fill the email

atomic locust
#

If they payment each time will be the same, is there a way to keep a record?

crimson needle
#

And really I don't know how to answer your question other than "try it" unfortunately. We don't have that kind of granular explanation

atomic locust
#

Is there any way to show payment history?

crimson needle
#

Depends 😅

atomic locust
#

Ok. Let's say the customer is required to pay a fixed amount on a routine basis. Is there an ability for auto pay, or would the customer be required to manually submit the payment each time? Also, is there the ability to do an ACH (like direct draw from bank account) payment instead of a credit card?

meager oasis
#

question about stripe

#

I'm literally in front of my customer rn

#

rather than sending him an email to add his payment details to a subscription, is it okay and/or allowed to add a payment method on my end with him present?

#

terminal doesn't offer storing the card for later in canada

crimson needle
#

@atomic locust Yes we support recurring payments via our Billing product which is fully compatible with Checkout
We do support ACH Debit https://stripe.com/docs/ach but that one doesn't work with Checkout so you'll have to build your own integration instead

#

@meager oasis you mean manually in the Dashboard? I assume so

meager oasis
#

the feature is there

#

stripe just gives people the business (and not the good kind) for using stripe as a virtual terminal

atomic locust
#

Is that related to subscriptions?

crimson needle
#

yes it's related to subscriptions

atomic locust
#

Is there any code examples for that?

crimson needle
meager oasis
#

okay so doing it once is fine

shadow cobalt
#

Hi, when using instant payouts for connect accounts is it possible to increase the 1% charge in a similar manner to application fees?

atomic locust
crimson needle
#

@atomic locust yes, you'd add a line item to the Session that isn't a recurring Price

atomic locust
crimson needle
#

@atomic locust I'm not sure what that means exactly but going to go with yes

atomic locust
crimson needle
#

You might be better off testing a lot of this yourself via t the API right now to familiarize yourself with the product. A lot of this is covered in details in our docs and would make a lot more sense as you read through those end to end

atomic locust
shadow cobalt
#

@crimson needle I got this in the email so just wondering what they meant and method: "Stripe charges 100bps on Instant Payouts. As the platform, you will have the ability to set the fee per payout amount. "

atomic locust
crimson needle
crimson needle
atomic locust
shadow cobalt
#

No worries - thanks for you help

crimson needle
#

I'm flagging internally too, that sentence seems incorrect to me

#

@atomic locust yes!

atomic locust
crimson needle
#

Sure thing!

shadow cobalt
crimson needle
#

@shadow cobalt okay they confirmed what they meant: you can debit their balance with Account Debit for example, or transfer less into their account if you use SC&T

shadow cobalt
#

SC&T?

#

And account debits incur further charges right?

crimson needle
vocal stump
#

When I pull an invoice using Subscription::all with [stripe_account => 'acc_xxx'] and I do expand => ['latest_invoice'] and then change that invoice and call ->save(); on the object, it appears to have lost its Connect context and gives me a "no such invoice" error. If I do Invoice::update() on that same Invoice ID passing the stripe_account header again, it does work.