Wallets

Wallets hold merchant funds from successful transactions. Each business has wallets per currency, and the balance is updated automatically as transactions are processed.

The wallet model

Properties

  • Name
    id
    Type
    integer
    Description

    Unique wallet identifier.

  • Name
    userId
    Type
    integer
    Description

    Owner user ID.

  • Name
    businessId
    Type
    integer
    Description

    Associated business ID.

  • Name
    balance
    Type
    integer
    Description

    Current balance in the smallest currency unit.

  • Name
    currency
    Type
    string
    Description

    Three-letter ISO currency code.

  • Name
    dateCreated
    Type
    timestamp
    Description

    Timestamp when the wallet was created.


POST/v1/wallets

Create wallet

Create a new wallet for your business. Wallets are automatically created when transactions are processed, but you can also create them manually.

Required attributes

  • Name
    currency
    Type
    string
    Description

    Three-letter ISO currency code for the wallet (e.g., USD, ZWL).

Request

POST
/v1/wallets
curl -X POST https://api.zuripay.app/v1/wallets \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"currency": "USD"}'

Response

{
  "result": "success",
  "message": "Wallet created successfully.",
  "wallet_id": 1
}

GET/v1/wallets/list

List wallets

Retrieve all wallets for your business.

Request

GET
/v1/wallets/list
curl https://api.zuripay.app/v1/wallets/list \
  -H "Authorization: Bearer sk_live_your_api_key"

Response

{
  "result": "success",
  "wallets": [
    {
      "id": 1,
      "balance": 150000,
      "currency": "USD",
      "dateCreated": "2025-01-15T10:30:00Z"
    }
  ]
}

GET/v1/wallets/fetch/:wallet_id

Fetch wallet

Retrieve details of a specific wallet.

Request

GET
/v1/wallets/fetch/1
curl https://api.zuripay.app/v1/wallets/fetch/1 \
  -H "Authorization: Bearer sk_live_your_api_key"

GET/v1/wallets/balance

Get balance

Get the current balance across all wallets for your business.

Request

GET
/v1/wallets/balance
curl https://api.zuripay.app/v1/wallets/balance \
  -H "Authorization: Bearer sk_live_your_api_key"

Response

{
  "result": "success",
  "balances": [
    {
      "currency": "USD",
      "balance": 150000
    },
    {
      "currency": "ZWL",
      "balance": 5000000
    }
  ]
}

DELETE/v1/wallets/delete

Delete wallet

Delete a wallet. The wallet must have a zero balance before it can be deleted.

Request

DELETE
/v1/wallets/delete
curl -X DELETE https://api.zuripay.app/v1/wallets/delete \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"wallet_id": 1}'

Response

{
  "result": "success",
  "message": "Wallet deleted successfully."
}

Was this page helpful?