Events

Mansar uses Events to record important changes happening under your org. Once an event is created, it will be delivered to your application via a webhook call.

Our event types follow a specific structure: resource.event.

Each event includes an id field, which uniquely identifies the event instance, and a type field that identifies the type of the event instance.

Each event type includes a different set of attributes and relationships, relevant to that specific event.

Event attributes may contain a set of custom tags inherited from a related resource request.

account.createdarrow-up-right

Occurs when an Account is created successfully.

Example account.created payload:

{
  "data": [
    {
      "id": "269",
      "type": "account.created",
      "attributes": {
        "createdAt": "2024-01-13T07:40:43.813Z",
        "tags": {
          "tag": "value"
        }
      },
      "relationships": {
        "account": {
          "data": {
            "id": "10004",
            "type": "account"
          }
        },
        "customer": {
          "data": {
            "id": "10000",
            "type": "customer"
          }
        }
      }
    }
  ]
}

account.closedarrow-up-right

Occurs when an Account is closed.

Example account.closed payload:

account.reopenedarrow-up-right

Occurs when a closed Account is reopened.

Example account.reopened payload:

account.frozenarrow-up-right

Occurs when an Account is frozen.

Example account.frozen payload:

account.unfrozenarrow-up-right

Occurs when a frozen Account is unfrozen.

Example account.unfrozen payload:

account.updatedarrow-up-right

Occurs when an Account is updated. The list of changes is provided in the changes attribute.

Example account.updated payload:

application.createdarrow-up-right

Occurs when an Application is created.

Example application.created payload:

application.deniedarrow-up-right

Occurs when an Application is denied.

Example application.denied payload:

application.canceledarrow-up-right

Occurs when an Application is canceled.

Example application.canceled payload:

application.pendingReviewarrow-up-right

Occurs when an Application is in pendingReview state.

Example application.pendingReview payload:

application.awaitingDocumentsarrow-up-right

Occurs when additional Application Documents are required to approve an Application.

Example application.awaitingDocuments payload:

authorization.createdarrow-up-right

Occurs when an Authorization is created.

Example authorization.created payload:

authorization.canceledarrow-up-right

Occurs when an Authorization is canceled.

Example authorization.canceled payload:

authorization.amountChangedarrow-up-right

Occurs when an Authorization amount is changed. This event will be followed by an authorizationRequest.pending event.

Example authorization.amountChanged payload:

authorization.declinedarrow-up-right

Occurs when an Authorization is declined.

Example authorization.declined payload:

authorization.updatedarrow-up-right

Occurs when an Authorization is updated.

Example authorization.updated payload:

authorizationRequest.approvedarrow-up-right

Occurs when an AuthorizationRequest is approved. See Programmatic authorization of card use

Example authorizationRequest.approved payload:

authorizationRequest.declinedarrow-up-right

Occurs when an AuthorizationRequest is declined. See Programmatic authorization of card use

Example authorizationRequest.declined payload:

authorizationRequest.pending (Purchase) arrow-up-right

Occurs when a Purchase related AuthorizationRequest is pending approval. See Programmatic authorization of card use

Example authorizationRequest.pending payload:

authorizationRequest.pending (CardTransaction) arrow-up-right

Occurs when a CardTransaction related AuthorizationRequest is pending approval. See Programmatic authorization of card use

Note that the type of the authorization request under relationships here is capitalised (CardTransactionAuthorizationRequest), unlike the corresponding resource.

Example authorizationRequest.pending payload:

authorizationRequest.pending (IIAS)arrow-up-right

Occurs when an IIASarrow-up-right related AuthorizationRequest is pending approval. See Programmatic authorization of card use

Example IIAS authorizationRequest.pending payload:

bulkPayments.failedarrow-up-right

Occurs when a Payment in bulk failed.

Example bulkPayments.failed payload:

bulkPayments.finishedarrow-up-right

Occurs when a Payments bulk is finished.

Example bulkPayments.finished payload:

card.createdarrow-up-right

Occurs when a Card is created successfully.

Example card.created payload:

card.activatedarrow-up-right

