#geeky-mechanic_api

1 messages ¡ Page 1 of 1 (latest)

vestal knollBOT
verbal perchBOT
#

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.

vestal knollBOT
#

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

stone dome
#

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
}```
shadow sinew
#

Hi, let me help you with this.

stone dome
#

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

stone dome
shadow sinew
#

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?

stone dome
#

1 sec

#

Straight from my logs :
Transfer destination: acct_1PCoxSPCdskAxs1a

shadow sinew
#

Does it still fail?
Is this the same code that sent this request? req_1rKKo5gqIGG1PD

shadow sinew
stone dome
#

Its this request that failed : req_fPkeYRcnajdEU8

#

com.stripe.exception.InvalidRequestException: No such charge: 'py_1PLla4PCdskAxs1aUxjsRkoh'; code: resource_missing; request-id: req_fPkeYRcnajdEU8

shadow sinew
#

I don't see the StripeAccount header on this request.

stone dome
#

HHmmm

shadow sinew
#

Is it this line that's failing?

Charge charge = StripeAssetFetcher.build(stripeErrorRepository).getCharge(transfer.getDestinationPayment());

stone dome
#

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!!

shadow sinew
#

No worries, glad it works now.
Happy to help.

vestal knollBOT