#tkkuytool-invoice-email
1 messages · Page 1 of 1 (latest)
Hello 👋
Can you share the example API requests for how you're creating the invoices and how you're sending them to customers?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
First of all, I create a payment request with paymentintent (on my payment page), then I write the related transactions to the database if the transaction is successful at the callback endpoint. I also create an invoice with the following .net (c#) code.
var customerOptions = new CustomerCreateOptions
{
Name = "TuÄŸberk",
Email = "customer@mail.com",
Address = new AddressOptions
{
Line1 = "Istanbul",
City = "Istanbul",
PostalCode = "12345",
country = "US"
},
};
var customerService = new CustomerService();
var customer = customerService.Create(customerOptions);
var invoiceService = new InvoiceService();
var invoice = invoiceService.Create(new InvoiceCreateOptions
{
Customer = customer.Id,
AutoAdvance = true, // Set to pay invoice automatically
Description = "Test Invoice",
Currency = "eur",
CollectionMethod = "send_invoice",
DaysUntilDue = 7,
});
var options = new InvoiceItemCreateOptions
{
Customer = customer.Id,
PriceData = new InvoiceItemPriceDataOptions()
{
Currency = "eur",
UnitAmount = 100,
product = "product_id_example"
},
Description = "test - Test",
Invoice = invoice.Id
};
var service = new InvoiceItemService();
service.Create(options);
invoiceService.Pay(invoice.Id, new InvoicePayOptions()
{
PaidOutOfBand = true
});
thanks, looking..
Have you tried calling the Send invoice API endpoint explicitly to see if that worked?
https://stripe.com/docs/api/invoices/send
also, can you share an example invoice that wasn't sent to the customer?
tkkuytool-invoice-email