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

# Initiate B2C Transfer

POST http://localhost:8080/api/v3/transactions/b2c
Content-Type: application/json

Business-to-customer payout: sourceWalletId must be a BUSINESS wallet, destinationWalletId must be a PERSONAL wallet.

Reference: https://apidocs.sare.africa/sare-core-api/wallet/transactions/initiate-b-2-c-transfer

## Request

### Headers

- `Idempotency-Key` (string, optional)

### Body (application/json)

This endpoint expects an object.

- `sourceWalletId` (string, required)
- `destinationWalletId` (string, required)
- `amount` (integer, required)

## Response

### 200

OK

- `code` (integer, required)
- `message` (string, required)
- `data` (ApiV3TransactionsB2CPostResponsesContentApplicationJsonSchemaData, required)

## Types

### ApiV3TransactionsB2CPostResponsesContentApplicationJsonSchemaData

- `transactionId` (string, required)
- `sourceWalletId` (string, required)
- `recipientName` (string, required)
- `amount` (integer, required)
- `fee` (integer, required)
- `status` (string, required)
- `reference` (string, required)
- `timestamp` (datetime, required)

## Examples

**Request**

```json
{
  "sourceWalletId": "b1e7f6a0-9d2b-4a5b-9c3d-1a2b3c4d5e6f",
  "destinationWalletId": "d4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80",
  "amount": 300
}
```

**Response**

```json
{
  "code": 200,
  "message": "Transfer initiated.",
  "data": {
    "transactionId": "3c4d5e6f-7a8b-4c9d-0e1f-2a3b4c5d6e7f",
    "sourceWalletId": "b1e7f6a0-9d2b-4a5b-9c3d-1a2b3c4d5e6f",
    "recipientName": "Jane Doe",
    "amount": 300,
    "fee": 0,
    "status": "INITIATED",
    "reference": "TX-2026-000126",
    "timestamp": "2026-09-22T10:05:00Z"
  }
}
```

**SDK Code**

```python Wallet_Transactions_Initiate B2C Transfer_example
import requests

url = "http://localhost:8080/api/v3/transactions/b2c"

payload = {
    "sourceWalletId": "b1e7f6a0-9d2b-4a5b-9c3d-1a2b3c4d5e6f",
    "destinationWalletId": "d4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80",
    "amount": 300
}
headers = {
    "Idempotency-Key": "idem-{{$guid}}",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Wallet_Transactions_Initiate B2C Transfer_example
const url = 'http://localhost:8080/api/v3/transactions/b2c';
const options = {
  method: 'POST',
  headers: {'Idempotency-Key': 'idem-{{$guid}}', 'Content-Type': 'application/json'},
  body: '{"sourceWalletId":"b1e7f6a0-9d2b-4a5b-9c3d-1a2b3c4d5e6f","destinationWalletId":"d4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80","amount":300}'
};

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

```go Wallet_Transactions_Initiate B2C Transfer_example
package main

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

func main() {

	url := "http://localhost:8080/api/v3/transactions/b2c"

	payload := strings.NewReader("{\n  \"sourceWalletId\": \"b1e7f6a0-9d2b-4a5b-9c3d-1a2b3c4d5e6f\",\n  \"destinationWalletId\": \"d4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80\",\n  \"amount\": 300\n}")

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

	req.Header.Add("Idempotency-Key", "idem-{{$guid}}")
	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 Wallet_Transactions_Initiate B2C Transfer_example
require 'uri'
require 'net/http'

url = URI("http://localhost:8080/api/v3/transactions/b2c")

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

request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = 'idem-{{$guid}}'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"sourceWalletId\": \"b1e7f6a0-9d2b-4a5b-9c3d-1a2b3c4d5e6f\",\n  \"destinationWalletId\": \"d4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80\",\n  \"amount\": 300\n}"

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

```java Wallet_Transactions_Initiate B2C Transfer_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("http://localhost:8080/api/v3/transactions/b2c")
  .header("Idempotency-Key", "idem-{{$guid}}")
  .header("Content-Type", "application/json")
  .body("{\n  \"sourceWalletId\": \"b1e7f6a0-9d2b-4a5b-9c3d-1a2b3c4d5e6f\",\n  \"destinationWalletId\": \"d4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80\",\n  \"amount\": 300\n}")
  .asString();
```

```php Wallet_Transactions_Initiate B2C Transfer_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'http://localhost:8080/api/v3/transactions/b2c', [
  'body' => '{
  "sourceWalletId": "b1e7f6a0-9d2b-4a5b-9c3d-1a2b3c4d5e6f",
  "destinationWalletId": "d4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80",
  "amount": 300
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'Idempotency-Key' => 'idem-{{$guid}}',
  ],
]);

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

```csharp Wallet_Transactions_Initiate B2C Transfer_example
using RestSharp;

var client = new RestClient("http://localhost:8080/api/v3/transactions/b2c");
var request = new RestRequest(Method.POST);
request.AddHeader("Idempotency-Key", "idem-{{$guid}}");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"sourceWalletId\": \"b1e7f6a0-9d2b-4a5b-9c3d-1a2b3c4d5e6f\",\n  \"destinationWalletId\": \"d4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80\",\n  \"amount\": 300\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Wallet_Transactions_Initiate B2C Transfer_example
import Foundation

let headers = [
  "Idempotency-Key": "idem-{{$guid}}",
  "Content-Type": "application/json"
]
let parameters = [
  "sourceWalletId": "b1e7f6a0-9d2b-4a5b-9c3d-1a2b3c4d5e6f",
  "destinationWalletId": "d4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80",
  "amount": 300
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8080/api/v3/transactions/b2c")! 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()
```