#jay2002_api

1 messages ¡ Page 1 of 1 (latest)

marsh gardenBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1250427929431773274

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

dim pilot
#

omg i see I was testing earlier with this user and it has 40 bucks charged already today. didn't see that. But still almost appears like two charges were done for 299.99 on this customer. I don't work the dashboard much so I could be wrong.

fickle elbow
#

hi there!

#

I'm not sure I understand what's your question. can you clarify?

dim pilot
#

Was this test customer charged twice for 299.99 on upgrade?

fickle elbow
#

here are all the Invoice for the customer you shared. they were never charger 299.99 for the Subscription

dim pilot
#

So to confirm they where charged 260.02, 20, 19.99 total and not 299.99 twice?

#

To me this looks like two charges one for 260.02 and one for 299.99 because both have different payment id's

fickle elbow
#

there are 3 invoice for the Subscription (260, 20, 19.99), plus 299.99 that you created separately. so in total that's 4 charges.

dim pilot
#

I am attaching the payment intent to the subscription when i process the upgrade so that seems odd it's not using the payment intent that was authorized

fickle elbow
#

I am attaching the payment intent to the subscription
what does that mean?

dim pilot
#

I create a payment intent which authorizes a payment amount then I want to use that intent with the subscription update

fickle elbow
#

that's not possible. if you update the Subscription, it will create its own PaymentIntent. you cannot attach an existing PaymentIntent to a Subscrpition.

dim pilot
#

Are you sure about that? I just adjusted the code on a new test. It only charged once. And I captured the payment intent after update
params := &stripe.PaymentIntentParams{
Customer: stripe.String(previousSubscription.Customer.ID),
Amount: stripe.Int64(29999), // Minimal amount for authorization
Currency: stripe.String(string("USD")),
PaymentMethod: stripe.String(customer.InvoiceSettings.DefaultPaymentMethod.ID),
CaptureMethod: stripe.String(string(stripe.PaymentIntentCaptureMethodManual)),
AutomaticPaymentMethods: &stripe.PaymentIntentAutomaticPaymentMethodsParams{
Enabled: stripe.Bool(true),
AllowRedirects: stripe.String("never"), // Disable redirect-based payment methods
},
}

#

Oh I see it says incomplete

fickle elbow
#

I don't understand your question sorry.

dim pilot
#

So here is the problem. How can I authorize funds then capture on a subscription update?

fickle elbow
#

you want to place a hold on a Subscription payment?

#

if so, that's not supported.

dim pilot
#

If you use a debit card to authorize funds of 299 then capture that authorization later usually merchant accounts allow this up to 5 days later.

#

If I authorize 299 on a debit card then do what I'm doing now it will authorize 299 and then charge 299 making it appear as if two charges came through on a customers card.

#

debit cards are not like credit cards and tend to hold funds at the bank on authorizations

#

I was hoping to use the authorization that was approved and turn it into a charge which can be done on other merchant accounts

marsh gardenBOT
autumn fractal
#

Hello
Are you asking if you can authorize a payment method once on merchant account A and then use that authorization later on merchant account B?

dim pilot
#

It's the same merchant account. Stripe is stripe. It's the same actual account under stripe same company. I'm just asking if I can authorize a payment then capture it. Right now soma tells me subscription updates always use a new payment intent id.

autumn fractal
#

I was hoping to use the authorization that was approved and turn it into a charge which can be done on other merchant accounts
I'm sorry you mentioned other merchant accounts here

I'm just asking if I can authorize a payment then capture it. Right now soma tells me subscription updates always use a new payment intent id.
Subscription update that triggers a new invoice will generate a new PaymentIntent. You can't link the subscription invoice to an existing PaymentIntent

dim pilot
#

I was just mentioning other past merchants I could do this behavior. So 100% to confirm there is no way to authorize a payment check if it succeeds then use it in a subscription update. I just need to be 100% clear here.

autumn fractal
#

What's the end goal here? Are you trying to prevent the subscription update if the payment fails?

#

If so, we do have pending updates feature: https://docs.stripe.com/billing/subscriptions/pending-updates

So 100% to confirm there is no way to authorize a payment check if it succeeds then use it in a subscription update. I just need to be 100% clear here.
Correct. You can't authorize the payment using a separate PaymentIntent and link it to a subscription invoice like that.

dim pilot
#

Bummer thank you for clarifying