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.created
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.closed
Occurs when an Account is closed.
Example account.closed payload:
account.reopened
Occurs when a closed Account is reopened.
Example account.reopened payload:
account.frozen
Occurs when an Account is frozen.
Example account.frozen payload:
account.unfrozen
Occurs when a frozen Account is unfrozen.
Example account.unfrozen payload:
account.updated
Occurs when an Account is updated. The list of changes is provided in the changes attribute.
Example account.updated payload:
application.created
Occurs when an Application is created.
Example application.created payload:
application.denied
Occurs when an Application is denied.
Example application.denied payload:
application.canceled
Occurs when an Application is canceled.
Example application.canceled payload:
application.pendingReview
Occurs when an Application is in pendingReview state.
Example application.pendingReview payload:
application.awaitingDocuments
Occurs when additional Application Documents are required to approve an Application.
Example application.awaitingDocuments payload:
authorization.created
Occurs when an Authorization is created.
Example authorization.created payload:
authorization.canceled
Occurs when an Authorization is canceled.
Example authorization.canceled payload:
authorization.amountChanged
Occurs when an Authorization amount is changed. This event will be followed by an authorizationRequest.pending event.
Example authorization.amountChanged payload:
authorization.declined
Occurs when an Authorization is declined.
Example authorization.declined payload:
authorization.updated
Occurs when an Authorization is updated.
Example authorization.updated payload:
authorizationRequest.approved
Occurs when an AuthorizationRequest is approved. See Programmatic authorization of card use
Example authorizationRequest.approved payload:
authorizationRequest.declined
Occurs when an AuthorizationRequest is declined. See Programmatic authorization of card use
Example authorizationRequest.declined payload:
authorizationRequest.pending (Purchase)
Occurs when a Purchase related AuthorizationRequest is pending approval. See Programmatic authorization of card use
Example authorizationRequest.pending payload:
authorizationRequest.pending (CardTransaction)
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)
Occurs when an IIAS related AuthorizationRequest is pending approval. See Programmatic authorization of card use
Example IIAS authorizationRequest.pending payload:
bulkPayments.failed
Occurs when a Payment in bulk failed.
Example bulkPayments.failed payload:
bulkPayments.finished
Occurs when a Payments bulk is finished.
Example bulkPayments.finished payload:
card.created
Occurs when a Card is created successfully.
Example card.created payload:
card.activated
Occurs when a Card is activated for the first time.
Example card.activated payload:
card.statusChanged
Occurs when a Card status changes, excluding first time card activation (see card.activated).
Example card.statusChanged payload:
card.pinChanged
Occurs when a Card PIN is changed.
Example card.pinChanged payload:
card.reissuing
Occurs when a Card is being reissued.
Example card.reissuing payload:
creditDecision.approved
Occurs when a new approved Credit Decision is created.
Example creditDecision.approved payload:
creditDecision.denied
Occurs when a new denied Credit Decision is created.
Example creditDecision.denied payload:
customer.created
Occurs when a new Customer is created.
Example customer.created payload:
customer.updated
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.archived
Occurs when a Customer is archived.
Example customer.archived payload:
declinedIncomingPayment.created
Occurs when a Declined Incoming Payment is created.
Example declinedIncomingPayment.created payload:
dispute.created
Occurs when a Dispute is created.
Example dispute.created payload:
dispute.statusChanged
Occurs when a Dispute status changes.
Example dispute.statusChanged payload:
document.approved
Occurs when an Application Document is approved.
Example document.approved payload:
document.rejected
Occurs when an Application Document is rejected.
Example document.rejected payload:
payment.created
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.sent
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.rejected
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.returned
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.canceled
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.pendingReview
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.created
Occurs when a recurring payment is created.
Example recurringPayment.created payload:
recurringPayment.statusChanged
Occurs when a recurring payment status has been changed. See Recurring Payment Statuses.
Example recurringPayment.statusChanged payload:
recurringPayment.failed
Occurs when a payment creation from a recurring payment has failed.
Example recurringPayment.created payload:
recurringRepayment.created
Occurs when a recurring repayment is created.
Example recurringRepayment.created payload:
recurringRepayment.failed
Occurs when a repayment creation from a recurring repayment has failed.
Example recurringRepayment.failed payload:
recurringRepayment.skipped
Occurs when a repayment creation from a recurring repayment is skipped due to repayment amount being 0.
Example recurringRepayment.skipped payload:
recurringRepayment.statusChanged
Occurs when a recurring payment status has been changed. See Recurring Repayment Statuses.
Example recurringRepayment.statusChanged payload:
statements.created
Occurs when all Statements were created for the previous month.
Example statements.created payload:
statement.created
Occurs when custom cycle statements were created for the previous cycle.
Example statement.created payload:
transaction.created
Occurs when a Transaction is created.
Example transaction.created payload:
transaction.updated
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.created
Occurs when a Received Payment is created.
Example receivedPayment.created payload:
receivedPayment.advanced
Occurs when a Received Payment is advanced.
Example receivedPayment.advanced payload:
receivedPayment.pendingReview
Occurs when a Received Payment is pending review.
Example receivedPayment.pendingReview payload:
receivedPayment.pending
Occurs when a Received Payment is pending due to future settlement date.
Example receivedPayment.pending payload:
receivedPayment.markedForReturn
Occurs when a Received Payment is marked for return.
Example receivedPayment.markedForReturn payload:
receivedPayment.completed
Occurs when a Received Payment is completed.
Example receivedPayment.completed payload:
receivedPayment.returned
Occurs when a Received Payment is returned.
Example receivedPayment.returned payload:
chargeback.created
Occurs when a Chargeback is successfully created.
Example payment.created payload:
reward.sent
Occurs when a Reward is successfully sent to an end customer.
Example reward.sent payload:
reward.rejected
Occurs when a Reward creation request is rejected (typically due to account status or availability of funds).
Example reward.rejected payload:
repayment.created
Occurs when a MobileWalletRepayment or BookRepayment is successfully created.
Example repayment.created payload:
repayment.statusChanged
Occurs when a MobilewalletRepayment or BookRepayment status changes.
Example repayment.created payload:
creditApplication.created
Occurs when an Onboarding credit application is created successfully.
Example creditApplication.created payload:
creditApplication.pending
Occurs when an Existing customer credit application is created successfully.
Example creditApplication.pending payload:
creditApplication.approved
Occurs when an credit application is approved.
Example creditApplication.approved payload:
creditApplication.denied
Occurs when an credit application is denied.
Example creditApplication.denied payload:
creditApplication.canceled
Occurs when an credit application is canceled.
Example creditApplication.canceled payload:
Get by Id
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
Response is a JSON:API document.
200 OK
data
Event
The requested resource after the operation was completed.
List
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 Parameters
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
Response is a JSON:API document.
200 OK
data
Array of Event
Array of event resources.
Example Response:
Fire Event
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