Occurs when a Card is activated for the first time.

Example card.activated payload:

card.statusChangedarrow-up-right

Occurs when a Card status changes, excluding first time card activation (see card.activated).

Example card.statusChanged payload:

card.pinChangedarrow-up-right

Occurs when a Card PIN is changed.

Example card.pinChanged payload:

card.reissuingarrow-up-right

Occurs when a Card is being reissued.

Example card.reissuing payload:

creditDecision.approvedarrow-up-right

Occurs when a new approved Credit Decision is created.

Example creditDecision.approved payload:

creditDecision.deniedarrow-up-right

Occurs when a new denied Credit Decision is created.

Example creditDecision.denied payload:

customer.createdarrow-up-right

Occurs when a new Customer is created.

Example customer.created payload:

customer.updatedarrow-up-right

Occurs when a Customer is updated (whether by the org, or by Mansar, in case the fields being updated are sensitive fields ).

Example customer.updated payload:

customer.archivedarrow-up-right

Occurs when a Customer is archived.

Example customer.archived payload:

declinedIncomingPayment.createdarrow-up-right

Occurs when a Declined Incoming Payment is created.

Example declinedIncomingPayment.created payload:

dispute.createdarrow-up-right

Occurs when a Dispute is created.

Example dispute.created payload:

dispute.statusChangedarrow-up-right

Occurs when a Dispute status changes.

Example dispute.statusChanged payload:

document.approvedarrow-up-right

Occurs when an Application Document is approved.

Example document.approved payload:

document.rejectedarrow-up-right

Occurs when an Application Document is rejected.

Example document.rejected payload:

payment.createdarrow-up-right

Occurs when a Mobile Payment, Book Payment, or Wire Payment is successfully created with a specified status. This event does not fire for rejected payments, see payment.rejected instead.

Example payment.created payload:

payment.sentarrow-up-right

Occurs when a payment was created and processed successfully.

The event covers different types of payments like Mobile Payment, Wire Payment, and Push To Card Payment.

Example payment.sent payload:

payment.rejectedarrow-up-right

Occurs when a payment gets rejected. This event should include a reason that will specify why the payment was rejected.

The event covers different types of payments like MobilePayment, Book Payment, Wire Payment, and Push To Card Payment.

Example payment.rejected payload:

payment.returnedarrow-up-right

Occurs when a sent Mobile Payment was returned by the Payment Service Provider or the receiving bank for a specified reason. This also occurs when a sent Wire Payment was returned.

Example payment.returned payload:

payment.canceledarrow-up-right

payment.canceled or payment.Canceled. Occurs when a sent MobilePayment was canceled by the client / end-customer before being sent to the Payment Service Provider.

Example payment.canceled payload:

payment.pendingReviewarrow-up-right

Occurs when a sent Payment is waiting to be manually reviewed, typically due to a high level of risk associated with that payment.

Example payment.pendingReview payload:

recurringPayment.createdarrow-up-right

Occurs when a recurring payment is created.

Example recurringPayment.created payload:

recurringPayment.statusChangedarrow-up-right

Occurs when a recurring payment status has been changed. See Recurring Payment Statuses.

Example recurringPayment.statusChanged payload:

recurringPayment.failedarrow-up-right

Occurs when a payment creation from a recurring payment has failed.

Example recurringPayment.created payload:

recurringRepayment.createdarrow-up-right

Occurs when a recurring repayment is created.

Example recurringRepayment.created payload:

recurringRepayment.failedarrow-up-right

Occurs when a repayment creation from a recurring repayment has failed.

Example recurringRepayment.failed payload:

recurringRepayment.skippedarrow-up-right

Occurs when a repayment creation from a recurring repayment is skipped due to repayment amount being 0.

Example recurringRepayment.skipped payload:

recurringRepayment.statusChangedarrow-up-right

Occurs when a recurring payment status has been changed. See Recurring Repayment Statuses.

Example recurringRepayment.statusChanged payload:

statements.createdarrow-up-right

Occurs when all Statements were created for the previous month.

Example statements.created payload:

statement.createdarrow-up-right

