#ebellotpu6_api

1 messages ¡ Page 1 of 1 (latest)

spring daggerBOT
#

👋 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/1413520431729868901

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

outer patrol
#

Hi there, looking at this now

#

Can you show me an example of what you're trying to change or what you're seeing?

fossil plover
#

i want to set the name of the Payment for invoice to Subscription: ES_Barcelona_4 | storage 203 - Prorrata (09/2024)

outer patrol
#

Got it, looking into it

#

Are you able to edit the description field of the payment intent or does that give an error?

fossil plover
#

I do that:
public Invoice CreateInvoicePayment(PaymentRequest payment, string apiKey)
{
Stripe.StripeConfiguration.ApiKey = apiKey;
try
{
// Create an Invoice
var invoiceOptions = new InvoiceCreateOptions
{
Customer = payment.CustomerId,
CollectionMethod = "charge_automatically",
Description = payment.Description,
//DefaultTaxRates = new List<string> { payment.TaxRateId }, // IVA 0%
DefaultPaymentMethod = payment.PaymentMethodId
};
var invoiceService = new InvoiceService();
var invoice = invoiceService.Create(invoiceOptions);

    // Create an Invoice Item with the Price, and Customer you want to charge
    var invoiceItemOptions = new InvoiceItemCreateOptions
    {
        Customer = payment.CustomerId,
        PriceData = new InvoiceItemPriceDataOptions
        {
            UnitAmount = payment.Amount,
            Currency = "eur",
            Product = payment.ProductId,
            TaxBehavior = "inclusive"
        },
        Invoice = invoice.Id,
        Description = payment.Description
    };
    var invoiceItemService = new InvoiceItemService();
    invoiceItemService.Create(invoiceItemOptions);

    // Pay the Invoice
    return invoiceService.Pay(invoice.Id);
}
catch (Exception e)
{
    _logger.LogInformation(e, $"StripeError: payment {JsonConvert.SerializeObject(payment)}");
    return null;
}

}

But this didn't change the title of the payment

#

?

#

????

outer patrol
spring daggerBOT
fossil plover
#

But the payment intent is not created unitl I pay the invoice...

loud light
#

Hi, taking over as my teammate needs to step away. Let me catch up.