#dev-help
1 messages · Page 132 of 1
endpointSecret is correct and corresponding to what i have on my stripe dashboard
If you log request.body do you get JSON or a javascript buffer object?
I have no other occurence :/
i'll try right now
Do you have an idea why it would stop working out of nowhere ?
That's what I'm trying to determine 🙂
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 ?
Let's start with the basics, how are you triggering an event? Via your code or via the Stripe CLI?
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
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>
{
"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
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
If you need JSON parsing for other routes, then you need to define it so that it skips this particular route. Here's an example on how to do that: https://github.com/stripe/stripe-node/blob/master/examples/webhook-signing/node-express/express.js#L9-L16
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
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
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
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
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
@sage burrow hello! could you elaborate a bit more on where the 5 cents is coming from?
@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
hello @hollow nebula , yes in the case of invoice.payment_failed the due_date will be null
@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.
@sage burrow when an invoice is paid, the starting balance owed/due to the customer is included with the invoice
hey all
@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.
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
@sage burrow I'd start by looking at the events relating to that customer, to track why they had a $0.05 balance
I feel like I'm missing something obvious
@golden cosmos How can I get the date that the payment should have been made?
@stark tide how can I get events for a customer. This does not work https://api.stripe.com/v1/events?customer=cus_JuPxXndbIoXTlt
@sage burrow you can view this here : https://dashboard.stripe.com/test/customers/cus_JuPxXndbIoXTlt/balance_transactions
@vocal wagon if you're using checkout, you'd get the line items (and the product) from the checkout_session events
@stark tide is correct and this customer had a negative balance of 5 cents before the invoice was created
@golden cosmos I don't have access to dashboard but I do have the api keys so can check through the api
@stark tide Thanks.. but I don't seem to be getting the line items in the checkout_session event
ah, sorry - I forgot that you need to expand the line_items prop https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-line_items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
you'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
thanks
np
@golden cosmos they shouldn't have a negative balance because they paid before the trial expires.
@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.
@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
@sage burrow you should be able to list the CustomerBalanceTransactions for that customer to find out what created the $0.05 balance
@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
@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.
@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
@vocal wagon do you have a reference request ID?
where would i find that?
@vocal wagon you can get that from https://stripe.com/docs/api/request_ids
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
@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?
sorry about that, i misunderstood your original question and my answer was incorrect. To clarify, because your collection_method was set to charge _automatically [0], the due_date is always null
[0] https://stripe.com/docs/api/invoices/create#create_invoice-collection_method
@stark tide req_iwhEeP45QjXN5t
You would want to disable prorations when switching plans : https://stripe.com/docs/api/subscriptions/update#update_subscription-proration_behavior
@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
@stark tide sorry, let me check again
@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?
@golden cosmos I thought I am already doing that but maybe there is a bug in my code. Thanks!
yep! you can!
@stark tide OK, its: req_Jovdh4SLJyRUM0
@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?
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
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
There is, but it's not well explained
You'd do:
\Stripe\Checkout\Session::retrieve([
'id' => $event->data->object->id,
'expand'=>['line_items']
]);
@bleak breach thanks
laters guys
widgets to sell, and all that
thanks @stark tide @bleak breach
Is there a way to speed up the time needed for a payment to show in the test environment?
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?
As in bypassing your pending balance and going directly to your available balance? Yes there's a test card for that: https://stripe.com/docs/testing#cards-responses
Learn about the different methods to test your integration before going live.
No, the customer (or you) has to explicitly update the subscription to set a new default payment method
@bleak breach Thanks 🙏
@Paul, Awesome! Thanks!
@vocal wagonl I am not sure what I am doing wrong or maybe it is some setting in dashboard that I don't have access to. Can you please check this one https://api.stripe.com/v1/invoices?customer=cus_JvvL5aRGpDwXUo https://api.stripe.com/v1/invoices/upcoming?customer=cus_JvvL5aRGpDwXUo
As you can see the charge still doesn't show and the invoice is still only showing in upcoming
Those are links to api.stripe.com, did you mean to send a request ID instead?
@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
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
@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.
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
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
How 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.
If you don't provide a customer ID when creating a session, Checkout will automatically create a new customer for you: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
@vocal 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.
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
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Alternatively you can create a subscription without a trial period, in which case the first invoice will immediately be created, finalized and paid.
@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?
Sure, if you don't mind sharing what the original issue was
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.
Ah yes I saw that, which parameter was that?
@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!
I think it's more related to what type of proration behaviour you were passing in
@bleak breach judging by the upcoming invoice amount it i not there anymore
but if it works the way you want it to then great!
@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'
Is this still the proper way to use Tax ID Collection?
It's probably easier for you to confirm yourself. If the upcoming invoice is the amount you expect it to be then that means it's works
Yup
@awesome! thank you! You guys are the best support team!
It's throwing an error; even when I copy and paste it.
What's the error?
Also is this for a new customer or an existing customer?
New Customer;
and lemme grab the error
The period is triggering it.
The one between collection and enabled
This is the correct syntax:
tax_id_collection: {
enabled: true,
},
Learn how to collect VAT and other customer tax IDs with Checkout.
Ah; thanks.
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?
Yes I believe so, you can create rules that combine the destination and either declines_per_card_number_daily or declines_per_card_number_hourly attributes: https://stripe.com/docs/radar/rules/reference
Learn more about the structure of rules and the order in which Radar processes them.
@bleak breach it still doesn't work
@sage burrow Are you setting proration_behavior to none?
Yes I do Unless I have some bug in the code ... I cannot find a past request id without having access to dashboard, right?
You can get the latest response via the API: https://stripe.com/docs/api/request_ids
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
@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?
No, it's still because when you switched plans on the subscription a proration was created for $0.03:
Unused time on Basic Bundle Yearly Default Plan (900 bookings per year) after 28 Jul 2021
@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
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?
@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?
@bleak breach Something like this: https://api.stripe.com/v1/requestids/req_aj1UOHdA2fNdXM ?
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?
@dense rover you man a daily subscription where a certain amount is charged to the user everyday?
@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
Yes you can. all you need to do is subscribe them to a plan (price) with a daily interval https://stripe.com/docs/api/plans/object#plan_object-interval
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
@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?
it depends on user, if he solves the problem of the day, just one day or it could be in series)
@dense rover I am not sure. I came here to ask for help too. Maybe it is better to wait for stripe official staff
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.
@dense rover It seems that there a way to pause subscriptions https://support.stripe.com/questions/how-to-pause-or-cancel-subscriptions
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
ok, but at the charging time, the user have to confirm the payment ? or it will be without it ?
@dense rover no stripe keeps the card on file. You have to choose charge_automatically for billing
What he said I believe is correct; but it’s better to double check with Support.
or probably someone here
@dense rover I agree with @smoky ledge
which solution do you mean? or both of them?)
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
hi @dense rover let me see if I can help
@dry hatch when you finish I need help too
krm I can help with your question
In order to see the details, you will have to login to your dashboard and view it
There is no way to retrieve it from API
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
And since you initiated the request, you should know the request content.
@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
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
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
@lucid raft yes I know the content but now i am doubting. Can you check if I sent proration none?
can anyone help me with that
What validation you are referring to? and you mean you are using Google Pay?
Yes google pay
@sage burrow do you have access to your dashboard?
@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
@sage burrow yup, it is correct, it is set to none
@wsm awesome! thank you for confirming that!
@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 ?
@wsm I know but several stripe agents here told me I am not sending it
Like in name field these are accepting the special character thoguh payment is not prcoessing I want disable the these kind of special characters...So like that I want to add some validations can I ?
@wsm do you wanna look at my original issue maybe?
@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 ?
for now looking for solution,
User add card
Then confirm if he didn't do task during the period EVERYDAY, he will be charged fixed amount of money
Error is not coming I just want to add some custom validations So that user can stop there only... Payment is not processing only I don't customer should suffer this much that's what my concern
@lucid raft sure. But I am confused now because the last charge doesn't have the same issue
You would want to create a normal Subscription anyway. Then in each day when you detect that he completed the task, you can offer that day for free with the resume on next day: https://stripe.com/docs/billing/subscriptions/pause#free
@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?
thank you, one more question)
for example user has been charged N days, then last 7 days he completed the task, and as a reward he should get N*0.2% charged amount of money, is there any ready solutions? 😅
or maybe in third party services as Backendless etc
Those charges in first N days are final. You can consider creating a Coupon for him to use next time https://stripe.com/docs/payments/checkout/discounts#coupons
@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?
stepping in for wsw since he's away for a bit! give me a while to look into this particular charge
@golden cosmos Awesome! Thank you!
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
Can you give me full account_id? (those starts with acct_)
@sage burrow It's a similar issue to the $0.05 issue you raised earlier.
‘acct_1GENjnGtsNmzQCqS’ @dry hatch
@golden cosmos correct and I just confirmed with @lucid raft that I am sending the parameter to tell stripe i don't want prorations
hmmm, to confirm the steps you took, you created a subscription, then cancelled it saying you don't want any prorations is that right?
what if I will send the money as Refund?
@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
looking into it!
You will need a specific PaymentIntent to create a Refund. Which day would you choose? And if that days' amount can't cover the refund amount then you can't do it. Also refund lated to your current balance and bank account https://stripe.com/docs/refunds. I would suggest to use Coupon instead as it fits better for what you want to do
ok, then it mean that coupons can be used only in my Application? if yes, this solution not suitable(
@golden cosmos the roblem is still there I just got a new charge ch_0JI63HtC5CmKO3CdaddDjZAT
Only within your Stripe account, yes
@golden cosmos and for some reason the one after it has the right amount ch_0JI65BtC5CmKO3CdtlhxzJyd
@golden cosmos I am going crazy 😩
sorry, give me a while more, subscriptions are complicated
@golden cosmos I know! Of course , take your time!
Can I know what's the issue here?
And how to resolve it?
@dry hatch @golden cosmos
Hi, I am checking your request. Do you have access to Dashboard? Are you using a restricted key?
No, i don't have access to dashboard @dry hatch
I think I have found it. In your request your developer are creating a bank account on your own account. Your developer must specify a Custom account instead: https://stripe.com/docs/api/external_account_bank_accounts/create?lang=ruby
@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!
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.
@sage burrow to add on, when you reset the billing anchor, it will trigger an invoice : https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#immediate-payment
Hello, is there a way I can change the billing date (like 2 minutes after now) of a subscription, so that I can test invoice.payment_failed event? I am using 4000000000000341 test card from https://gist.github.com/rymawby/9b904feec040b25a8034.
hello @hollow nebula! you could update the subscription's billing_cycle_anchor [0] . Or you could also use the Stripe CLI to trigger and test for the invoice.payment_failed event
[0] https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_cycle_anchor
Thanks @dry hatch
Developer is checking .
And also we want to know about the limitation when creating external_account
@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
hello pranavi, do you have any specific concerns when you refer to limitations when creating an external account?
@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.
@hollow nebula let me think about what workarounds are possible (if any), will get back to you in a bit
Want to know the number of external_accounts that can add/link to our Stripe account
@golden cosmos @dry hatch
@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?
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 🎉
@brave kite it's one external bank account per supported currency for a connected account
@hollow nebula you would need to do it via the API
Oh, got it
How many external accounts we can create? Is it limited @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.
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({
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?
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?
Hey @golden cosmos
No problem , thanks .
But I want to know the numbers 😅
How many external accounts can we create?
@golden cosmos @dry hatch
@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
If you provide payment_intent_data.setup_future_usage settings Checkout will automatically save and attach the PaymentMethod to your customer: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage
@drowsy glen you'll actually get an error if you try to create an invoice with more than 250 items. Does your business typically have more than 250 line items per invoice?
@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.
aaah, whoops, sorry about that @drowsy glen . What @crimson needle said is right ^
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.
Just in case if you guys didn't see my message earlier 😊.
@hollow nebula yep! https://stripe.com/docs/cli/events/resend
@golden cosmos Thank you so much 🎉
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/',)
So in setup mode the PaymentMethod should be automatically attached to the customer you provided. When you say "default method" do you mean the default payment method for invoices? e.g. https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method ? If so then that's something you'd set yourself after the Checkout session has completed
@lapis pollen Subscription Schedules sounds like it would fit your use case, you can create a Subscription Schedule with a specified start_date [0]. You can read about Subscription Schedules in more detail here : https://stripe.com/docs/billing/subscriptions/subscription-schedules
[0] https://stripe.com/docs/api/subscription_schedules/create#create_subscription_schedule-start_date
Thanks @golden cosmos
you're welcome!
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?
According to dj-stripe's code 0 default_payment_method is the invoice default payment method as I mentioned earlier, which would make sense why it's returning False for you, since Checkout only attaches the payment method to the customer, it doesn't set it as the invoice default payment method. You'd have to do that update yourself after the session has completed.
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 ?
@tight parcel After the session has completed you'd update the customer here: https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
I see, so I'll have to update it with a webhook after the card is added probably. Trying to avoid that but oh well... Thanks!
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:
- 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
- The default invoice payment method on the customer (if set): https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method
- 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
Very clear @bleak breach . Thank you 😊
Hi Guys, my Name is Leon! I just joined a few moments ago and need a little help from you guys...
Hi Leon!
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?
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
You mean you don't see your Stripe account in your Webflow view? Or you are trying to connect your account to Pico but aren't able to?
no i dont see my Stripe account when i wanna connect with pico.
It's original is : :
That isn't really something we can help with. I suggest you reach out to Pico directly
@vocal wagon hold on, so you have 2 accounts, one regular one and one created with Atlas right?
yes! correct. And the regular one is already connected with webflow.
That's expected then, you can only connect your account to one platform at a time
You'd first have to disconnect from Webflow before you can connect to Pico: https://dashboard.stripe.com/account/applications
oh okay so i gonna try this now, thanks a lot!
Can anyone help me on the isssue?!
What exactly is your question or concern?
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.
It should be : :
I'm afraid I don't understand what your concern is. That shows an invoice with a billing period of one day, which could be completely normal depending on how you set up the subscription. Are you expecting something else?
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
But both are from the same timezone!
Can you share the invoice ID? Looks like in_123
in_1JHsbgSDLx9D8C1wT0CHEvpX
Thanks, having a look
Hello,@Paul I changed the customer service phone number (skype), why can customers still call the owner phone number of the registered stripe?
: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
@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
@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
Thanks @bleak breach , how will I know when it's fixed?
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?
Just checking, was whoever took that screenshot in the UTC+05:30 timezone?
@dense moss do you have an example link I can look at? This should be impossible
Yes it is!
You can write into support if you want to get an update on when it'll be fixed: https://support.stripe.com/contact
Sure, Thanks @bleak breach !
I've tryed to pay this with a sepa debit and failed it...as you can see you can try again
let me try
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
yeah this definitely shouldn't be happening. Let me investigate for a bit, thanks a lot for the report
Ok thanks
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
Wait a session expires after 24hrs? So we can't create a session beforehand? We need to create the session when the user try to pay?
yes
Oh...that's unfortunate 😄
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
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"
@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
yes I get it from google, and if I upgrade to any other most recent version I still got this error " Attempted to get instance of CustomerSession without initialization."
Just wanted to know if I can set "shouldInitCustomerSessionTokens = false" from AddPaymentMethodActivityStarter class...then I might dont have to initialise that CustomerSession
Or suggest me some other solutions ?
someone on my team is looking into it as I don't know our Android SDK well, cc @lucid raft
ahan ok...Do let me know if you found anything.
This is the email I got.
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...
@drowsy glen no it's not adjustable, it's a real limit. We recommend "grouping" line items into one larger item otherwise
Grouping being just us adjusting the description and amounts, or is there an API feature grouping that I've missed?
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
Alrighty :)
Thanks kindly, I'll take this back to the team and see what we can do :)
Thank you.
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?
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
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
im guessing there's no way to create an invoice with invoice items included in one call right?
why can't I create an invoice first, and then pass the id like in #4? incase there's left over invoice items from another time?
Yeah it's just not how our API works for now
what is this MyEphemeralKeyProvider() in CustomerSession.initCustomerSession(this, MyEphemeralKeyProvider())
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);
That's something you have to setup follow this https://stripe.com/docs/mobile/android/basic#set-up-ephemeral-key
(I work with @vocal wagon btw), so the thing is that in our setup (v12.6.0) we attached the customer to the paymentMethod later at the backend (after the Android client sends me the paymentMethodId). Now, this solution with this EphemeralKey requires the backend to generate a Customer object before ?
@kindred frigate what does "I want to set the default to anyone" mean?
@plain gale sorry for missing this. Your user case is simply using the AddPaymentMethodActivityStarter as an UI component to get a payment method?
@plain gale let me check
Do you have more code on how you make use of the AddPaymentMethodActivityStarter?
@lucid raft Yes, thats only our use case
We only use it like this
AddPaymentMethodActivityStarter(activity).startForResult()
and check result in OnActivityResult()
Suppose we have saved 3 cards and I want to charge from one of the cards, in this case I will mark one of the cards as default. so next payment i will take this card and deduct amount
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 ^
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?
Yeah please let me know how can I achive my use case to use only UI component.
in v 12.0.6 we were only using AddPaymentMethodActivityStarter(activity).startForResult()
and check result like that AddPaymentMethodActivityStarter.Result.fromIntent(data) which was working.
Let me know what I can do to achieve the same use case.
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
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
We cover various options in https://stripe.com/docs/payments/checkout/fulfill-orders#fulfill
How do I verify, can I just recheck the PaymentIntent? Does it update after the transaction is complete?
If you use Checkout you'd check the Session itself https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_status
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?
You can query immediately!
@kindred frigate I'm looking into it, sorry for the delay
Thank you very much
btw, if you delete an invoice, does it delete all related invoice items?
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?
@neon linden if they were pulled into the invoice yes
oh alright good
what is mean DefaultSource in CustomerService?
var options1 = new CustomerUpdateOptions
{
DefaultSource = CardId
};
var service2 = new CustomerService();
Customer customer1 = service2.Update(CustomerId_Stripe, options1);
@cosmic moat the error isn't on creation it's likely when you redirect client-side. You need to initialize Stripe.js with the correct account id https://stripe.com/docs/connect/authentication#adding-the-connected-account-id-to-a-client-side-application
I think I got a good enough system setup, i'll be back when it fails :lol:
@kindred frigate ignore DefaultSource.
thanks for the help koopa
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
- create a dummy
EphemeralKeyProvidernot actually fetching any keys - init a CustomerSession with
CustomerSession.initCustomerSession(activity, myDummyEphemeralKey, false)<-- the false telling the SDK not prefetching the key without calling any backend code - do what you are doing now
let me know if that workaround works.
hello,
can i update payment method id (pm_1JHrIbA) into Customer object
@kindred frigate I am still looking into your question already. Please wait while I figure it out
@kindred frigate https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=checkout#handling-existing-customers you can see the docs here.
If you are doing one-time payments, you can not choose which PaymentMethod we will pre-fill automatically. It will always be the most recent. Only with subscription mode for recurring payment can you control the PaymentMethod
suppose i have saved 3 cards then which card it will deduct amount
@kindred frigate Hey there, taking over from @crimson needle
@kindred frigate You're using PaymentIntents, right?
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? 🙂
@vocal wagon Hey there! PaymentIntents also create a Charge object (as you've discovered). We generally recommend refunding using the pi_xxx: https://stripe.com/docs/refunds#api
Learn how to refund or cancel a payment.
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.
Great! Thanks for the help! 😄
I know I can attach metadata to the invoice but I'd like to have as few calls as possible
Thanks...that works for me...
@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?
yes
@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
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.
@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
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Okay Thanks
Hey, Can someone help me with how I can delete a coupon from a subscription?
@vocal wagon Hello. Via the API?
No via the regular interface
Actually i want to create token for card in react native
So i need to know how to do that!
@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?
@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)
@queen stratus Are you using createToken (https://stripe.dev/stripe-react-native/api-reference/modules.html#createtoken)?
Documentation for @stripe/stripe-react-native
PErfect, that fixed it, thanks!
@vocal stump That seems like it could resolve your use case, yep. Give it a try and let me know
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
@latent ferry Hey there. The best guides for Apple Pay specifically are here: https://stripe.com/docs/apple-pay#accept
Allow customers to securely make payments using Apple Pay on their iPhone, iPad, and Apple Watch.
Yeah bro i am using like
const stripe = useStripe();
let params = {"brand": "MasterCard", "complete": true, "expiryMonth": 8, "expiryYear": 25, "last4": "4444"}
const { token, error } = await stripe.createToken(params);
@latent ferry Otherwise I'd recommend writing in with details on your specific issue to https://support.stripe.com/contact
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
I've already reached out to stripe support. But they aren't really fast. And we have this issue in production
As for credit card flow - it works fine in our case. The issue is with Apple Pay
Yeah bro i found what mistake i made. Actually i missed address prop and name thats why getting error.
Thank you @hollow prairie @latent ferry
@queen stratus We'd generally advise against using createToken anyway as you'd then be liable for your own PCI compliance: https://github.com/stripe/stripe-react-native/issues/448#issuecomment-884654008
@queen stratus <CardField /> or the Payment Sheet are the preferred RN integration patterns
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
It's hard to figure out of right flow from the iOS guide cos I'm not an iOS developer.
@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?
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
@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.
Hi, I'm trying to get the balances for a connected account and it seems that https://stripe.com/docs/api/balance/balance_retrieve only returns the available and pending balances ... where can I get the "in transit to bank" amount from ?
@neon linden Are you a platform setting up webhooks for your connected accounts? We'd advise against storing the webhook secret
im not sure that's what I'm doing, I just wanna validate invoice payment webhooks
@neon linden But why is there a need for multiple webhooks if there's just a single account?
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 🤔
@vocal stump That looks like a solid approach to me. Do you have a flow to test it?
this just keeps sounding like a bad idea the more I think about it
@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?
@tribal cloud Hello. Yeah that's not available via the API currently I'm afraid
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
@neon linden Sorry, I'm just really struggling to understand the use case specifically around '4 servers startup'
but that would also fire if I manually void the invoice without issuing a new invoice
Metadata must stay
just 4 instances of the same server, just scaling up, but nevermind
there's too many issues with the programmable approach
@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 🤯
@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?
@vocal stump Confirming
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...?
@vocal stump Seems accurate from what I can discern from https://stripe.com/docs/billing/subscriptions/pending-updates
Learn how to handle payment failures when updating subscriptions.
@echo coral Hello, is there anything indicating an error in your browser console?
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.
Has to be done when creating the PaymentIntent https://support.stripe.com/questions/using-authorization-and-capture-with-paymentintents
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
(or updating it before it's confirmed/authorized if using manual confirmation)
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"
You should be able to find the requests that return a 402 in your developer logs on the Dashboard. Those should have the responses with the specific error code (if you can't see the response in the browser logs directly)
(a 402 is what you would expect when you use a test card that causes the payment to fail)
@hollow prairie Roger that
@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?
Yep, see https://stripe.com/docs/error-codes
Learn more about common error codes and how to resolve them.
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
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
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Set up your bank account to receive payouts.
@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?
Anything in pending_updates on the Subscription object will be applied when the next billing cycle starts. What specifically led you to wonder about the 24 hours before that?
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?
Oh sorry, I'm thinking of SubscriptionCycles with the cycle changes. Replace that with "when the payment succeeds"
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?
see https://stripe.com/docs/billing/subscriptions/pending-updates#handling-failed-payments
If the pending_update hash is populated, the payment failed and the subscription will continue to cycle as if no update request was made.
Learn how to handle payment failures when updating subscriptions.
hi, I have a problem with some payments. sometimes 1 cent is missing before the processing fees. can you please explain why ?
Yes, that was expected, but what happens to the pending_updates attribute? @sick talon
: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
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
Same link as above. Unless the payment succeeds at some point or you update the subscription again to clear the pending updates, they just hang around.
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?
The expiration of the pending updates is covered in https://stripe.com/docs/billing/subscriptions/pending-updates-reference#expiration (linked to in the doc I linked above)
Learn more about the pending updates feature.
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.
"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."
Ah ok
So that answers the question
So I will have a 1 hour window to handle this
Given the above example
Where are you getting that hour from? Do you mean the time between an Invoice being created and finalizing, or something else?
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?
You'd want to test your specific scenario in testmode and see exactly what that event contains.
and I will, but I like to test out my ideas before I spend time coding them 😄
You could use the CLI to create the Subscription and its pending updates, then the events will fire on that real timeline.
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
Yeah, that's the intention of it expiring when the cycle ends.
Makes total sense I had just not seen that. I thought it was 23 hours all the time
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?
Learn how to save card details and charge your customers later.
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
You can create a Customer object in Stripe and then add details later when you have them. That's what the code in that doc does.
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.
You can wait to create a Customer object until they submit they are ready to submit card info.
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.
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.
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?
All Stripe timestamps are Unix timestamps in seconds.
Alright, thanks for the confirmation
So isn't a problem if we will get new customers sometimes that won't be used?
It's about shooshtime last question
@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
A Customer object in Stripe is just an object, if you don't use it for anything after creating it, nothing happens to it.
Which API are you using? Subscriptions, Invoices, PaymentIntent, Charges, something else?
Single-time card payments I think
Ok but when I open this page https://dashboard.stripe.com/test/customers I see many empty records here. Is it ok?
Sure, you can delete them, or leave them, up to you.
Ok, thanks
If it's using PaymentIntents directly then you just pass an amount. There are not products/prices or quantities involved.
You can use metadata to track arbitrary values if you need to https://stripe.com/docs/api/metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
and soooo if I need quantity more than 1, have to do like amount = bag.price * n * 100 where n is a quantity value...
And what about shopping cart? How can I manage it? I mean like 2 or more different items at one transaction
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
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?
My understanding is that using either Stripe.js or Stripe's hosted forms are required to collect payments through Stripe, so that your site's code is never exposed to sensitive card details and you don't have to worry about complicated compliance rules. It is possible to customize card inputs through Stripe.js by passing in some custom CSS
Ok, thanks
You can pass in some CSS as specified by https://stripe.com/docs/js/appendix/style, but you should always use Elements.
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?
since your client-side code is ultimately in charge of when the card is added to the user, you should easily be able to hook into your form validation system to achieve this. Make sure that you only validate/add the card data after your form completes successfully without errors, and you should be good to go.
You should disconnect the idea of a Customer (the object in the API) from the actual data you have on your customer (the person on your page). Create a Customer object in Stripe, attach the PaymentMethod (card) to it using a SetupIntent, and that's how your validate the payment method. Then, entirely separately, worry about validating your customer's details.
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.
See https://stripe.com/docs/api/subscriptions/update#update_subscription-proration_behavior and https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#immediate-payment (you want to create prorations but not always_invoice)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Learn how to upgrade and downgrade subscriptions by changing the price.
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?
When we do the "plan" (ie, stripe product) change, we are using
ProrationBehavior: stripe.String(string(stripe.SubscriptionProrationBehaviorCreateProrations))
I think the problem we're having is that the quantity on the product is 0, because stripe can't do the usage calculation, so it automatically finalizes the invoice since there's nothing to charge?
What's the id of the request where you make that change?
@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:
- I have a pending update on a sub, failed due to 3DS or whatever
- The sub changes billing cycle within the next reasonable number of minutes/seconds
- simulating a situation where you create a
pending_updateless than 23 hours before a sub changes cycle.
I tried using trial_end but I can't get it to do what I want
evt_1JHvTDI67GP2qpb4Vp6v8I0W is the event, if that's what you meant?
Try using a daily price, that's the fastest way to get it to the next billing cycle anchor being that close.
I suppose, but that means 24 hours between each attempt. I guess that will have to do though.
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.
Yep, there really isn't a better solution for specifically what you're trying to test.
Ok. Clear. Thanks
So the 0 invoice for that Subscription is from when you created it. You're passing the proper parameters when updating it to create prorations but not an immediate invoice. It's a metered plan so usage isn't paid for until the end of the period.
Go ahead and post your specific dev question(s), folks are around.
To test the prorations, make sure you assign some usage of the original plan and then update the subscription, you should see the proration get created for the "old" plan then.
By "some usage" you just mean non-zero quantity?
Cool, I'll play around with this a bit more. Thanks for your help @sick talon
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.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Hey guys, 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?
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?
You're not missing anything, that's what you're able to access. It's a running total, and the individual records you submitted aren't retrievable.
How does the stripe UI get it?
That's not part of the SDK, no.
Meaning the Dashboard? You can view them there, but it's not in the API.
Yes, the dashboard. Ok. thanks. Having this info in the API would be very helpful ... is there a place I can leave feature feedback?
I'll let the team know but I wouldn't expect it to happen.
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).
Ok. Basically, I want to validate that what I sent to stripe is actually correct every day. I have the list in my DB, but I guess I'll just use the 'total summary' as my check. If it fails, I'll have to go to the UI and MANUALLY figure out where things are wrong.
Essentially, yes.
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.
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
What is "here" in your context?
here means in stripe-react-native
ok and are you making a payment at the time you save the card, or just saving it for use in the future?
saving it for the future
https://stripe.com/docs/payments/save-and-reuse?platform=react-native replaced the Token flow then and is what you want
Learn how to save card details and charge your customers later.
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
thanks a lot, i hope this can be implemented with class component as well instead of functions
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)
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
amazing, thank you!
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
Documentation for @stripe/stripe-react-native
Documentation for @stripe/stripe-react-native
Hi, does anyone know if the bacs payment page supports a description of the price like on a card payment page?
What specifically do you mean by the BACS Payment Page?
@sick talon entering sort, acct number etc
I mean what page are you referring to. Are you using Checkout, building your own page, looking at an Invoice, something else?
thanks a lot for your help
@sick talon just the default checkout, i'm curious as the default card payment checkout has this information.
Interesting, can you screenshot a test mode page of what you're seeing on the two different types?
sure. one moment
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
Meaning to check if it was successful? Check status from https://stripe.com/docs/api/payment_intents/retrieve
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Cool, thank you!#
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?
Give me a few moments to look into this - I believe this is because of strict requirements from bacs debit, but need to confirm
@dim hearth thanks!
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
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?
Explore a full, working code sample of an integration with Stripe Checkout.
That's strange... is it completely empty or is there other information in there?
What is the behavior you're expecting? Just the one invoice for the section subcsription id#yyy?
With Checkout you still need to be able to make a POST request to your own backend (in the example they make the request to /create-checkout-session) in order to actually create the Checkout Session and generate the URL to redirect to. You need to make that endpoint for the integration to work
@dim hearth Invoice must not create after schedule canceling. I set prorate:false for it
This is all a successful response contains.
When the sdk throws an exception it contains header info though 🤔
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?
Found it! You can check lastResponse to get full information (including headers) about the response that generated that resource (see https://github.com/stripe/stripe-node/blob/e545310ab9e11dcc4088bce7352505fc260b2e5c/README.md#examining-responses)
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
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Hmm can you elaborate? The docs and the typescript definitions don't contain a headers attribute on the lastResponse object
@dim hearth I cancel subscription schedule, not subscription. And use prorate:false in request but it not help https://dashboard.stripe.com/test/logs/req_bNdx7sLVhFjfZY . Stripe create draft scheduled invoice - https://dashboard.stripe.com/test/invoices/in_1JIEqCLLJi9S5Lvqz0OiqPNH
Ah, I see what you're saying now - thanks for sending over those requests! Give me a few minutes to look into this
No, you should still do this with a subscription and set a trial. You can set trial_end or trial_period_days when creating a subscription.
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
You need to be setting prorate: false AND invoice_now: false - invoice_now defaults to true, and as a result it's pulling in any uninvoiced metered usage and pending invoice items (you added an invoice item in req_r8FMneUyQCINSB, which hadn't been put in an invoice yet).
@dim hearth Thanks a lot for help!)
Let me know if that doesn't work 👍
@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?
@dim hearth Its all right, it works!
Can I update metadata on a voided invoice?
I'm pretty sure you can - but you can just try it out in test mode real quick to confirm
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
Subscriptions still have associated Payment/SetupIntents. When a Subscription starts in a trialing state, it'll have an associated SetupIntent you can use to set up Payment
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.
Sorry I missed this last message! Admittedly, typescript isn't my strong suit so I don't know exactly how everything works but when I test it out and print lastResponse I see an IncomingMessage (https://nodes.duniter.io/typescript/duniter/typedoc/classes/_http_.incomingmessage.html) being printed that has all the information I need
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)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
@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.
@dim hearth That sounds like what I should be doing
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
}```
No no, there's no need to you to create that yourself. Creating the Subscription will automatically generate those for you. Have you read through https://stripe.com/docs/billing/subscriptions/elements ?
Learn how to offer multiple pricing options to your customers and charge them a fixed amount each month.
@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
@dim hearth - thanks so much, sorry, I missed that Subscriptions did this for you.
That parameter is part of the Product Catalog beta - I don't know the specifics of how/when the populate it so I'd suggest reaching out to support https://support.stripe.com/contact or ask the folks who got you into the beta
I believe you want Customer::createBalanceTransaction()
hallo, is the clientSecret enough to confirm a payment server side?
@dim hearth Thanks. There it was.
I am using the flutter_stripe plugin to generate a clientSecret with an apple pay flow
Yes, the clientSecret + your publishable key should be enough to confirm cilent-side
ok thanks, can you point me to the functions I should use?
I am using firebase cloud functions so I assume the SDK is the javascript stripe SDK
If you're using the flutter_stripe plugin you should be referencing those docs for guidance on how to confirm - Is this what you're using? https://pub.dev/packages/flutter_stripe
@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
Hmmm... I would expect idempotent-replayed to be populated if it was an idempotent request. Just to double check - do you have a request ID I can take a look at?
req_30M9mkwwPyqQll
It looks like its in setup mode, will payment mode work the same for subscriptionschedules?
Ah, that's not a replay. You can also see that original-request and request-id are the same in this instance
yes I am using this and I have a clientSecret on the mobile device. I would like to create a paymentMethod on the mobile device from a clientSecret but I am not able to do that
What's your intended use case here? If you're just trying to get a payment method created/setup for future usage, then setup mode is the way to go. Payment mode only really makes sense if you're intending to collect payment from your customer
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
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
What specifically are you having trouble with? Are you running into an error? If you're looking for examples of how to do everything they have a full example app https://github.com/flutter-stripe/flutter_stripe/tree/0c8f6ff5bd80f54af8af90e8c5f873b432ba7b8e/example
You need to be contacting support to get that enabled 👍
Yes, I've tried but just got the response for waiting..
Unfortunately, I can't do anything to help on my end (we don't deal with account-specific issues like that) - usually support should get back to you within 24 hours, but sometimes it can take longer during high volume periods
@dim hearth
Hi, how can I use data from webhook?
Let's say I want event.data.object.receipt_url on client side?
Hello, I have a question about payouts.
If you want access to this information client-side, your frontend will need to request it from your backend. Do you have more details on what you're trying to do?
What's your question?
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?
That depends on the country you're in - you can find guidance here (https://stripe.com/docs/payouts#standard-payout-timing)
Set up your bank account to receive payouts.
It's a webhook.
And so it fires each transaction.
And so I want this receipt to show up on front end (at successUrl).
But I can't really figure it out
Thank You
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?
That's not enough information to be able to definitively say why the charge was declined. Do you have a request or object ID I can take a look at?
yes plz add me so i can send u the ifnformation
Object IDs are totally find to send over in the public channel - just don't send over any PII 👍
No, I need an ID like "in_xxx" not the invoice number
yes that's it
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)
@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
Is there a specific reason you're relying on the charge.succeeded to come in to display the receipt on the frontend? I imagine you're confirming a payment on the frontend, and after confirmation you should know when the charge has succeeded and can redirect the user to the receipt
This card was declined by the card issuer/bank, not because of the currency you were charging. If your customer believes this is a mistake they need to contact their bank in order to correct this
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!
I've been working with @worn oyster on this and Stripe support sent us here to get help. Maybe there's something with the way we're making the request that's not quite right? Not really sure
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
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
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
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
Hmm... I would've expected this to be something support would handler. Do you have your account ID handy so I can try and find your ticket on my end?
does it have to match the account owner
I don't know the specifics of why it was declined - again, they should contact their card issuer.
ok thanks
Which client library are you using? You should be able to see the raw request in any of our libraries, it's just a matter of finding out how
I am not really familiar with event types.
I though charge.succeeded is the last one, and so if it's there then customer was charged successfully.
Yes I think so. But I am not getting it... How can I get this receipt?
I obviously can't fetch ('/webhook')
And I really don't want to save it in database
@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?
We ran into some issues verifying your account details. Please correct the following items. Otherwise, payouts or charges could be paused.
Have you tried printing $customer->getLastResponse()? That should have everything you need
@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.
Sorry let me rephrase, I wasn't implying that you should use a different event - I was asking why you were relying on an event at all.
After confirming the Payment, you can just make a simple request to your backend to an endpoint that retrieves the charge/payment and sends back the receipt_url
@dim hearth makes sense. Is there a way to have reuest's details. A request that was made yesterday?
No, there isn't a way to do that 😦
@dim hearth 👍
No, the request I looked at was declined because of an issue on the customers end. For issuers with verifying your account details you need to contact support
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.
@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?
Do you have a subscription ID I can take a look at?
sub_IseFK85ppEBHBv
Let me check on this, give me a second (I believe having "Developer" access to the account will work, but just want to be sure)
@dim hearth awesome! Thanks!
I am not sure if I am relying on event
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?
looking now!
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!
@dim hearth, Yes as long as I have no access to sensitive info ...
@dim hearth hey hes saying that everytime the charge is from a different currency his bank usually declines
Yes, here you go: acct_1HyiKMEGuiXMu7rL
This is your backend code right? So I imagine this is called from your frontend, and you can send back the receipt_url back
@rough finch That particular subscription wasn't created with setting on_behalf_of. Is that intentional? Or did you send over the wrong subscription?
nope, this is Frontend code.
The stripe is defined like that:
import { loadStripe } from '@stripe/stripe-js'
stripe = await loadStripe(process.env.NUXT_APP_STRIPE_PK)
and nvm looks like this is an error on my end somewhere. It is definitely creating the invoice with the coupon
Ah was just about to respond! Yeah I was just about to say this looks like an error in your code - if you're still having issues feel free to share a quick code snippet!
hello, I'm wondering if its possible to move a card from one customer to another across accounts. Thanks in advance.
The subscription was created before we got "on_behalf_of" turned on for subscriptions. So now, when the i get notified of the invoice, I then add it. req_odtN8AdOTET6K2, which is about an hour before the invoice goes through. Is that not enough?
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?
@dim hearth how does stripe even know what your website is from the website link you provide?
Sorry! Was reading too quickly - So the call to confirmCardPayment should return a promise that can resolve to a PaymentIntent upon success (https://stripe.com/docs/js/payment_intents/confirm_card_payment). That PaymentIntent should include the receipt_url
I assume that wouldn't be enough and you would need to set it on the subscription itself (but I don't know the nitty gritty of how this code is implemented). Have you been able to get this working when you set it on the subscription itself?
Hello! This is only possible in a very limited setting - you can clone cards from a platform account to one of your own connected accounts.
Hello! We don't have any specific guidance, but I would strongly suggest taking a look at the API changelog (https://stripe.com/docs/upgrades#api-changelog) to see what has changed recently. There may be some behavioral differences between API versions, but they should all be called out in the changelog
Keep track of changes and upgrades to the Stripe API.
What about all the old subscriptions that don't have the right on_behalf_of? How do i get them updated? how far in advance would they need to be updated?
Can you be more specific? Are you referring to how we the URL you provide during on boarding or somethign else?
Sorry it's a bit busy today! Taking a look now!
OK.. the problem I'm facing is we have a Stripe billing account with some bad data. We'd like to start with a clean account and not have to have customers reenter their credit cards. Any advice?
yes boarding url
thanks! that's fine, just wanted to check there are no plans on deprecating older versions, and whether it's OK to set up a new integration with an older API version
You should be able to update the subscription itself and set on_behalf_of in that request
Ahhh...that's slightly different - for that I'd recommend looking at this article https://support.stripe.com/questions/copy-existing-account-data-to-a-new-stripe-account#copying-data
Sorry but I can't see receipt in there...
That's what I did, i do that right after i get notified of next invoice created, but guess it needs to be before the invoice created. Will do, thank you
great, thanks for the assistance!
Yup! It's totally fine to use an older version - of course if you're building something from scratch it's definitely recommended to use a newer API version, but if you need to use an older one go ahead!
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?
this
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 ...
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
and how do I retrieve the associated Charge?..
@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?
@dim hearth
Will stripe automatically send an email receipt to a customer?
Here's the API request you would need to retrieve the charge: https://stripe.com/docs/api/charges/list#list_charges-payment_intent
Sending an email receipt to a customer automatically is something you can enable in the dashboard (https://dashboard.stripe.com/settings/emails)
If they're all part of the same company/business, then yes that should be fine - but if they're not I imagine that not okay (but again, support is better equipped to answer this question)
If you're still running into issues later please feel free to ask again!
Depending on the country/region you may be able to get support through livechat
And regarding card element:
Why does it require ZIP code?
Hello! It's definitely possible to update a subscription once it's already started - have you looked at this https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#changing?
Learn how to upgrade and downgrade subscriptions by changing the price.
@dim hearth
And why is it so ugly? Can I customize it?
Quick question for you - I'm looking at the recent tickets with this account and I see that they gave an update yesterday saying that they were still looking into it. Is there another chat with Support that I'm missing?
Thanks, yeah I did read over this but understood it as being specifically in regards to changing from basic to pro (or a similar change), as per this line: "Assuming a customer is currently subscribed to a basic-monthly subscription at 10 USD per month, the following code switches the customer to a pro-monthly subscription at 30 USD per month. "
@thin isle is that on your website?
yes. Submit button is mine, obviously 🙂
But the fields for CCN and Exp Date is from stripe
I'd like to keep them on the Basic plan (Subscription A), but just change the Basic Plan's price.
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
Complete reference documentation for the Stripe JavaScript SDK.
The example in the docs are switching from a basic -> pro plan, but it definitely works when switching to a different price that is still in the same product (basic product). You would have one product for the "basic plan" and then create two prices for it.
Okay, do I just archive the old price then and Stripe handles the swap automatically or do I need to run a subscription update on all basic plan holders?
Hi, I am hoping to get some info about Stripe connect.
- What is the payout cadence of Stripe Connect? Can we use stripe connect to support daily (or more frequent) payouts to merchants?
- What does stripe connect pricing typically look like if we are already using several other stripe services?
You can't update a price once it's been created/used - you would have to update all the subscriptions using the old price if you want to get them all on the new price.
Blerg. Okay.
- For Express and Custom, yes. You can set the payout schedule with the
settingshash on the account in the API: https://stripe.com/docs/api/accounts/object#account_object-settings-payouts-schedule - 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.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
hi
how are you, sir
I have some problems with the payout. Can you assist me?
when I payout I am getting an error https://www.screencast.com/t/zTk5qvTuaGRj
The error message says that you're trying to payout more than you have in your available balance - is this not what you expect?
but i have to much balance in my test account
thank you!
So the flow would be:
- Client requests a price update
- I create an update price as per the Upgrade/Downgrade docs
- We choose to prorate it or not
- 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?
Balance is split out into mutiple buckets - this error message is specifically saying you don't have enough ACH balance. Are you checking how much balanace you have specifically from ACH transactions?
@solemn pawn Also can you send over the request ID
where i can see ACH transactions balance please guide me
Yup, that's the general idea 👍
Ok, thanks!
Before going into that, do you have a request ID I can take a look at? Just want to confirm what issue you're seeing
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`
If you change "bank_account" to "card" in your code, the payout should be successful.
ok ok let me check
Let me double check on that
thank you so much
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.
@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.
What do you mean, the payment method is not attached to the customer?
It shows in their account
@jaunty wind It's not attached to the Customer inside Stripe.
It is though
@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?
where would that be
@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.
Of course
customer added a new card in her account on woocommerce
and it shows this in stripe
@jaunty wind Can you share the Stripe Payment Method ID or the Stripe Customer ID?
Sent it to you
@jaunty wind Sent it to me? What do you mean?
I DM'd you the customer id
@jaunty wind I have DMs disabled; it shouldn't be possible to send me a DM.
cus_J4aXrpmNDvCEqk
@jaunty wind Thanks! Taking a look...
@jaunty wind Have you only seen this error with one customer or with multiple customers?
Just this one
@jaunty wind The Payment Method in question was detached from that Customer in Stripe by WooCommerce using this request: https://dashboard.stripe.com/logs?object=cus_J4aXrpmNDvCEqk
@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.
The card is in the customers account though?
@jaunty wind Oh, wrong link: https://dashboard.stripe.com/logs/req_nAteOS8xtGNjzR
@jaunty wind Not anymore, it was removed from their account.
@jaunty wind WooCommerce detached it using the request linked above.
@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 Ah, okay, so it looks like WooCommerce switched them to a new Payment Method.
@jaunty wind Here's the log attaching the new one: https://dashboard.stripe.com/logs/req_9wnIIv47mXWrHX
Yeah cause the customer removed the old card and added a new one
@jaunty wind You are able to see these logs I'm linking to, right?
@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. 🙂
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!
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?
that sounds like a question for Calendly. They would be able to speak to the specifics of their integration, this server is for developers building new integrations with Stripe
Thank you!
@slow sorrel : What @icy anvil said is correct, if you're signed up with Calendly to manage this you need to speak with them.
(Thanks @icy anvil !)
@granite star Got it, and sorry to hear it's been painful. I can help if this is indeed an integration problem, but the error you shared earlier sounds like your platform needs to be enabled for that flow based on your platform profile and we're not able to make those changes here. Can you share your account ID for the platform? (acct_1234)
Yes, thank you. I'll grab that ID now and let @silk salmon take it from here, but will be on the thread to help in any way that I can...
acct_1HyiKMEGuiXMu7rL
I'll let @silk salmon confirm but I believe part of the issue is that we don't seem to be able to enable that on our side - or perhaps are not understanding how to do that properly
Spoke with @silk salmon he will pick up this thread in a moment...
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
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.
@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
Yes, as my colleagues have shared this is something you need to work with support on. I've taken a look to confirm your open email with the support team has not be forgotten - please be patient while the team works to get back to you. cc @granite star
@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 😕
Yes - I've asked for updates internally but the support team will be in touch when they have a response or more questions for you
hey @wheat aspen can you share any failing request ID(s)? You should be able to create such a trial without a payment method.
Any way we can get a sense of what the timing will be for a reply?
I don't have an estimate for that, no, but it will be as soon as they have more for you.
The request succeeds and the subscription is created. It may be a library issue. The library attempts to validate the SetupIntent object, and when it sees the status of requires_payment_method on the SetupIntent, it raises it's own error.
Can that status on the SetupIntent be safely ignored if the subscription is trialing?
Yep! You'd use that to collect payment details for the payments after the trial ends, but you can ignore that if you like.
Awesome, thank you. I'll put together a PR for the Pay gem.
Can you share a link to the code you're using / looking at? I am curious what it is trying to do by default
That gets called from here https://github.com/pay-rails/pay/blob/master/lib/pay/stripe/billable.rb#L103
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
@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
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
Ah, thanks. Yes, that seems to be an opinionated implementation of starting a sub on trial.
Getting so frustrated. Who can help me?
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?
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.
@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
What if i cant even get ahold of them?
Please talk to support https://support.stripe.com/contact
Im trying to sign in but do not the know 6 digit code.
@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
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.
That's what i've done, but i've been sent to the docs i already read (https://stripe.com/docs/declines#issuer-declines) and so, don't helped me :/
thank you @crimson needle. do you even recommend against using product trials as a sensible default/fallback? or best to just always set explicitly?
You can reply with specific example charge ids and they should be able to investigate further. Unfortunately we can't look into this here on Discord, it's specific to your account
@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)
Got it. Thank you for your excellent help as always!
I already gave IDs 🙂
Ok, thanks
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
Yes
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[]
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.
@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
This is how it appears. I don't know what it thinks is null...
@brave magnet https://stripe.com/docs/payments/payment-links you might want to use this instead
it says your address variable is null. Did you define address and put real value in it? That part is your own code and not related to Stripe.
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?
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?
@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?
Oops sorry @opal ibex , didn't mean to send that yet and step on toes
I just found my own error - it did not like the fact that address[4] was null even though I had called .ToString() which I thought would get around it.
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
Yeah that API has been considered deprecated for multiple years now. But it should still work overall.
Can you share the request id req_123 you have in that screenshot?
thanks @crimson needle , is it possible to have the platforms connected for us via customer service?
Sure, just a screenshot of what I see in the dashboard?
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
ohhhh yeah it can be finicky 😦
ok thank you!
No, you would have to do this yourself via OAuth https://stripe.com/docs/connect/oauth-standard-accounts (and you might have to talk to our support team anyway because we don't support connecting an existing Standard account platform to another by default anymore)
no screenshot no. Just the exact id, the string, copy-pasted here. The req_123 from the bottom of your earlier screenshot.
ah yes req_7vs3W9T8w8MkVF
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
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.
Sounds good!
General dev question: is this an appropriate place to ask WP Full Stripe API integration questions as well?
@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
All good, thanks! I'm thinking I'll be extending their integration with some vanilla stripe docs-recommended php, so I may reach out then. So excited for this resource!
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.
As a follow up - once I onboard platform B to platform A, i will still be able to onboard client's standard accounts to platform B, correct? (albeit new accounts they sign up for)
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.
yes no changes, you just connect B to A as a way to clone a PaymentMethod from A to B, to then clone it to B's connected accounts
sorry @crimson needle but in talking to customer service to enable me to onboard platform B to platform A, they just said that after i do so, platform B will no longer be able to onboard any accounts as its own. direct quote "Yes, its platform profile will technically 'dissolve', for the lack of a better word."
what even. 😅
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
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
ok thanks @crimson needle, will do
With payment links, can the amount of money involved in the transaction be modified or made unique per customer contract? In my case, I have one product, which varies in price based on the user's needs. What's the best approach (payment links or checkout-pages or something else) given this information?
ah no in that case using the API to create a Checkout Session like you were is the cleanest
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?
Has anyone had any success with this TypeScript example and allowing promotion codes? https://github.com/stripe-samples/nextjs-typescript-react-stripe-js
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?
@atomic locust In which sense are you asking that? Like if you had collected that information upfront? That's not something we surface on Checkout today no
Correct. If the customer filled out a form for example can any of that be incorporated on the checkout screen? When I look at the API, I can't tell which of the parameters actually effect what appears on the checkout page vs data that is stored in the stripe account
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
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
@atomic locust gotcha, then no all the customer details won't be reflected on the page itself
But apparently some product/price data is. So how do differentiate in the API what can/can't/won't display on the page?
Also, can the email address be prefilled or do they have to enter that each time?
customer_email can be used to pre-fill the email
If they payment each time will be the same, is there a way to keep a record?
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
Is there any way to show payment history?
Depends 😅
If you re-use the same customer each time you can see all transactions for that customer https://stripe.com/docs/api/payment_intents/list + customer filter for example
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?
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
@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
the feature is there
stripe just gives people the business (and not the good kind) for using stripe as a virtual terminal
Can you direct me to the billing product page?
Is that related to subscriptions?
yes it's related to subscriptions
Is there any code examples for that?
@meager oasis https://support.stripe.com/questions/enter-customer-payment-information-manually-into-stripe-for-mail-or-telephone-orders it comes with restrictions
@atomic locust yes we have numerous examples such as https://stripe.com/docs/billing/subscriptions/checkout
okay so doing it once is fine
Hi, when using instant payouts for connect accounts is it possible to increase the 1% charge in a similar manner to application fees?
Is there a way to add a service fee? For example add a % onto the cost and use the new total as the amount charged?
@atomic locust yes, you'd add a line item to the Session that isn't a recurring Price
Can you something similar on a standard checkout page (for one time charges - not subscription)
No you can't take a fee on Payout creation, you'd have to take a fee another way (charging their card on file, taking a fee on future charge, etc)
@atomic locust I'm not sure what that means exactly but going to go with yes
Can the line item be predefined so it happens each time?
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
The customer is trying to pass along some of the merchant fees to the customer. So they want to add a fixed percent onto each transaction.
@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. "
This would be a fixed % on every transaction.
you control everything that goes into the Session/amount, so it's definitely possible for you to calculate all of this the way you want to
Hum never heard of this email honestly. I'd recommend talking to our support team https://support.stripe.com/contact/email
Ok, so it is calculated prior calling the checkout session.
No worries - thanks for you help
I'm flagging internally too, that sentence seems incorrect to me
@atomic locust yes!
Thanks for the insight.
Sure thing!
That'd be great, I can forward you the entire email if you like or helps
@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
SC&T = https://stripe.com/docs/connect/charges-transfers sorry
And yes Account debits come with a fee
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.