This endpoint is to validate payment once a request is sent to the payment confirmation hook specified in your dashboard with the reference sent in a POST request to the payment confirmation url specified.
{ "status": "ok", "msg": "Payment retrieved", "data": { "status": true, "status_id": 102, "status_name": "Success", "reference_code": "e2437ab24b27affb", "amount": 100, "amount_formatted": "₦100", "date": "11th Sep 2018", "date_time": "2018-09-11 17:44:17", "email": "support@aimtoget.com", "phone": "+2349061668519", "description": "An aimtoget test payment", "channel": "Wallet", "metadata": { "referrer": { "name": "Referrer", "value": "https://aimtoget.com/product/pay-with-airtime" } } } }
Once request has been made and is successful, the value of status in the data object will return true.
It is also advice-able to check the amount returned.
if($response->data->status === true && $response->data->amount == $amount) { //Award value }