Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 8 Next »

Subscription Creation

To start receiving webhook events, you must create a subscription. This informs our system about the events you want to monitor and their corresponding endpoint.

Follow these steps to create a subscription:

  1. Log in to your Moniepoint account

login_to_moniepoint.png
  1. Select a Business

select_a_business.png

  1. Navigate to your settings page

navigate_to_settings.png

  1. Navigate to POS App Developers in settings

    image-20241031-134216.png

  2. Navigate to Webhooks

image-20241031-133503.png

  1. Now you can create new subscription. Click on New Subscription

image-20241031-133601.png

  1. Add subscription URL (Where you want to receive notification) and also select transaction type for which you want to receive notification

    image-20241031-134001.png

image-20241031-134038.png

  1. API secret is generated upon successful creation of webhook subscription

image-20241031-115037.pngimage-20241031-115205.png

Note: A unique secret will be generated upon successful subscription creation .The API secret can only be copied once at point of creation and needs to be stored securely. This can further use to verify event notifications.

Event logs

  1. Open details of subscription and click on Event details

image-20241031-122449.png

image-20241031-122616.png
  1. Here user can see list of all the notifications along with other details i-e Transaction details(Transaction status, amount, Terminal serial)

image-20241031-124540.png

  1. User can also filter by (Date Range, Notification Status and Transaction Type)

image-20241031-124330.pngimage-20241031-124215.png

Edit Subscription

You can also edit the webhook subscription

  1. Open details of webhook subscription

image-20241031-122449.png

  1. Click on Edit Subscription

image-20241031-151731.png

3. Here You can update URL and Transaction types

image-20241031-151903.png

Delete subscription

You can also delete subscription by following steps outlined below

  1. Open details of subscription

image-20241031-122449.png

  1. Click on Delete subscription

image-20241031-125644.png

image-20241031-125859.png

Verifying Webhook Signatures

To ensure the authenticity of webhook requests, verify the signature included in the moniepoint-webhook-signatureheader.

Verification Process

  1. Use this link to verify signature

  2. Add plain text in this format moniepoint-webhook-id__ moniepoint-webhook-timestamp__payload

  3. Add webhook secret in secret key field

  4. Compare the generated signature with the moniepoint-webhook-signature header to ensure integrity.

Note: moniepoint-webhook-idand moniepoint-webhook-timestamp , is in notification header.

Sample Notification Received:

Headers:

{
  "user-agent": "ReactorNetty/1.1.9",
  "content-length": "623",
  "accept": "application/json",
  "accept-encoding": "gzip",
  "content-type": "application/json",
  "moniepoint-webhook-id": "a7603882-b75e-43b8-bb0e-f8d95d9a05e7",
  "moniepoint-webhook-signature": "muPzWhsvQfqKrRegthzLrNk3CMX7D6APTgEyxXgRABc=",
  "moniepoint-webhook-timestamp": "1730475285755",
  "x-forwarded-for": "141.147.77.31",
  "x-forwarded-host": "webhook-subscription.free.beeceptor.com",
  "x-forwarded-proto": "https"
}

Payload:

{"data":{"amount":25300,"businessId":150,"customFields":{"Invoice ID":"iu12$%h"},"responseCode":"09","terminalSerial":"TestDev24","businessOwnerId":100,"responseMessage":"Airtime Purchase Pending","transactionTime":"2024-09-24T09:32:57.916+0100","transactionType":"AIRTIME","merchantReference":"","transactionStatus":"PENDING","transactionReference":"ATP|2MPT0073|183849600858930565120","retrievalReferenceNumber":""},"eventId":"df6e5ca5-8c5e-42c8-9a93-bd21cfa650ba","subject":{"domain":"CHANNELS","resource":"business","resourceId":"150"},"createdAt":"2024-11-01T16:19:57.912103129","eventType":"V1_POS_AIRTIME_TRANSACTION"}
  • No labels