Skip to content

StripeInvoice addLineItem not working #15

Description

@fedegiust

Hi,

I'm quite new to salesforce and got a task using your Stripe Client.
I've been trying to do the following.

Once an invoice is created on stripe, to use the webhook invoice.created and then add a line item to the invoice that was just created before process the invoice on Salesforce.

I'm trying now to use the addLineItem method but nothing gets added, and get nothing on the logs.

I've tried calling it like this

            StripeInvoiceItemResponse li = invoice.addLineItem(3);
            System.debug('### Invoice Line Item invoice: ' + li.invoice_id);
            System.debug('### Invoice line item id: ' + li.id);   

or simply

    invoice.addLineItem(3);

Nothing gets added to the invoice on stripe so I don't know exactly what am I missing.

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions