#jyn_webhooks
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/1270290885422350422
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐ happy to help
your account's default API version is 2023-10-16 and since 2022-11-15 we substituted the charges array by latest_charge https://docs.stripe.com/upgrades#:~:text=The charges property,charge property instead.
I see,so I need to use the "latest_charge": "ch_3PkMlaKm50QBZFhQ0szmEJDD" and make another API call to obtain the chages array, is that correct?
why do you need the list of charges? the latest charge is the one that either failed or passed
we need payment_method_details object in list of charges to obtain some useful information. currently the payload of latest_charge only a string e.g. ch_3PkMlaKm50QBZFhQ0szmEJDD
you can retrieve the latest_charge by ID https://docs.stripe.com/api/charges/retrieve and get the payment_method_details
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
thanks @jade flint !
besides @jade flint , I have another issue with Retrieve a PaymentIntent, should I leave this thread and create another thread? sorry im new here, just want to know if I should create a new thread or continue using this thread but with another topic.
no we can talk about it here
sure,
We're currently facing issue on one of our account with Stripe AU.
When we try to retrieve the payment from Stripe we gotten error No such payment_intent: 'pi_3PkfalKm50QBZFhQ0pdaa7A3' , but we can found the payment intent with pi_3PkfalKm50QBZFhQ0pdaa7A3 in the stripe dashboard.
payment_intent id: pi_3PkfalKm50QBZFhQ0pdaa7A3
request_id: req_Hxo8kf9PpvEIuY
"error.message":"No such payment_intent: 'pi_3PkfalKm50QBZFhQ0pdaa7A3'; code: resource_missing; request-id: req_Hxo8kf9PpvEIuY",
"error.stack_trace":"com.stripe.exception.InvalidRequestException: No such payment_intent: 'pi_3PkfalKm50QBZFhQ0pdaa7A3'; code: resource_missing; request-id: req_Hxo8kf9PpvEIuY\n\t
at com.stripe.net.LiveStripeResponseGetter.handleApiError(LiveStripeResponseGetter.java:742)\n\t
at com.stripe.net.LiveStripeResponseGetter.staticRequest(LiveStripeResponseGetter.java:532)\n\t
at com.stripe.net.LiveStripeResponseGetter.request(LiveStripeResponseGetter.java:88)\n\t
at com.stripe.net.ApiResource.request(ApiResource.java:169)
the PI you're trying to retrieve is on another account of yours
you created that PI with the acct_1O53WRKm50QBZFhQ account https://dashboard.stripe.com/logs/req_fW0ggf7umYsd75
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
and you're retrieving it using the SG account acct_18OcAIESJ0XXzhv1
We didn't specify any account during the retrieve. We just provided apiKey, it works for other Stripe Account, only Stripe AU gotten the issue of retrieving it using other acccount:
PaymentIntent.retrieve(piId, getRequestOption(txn));
private RequestOptions getRequestOption(EPCSessionTxn txn) {
return new RequestOptions.RequestOptionsBuilder()
.setApiKey(getApiKey(txn))
.build();
}
Just wondering is that possible that for new api version 2023-10-16 we need to specify accountId acct_1O53WRKm50QBZFhQ when retrieve payment intent?
The previous code was written for api version 2018-11-08
We are just enabling new account and reuse the same code
this means that you're using the wrong API keys
I think it's just a problem of secret key configuration in your code/environment
If that possible if you can help us to check what API key we are using when retrive the payment for request_id: req_Hxo8kf9PpvEIuY ? Because somehow some request is successful and some request hitting error, with the same env and same configuration.