> 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.

# Confirm Transfer OTP

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

Reference: https://apidocs.sare.africa/sare-core-api/wallet/transactions/confirm-transfer-otp

## Request

### Headers

- `Idempotency-Key` (string, optional)

### Body (application/json)

This endpoint expects an object.

- `otp` (string, required)
- `transactionId` (string, required)

## Response

### 200

OK

- `code` (integer, required)
- `data` (object, required)
  - `status` (string, required)
  - `transactionId` (string, required)
- `message` (string, required)

## Errors

### 400 Bad Request Error

Bad Request

- `path` (string, required)
- `status` (integer, required)
- `message` (string, required)

## Examples

**Request**

```json
{
  "otp": "482913",
  "transactionId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5f"
}
```

**Response**

```json
{
  "code": 200,
  "data": {
    "status": "PROCESSING",
    "transactionId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5f"
  },
  "message": "Transaction is being processed."
}
```

**SDK Code**

```python Wallet_Transactions_Confirm Transfer OTP_example
import requests

url = "http://localhost:8080/api/v3/transactions/confirm/otp"

payload = {
    "otp": "482913",
    "transactionId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5f"
}
headers = {
    "Idempotency-Key": "idem-{{$guid}}",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Wallet_Transactions_Confirm Transfer OTP_example
const url = 'http://localhost:8080/api/v3/transactions/confirm/otp';
const options = {
  method: 'POST',
  headers: {'Idempotency-Key': 'idem-{{$guid}}', 'Content-Type': 'application/json'},
  body: '{"otp":"482913","transactionId":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5f"}'
};

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

```go Wallet_Transactions_Confirm Transfer OTP_example
package main

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

func main() {

	url := "http://localhost:8080/api/v3/transactions/confirm/otp"

	payload := strings.NewReader("{\n  \"otp\": \"482913\",\n  \"transactionId\": \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5f\"\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_Confirm Transfer OTP_example
require 'uri'
require 'net/http'

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

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  \"otp\": \"482913\",\n  \"transactionId\": \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5f\"\n}"

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

```java Wallet_Transactions_Confirm Transfer OTP_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("http://localhost:8080/api/v3/transactions/confirm/otp")
  .header("Idempotency-Key", "idem-{{$guid}}")
  .header("Content-Type", "application/json")
  .body("{\n  \"otp\": \"482913\",\n  \"transactionId\": \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5f\"\n}")
  .asString();
```

```php Wallet_Transactions_Confirm Transfer OTP_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'http://localhost:8080/api/v3/transactions/confirm/otp', [
  'body' => '{
  "otp": "482913",
  "transactionId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5f"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'Idempotency-Key' => 'idem-{{$guid}}',
  ],
]);

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

```csharp Wallet_Transactions_Confirm Transfer OTP_example
using RestSharp;

var client = new RestClient("http://localhost:8080/api/v3/transactions/confirm/otp");
var request = new RestRequest(Method.POST);
request.AddHeader("Idempotency-Key", "idem-{{$guid}}");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"otp\": \"482913\",\n  \"transactionId\": \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5f\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Wallet_Transactions_Confirm Transfer OTP_example
import Foundation

let headers = [
  "Idempotency-Key": "idem-{{$guid}}",
  "Content-Type": "application/json"
]
let parameters = [
  "otp": "482913",
  "transactionId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5f"
] as [String : Any]

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

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