#nimish-tank_api
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/1389831611553546320
๐ 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.
- nimish-tank_webhooks, 15 hours ago, 18 messages
Hi! Sorry what is the exact question here?
I don't know what this req_uC2I28Btr6HxS6 ID is, and which API object data is received from it?
Are you able to access the request from your dashboard?
Which API is it where, if I pass this kind of ID, I get the object data?
This is an API to create a Refund. You will get a refund object ID that starts with re_. https://docs.stripe.com/api/refunds/object
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Looking into the event.
pls tell me where in refund id ?
You can use the charge ID, starting with ch_, in the event to retrieve the refund ID via the API: https://docs.stripe.com/api/charges/object#charge_object-refunds-object
I have check my charge object not find refund object
{
"id": "ch_3Rg3daBZi1m6nlLF0oX4gT78",
"object": "charge",
"amount": 600000,
"amount_captured": 600000,
"amount_refunded": 600000,
"application": null,
"application_fee": null,
"application_fee_amount": null,
"balance_transaction": "txn_3Rg3daBZi1m6nlLF0om0dKyw",
"billing_details": {
"address": {
"city": null,
"country": "IN",
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": null,
"name": null,
"phone": null,
"tax_id": null
},
"calculated_statement_descriptor": "BLUESKYBIO* BSPLICENSE",
"captured": true,
"created": 1751374214,
"currency": "usd",
"customer": "cus_S3S8KdCGi0N78t",
"description": null,
"destination": null,
"dispute": null,
"disputed": false,
"failure_balance_transaction": null,
"failure_code": null,
"failure_message": null,
"fraud_details": [],
"livemode": false,
"metadata": {
"platform": "OL",
"transaction_type": "payment"
},
"on_behalf_of": null,
"order": null,
"outcome": {
"advice_code": null,
"network_advice_code": null,
"network_decline_code": null,
"network_status": "approved_by_network",
"reason": null,
"risk_level": "normal",
"risk_score": 10,
"seller_message": "Payment complete.",
"type": "authorized"
},
"paid": true,
"payment_intent": "pi_3Rg3daBZi1m6nlLF0QvoM6C0",
"payment_method": "pm_1RRuwnBZi1m6nlLFuZpatq5G",
"payment_method_details": {
"card": {
"amount_authorized": 600000,
"authorization_code": "241635",
"brand": "mastercard",
"checks": {
"address_line1_check": null,
"address_postal_code_check": null,
"cvc_check": null
},
"country": "US",
"exp_month": 1,
"exp_year": 2040,
"extended_authorization": {
"status": "disabled"
},
"fingerprint": "M2gNM1AgYYUbggx9",
"funding": "credit",
"incremental_authorization": {
"status": "unavailable"
},
"installments": null,
"last4": "4444",
"mandate": null,
"multicapture": {
"status": "unavailable"
},
"network": "mastercard",
"network_token": {
"used": false
},
"network_transaction_id": "MCCM2GNM10702",
"overcapture": {
"maximum_amount_capturable": 600000,
"status": "unavailable"
},
"regulated_status": "unregulated",
"three_d_secure": null,
"wallet": null
},
"type": "card"
},
"radar_options": [],
"receipt_email": null,
"receipt_number": null,
"receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xOWc3V1VCWmkxbTZubExGKJKLk8MGMgbpE-2uNI86LBbzyg9DRa_zNMX_P7UMB7iOW7C_nWeYyfw3ewhqMMTu08s7X0fitJJMOAO7",
"refunded": true,
"review": null,
"shipping": null,
"source": null,
"source_transfer": null,
"statement_descriptor": null,
"statement_descriptor_suffix": "BSPLicense",
"status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
public function chargeRetrieve($chargeId)
{
try {
$chargeData = Charge::retrieve(
$chargeId,
[]
);
return $chargeData;
} catch (ApiErrorException $error) {
Log::error('Stripe charge retrieve failed', [
'charge_id' => $chargeId,
'error' => $error->getMessage()
]);
return null;
} catch (Exception $error) {
Log::error('Stripe charge retrieve failed', [
'payment_intent' => $chargeId,
'error' => $error->getMessage()
]);
return null;
}
}
this is my charge retrieve code
You need to expand the refund object: https://docs.stripe.com/api/expanding_objects
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
$chargeData = Charge::retrieve(
$chargeId,
['expand' => ['refunds'],]
);
i have tried this, but it's not working.
I have been trying for 2 days, please give me the solution. Tell me why my code is wrong and correct it for me.
$stripe->charges->retrieve(
'ch_3Ln0WI2eZvKYlo2C1PO0FwVL',
['expand' => ['customer', 'payment_intent.customer']]
);
i have try this but not refund object finding
Apologies I was working on another thread. Looking into this now.
How i need to refund id
The code you provided below, is the charge ID, ch_3Ln0WI2eZvKYlo2C1PO0FwVL, correct? Also you should pass refunds in the expand [ ].
$stripe->charges->retrieve(
'ch_3Ln0WI2eZvKYlo2C1PO0FwVL',
['expand' => ['customer', 'payment_intent.customer']]
);
The correct way should be:
$stripe->charges->retrieve(
'ch_3Rg3daBZi1m6nlLF0oX4gT78',
['expand' => ['refunds']]
);