#danmatthews-subscription-connect
1 messages ยท Page 1 of 1 (latest)
sub_1Jmh3H2aeyeYuWjZDoAy76pD
Ah ok, is it because the price is too low
in that case you want to use the pending_setup_intent instead
i think the price is $0.12
yes correct!
Thanks - it's now complaining the customer has no payment
just wondering why it's not working even though this is the way it's suggested in
Do you have a specific request id i can look at for the error you see? like req_123
https://stripe.com/docs/api/request_ids
https://support.stripe.com/questions/finding-the-id-for-an-api-request
req_8TPubdnPz1ePFD
thanks!
koopajah mentioend above that i probably need to use pending_setup_intent but i'm almost positive this was working previously when i tested the connect integration originally
i'm using the same code, so i feel like i'm going a little crazy
Looking, thanks
thank you
If you're setting this up for a customer with no payment method yet attached, you'll want to use payment_behavior=default_incomplete like we use in the non-connect guide:
https://stripe.com/docs/billing/subscriptions/build-subscription?ui=elements#create-subscription
Can you try adding that?
Otherwise you can collect a payment method for the customer first and provide that for the subscription before creating it
Oh no, i think that was there and i removed it ๐ฆ
I'm an idiot
Cool, so that's better, now i'm getting "no such payment intent" error
$subscription = $stripe->subscriptions->create(
[
"customer" => $customer->id,
"metadata" => [],
"items" => [
[
"price" => $price->id,
],
],
"payment_behavior" => "default_incomplete",
"expand" => ["latest_invoice.payment_intent"],
],
["stripe_account" => $teamStripeConnection->stripe_account_id]
);
$intent_secret =
$subscription->latest_invoice->payment_intent->client_secret;
just for reference this is the subscription create code
Is there something extra that needs to be added to confirmCardPayment in the JS for connect payments?
Ok this is likely because of the connect request, you need to ensure you initialize Stripe.js the same way: use the platform PK + provide the stripeAccount parameter
ahh ok
const stripe = Stripe('pk_test_123platform', {stripeAccount: 'acct_567connected'})