> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.shimi.cash/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.shimi.cash/_mcp/server.

# Fund Card

POST https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/card/fund-card
Content-Type: application/json

Funds a card from your settlement balance.

**Body (JSON)** — both required:

| Field    | Type   | Notes                                              |
| -------- | ------ | -------------------------------------------------- |
| `cardId` | string | `cardId` returned by **Generate Card**             |
| `amount` | number | NGN, must be > 0. Send a JSON number, not a string |

The amount is debited from your **first active settlement account** (you cannot choose which; there is no `settlementId` field — if you have none, an empty one is created and the call fails with insufficient balance). Funding is allowed up to the full balance (`balance >= amount`).

**Outcomes** (every non-success is HTTP 400, distinguish by `message`):

* `Card funded successfully` — done.
* `...Your balance has been refunded.` — provider declined; settlement re-credited. Safe to retry with a new request.
* `Card funding is being confirmed. Do not retry; check the card transaction status.` — provider outcome unknown (timeout/network/5xx). **Your balance has been debited and NOT refunded**; the card may or may not have been funded. Do not retry — contact support for reconciliation.

There is no idempotency key on this endpoint: a client-side retry after a timeout will fund the card twice.

> All errors from this folder use `{ "status": "error", "message": "..." }` and are returned as **HTTP 400** (including "Card not found" — there is no 404). Success bodies use `status: "success"` (not `success: true` like the VTU endpoints).

Reference: https://docs.shimi.cash/api-reference/shimi-api/card-issuing/fund-card

## Authentication

- `Authorization` header (bearer token, required) — Access token from Generate Access Token (valid 15 minutes).

## Request

### Body (application/json)

This endpoint expects an object.

- `amount` (integer, optional)
- `cardId` (string, optional)

## Response

### 200

OK

- `status` (string, optional)
- `message` (string, optional)

## Errors

### 400 Bad Request Error

Declined (refunded) / Being confirmed (ambiguous, not refunded) / Insufficient balance / Missing fields / Invalid amount / Card not found

- `status` (string, optional)
- `message` (string, optional)

### 401 Unauthorized Error

Unauthorized

- `message` (string, optional)

### 403 Forbidden Error

Invalid or expired access token / KYB not approved / Account deactivated

- `message` (string, optional)
- `code` (string, optional)
- `kybStatus` (string, optional)

## Examples

### 200 Funded

**Response**

```json
{
  "status": "success",
  "message": "Card funded successfully"
}
```

**SDK Code**

```python 200 Funded
import requests

url = "https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/card/fund-card"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript 200 Funded
const url = 'https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/card/fund-card';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go 200 Funded
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/card/fund-card"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby 200 Funded
require 'uri'
require 'net/http'

url = URI("https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/card/fund-card")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java 200 Funded
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/card/fund-card")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php 200 Funded
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/card/fund-card', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp 200 Funded
using RestSharp;

var client = new RestClient("https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/card/fund-card");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift 200 Funded
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/card/fund-card")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Card Issuing_fundCard_example

**Request**

```json
{
  "amount": 5000,
  "cardId": "{{card_id}}"
}
```

**Response**

```json
{
  "status": "success",
  "message": "Card funded successfully"
}
```

**SDK Code**

```python Card Issuing_fundCard_example
import requests

url = "https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/card/fund-card"

payload = {
    "amount": 5000,
    "cardId": "{{card_id}}"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Card Issuing_fundCard_example
const url = 'https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/card/fund-card';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"amount":5000,"cardId":"{{card_id}}"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Card Issuing_fundCard_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/card/fund-card"

	payload := strings.NewReader("{\n  \"amount\": 5000,\n  \"cardId\": \"{{card_id}}\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Card Issuing_fundCard_example
require 'uri'
require 'net/http'

url = URI("https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/card/fund-card")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"amount\": 5000,\n  \"cardId\": \"{{card_id}}\"\n}"

response = http.request(request)
puts response.read_body
```

```java Card Issuing_fundCard_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/card/fund-card")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"amount\": 5000,\n  \"cardId\": \"{{card_id}}\"\n}")
  .asString();
```

```php Card Issuing_fundCard_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/card/fund-card', [
  'body' => '{
  "amount": 5000,
  "cardId": "{{card_id}}"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Card Issuing_fundCard_example
using RestSharp;

var client = new RestClient("https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/card/fund-card");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"amount\": 5000,\n  \"cardId\": \"{{card_id}}\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Card Issuing_fundCard_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "amount": 5000,
  "cardId": "{{card_id}}"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://shimi-waas-api-9493532b9281.herokuapp.com/api/v1/card/fund-card")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```