Purses
Purses APIs can be used for managing purses and retrieving balances.
Purses API Endpoints
Obtain Primary Account Balances
This endpoint retrieves balances (i.e., Available, Ledger) associated with the primary account.
Response Parameters
Field | Description |
---|---|
responseDetails | See Response Details |
code | See Response Details |
subCode | See Response Details |
description | See Response Details |
url | See Response Details |
purses | A balance holding object. All accounts have the built-in primary purse which is used for general spending activities. Note: Additional types of purses could be used for saving funds and therefore inaccessible for spending activities. For some products, purses may be used to support multi-currency accounts and spending. |
purseIdentifier | Unique identifier of a purse within an account. |
purseType | Indicates the purpose of the purse. |
availableBalance | Amount of funds available for use. Note: Pending transactions are included in this balance. |
ledgerBalance | Balance of the account based on all activities that have been posted to the associated ledger. |
availableBalanceAsOfDateTime | The date/time (UTC) that the available balance is reflective of. |
ledgerBalanceAsOfDateTime | The date and time (UTC) that the ledger balance is reflective of. |
Purse Descriptions
The following characters can be used in purse descriptions.
Note: Forward and Backward slashes are not allowed.
Character | Example |
---|---|
Uppercase or Capital Letters | A-Z |
Lowercase Letters | a-z |
Numbers or Digits | 0-9 only |
Space | |
Comma | , |
Dash/hyphen | - |
Colon | : |
Parenthesis | () |
Ampersand | & |
Period | . |
Apostrophe | ‘ |
Exclamation | ! |
Dollar Sign | $ |
Percent | % |
Asterisk | * |
At Sign | @ |
Pound or Hashtag | # |
Plus Sign | + |
Add a Savings Purse
This endpoint allows the addition of a savings purse.
A savings purse can only be created if the customer’s account status is normal.
Interest Rate Tier information is only included in responses to POST /purses calls/requests that include interestRateTier. Refer to Interest Rate/Endpoint: POST /purses for calls/requests that include interestRateTier information.
Response Parameters
Field | Description |
---|---|
responseDetails | See Response Details |
code | See Response Details |
subCode | See Response Details |
description | See Response Details |
url | See Response Details |
purse | A balance holding object. All accounts have the built-in primary purse which is used for general spending activities. Note: Additional types of purses could be used for saving funds and therefore inaccessible for spending activities. For some products, purses may be used to support multi-currency accounts and spending. |
purseIdentifier | Unique identifier of a purse within an account. |
purseType | Indicates the purpose of the purse. |
purseDescription | Value used to describe what the purseType is for. |
availableBalance | Amount of funds available for use. Note: Pending transactions are included in this balance. |
ledgerBalance | Balance of the account based on all activities that have been posted to the associated ledger. |
availableBalanceAsOfDateTime | The date/time (UTC) that the available balance is reflective of. |
ledgerBalanceAsOfDateTime | The date and time (UTC) that the ledger balance is reflective of. |
Restricted Accounts
Partners can update purses on accounts that are restricted with a cure (kycGate) by calling the below endpoint:
See KYC in the Enrollments APIs for more information about KYC verification.
Response Codes
Scenario | Code | subCode | Description |
---|---|---|---|
A savings purse can only be created if the customer’s account status is normal. If the account status is not normal, the following will be returned. | 5 | 100 | An account must be in a normal status to add a purse. |
Account status is restricted without a cure. | 5 | 100 | An account must be in an eligible status to add a purse. |
Update a Purse
This endpoint allows Partners to update a specific purse.
Response Codes
Scenario | HTTP Status Code | code | subCode | Description |
---|---|---|---|---|
Purse being updated is not in normal status | 200 | 5 | 100 | An account must be in a normal status to update a purse. |
There is an existing purse with the same name | 200 | 5 | 1020 | The purseName already exists. |
Purse being updated is not a savings purse | 200 | 5 | 352 | Only a saving purse can be updated. |
IconName more than 50 | 400 | 5 | 602 | The iconName should not be more than 50 chars. |
Description more than 100 | 400 | 5 | 602 | The description should not be more than 100 chars. |
Invalid goal amount | 400 | 5 | 354 | The goalAmount is invalid. |
Invalid description chars | 400 | 5 | 640 | The description should only contain alphanumeric chars [Aa-Zz] [0-9]. |
Invalid Identifier | 400 | 5 | 602 | Invalid Identifier. |
Purse not found | 200 | 5 | 1000 | The purse does not exist. |
Account not found | 404 | 10 | 0 | Account not found. |
Close an Empty Balance Non-Spending Purse
This endpoint is used to close and delete an Empty Balance Non-Spending Purse
API Call Structure
DELETE /programs/{programCode}/accounts/{accountIdentifier}/purses/{purseIdentifier}
API Call Structure Parameters
- X-GD-RequestID (required header)
- programCode (required)
- accountIdentifier (required)
- purseIdentifier (required)
For more details, refer to Structure of API Calls.
Sample Response Body
{
"responseDetails":[
{
"code":0,
"subCode":0,
"description":"Success",
"url":"http://tbd"
}
]
}
Updated 11 months ago