xendit-php icon indicating copy to clipboard operation
xendit-php copied to clipboard

The metadata field is not being sent or accepted by the createInvoice() method.

Open ahmaruff opened this issue 1 year ago • 2 comments

I want to create an invoice with some metadata so that I can identify the invoice type in my app. However, it seems that the CreateInvoiceRequest() method ignores the "metadata" field. When I bypass it (by directly passing the data into the createInvoice() method), it still behaves the same.

Here's my code:

 try {
            $resp = array();
            $invoiceRequest = new CreateInvoiceRequest($validated);
            $invoiceCreated1 = $apiInstance->createInvoice($invoiceRequest);
            $invoiceCreated2 = $apiInstance->createInvoice($validated);

            dd($invoiceCreated1,$invoiceCreated2); // both return the same
}

For the record, the documentation for this package also seems to ignore the metadata field. But why? According to the API documentation here, it clearly states that we can use metadata.

ahmaruff avatar Oct 17 '24 20:10 ahmaruff

i havre noticed createInvoice endpoint has a response containing the metadata but the metadata is not passed to the payment success hook .

is somebody at xendit going to fix this issue?

krisbaum74 avatar Jun 15 '25 22:06 krisbaum74

This is an issue 2 years ago already and it still exist. No one will actually fix it.

chillingpulsar avatar Oct 04 '25 11:10 chillingpulsar