#BilalSaeedAlam
1 messages · Page 1 of 1 (latest)
https://stripe.com/docs/receipts#receipts-in-test-mode
you can view or manually send a receipt using the Dashboard.
you'll see a button for sending a receipt in the Dashboard page for a payment in test mode
Okay so it is not possible with fucnction automatically
Will there be some cost of charge to send an email automatically?
no
So in the live mode it will be possible to send recipt auomatically after charge?
Basically i need to check this if i charge customer and then automatically generate receipt so i can show to customer that this amount has been charged. Because i am setting everthing on automation so everytime i can not send receipt to customer manually by dashboard
https://stripe.com/docs/receipts
Stripe automatically sends email receipts after a successful payment or refund when you provide an email address in the Customer object of your API request
Yes i am passing this into payment intent object
const paymentIntent = await stripe.paymentIntents.create({
amount: 100,
currency: "usd",
// automatic_payment_methods: { enabled: true },
customer: data[0].customer,
payment_method: data[0].id,
off_session: true,
confirm: true,
receipt_email: customer ? customer.email : "",
description:
"3% of your purchase goes toward our ocean cleanup effort!",
});
But didn't recive any email just the one which i get it by manually
probably because you're in test mode and the receipt is not sent in test mode
And in response object invoice is null too
{
id: 'pi_3NGfUiJIXd7Tyawp1eruy8mT',
object: 'payment_intent',
amount: 100,
amount_capturable: 0,
amount_details: { tip: {} },
amount_received: 100,
application: null,
application_fee_amount: null,
automatic_payment_methods: null,
canceled_at: null,
cancellation_reason: null,
capture_method: 'automatic',
client_secret: 'pi_3NGfUiJIXd7Tyawp1eruy8mT_secret_h36zUr9L2MicXc0UAY0BdcOml',
confirmation_method: 'automatic',
created: 1686217864,
currency: 'usd',
customer: 'cus_O08vi5vdgirVPd',
description: '3% of your purchase goes toward our ocean cleanup effort!',
invoice: null,
last_payment_error: null,
latest_charge: 'ch_3NGfUiJIXd7Tyawp1d4EP3cq',
livemode: false,
metadata: {},
next_action: null,
on_behalf_of: null,
payment_method: 'pm_1NGQLCJIXd7TyawpW03dHrOr',
payment_method_options: {
card: {
installments: null,
mandate_options: null,
network: null,
request_three_d_secure: 'automatic'
}
},
payment_method_types: [ 'card' ],
processing: null,
receipt_email: 'alam@mediacarry.com',
review: null,
setup_future_usage: null,
shipping: null,
source: null,
statement_descriptor: null,
statement_descriptor_suffix: null,
status: 'succeeded',
transfer_data: null,
transfer_group: null
}
an invoice is not a receipt, so that's normal
Invoice is a specific different Stripe product(https://stripe.com/docs/invoicing), which you're not using, so don't worry about it.
And if i need that because in my application there will be orders their amounts and total so i need to send customer that invoice automatically
make sure you understand the difference between an Invoice and a Receipt first before deciding what you need.
Alright