Occurs when custom cycle statements were created for the previous cycle.

Example statement.created payload:

transaction.createdarrow-up-right

Occurs when a Transactionarrow-up-right is created.

Example transaction.created payload:

transaction.updatedarrow-up-right

Occurs when a PurchaseTransaction, AtmTransaction, or CardTransaction is updated with the interchange amount, calculated at the end of each day.

Example transaction.created payload:

receivedPayment.createdarrow-up-right

Occurs when a Received Paymentarrow-up-right is created.

Example receivedPayment.created payload:

receivedPayment.advancedarrow-up-right

Occurs when a Received Payment is advanced.

Example receivedPayment.advanced payload:

receivedPayment.pendingReviewarrow-up-right

Occurs when a Received Payment is pending review.

Example receivedPayment.pendingReview payload:

receivedPayment.pendingarrow-up-right

Occurs when a Received Payment is pending due to future settlement date.

Example receivedPayment.pending payload:

receivedPayment.markedForReturnarrow-up-right

Occurs when a Received Payment is marked for return.

Example receivedPayment.markedForReturn payload:

receivedPayment.completedarrow-up-right

Occurs when a Received Payment is completed.

Example receivedPayment.completed payload:

receivedPayment.returnedarrow-up-right

Occurs when a Received Payment is returned.

Example receivedPayment.returned payload:

chargeback.createdarrow-up-right

Occurs when a Chargeback is successfully created.

Example payment.created payload:

Occurs when a Reward is successfully sent to an end customer.

Example reward.sent payload:

reward.rejectedarrow-up-right

Occurs when a Reward creation request is rejected (typically due to account status or availability of funds).

Example reward.rejected payload:

repayment.createdarrow-up-right

Occurs when a MobileWalletRepayment or BookRepayment is successfully created.

Example repayment.created payload:

repayment.statusChangedarrow-up-right

Occurs when a MobilewalletRepayment or BookRepayment status changes.

Example repayment.created payload:

creditApplication.createdarrow-up-right

Occurs when an Onboarding credit application is created successfully.

Example creditApplication.created payload:

creditApplication.pendingarrow-up-right

Occurs when an Existing customer credit application is created successfully.

Example creditApplication.pending payload:

creditApplication.approvedarrow-up-right

Occurs when an credit application is approved.

Example creditApplication.approved payload:

creditApplication.deniedarrow-up-right

Occurs when an credit application is denied.

Example creditApplication.denied payload:

creditApplication.canceledarrow-up-right

Occurs when an credit application is canceled.

Example creditApplication.canceled payload:

Get an event resource by id. This API is available only for events that were created within the last 90 days.

Verb

GET

Url

https://api.s.usemansar.xyz/events/{id}

Required Scope

events

Timeout (Seconds)

5

Response is a JSON:API document.

200 OKarrow-up-right

Field
Type
Description

data

Event

The requested resource after the operation was completed.

List event resources, going back up to 90 days. Paging can be applied.

Verb

GET

Url

https://api.s.usemansar.xyz/events

Required Scope

events

Timeout (Seconds)

5

Query Parametersarrow-up-right

Name
Type
Default
Description

page[limit]

integer

100

Optional. Maximum number of resources that will be returned. Maximum is 1000 resources. See Pagination.

page[offset]

integer

0

Optional. Number of resources to skip. See Pagination.

filter[type][]

string

(empty)

Optional. Filter Events by Event type.

filter[since]

RFC3339 Date string

(empty)

Optional. Filters the events that occurred after the specified date. e.g. 2024-01-13T16:01:19.346Z

filter[until]

RFC3339 Date string

(empty)

Optional. Filters the events that occurred before the specified date. e.g. 2024-01-15T20:06:23.486Z

Response is a JSON:API document.

200 OKarrow-up-right

Field
Type
Description

data

Array of Event

Array of event resources.

Example Response:

Resend a previously published webhook event. This API is available only for events that were created within the last 90 days.

Verb

POST

Url

https://api.s.usemansar.xyz/events/{eventId}

Required Scope

events-write

Timeout (Seconds)

5

Last updated