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

FieldDescription
responseDetailsSee Response Details
codeSee Response Details
subCodeSee Response Details
descriptionSee Response Details
urlSee Response Details
pursesA 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.
purseIdentifierUnique identifier of a purse within an account.
purseTypeIndicates the purpose of the purse.
availableBalanceAmount of funds available for use. Note: Pending transactions are included in this balance.
ledgerBalanceBalance of the account based on all activities that have been posted to the associated ledger.
availableBalanceAsOfDateTimeThe date/time (UTC) that the available balance is reflective of.
ledgerBalanceAsOfDateTimeThe 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.

CharacterExample
Uppercase or Capital LettersA-Z
Lowercase Lettersa-z
Numbers or Digits0-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

FieldDescription
responseDetailsSee Response Details
codeSee Response Details
subCodeSee Response Details
descriptionSee Response Details
urlSee Response Details
purseA 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.
purseIdentifierUnique identifier of a purse within an account.
purseTypeIndicates the purpose of the purse.
purseDescriptionValue used to describe what the purseType is for.
availableBalanceAmount of funds available for use. Note: Pending transactions are included in this balance.
ledgerBalanceBalance of the account based on all activities that have been posted to the associated ledger.
availableBalanceAsOfDateTimeThe date/time (UTC) that the available balance is reflective of.
ledgerBalanceAsOfDateTimeThe 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

ScenarioCodesubCodeDescription
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.5100An account must be in a normal status to add a purse.
Account status is restricted without a cure.5100An 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

ScenarioHTTP Status CodecodesubCodeDescription
Purse being updated is not in normal status2005100An account must be in a normal status to update a purse.
There is an existing purse with the same name20051020The purseName already exists.
Purse being updated is not a savings purse2005352Only a saving purse can be updated.
IconName more than 504005602The iconName should not be more than 50 chars.
Description more than 1004005602The description should not be more than 100 chars.
Invalid goal amount4005354The goalAmount is invalid.
Invalid description chars4005640The description should only contain alphanumeric chars [Aa-Zz] [0-9].
Invalid Identifier4005602Invalid Identifier.
Purse not found20051000The purse does not exist.
Account not found404100Account 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"
      }
   ]
}