Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

To be granted access to this API, you will be required to be PCI-DSS certified. For further inquiries, please reach out to integrations@monnify.com

...

Charge Card with no OTP

Info

Endpoint
POST: https://sandbox.monnify.comThis endpoint is protected with OAuth 2.0 Bearer token

Endpoint URL: {{baseurl}}/api/v1/merchant/cards/charge

This endpoint is protected by Bearer TokenHTTP Method: POST

Info

The {{base url}} for test is https://sandbox.monnify.com but when you go live, it changes to the live url

Sample Request Body (with no OTP)

Code Block
languagejson
{
    "transactionReference": "MNFY|20190514172736|000001",
    "collectionChannel": "API_NOTIFICATION",
    "card": {
        "number": "4111111111111111",
        "expiryMonth": "10",
        "expiryYear": "2022",
        "pin": "1234",
        "cvv": "122"
    }
}

Sample Response (with no OTP)

Code Block
languagejson
{
    "requestSuccessful": true,
    "responseMessage": "success",
    "responseCode": "0",
    "responseBody": {
        "status": "SUCCESS",
        "message": "Transaction Successful",
        "transactionReference": "MNFY|54|20210429142557|000206",
        "paymentReference": "1619702756719",
        "authorizedAmount": 2000.00
    }
}

...

Charge Card with OTP

Info

This endpoint is protected with OAuth 2.0 Bearer token

Endpoint

...

URL: {{baseurl}}/api/v1/merchant/cards/charge

This endpoint is protected by Bearer TokenHTTP Method: POST

Sample Request Body (with OTP)

Code Block
languagejson
{
    "transactionReference": "MNFY|54|20210429142945|000208",
    "collectionChannel": "API_NOTIFICATION",
    "card": {
        "number": "5061040000000000215",
        "expiryMonth": "09",
        "expiryYear": "2022",
        "pin": "1234",
        "cvv": "122"
    }
}

Sample Response (with OTP)

Code Block
languagejson
{
    "requestSuccessful": true,
    "responseMessage": "success",
    "responseCode": "0",
    "responseBody": {
        "status": "OTP_AUTHORIZATION_REQUIRED",
        "message": "OTP Authorization required",
        "otpData": {
            "id": "2000.00-e944ba213f0acbc90a16b292ba353b2f",
            "message": "Please enter OTP. Use 123456 as token"
        },
        "transactionReference": "MNFY|54|20210429142945|000208",
        "paymentReference": "1619702984105",
        "authorizedAmount": 1000
    }
}

...


Authorize OTP

Info

This endpoint is protected with OAuth 2.0 Bearer token

Endpoint

...

URL: {{baseurl}}/api/v1/merchant/cards/otp/authorize

This endpoint is protected by Bearer TokenHTTP Method: POST

Sample Request

Code Block
languagejson
{
    "transactionReference": "MNFY|54|20210429142945|000208",
    "collectionChannel": "API_NOTIFICATION",
    "tokenId": "2000.00-e944ba213f0acbc90a16b292ba353b2f",
    "token": "123456"
}

Sample Response

Code Block
languagejson
{
    "requestSuccessful": true,
    "responseMessage": "success",
    "responseCode": "0",
    "responseBody": {
        "status": "SUCCESS",
        "message": "Transaction Successful",
        "transactionReference": "MNFY|54|20210429142945|000208",
        "paymentReference": "1619702984105",
        "authorizedAmount": 2000.00
    }
}

...

3DS Secure Authentication Transaction

Info

Endpoint
POST: https://sandbox.monnify.com/This endpoint is protected by basic authentication

Endpoint URL: {{baseurl}}/api/v1/merchant/cards/charge

This endpoint is protected by basic authenticationHTTP Method: POST

Sample Request

Code Block
languagejson
 {
    "transactionReference": "MNFY|19|20210430115705|000243",
    "collectionChannel": "API_NOTIFICATION",
    "card": {
        "cvv": "123",
        "expiryMonth": "12",
        "expiryYear": "2022",
        "number": "4000000000000002",
        "pin": "1234"
    }
}

Sample Response

Code Block
languagejson
{
    "requestSuccessful": true,
    "responseMessage": "success",
    "responseCode": "0",
    "responseBody": {
        "status": "BANK_AUTHORIZATION_REQUIRED",
        "message": "3D Secure Authorization required",
        "secure3dData": {
            "id": "2000.00-59077a3e5157fae7ca9dd260d911ccbb",
            "redirectUrl": "http://localhost:10001"
        },
        "transactionReference": "MNFY|19|20210430115705|000243",
        "paymentReference": "1619780224192",
        "authorizedAmount": 1000
    }
}

...

Field Parameters

Field

Description

transactionReference

Unique reference generated for the transaction by Monnify

collectionChannel

"API_NOTIFICATION" only enabled merchants can access resource

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)

...