A. Payment Successful

After a successful payment, two webhook events will be sent:

  1. Account Connected event.
  2. Payment Successful event.

  1. Account Connected event (mono.events.account_connected):
    Using the Account ID here, you can fetch the customer details like Name, BVN, Account Number, and much more via our Information API
{
    "event": "mono.events.account_connected",
    "data": {
      "id": "611d575feef5d3371ca9d0d8"
    }
}
  1. Payment Successful event (direct_debit.payment_successful):
    With the reference here, you can verify the payment status of payment using the Verify payment status API

ONE-TIME PAYMENT

{
    "event": "direct_debit.payment_successful",
    "data": {
      "type": "onetime-debit",
      "object": {
        "id": "txd_9AhCg0PNkwHiq6RqLLdiqKDf",
        "status": "successful",
        "amount": 30000,
        "description": "free shirt",
        "fee": 300,
        "currency": "NGN",
        "account": "611d575feef5d3371ca9d0d8",
        "customer": "611adcd9a5fda23baf58140d",
        "reference": "djdjj3939394949944",
        "liveMode": true,
        "created_at": "2021-08-18T18:54:23.491Z",
        "updated_at": "2021-08-18T18:55:16.055Z"
      }
    }
  }

RECURRING PAYMENT

a. Webhook event once payment is successful.

{
  "event": "direct_debit.payment_successful",
  "data": {
    "type": "recurring-debit",
    "object": {
            "id": "txrd_xyz",
      "status": "processing", // the status remains "processing" after a successful payment unti confirmed. 
      "description": "Monthly fee",
      "account": "614d8fd4f18f5601caebd4c6",
      "customer": null,
      "reference": "ref_xyTsaAAmu865s1323b1b",
      "startDate": 1632473045,
      "currentPeriodStart": 1632473045,
      "currentPeriodEnd": 1635065045,
      "endDate": 1636502400,
      "created_at": "2021-09-24T08:44:05.195Z",
      "updated_at": "2021-09-24T08:44:14.612Z"
    }
  }
}

b. Webhook once payment is confirmed.

{
  "event": "direct_debit.payment_updated",
  "data": {
    "type": "recurring-debit",
    "object": {
            "id": "txrd_xyz",
      "status": "active",
      "description": "Monthly fee",
      "account": "614d8fd4f18f5601caebd4c6",
      "customer": null,
      "reference": "ref_xyTsaAAmu865s1323b1b",
      "startDate": 1632473045,
      "currentPeriodStart": 1632473045,
      "currentPeriodEnd": 1635065045,
      "endDate": 1636502400,
      "created_at": "2021-09-24T08:44:05.195Z",
      "updated_at": "2021-09-24T08:44:14.612Z"
    }
  }
}

B. Payment Failed

For One-time Payment:

{
  "event": "direct_debit.payment_failed",
  "data": {
    "type": "onetime-debit",
    "object": {
      "description": "Wallet Funding",
      "amount": 50000,
      "fee": 4500,
      "liveMode": true,
      "customer": null,
      "account": "618d41d618d6e5538b46d1e2",
      "updated_at": "2021-11-11T16:21:40.066Z",
      "currency": "NGN",
      "reference": "wp_f4719afff583f0079eda234d60c0570e",
      "status": "failed",
      "id": "txd_XzhFBoknIjuosOz4",
      "created_at": "2021-11-11T16:16:23.851Z"
    }
  }
}

For Recurring Payment:

{
  "event": "direct_debit.payment_failed",
  "data": {
    "type": "recurring-debit",
    "object": {
      "description": "Loan Re-payment",
      "amount": 50000,
      "fee": 4500,
      "liveMode": true,
      "customer": null,
      "account": "618d41d618d6e5538b46d1e2",
      "updated_at": "2021-11-11T16:21:40.066Z",
      "currency": "NGN",
      "reference": "wp_f4719afff583f0079eda234d60c0570e",
      "status": "failed",
      "id": "txd_XzhFBoknIjuosOz4",
      "created_at": "2021-11-11T16:16:23.851Z"
    }
  }
}

C. Payment Cancelled

For Recurring Payment:

{
  "event": "direct_debit.payment_cancelled",
  "data": {
    "type": "onetime-debit",
    "object": {
      "description": "J68ON7CHBJV",
      "amount": 11400000,
      "fee": 4500,
      "liveMode": true,
      "customer": null,
      "account": "618d0d4b18d6e5538b3761cd",
      "updated_at": "2021-11-11T12:33:33.477Z",
      "currency": "NGN",
      "reference": "J68ON7CHBJV",
      "status": "cancelled",
      "id": "txd_aSPmTQsnM4fkQWl6",
      "created_at": "2021-11-11T12:32:11.733Z"
    }
  }
}

D. Payment Abandoned

For Recurring Payment:

{
  "event": "direct_debit.payment_abandoned",
  "data": {
    "type": "onetime-debit",
    "object": {
      "description": "J68ON7CHBJV",
      "amount": 11400000,
      "fee": 4500,
      "liveMode": true,
      "customer": null,
      "account": "618d0d4b18d6e5538b3761cd",
      "updated_at": "2021-11-11T12:33:33.477Z",
      "currency": "NGN",
      "reference": "J68ON7CHBJV",
      "status": "abandoned",
      "id": "txd_aSPmTQsnM4fkQWl6",
      "created_at": "2021-11-11T12:32:11.733Z"
    }
  }
}

Did this page help you?