Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xendit InvoiceCallback Type not match with request body #223

Open
mcdanang opened this issue Aug 19, 2024 · 4 comments
Open

Xendit InvoiceCallback Type not match with request body #223

mcdanang opened this issue Aug 19, 2024 · 4 comments

Comments

@mcdanang
Copy link

image
From the documentation, all properties of Invoice Callback Object are in camelCase.

However, when I checked the request body in invoice webhook, all properties are in snake_case
image

So, the request body in invoice webhook not match with Invoice Callback Object

@itsmikesharescode
Copy link

Is there a way to make it work?

@mcdanang
Copy link
Author

mcdanang commented Aug 20, 2024 via email

@itsmikesharescode
Copy link

Hi Mike, To make it work, you can just create an extended interface. For instance, we can add "external_id" like this: interface ExtendedInvoiceCallback extends InvoiceCallback { external_id: string; } Now we can get "external_id" from Invoice Callback Object. Best Regards, Muhamad Danang Priambodo

On Tue, Aug 20, 2024 at 2:21 AM Mike John Eviota @.> wrote: Is there a way to make it work? — Reply to this email directly, view it on GitHub <#223 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQM65W6EUQOUGGPZV6Y45ODZSJASRAVCNFSM6AAAAABMXM2TD2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJXGI3TMMBXHE . You are receiving this because you authored the thread.Message ID: @.>

Will this work with this issue sir mcdanag #222

@mcdanang
Copy link
Author

Hi Mike, To make it work, you can just create an extended interface. For instance, we can add "external_id" like this: interface ExtendedInvoiceCallback extends InvoiceCallback { external_id: string; } Now we can get "external_id" from Invoice Callback Object. Best Regards, Muhamad Danang Priambodo

On Tue, Aug 20, 2024 at 2:21 AM Mike John Eviota @.> wrote: Is there a way to make it work? — Reply to this email directly, view it on GitHub <#223 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQM65W6EUQOUGGPZV6Y45ODZSJASRAVCNFSM6AAAAABMXM2TD2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJXGI3TMMBXHE . You are receiving this because you authored the thread.Message ID: _@**.**_>

Will this work with this issue sir mcdanag #222

I don't think so.

In this thread, the callback return the data (e.g. external_id) but the properties name not match with the Invoice Callback Object (externalId).

On the other hand, issue #222 doesn't return the url properties. I think you can just save the url in your own database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants