...
Info |
---|
This endpoint is protected with OAuth 2.0 Bearer token. To find out more about authorization for Monnify endpoints, check Here |
Endpoint URL: {{base_url}}/api/v1/merchant/cards/charge
...
Code Block | ||
---|---|---|
| ||
{ "requestSuccessful": true, "responseMessage": "success", "responseCode": "0", "responseBody": { "status": "BANK_AUTHORIZATION_REQUIRED", "secure3dData": { "id": "769104908", "redirectUrl": "https://0eaf.cardinalcommerce.com/EAFService/jsp/v1/redirect", "callBackUrl": "https://webpay.interswitchng.com/collections/api/v1/pay/cardinalCallBack", "eciFlag": "07", "termUrl": "https://webpay.interswitchng.com/collections/api/v1/pay/cardinalCallBack", "acsUrl": "https://0eaf.cardinalcommerce.com/EAFService/jsp/v1/redirect", "paReq": "P.29bc9e4fb9c3cdd35c3cd6abf323a7544ed8da1a7b609462f2979c2c8cdf561736fbed57ed447ef69484556311fc0b08399a9b3a8f3ae94900d9e5cb443a1bf257541e1b931b67dfcb4c27ba64d06b53", "transactionId": "gJKEbN5MmwlkjcKwYAD0", "paymentId": "769104908", "method": "POST", "md": "769104908" }, "transactionReference": "MNFY|79|20220328040030|001015", "paymentReference": "u0v3ysqjp809883", "authorizedAmount": 20.0 } } |
Info |
---|
From the above response, the redirectUrl similar to the ascUrl is the url that takes the user to the VISA card website that has an input form to enter OTP sent to the user's phone number. For those using the API method, the backend sends the ascUrl, TermUrl,md and the PaReq response parameters to the frontend which runs an onload html form that redirects the user to VISA website. |
Code Block | ||
---|---|---|
| ||
<body onload ='form1.submit()'>
<form id="form1" action=ACSUrl method="post">
<input name="TermUrl" value={TermUrl}>
<input name="MD" value={MD}>
<input name="PaReq" value={PaReq}>
</form>
</body> |
Frontend posts an Html form that redirects to the VISA card website to collect OTP sent to the user’s phone. After the OTP verification is completed on the VISA card endpoint, it makes a post request to the callback URL, which is similar to what is given in the TermUrl(It’s also possible to replace the TermUrl with your own URL so as to know when OTP verification process ends).
Finally, to authorize the charge on the user’s card, you make an authenticated post request (containing your transaction reference, collection channel, api key, and card details) to the authorized endpoint. Check 3DS Secure Authentication on how to authorize the charge.
...
Field Parameters
Field | Description |
---|---|
transactionReference | Unique reference generated for the transaction by Monnify |
collectionChannel |
|
card | Object containing card information |
number | Card number |
expiryMonth | Card expiration month |
expiryYear | Card expiration year |
pin | Card pin from card owner |
cvv | Security code behind card |
tokenId | Token id from the request response (otpData.id) |
token | OTP from card owner (use 12345 for test card) |
...