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

# Upload payment proof

POST https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/{tradeId}/proof
Content-Type: application/json

Upload payment proof.

**Credential:** Customer session

**Before you call**

- A customer session for the same partner, integration, customer, wallet and chain.
- To change proof, the customer must be the fiat payer on a BUY, and the trade must be CREATED, PAID or DISPUTED.
- Uploads accept PNG or JPEG files up to 3 MiB decoded. Authenticated reads return merchant originals unchanged.

Customer BUY fiat payer only in CREATED, PAID or DISPUTED. One PNG or JPEG image up to 3 MiB. PDFs are rejected for new uploads. Identical POST retry is idempotent; use PATCH for replacement. Stored privately with a small blurred preview; a linked proof message is committed atomically. Does not mark paid.

Storage unavailability can return 502 or 503 UPSTREAM_ERROR. Retry with backoff; contact Sinbad with requestId if it persists.



> Confirm with Sinbad that this endpoint is enabled in your environment.

**Errors**

| Status | Code | What to do |
| --- | --- | --- |
| 400 | `VALIDATION_ERROR` | Correct the fields reported in details before retrying. |
| 401 | `UNAUTHENTICATED` | Create a new customer session or use a valid server credential. |
| 403 | `FORBIDDEN` | Check credential ownership, integration and the supplied Origin. |
| 404 | `NOT_FOUND` | Check the resource ID. A resource that belongs to someone else also returns 404. |
| 409 | `CONFLICT` | Read the current state again before you prepare or retry. |
| 502 | `UPSTREAM_ERROR` | Retry with backoff and quote requestId if it persists. For transaction reports, retry the same hash without sending another transaction. |
| 503 | `UPSTREAM_ERROR` | Retry with backoff; preserve the same idempotency key for a repeated mutation. |

Reference: https://docs.getsinbad.com/api-reference/payment-proof/upload-partner-trade-proof

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `tradeId` (string, required)

### Body (application/json)

This endpoint expects an object.

- `contentType` (enum, required)
  - Allowed values: `image/png`, `image/jpeg`
- `dataBase64` (string, required) — Base64 encoded file bytes without a data URL prefix.

## Response

### 201

Saved proof metadata, including identical retries.

- `proofId` (string, required)
- `contentType` (string, required) — Original content type; merchant files can use native image formats.
- `size` (integer, required)
- `uploadedByRole` (enum, required)
  - Allowed values: `customer`, `merchant`
- `uploadedAt` (datetime, required, nullable)
- `base64` (string, required) — Blurred preview, not original file bytes.
- `width` (double, required)
- `height` (double, required)

## Errors

### 400 Bad Request Error

The request is invalid.

- `error` (V1TradesTradeIdProofPostResponsesContentApplicationJsonSchemaError, required)

### 401 Unauthorized Error

Authentication is required.

- `error` (V1TradesTradeIdProofPostResponsesContentApplicationJsonSchemaError, required)

### 403 Forbidden Error

You do not have permission to perform this action.

- `error` (V1TradesTradeIdProofPostResponsesContentApplicationJsonSchemaError, required)

### 404 Not Found Error

The requested resource was not found.

- `error` (V1TradesTradeIdProofPostResponsesContentApplicationJsonSchemaError, required)

### 409 Conflict Error

The request conflicts with the current state of the resource.

- `error` (V1TradesTradeIdProofPostResponsesContentApplicationJsonSchemaError, required)

### 502 Bad Gateway Error

A required service is unavailable.

- `error` (V1TradesTradeIdProofPostResponsesContentApplicationJsonSchemaError, required)

### 503 Service Unavailable Error

Service temporarily unavailable.

- `error` (V1TradesTradeIdProofPostResponsesContentApplicationJsonSchemaError, required)

## Types

### V1TradesTradeIdProofPostResponsesContentApplicationJsonSchemaError

- `code` (string, required)
- `numericId` (integer, required)
- `message` (string, required)
- `requestId` (string, optional)
- `details` (map from string to any, optional)

## Examples

**Request**

```json
{
  "contentType": "image/png",
  "dataBase64": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+/lS8AAAAASUVORK5CYII="
}
```

**Response**

```json
{
  "proofId": "proof_demo",
  "contentType": "image/png",
  "size": 68,
  "uploadedByRole": "customer",
  "uploadedAt": "2026-10-23T10:00:00.000Z",
  "base64": "/9j/2wBDABQODxIPDRQSEBIXFRQYHjIhHhwcHj0sLiQySUBMS0dARkVQWnNiUFVtVkVGZIhlbXd7gYKBTmCNl4x9lnN+gXz/2wBDARUXFx4aHjshITt8U0ZTfHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHz/wAARCABAAEADASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAb/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/ALMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/2Q==",
  "width": 1,
  "height": 1
}
```

**SDK Code**

```python Default
import requests

url = "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/proof"

payload = {
    "contentType": "image/png",
    "dataBase64": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+/lS8AAAAASUVORK5CYII="
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Default
const url = 'https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/proof';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"contentType":"image/png","dataBase64":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+/lS8AAAAASUVORK5CYII="}'
};

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

```go Default
package main

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

func main() {

	url := "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/proof"

	payload := strings.NewReader("{\n  \"contentType\": \"image/png\",\n  \"dataBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+/lS8AAAAASUVORK5CYII=\"\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 Default
require 'uri'
require 'net/http'

url = URI("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/proof")

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  \"contentType\": \"image/png\",\n  \"dataBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+/lS8AAAAASUVORK5CYII=\"\n}"

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

```java Default
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/proof")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"contentType\": \"image/png\",\n  \"dataBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+/lS8AAAAASUVORK5CYII=\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/proof', [
  'body' => '{
  "contentType": "image/png",
  "dataBase64": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+/lS8AAAAASUVORK5CYII="
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Default
using RestSharp;

var client = new RestClient("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/proof");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"contentType\": \"image/png\",\n  \"dataBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+/lS8AAAAASUVORK5CYII=\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Default
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "contentType": "image/png",
  "dataBase64": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+/lS8AAAAASUVORK5CYII="
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/trades/trade_demo/proof")! 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()
```