#hiren-prajapati_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/1324662963293913139
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
in attached image to how to pay funds using bank details for testing trasaction test mode?
how to Redirect from stripe invoice page to the web app
No there is no redirection to made from Stripe Invoice to the bank web page. In live mode customer should open their bank account of their choice, and make a transer to the details shown in the formm (same you are showing in the Screenshot)
In test mode, here are the steps to follow:
https://docs.stripe.com/payments/bank-transfers/accept-a-payment?payment-ui=direct-api#test-your-integration
Okay, how to perform this steps can you help me for
In test mode, why send invoice is not send to email address give by when create stripe customer?
This is a different question actually.
which one
In test mode, why send invoice is not send to email address give by when create stripe customer?
Stripe don't send emails in test mode. If you want to test invoice emailing you need to use your Stripe email as a Customer email in test mode in order to get an email:
https://docs.stripe.com/test-mode#test-email
in attached image to how to pay funds using bank details for testing trasaction test mode?
You to follow this step in order to add test funds to your test customer
<https://docs.stripe.com/payments/bank-transfers/accept-a-payment?payment-ui=direct-api#test-your-integration
not getting I have try
Sorry I'm not understanding your last follow up.
export async function createInvoice(stripeCustomerId, milestone) {
try {
// Create the invoice
const invoice = await stripe.invoices.create({
customer: stripeCustomerId,
collection_method: 'send_invoice',
due_date: Math.floor(Date.now() / 1000) + 7 * 24 * 60 * 60,
payment_settings: {
payment_method_types: ['customer_balance', 'card'], // Enable customer balance and card
},
auto_advance: true, // Invoice will not auto-finalize until payment is made
metadata: {
freelancerId: milestone.freelancerId,
milestoneId: milestone.id,
projectId: milestone.projectId,
description: Milestone payment for ${milestone.title},
},
});
// Create a new invoice item (chargeable amount)
const invoiceItem = await stripe.invoiceItems.create({
customer: stripeCustomerId,
amount: Math.round(milestone.paymentAmount * 100),
currency: milestone.currency.toLowerCase(),
description: milestone.title, // Description
invoice: invoice.id,
});
// Finalize the invoice (send to client)
const finalizedInvoice = await stripe.invoices.finalizeInvoice(invoice.id);
// // Get the hosted invoice URL
const hostedInvoiceUrl = finalizedInvoice.hosted_invoice_url;
const invoicePdfUrl = finalizedInvoice.invoice_pdf;
return { invoice: finalizedInvoice, hostedInvoiceUrl, invoicePdfUrl };
} catch (error) {
console.error('Error creating invoice:', error);
throw error;
}
}
i have created invoice in test mode so why not geeting send invocie emai how can i test in test mode
i have created invoice in test mode so why not geeting send invocie emai how can i test in test mode
Have you had a chance to read the guide I shared?
https://docs.stripe.com/test-mode#test-email
Your test customer need to have your Stripe Account email in order to get an email in test mode.
Yes have to customer stripe email but not getting
THanks man perfect
Your Stripe email h****h@gmail.com is different from the Customer email h***p@it***ions.co.in. Could you please make another test ?
Okay got it i have to create new custrome using stripe customer email correct ?
after make to test correct?
Yes
if stripe email and customer is same to so work send email invocie right?
Yes in test mode.
Okay let me do that
in_1Qd7XMBB4d7UbQKnccbAjRSj
not working man
I have try
you can check now req_id
??
I do see an event invoice.sent generated, have you checked all your email boxes ?
What about your spam ?
Not there also
Can you delete this webhook endpoint we_1Qc67rBB4d7UbQKnXMt33g3x and do the test again.
I'm suspecting that the pending event is blocking the email sending...
Checking...
we don't send emails in test mode as far as I know, you should use the buttons in the Dashboard to preview and send an email.
Okay got it man I know for that you are correct
when pay the invoice righ using card method so in stripe customer balance is why pending this amount webhook event geeting me paid status so why balance amount is pending in test mode
I'm sorry that's really hard to understand. Could you rephrase the sentence/use more punctuation, and share a specific technical example of e.g. the JSON field you're looking at and what value you expect to see?