/
Card Tokenization
Card Tokenization
To charge a card using the saved token, you will need to send a request to the endpoint below:
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-card-token
Content-Type: application/json
HTTP Method: POST
The {{base_url}} for test is https://sandbox.monnify.com
but when you go live, it changes to the live url
Sample Request
{
"cardToken": "MNFY_6A9DAD234B3E4E3C965B8F1D7BA8E0DE",
"amount": 50,
"customerName": "Smart Mekiliuwa",
"customerEmail": "smekiluwa@teamapt.com",
"paymentReference": "1642776682937",
"paymentDescription": "Paying for Product A",
"currencyCode": "NGN",
"contractCode": "675234136342",
"apiKey": "MK_TEST_VR7J3UAACH",
"metaData": {
"ipAddress": "127.0.0.1",
"deviceType": "mobile"
}
}
Sample Response
{
"requestSuccessful": true,
"responseMessage": "success",
"responseCode": "0",
"responseBody": {
"transactionReference": "MNFY|63|20220126120647|000042",
"paymentReference": "1643195206829",
"amountPaid": "30.00",
"totalPayable": "30.00",
"settlementAmount": "29.61",
"paidOn": "26/01/2022 12:06:52 PM",
"paymentStatus": "PAID",
"paymentDescription": "Paying for Product A",
"currency": "NGN",
"paymentMethod": "CARD",
"product": {
"type": "API_NOTIFICATION",
"reference": "1643195206829"
},
"cardDetails": {
"cardType": "MasterCard",
"last4": "2293",
"expMonth": "09",
"expYear": "24",
"bin": "539923",
"bankCode": null,
"bankName": null,
"reusable": true,
"countryCode": null,
"cardToken": "MNFY_A1BFC27BDE30453E95FA4E5E4055C9D8",
"supportsTokenization": false
},
"accountDetails": null,
"accountPayments": [],
"customer": {
"email": "smekiluwa@teamapt.com",
"name": "Smart Mekiliuwa"
},
"metaData": {
"deviceType": "mobile",
"ipAddress": "127.0.0.1"
}
}
}
You can also split payments among SubAccounts when attempting to charge a tokenised card.
This can be done using the incomeSplitConfig parameter.
Sample Request
{
"cardToken": "MNFY_6A9DAD234B3E4E3C965B8F1D7BA8E0DE",
"amount": 20,
"customerName": "Marvelous",
"customerEmail": "customer@gmail.com",
"paymentReference": "164277668999hbj2937",
"paymentDescription": "Paying for Product A",
"currencyCode": "NGN",
"contractCode": "675234136342",
"apiKey": "MK_PROD_WTZLS10MX6",
"incomeSplitConfig": [
{
"subAccountCode": "MFY_SUB_637933382917",
"feePercentage": 100,
"splitPercentage": 20,
"feeBearer": true
}
]
}
Sample Response
, multiple selections available,
Related content
Initialize Transaction
Initialize Transaction
More like this
Recurring Payments
Recurring Payments
Read with this
Pay with Card
Pay with Card
More like this
Account Direct Debits
Account Direct Debits
Read with this
Authorize OTP
Authorize OTP
More like this
Create A Mandate
Create A Mandate
Read with this