#sg_plugin-sources

1 messages ¡ Page 1 of 1 (latest)

viscid lichenBOT
#

👋 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/1287793475059847339

📝 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.

elfin river
#

Hello

#

PaymentIntents are higher-level objects than Charges

#

When you confirm a PaymentIntent a Charge is then created

elfin river
#

Sure thing

past barn
#

I receive the below object with paymnet_intent.succeded in which there is last4 property and also latest_charge contains an Id only
In this scenario, kindly assist me to get the last4 property to get the sepa iBAN's last 4 digits to store it for the sutomers reference

#

{
"id": "evt_3Q24r8RrdTkOmFTj16KsBM7q",
"object": "event",
"api_version": "2024-06-20",
"created": 1727069806,
"data": {
"object": {
"id": "pi_3Q24r8RrdTkOmFTj1HjOvDbE",
"object": "payment_intent",
"amount": 26667,
"amount_capturable": 0,
"amount_details": {
"tip": {
}
},
"amount_received": 26667,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"client_secret": "pi_3Q24r8RrdTkOmFTj1HjOvDbE_secret_4WdvWfeP8sFhJzRlAVP4FTj11",
"confirmation_method": "automatic",
"created": 1727069442,
"currency": "eur",
"customer": "cus_QtscLhoa6RVoAu",
"description": "Rental Amount",
"invoice": null,
"last_payment_error": null,
"latest_charge": "py_3Q24r8RrdTkOmFTj1Yx75Y3X",
"livemode": false,
"metadata": {
},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1Q24r6RrdTkOmFTjNB7yY13X",
"payment_method_configuration_details": null,
"payment_method_options": {
"sepa_debit": {
}
},
"payment_method_types": [
"sepa_debit"
],
"processing": null,
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
},
"livemode": false,
"pending_webhooks": 1,
"request": {
"id": null,
"idempotency_key": null
},
"type": "payment_intent.succeeded"
}

elfin river
#

Yep read the above -- you now retrieve the PaymentIntent and expand latest_charge. See: https://stripe.com/docs/expand for how to expand if you aren't familiar.

past barn
#

I will cehck it out and let you know

#

one more question

#

I have migrated from sources and charges api to paymentIntent API
in this case, I would have to receive the only payment_intent.succeeded event through webhook event calls
but why I still receive charge.succeed event in the webhook

elfin river
#

Because Charges are still created as I noted above

#

However with this integration you can ignore charge.succeeded

#

Feel free to remove it from the Event Types that your endpoint listens to.

#

You can just handle everything based on receiving payment_intent.succeeded

past barn
#

does it mean that payment_intent.succeeded event doesnt need to be listened and only charge.succeed is enough to listen after migration is done?????

elfin river
#

That is up to you

#

Either could work though we overall recommend listening to payment_intent.succeeded as it is higher-level and will contain more data.

past barn
#

ohh ok fine

elfin river
#

Mostly it depends on your integration and what data you need

past barn
elfin river
#

The Event contains the object

past barn
#

I will check the links shared by you

viscid lichenBOT
sage dew
#

sg_paymentintent-reconciliation

past barn
#

hello

#

Kindly let me know that do I have to add the expand option as below
var options = new PaymentIntentCreateOptions
{
PaymentMethod = StripeChargeModal.PaymentMethodId,
Amount = Convert.ToInt32(chargeAmount * 100),
Currency = StripeChargeModal.OrderCurrencyType,
Description = StripeChargeModal.PaymentDescription,
CaptureMethod = "automatic",
Confirm = true,
ConfirmationMethod = "automatic",
SetupFutureUsage = "off_session",
Expand = new List<string> { "latest_charge" },
Customer = customer?.Id
};

                        var service = new PaymentIntentService();
                        paymentIntent = service.Create(options);
sage dew
#

yeah that would expand the Charge that is created. You can test this in Test mode end to end to verify

past barn
#

I will check it out

#

You can test this in Test mode end to end to verify --- means?
is there any interface to cehck it out this???

#

you mean this test mode toggle button???

sage dew
past barn
sage dew
#

that button is just a UI switch for the UI in the Dashboard yes.

past barn
#

thanks for the clarification

#

I will check it out later today

#

one more support required from you on migrating the already added / authorized users data for recurring payments

#

The below are the src ids for the customers authorized with the sources API
src_1Q0HfoEtzJLzN4Bf5AioowYa
src_1PsT8MEtzJLzN4BfNf2FVdrI
src_1Ps7XsEtzJLzN4Bf3R1GWNCE
src_1Ps78CEtzJLzN4Bf3GcxPUUX
src_1PiVO4EtzJLzN4BfdlbYDwNR
src_1PiK4VEtzJLzN4BflRhKp4hF

#

these are examples, there are lots of live customers who have the iBAN numbers authorized for recuring payments

sage dew
#

I'm sorry, do you have a clear/exact question?

past barn
#

I need to migrate these authorized ids so that I can use with Payment intent APIs for recuring payments

sage dew
#

Try to pause, take a couple step back and try to ask one clear question all in one message so I can help you please

past barn
sage dew
#

You likely got an email telling you about the required migration? Sorry you are provided really few words every sentence, it's not easy to help you and understand what you are trying to answer

past barn
#

I have a customer data (cus_PWARUieNCn2eFW & src_1Oh86REtzJLzN4BfuuuM8cFW) authorized for recurrring payments
these data are created by sources API

I need to migrate these data so that I can use these data using payment intent API for recurring payments
kindly share the detils on it

sage dew
#

I need to migrate these data so that I can use these data using payment intent API for recurring payments
why? Can you clearly explain why you think you have to do that?

past barn
#

sorry for the inconvenience

#

I will explain with more details

sage dew
#

Did you get an email asking you to migrate? That's the part that is crucial to understand so I can help you

past barn
#

Im working on the migration processs as per the mail received as below

sage dew
#

Perfect! So that email should have detailed instructions and links to docs about what to do. There's a tool called Workbench in the Dashboard that would migrate all your old Sources src_123 to PaymentMethods pm_123. So I'd recommend reading those docs carefully. But if you have questions about that process, I recommend contacting our support team: https://support.stripe.com/contact for 1:1 help as they are better equipped to guide you on this migration

past barn
sage dew
#

see what I said above already

past barn
#

yes

#

I want to migrate the with ONLY coding, not using the workbench

sage dew
#

You can't, so you have to use Workbench for this

past barn
#

kindly share the details for that

past barn
sage dew
#

I'm sorry but this is impossible. There is no way to migrate with just code. You have to use that UI. Or your user(s) will need to use that UI themselves

#

sg_plugin-sources

past barn
#

kindly confirm me that the below are the points of my understanding on the migrtion process

  1. if we dont have the connected account for our customers, then each of the customers have to migrate their data using the UI migration tool in the stripe dashboard
  2. there is no way to migrate with code
sage dew
#

correct

past barn
#

thanks for confirmation

sage dew
#

sure!

past barn
#

one more clarification
is there any event which will be triggered through webhook events once the migration is done ??
are the old Sources and new PaymentMethods notified after the migration is succeddfully done so that we will update the data in our database to use it for future recuring payments???

sage dew
#

I don't know for sure, the best approach is to reach out to our support team and ask them for help on how to test this end to end as a plugin/saas developer

past barn