Credit Accounts
Credit Accounts are accounts that represent an amount loaned to an end customer. Credit Accounts have a:
Credit limit, the maximum amount the customer can be loaned at any given time
Balance, the amount the customer currently owes
Hold, the amount of authorizations pending
Available Credit Limit, the current maximum amount the customer can be further loaned. This is calculated by subtracting the Balance and Hold from the Credit Limit.
Currently credit accounts on Mansar support Business Charge Cards.
Credit Terms
When creating a credit account, you are required to select the Credit Terms for the account. The Credit Terms defines the set of terms that are applied to the account:
Billing cycle
Repayment terms
Fees
APR [in later versions]
Daily account spending limit
You may utilize as many credit terms as you need to make your product work, and there are many use cases for multiple credit terms products:
Manage fees and limits to represent different customer tiers (regular / VIP).
Offer multiple different credit solutions (e.g. charge cards and loans)
You may move an account between different credit terms that serve the same purpose (e.g. move an account from "regular" to "VIP" credit terms) by updating the account.
Create Credit Account
Creates a credit account for a Customer. An account.created event is raised when the call was successful.
Each credit account is created using specific credit terms.
Credit Account creation request supports Idempotency, ensuring that performing multiple identical requests will have the same effect as performing a single request.
Verb
POST
Url
https://api.s.usemansar.xyz/accounts
Required Scope
accounts-write
Data Type
creditAccount
Timeout (Seconds)
5
Attributes
creditTerms
string
The credit terms that will be associated with the account.
creditLimit
Integer (Cents)
The credit limit of the account.
tags
object
Optional.
idempotencyKey
string
Optional.
Relationships
customer
Required for individual / business accounts. JSON:API Relationship
The customer the credit account belongs to. The customer is either a business or an individual.
Example Request:
Response
Response is a JSON:API document.
201 Created
data
CreditAccount
The requested resource after the operation was completed.
Example Response:
Close Account
Closes an account. Closing an account is irreversible and can only be done by an Org user. An account.closed event is raised when the call was successful.
NOTE
Closing an account will also close the cards associated with the account. Closed accounts cannot accept repayments
Verb
POST
Url
https://api.s.usemansar.xyz/accounts/:accountId/close
Required Scope
accounts-write
Data Type
creditAccountClose
Timeout (Seconds)
5
Attributes
reason
string
The reason for closing the account. Either ByCustomer, Fraud or Overdue. If not specified, will default to ByCustomer.
fraudReason
string
Optional. The expanded fraud reason for closing the account when Fraud is specified as the reason. Can be one of: (MobilepaymentActivity, CardActivity, ApplicationHistory, AccountActivity, ClientIdentified, IdentityTheft, LinkedToFraudulentCustomer).
Response
Response is a JSON:API document.
200 OK
data
CreditAccount
Credit Account resource.
Freeze Account
Freezes an account. An account.frozen event is raised when the call was successful. A frozen account behaves like a closed account, with the primary difference being that a frozen state should be temporary, and after evaluation should either be un-frozen, or closed.
NOTE
Freezing an account will also freeze the cards associated with the account.
Verb
POST
Url
https://api.s.usemansar.xyz/accounts/:accountId/freeze
Required Scope
accounts-write
Timeout (Seconds)
5
Attributes
reason
string
The reason for closing the account. Either Fraud or Other, with a specified reasonText.
reasonText
string
Optional. The free-text reason for freezing the account (up to 255 characters) when Other is specified.
Response
Response is a JSON:API document.
200 OK
data
CreditAccount
Credit Account resource.
Unfreeze Account
Unfreezes an account.
NOTE
Unfreezing an account will also unfreeze the cards associated with the account.
Verb
POST
Url
https://api.s.usemansar.xyz/accounts/:accountId/unfreeze
Required Scope
accounts-write
Timeout (Seconds)
5
Response
Response is a JSON:API document.
200 OK
data
CreditAccount
Credit Account resource.
Get by Id
Get a credit account resource by id.
Verb
GET
Url
https://api.s.usemansar.xyz/accounts/{id}
Required Scope
accounts
Timeout (Seconds)
5
Query Parameters
include
string
(empty)
Optional. Related resource available to include: customer.
Response
Response is a JSON:API document.
200 OK
data
CreditAccount
Credit Account resource.
included
Array of Customer
Array of resources requested by the include query parameter.
List
Listing credit accounts is similar to listing deposit accounts, with a specific account type filter (see below)
Verb
GET
Url
https://api.s.usemansar.xyz/accounts
Required Scope
accounts
Timeout (Seconds)
5
Query Parameters
page[limit]
integer
100
Optional. Maximum number of resources that will be returned. Maximum is 1000 resources.
page[offset]
integer
0
Optional. Number of resources to skip.
filter[customerId]
string
(empty)
Optional. Filters the results by the specified customer id.
filter[tags]
Tags (JSON)
(empty)
Optional. Filter Accounts by Tags.
filter[status]
string
Authorized
Optional. Filter Account by its status (Open, Frozen, or Closed). Usage example: filter[status][0]=Closed
filter[fromBalance]
Integer
(empty)
Optional. Filters Accounts that have balance higher or equal to the specified amount (in cents). e.g. 5000
filter[toBalance]
Integer
(empty)
Optional. Filters Accounts that have balance lower or equal to the specified amount (in cents). e.g. 7000
filter[type]
string
(empty)
Optional. Filters Accounts by type. Valid values are deposit or credit.
include
string
(empty)
Optional. Related resource available to include: customer.
Response
Response is a JSON:API document.
200 OK
data
Array of DepositAccount or CreditAccount
Array of account resources.
included
Array of Customer
Array of resources requested by the include query parameter.
Example Response:
Update
Update a credit account.
Verb
PATCH
Url
https://api.s.usemansar.xyz/accounts/:accountId
Data Type
creditAccount
Timeout (Seconds)
5
Attributes
tags
object
Optional.
creditLimit
Integer (Cents)
Optional. The credit limit of the account.
Response
Response is a JSON:API document.
200 OK
data
CreditAccount
Credit Account resource.
Example Response:
Limits
Verb
GET
Url
https://api.s.usemansar.xyz/accounts/:accountId/limits
Timeout (Seconds)
5
Some monetary transactions (such as originating mobile payments) are subject to daily and/or monthly amount limits that are defined on the account level. Note that credit accounts do not support withdrawals.
The response to this API call includes the defined limits, as well as the current total amounts on each transaction type (under the totalsDaily and totalsMonthly fields), in cents.
Get Account Balance History
List account end-of-day balances history (filtering and paging can be applied).
The account balance history can be used to provide the customer with an overview of their balance across account(s) over time in a visually engaging way, providing insights and creating custom product features around it.

Verb
GET
Url
https://api.s.usemansar.xyz/account-end-of-day
Required Scope
account-end-of-day
Timeout (Seconds)
5
Query Parameters
page[limit]
integer
100
Optional. Maximum number of resources that will be returned. Maximum is 1000 resources.
page[offset]
integer
0
Optional. Number of resources to skip.
filter[accountId]
string
(empty)
Optional. Filters the results by the specified account id.
filter[customerId]
string
(empty)
Optional. Filters the results by the specified customer id.
filter[since]
ISO Local Date string
(empty)
Optional. Filters the account end-of-day balances after the specified date. e.g. 2021-06-01
filter[until]
ISO Local Date string
(empty)
Optional. Filters the account end-of-day balances before the specified date. e.g. 2021-07-01
Response
Response is a JSON:API document.
200 OK
data
Array of Account End-Of-Day
Array of account end-of-day resources.
meta
JSON object that contains pagination data
Pagination data includes offset, limit and total (total items).
Example Response:
Repayment Information
Verb
GET
Url
https://api.s.usemansar.xyz/accounts/:accountId/repayment-information
Timeout (Seconds)
5
The response to this API call includes the current repayment information.
Last updated