Notifications API icon

Notifications API

(0 reviews)
AsyncAPI for all MarketPay notifications published on to Messaging system

home

This is an AsyncAPI for all MarketPay notifications published on to our Messaging system(pub/sub).

Partners interested in receiving these notifications need to contact their account representative to understand and set up the right subscription type for them.

Currently supported notifications types

  • KYC
  • IBAN changes
  • SoftPOS Provisioning
  • HardPOS Provisioning
  • Ecom Provisioning
  • Nepting Provisioning
  • Terminal Status
  • HPP Status
  • PEP Status
  • PRO Instrument

How to connect

The notifications will be delivered via pull or push subscription types. For both subscription types, the necessary configurations will be set up for you. Please follow the guidelines below to integrate seamlessly with our API.

Subscription Types
Pull Subscription

In a pull subscription, you connect to our messaging system with a dedicated subscription and credentials that we create and share with you. You will be actively listening and recieve the message when published.

Connection Instructions

Receive the Credentials:

  • You will receive a JSON key file.
  • You will also receive the subscription name to connect to.

Connecting:

  • Use the provided subscription name and authenticate using the service account credentials to pull messages from the subscription.
Push Subscription

For push subscriptions, the messages are pushed to an HTTPS endpoint that you provide. You will need to ensure that your endpoint is accessible, not behind a firewall and can handle POST requests.

Connection Instructions

Provide Your Endpoint URL:

  • Share your HTTPS endpoint URL with us. Ensure it is reachable over the internet and can accept POST requests.

Receive the Subscription Details:

  • We will create the push subscription and configure it to send messages to your endpoint.

Handle Incoming Messages:

  • Your endpoint should be capable of handling the Pub/Sub POST requests and responding appropriately.
Authentication in Push Subscriptions

When using push subscriptions, authentication is crucial to ensure that only authorized sources can send requests to your endpoint.

HTTPS Endpoints:

  • Notifications can be sent only to HTTPS endpoints.
Comparison of Pull and Push Subscriptions
FeaturePull SubscriptionPush Subscription
Control Over ProcessingHigh (subscriber decides when/how much to pull)Low (messages pushed as they arrive)
LatencyPotentially higher due to pollingLower as messages are delivered immediately
ComplexityMore complex (managing polling and scaling)Simpler (no need to manage polling)
Resource ManagementManaged by the subscriberManaged by Pub/Sub service
Reachability RequirementsNone (subscriber can be behind firewalls)Subscriber must be accessible via HTTPS
SecurityEasier to secure (less exposed endpoints)Requires exposed endpoints (increased risk)
Error HandlingCustom error handling and retry logicLimited error handling and retry options
Retry LogicControlled by subscriberHandled by Pub/Sub, with configurable retries
AuthenticationFlexible (service account authentication)Limited to token and OIDC-based authentication
Summary
  • Pull Subscription: Ideal for scenarios where you need more control over message processing and error handling. Suitable for environments where the subscriber might be behind a firewall or not always reachable over the internet.
  • Push Subscription: Suitable for low-latency applications where the subscriber is always reachable over HTTPS. Simplifies the subscriber logic but requires careful handling of security and reachability concerns.

Default parameters of subscription

  • Subscription Expiry - Your subscription will not expire regardless of whether you stay connected or not.
  • Acknowledgement Deadline - The notification needs to be acknowledged within 20 seconds, or it will be treated as a NACK and will be retried for delivery.
  • Message Retry Policy - If the notification is not acknowledged within 20 seconds, it will be retried for delivery over the next 20 minutes with an exponential backoff period between attempts.
  • Message Retention Duration - Whether acknowledged or not, the notification stays in our system only for 20 minutes. If your application is not connected or the notification is not acknowledged on retry for more than 20 minutes, the notification will be lost.

Let us know if you want to have different params than the default ones to be set up for your subscription.


Reviews