#adil
1 messages · Page 1 of 1 (latest)
What does a 'payment ID' look like?
pi_3NRZJVSCq3EU2irS1ZWuYk50
Ok, so the receipt_url field is on the underlying Charge: https://stripe.com/docs/api/charges/object#charge_object-receipt_url
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I am using session checkout url field comes empty
You need to 'expand' the latest_charge field on the Payment Intent: https://stripe.com/docs/api/payment_intents/object#payment_intent_object-latest_charge
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
That will include the receipt_url field
where not found the object
please give me proper reference
how to get the receipt url with the payment id
I just explained how. You need to 'expand' the latest_charge field on your Payment Intent, you can do that by retrieving the Payment Intent via the API, and passing the expand: ['latest_charge'] parameter
the latest charge is not working with the payment intent retreiw
i am using this $paymentId = 'PAYMENT_ID'; // Replace with the actual payment ID
$paymentIntent = PaymentIntent::retrieve($paymentId);
$charges = $paymentIntent->charges->data;
this give me No such payment_intent: 'pi_3NRZJVSCq3EU2irS1ZWuYk50'"
Can you share the ID (req_xxx) of the failing API request? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
pi_3NTfI7HySlJzISBO1klJ9A9C
That's not the ID of the API request. And that's also a different ID to the one you shared in the error
Is it pi_3NRZJVSCq3EU2irS1ZWuYk50 or pi_3NTfI7HySlJzISBO1klJ9A9C
check this one this is the latest one generated pi_3NTfI7HySlJzISBO1klJ9A9C
This is the payment ID
I only need receipt URL
Ok, then use this code:
PaymentIntent::retrieve({
id: $paymentId,
expand: ['latest_charge']
});
Then in the response, you'll have a latest_charge.receipt_url field
let me check