#carboncopper_api
1 messages · Page 1 of 1 (latest)
👋 Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1393198761794342962
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- carboncopper_api, 1 hour ago, 20 messages
- carboncopper_api, 4 days ago, 25 messages
// Server side PHP
$confirmationToken = $_REQUEST['confirmation_token'];
$product = \Stripe\Product::create([
'name' => $description
]);
$price = \Stripe\Price::create([
'unit_amount' => 1000,
'currency' => 'gbp',
'recurring' => [
'interval' => 'month',
'interval_count' => 1
],
'product' => $product->id,
]);
$customer = \Stripe\Customer::create([
'email' => 'john.doe@example.com',
'name' => 'John Doe',
'description' => 'Hello world',
'address' => [
'city' => 'Beverly Hills',
'country' => 'US',
'line1' => '123 Main St',
'line2' => '',
'postal_code' => '90210',
'state' => 'CA',
]
]);
$subscription = \Stripe\Subscription::create([
'customer' => $customer->id,
'description' => 'Hello world',
'items' => [
[ 'price' => $price->id ]
],
'collection_method' => 'charge_automatically',
'payment_behavior' => 'default_incomplete',
'expand' => [ 'latest_invoice.payment_intent' ],
]);
$subscription->latest_invoice->payment_intent->confirm(
[
'confirmation_token' => $confirmationToken,
'payment_method_types' => [ 'bacs_debit' ],
'setup_future_usage' => 'off_session',
]
);
This are the request params I see in my Stripe dashboard log.
{
"confirmation_token": "ctoken_1Rjf3c01ThkcLeVlVz7nSgCF",
"payment_method_types": {
"0": "bacs_debit"
},
"setup_future_usage": "off_session"
}
This makes me think the ['bacs_debit'] array got converted into a key-value JSON object by the PHP SDK.
Hi there!
Can you share the ID (req_xxx) of the failing API request?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
req_EEIaHDFKCnvdL6
Remove payment_method_types from the request req_EEIaHDFKCnvdL6
Between, that PaymentIntent can accept only card or link, but not bacs
You can’t use the Payment Element to create SetupIntents for Bacs Direct Debit. Use Checkout in setup mode instead.
https://docs.stripe.com/payments/payment-methods/payment-method-support#bank-debits-product-support:~:text=1 You can’t use the Payment Element to create SetupIntents for Bacs Direct Debit. Use Checkout in setup mode instead.
I don't understand what you want me to remove this from.
From this request req_EEIaHDFKCnvdL6, you can't update the payment_method_types
👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
So I see that I cannot use a confirmation token for Bacs subscriptions. I need to use Checkout instead. Is this possible to do without needing to redirect the customer from the site?
why not just take the payment?
instead of saving the BACS and then creating the subscription
Do you mean I should create the subscription on the client side with Stripe.js?
This is for an ongoing subscription that debits the customer once a month.
instead of saving the BACS and then creating the subscription
actually never mind what I said because that's the only way to do it
you need to first save the BACS DD PaymentMethod and then create the subscription
this is one of the limitations
and you can only do that with the Stripe Hosted Checkout Sessions
one thing you can do in https://docs.stripe.com/payments/bacs-debit/save-bank-details
is to add a free trial to the subscription
and then it would be possible to do both things in the same time
Ok, thank you. I will need to do more research on Stripe Checkout.
And How to enable bank transfer?
please help me
I run demo project
but I can 't see bank transfer
@tight panther are you a colleague of @unborn crow ?
No, But pls help me
please open a new thread in #help
@unborn crow please let me know if you need any more help
I'm good for now, thanks.
How to open new thread?
already done
what did you choose?