#geeky-mechanic_api
1 messages ¡ Page 1 of 1 (latest)
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.
- geeky_express-transfer, 18 hours ago, 12 messages
- geeky-mechanic_api, 20 hours ago, 14 messages
đ 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/1245347264755667077
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
I get this error
com.stripe.exception.InvalidRequestException: No such charge: 'py_1PLlBiPCdskAxs1aRpBBi1t7'; code: resource_missing; request-id: req_1rKKo5gqIGG1PD
Howver when looking up that py_1PL id, its really there :
"id": "py_1PLlBiPCdskAxs1aRpBBi1t7",
"object": "charge",
"amount": 95722,
"amount_captured": 95722,
"amount_refunded": 0,
"application": "ca_OASxhuCSheGYbfpprNLEBAvRxON0wk6A",
"application_fee": null,
"application_fee_amount": null,
"balance_transaction": "txn_1PLlBjPCdskAxs1aL6Ensze8",
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": null,
"name": null,
"phone": null
},
"calculated_statement_descriptor": null,
"captured": true,
"created": 1716984063,
"currency": "cad",
"customer": null,
"description": null,
"destination": null,
"dispute": null,
"disputed": false,
"failure_balance_transaction": null,
"failure_code": null,
"failure_message": null,
"fraud_details": {},
"invoice": null,
"livemode": false,
"metadata": {},
"on_behalf_of": null,
"order": null,
"outcome": null,
"paid": true,
"payment_intent": null,
"payment_method": null,
"payment_method_details": {
"stripe_account": {},
"type": "stripe_account"
},
"receipt_email": null,
"receipt_number": null,
"receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xUENveFNQQ2Rza0F4czFhKMq03LIGMga_3HdnPXM6LBZRbmXpqwz2FgAOOqEgyRX5DIYu3kofzb8s930ybkk3w6AcQCfkobMO6O0-",
"refunded": false,
"review": null,
"shipping": null,
"source": {
"id": "acct_1Kj8JCAfoReX6Tch",
"object": "account",
"application_icon": "https://files.stripe.com/links/MDB8YWNjdF8xS2o4SkNBZm9SZVg2VGNofGZsX2xpdmVfZTBZMzRBa1JMeHRBTThSRThGT0lmR2c000BoTjpsgP",
"application_name": "Software"
},
"source_transfer": "tr_3PLlB4AfoReX6Tch1UyKwwgg",
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"status": "succeeded",
"transfer_data": null,
"transfer_group": null
}```
Hi, let me help you with this.
I believe the issue is due to the charge living on the Connected Account, but you're looking for it on the Platform. You should use the stripeAccount header when making the request: https://stripe.com/docs/connect/authentication
I was going to say that there was an issue in my request, but according to what I'm reading, I believe my request should reference the account :
// fetch the destination payment charge
Charge charge = StripeAssetFetcher.build(stripeErrorRepository).getCharge(transfer.getDestinationPayment());
// update its description
ChargeUpdateParams chargeUpdateParams = ChargeUpdateParams.builder()
.setDescription(
description
)
.build();
// reference the connect account
RequestOptions requestOptions = RequestOptions.builder()
.setStripeAccount(transfer.getDestination()).build();
try {
charge.update(chargeUpdateParams, requestOptions);
}
This was my latest transfer's destination field : acct_1PCoxSPCdskAxs1a
Which is indeed a Connect account
In this charge object, I see no reference to this connect account however
Yes, we normally don't put the owning account ID in the object itself.
Are you sure this transfer.getDestination() is returning the acct_xxx?
Does it still fail?
Is this the same code that sent this request? req_1rKKo5gqIGG1PD
I see that this is the update request though, not GET
Its this request that failed : req_fPkeYRcnajdEU8
com.stripe.exception.InvalidRequestException: No such charge: 'py_1PLla4PCdskAxs1aUxjsRkoh'; code: resource_missing; request-id: req_fPkeYRcnajdEU8
I don't see the StripeAccount header on this request.
HHmmm
Is it this line that's failing?
Charge charge = StripeAssetFetcher.build(stripeErrorRepository).getCharge(transfer.getDestinationPayment());
Yeah, I was mixed up, thanks for pointing it out, I added the header i'll test it again
Seems like it worked, sorry for the headache, and thanks!!
No worries, glad it works now.
Happy to help.