I am successfully using the PHP API to create invoices but I would like to know how I can capture the response from the API. For example, the invoice number that’s created, was the call successful, if the call failed, what was the reason or error?
Basically I normally hit an API then capture the response and act on it.
Another example would be setting auto-bill to true, can I get feedback from the API to tell me if the payment failed or not so I know if I should deliver the product, tell the customer the payment failed etc?
How would I know the invoice number in my code to query the invoice lol
The documentation for the PHP API is super limited. There are very few examples. I don’t know how to get anything back from your API. I only see how to create the invoice. How do I capture the data your API is returning such as errors, invoice numbers etc?
For anyone trying to accomplish the same, here is some more specifics on, for example how to get the invoice number in the response after creating an invoice using the PHP SDK.