#venkateshjsoft

1 messages · Page 1 of 1 (latest)

solar juncoBOT
full flame
jolly tundra
#

for the recurring payments, we need to collect subscription fee from the customer

#

after 15 days

#

I see here we set Mode = "setup"

#

than mode = "payment"

#

can we use this mode for all payment methods?

#

card, ideal, sepa-debit etc

full flame
#

All payment methods that support it, yes

jolly tundra
#

okay thanks

#

let me check

#

Stripe.StripeException: Mode cannot be setup when using prices.

#

im getting this error

full flame
#

Sounds like you're trying to pass a price into Checkout Session that's in setup mode. Either change it to payment mode, or remove the Price

jolly tundra
#

as per this document, on the step 3, it says charge your customer again

#

but in the step 1 and 2 we are not charging the customer

#

also in the checkout page, we are not showing how much money we are going to charge customer

full flame
#

That error only occurs when you're creating a Checkout Session in setup mode while trying to pass it a Price object ID or while passing line_item

jolly tundra
#

I understand

#

im trying to find solution to address 2 problems

#

I have 2 types of payment (card, ideal, sepa, sofort)

#

I want to charge the customer first time and later during renewal

#

I was trying to use checkout option

#

with mode = payment

#

this works fine for all payment types, but I want to charge the customer again during renewal, I belive ideal, sofort wont support this

#

how can i solve this issue

full flame
#

If you're using Subscriptions with Stripe, you can't. They don't support subscription charges. If you just want to charge them again, you create a payment and pass in the Payment Method's ID

jolly tundra
#

okay fine

#

When you need to charge your customer again, create a new PaymentIntent. Find the ID of the SEPA Direct Debit payment method by retrieving the SetupIntent and expanding the latest_attempt field where you will find the generated_sepa_debit ID inside of payment_method_details.

#

im not able to see the payment_method_details inside the setuppayment response

#

var options = new SetupIntentGetOptions
{
Expand = new List<string> { "latest_attempt" },
};
var service = new SetupIntentService();
service.Get("{{SETUP_INTENT_ID}}", options);

solar juncoBOT
lethal yarrow
#

Hello! I'm taking over and catching up...

#

Can you give me the ID of the Setup Intent you're trying to get the latest_attempt from?

jolly tundra
#

seti_1NdcDWDEdWHgNJdagK7RPWmh

#

the object is not availabel to access

#

looks like its a mistake in the document

#

there is no class payment_method_details under setupintent response

lethal yarrow
#

Looking...

#

Have you looked at those properties?

jolly tundra
#

as per this document I can get the SEPA_DEBIT_PAYMENT_METHOD_ID from the setup intent

#

var options = new SetupIntentGetOptions
{
Expand = new List<string> { "latest_attempt" },
};
var service = new SetupIntentService();
service.Get("{{SETUP_INTENT_ID}}", options);

lethal yarrow
#

What do you do after that though?

jolly tundra
#

I was trying to get the SEPA_DEBIT_PAYMENT_METHOD_ID

#

but that object is not there

lethal yarrow
#

Get it how though?

#

What code are you using to do that?

jolly tundra
#

var options = new SetupIntentGetOptions
{
Expand = new List<string> { "latest_attempt" },
};

        var service = new SetupIntentService();

        return service.Get(setupIntentId, options);
lethal yarrow
#

Right, then what?

jolly tundra
#

this method returns setup intent, but in the response Im not able to find any property related to SEPA_DEBIT_PAYMENT_METHOD_ID

#

I need this to process the actual payment

#

I setup the payment first, now I need to charge the customer with the actual price

#

so I need sepa debit payment method id

lethal yarrow
#

I don't understand what you mean when you say you can't find the property; can you share the full object you're getting back?

jolly tundra
#

sure

#

give me 2 min

#

req_7kEt2BKM4KtiVi

#

this is the request id

lethal yarrow
#

Unfortunately I can't see GET request responses on my end. Can you log the entire object in your code and provide the output?

jolly tundra
#

it will be huge, can I share screenshot

lethal yarrow
#

Yeah, it's right there where it's expected to be, pm_1NdcnlDEdWHgNJdaTRI1k3Lf under latest_attempt.payment_method_details.ideal.generated_sepa_debit.