> ## Documentation Index
> Fetch the complete documentation index at: https://docs.juicyway.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> The Juicyway Wallet API enables businesses to programmatically create and manage customer wallets, fund wallets, and process payouts across supported currencies. This guide describes the required endpoints, request/response formats, and recommended integration flow for Wallet-as-a-Service (WaaS).

## Wallet-as-a-Service (WaaS)

Wallet-as-a-Service (WaaS) provides an API-driven abstraction for wallet creation, funding, payouts, and transaction tracking.

WaaS handles:

* Wallet lifecycle management
* Multi-currency balances
* Credit and debit transactions
* Wallet status controls
* Transaction reconciliation

***

## Core Features & APIs

The Wallet API supports the following operations:

* **Customer Management**
  * Create and manage customer profiles
* **Wallet Management**
  * Create wallets per customer and currency
  * Retrieve wallet details and balances
  * Update wallet status (active, frozen, deleted)
* **Payment Methods**
  * Add supported payment methods to wallets
* **Transactions**
  * Credit transactions (funding)
  * Debit transactions (payouts)
  * Transaction listing and retrieval

***

## Base URL

```
https://api.spendjuice.com
```

***

## Authentication

All API requests require authentication using an API key.

**Header**

```
Authorization: YOUR_API_KEY
```

## Typical Merchant Flow

### Customer Onboarding

1. Create customer
2. Complete KYC verification
3. Create wallet
4. Add payment method

### Daily Operations

* Fund wallet (credit)
* Process payouts (debit)
* Retrieve balances
* Monitor transactions

### Account Management

* Freeze wallet

  ```json theme={null}
  PATCH /wallets/{id}/status
  ```
* Delete wallet

  ```json theme={null}
  PATCH /wallets/{id}/status
  ```

***

## Error Handling

| Code | Description                     |
| :--- | :------------------------------ |
| 400  | Invalid request parameters      |
| 401  | Unauthorized (invalid API key)  |
| 404  | Resource not found              |
| 422  | Business rule validation failed |
| 500  | Internal server error           |

## Best Practices

* Complete customer KYC before wallet activation.
* Use idempotency keys for wallet and transaction creation.
* Persist transaction IDs for reconciliation.
* Keep wallet status synchronized with internal user state.
* Use sandbox mode before production deployment.
