Since they are using PHP, using a framework such as Slim or Silex to build their API would make lots of sense without having force developers to use obnoxious HTML just to send a dead-simple POST request.
You can “POST” data without explicitly using an HTML form, though.
@collizo4sky Its no doubt that all Nigeria payment service has such a frustrating APIs. But I feel this is due to security reason which I think our payment processors in Nigeria are not ready to invest much on security and fraud protection. No doubt Stripe is good, and our payment processors are not making effort to be better rather they’re killing small businesses.
I’ll be glad if you’ll come and change this for us wink
They all use Interswitch and Interswitch does not offer REST APIs you can send card details for processing. (At last check). To pay, the user needs to be redirected to the Interswitch payment page. The processor needs to do this, i.e redirect the user to Interswitch, that’s why the HTML form comes in. The flow is something like this: Form (with hidden payment details) => Processor page => Interswitch
So if you post via other means, Curl for example, you don’t get redirected to the Processor and then Interswitch. The form ensures this by not just posting the details but redirecting you to the payment page (via the action attribute).
The reason is the same reason (excuse) for everything payment in Nigeria, CBN regulations. You can’t accept user card details on your site, heck, I will not enter my card details on any site, I’d rather use PayPal.
The only logical way will be to send payment details to the payment processor and since using GET will make the URL messy and stick to user browser history, POST is a better option to send payment details.
Most of the named processors allow you to use REST when validating their response. So it’s not like they don’t know what’s easier to work with.