I have been working with the Triggre API and I managed to successfully make a POST request for a nested JSON. I am getting a problem processing the response which comes in the following format:
" Successful Response
Upon a successful request a HTTP Status 201 will be returned and the location HTTP Header will contain the URL of the newly created Incoming Payment *HTTP/1.1 201 Created Location: https://sandbox.kopokopo.com/api/v1/incoming_payments/247b1bd8-f5a0-4b71-a898-f62f67b8ae1c*
I am able to pick the status code but I can’t pick the Created Location. Is anyone able to help out with how to pick it?
I’ve looked into your question and I’m afraid I have to tell you that it’s currently not possible for triggre to retrieve this response in the header. We’ll put it on our backlog to develop, but it will take some time.
The only solution I can think of is to create a small converter-script which creates the call for you and retrieves this URL and the incoperated ID and sends it back to Triggre itself.
We also have a Stripe-integration that you can use, would is be a solution for you to use that instead of Kopo Kopo?
Okay. Seems I may have to use Zapier for now. Sadly Stripe and other mainstream methods are generally not available in this region (East Africa) so we end up having to integrate local payment gateways.
Another option would be if Triggre could process incoming webhooks so I set the callback url to update my data items. Is this available?
Receiving and processing incoming webhooks is on our backlog as well, and quite high actually. However, in this specific situation that still wouldn’t be helpfull, since the ID of the payment is sent via the header and not in any other way. I actually haven’t seen an implementation like this before…
The only option then is to create a small converter-script or look into the Zapier solution you were talking about, though I’m not sure Zapier supports this. Please let me know if it does
Zapier works using the callback. The API gives the option of capturing the Location from the HTTP header and also sending a callback.
I will use Zapier for the time being and cross fingers that incoming webhooks go live on Triggre soon.