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

# Submit or track a signed transaction

POST https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/transactions
Content-Type: application/json

Submit or track a signed transaction.

**Credential:** Customer session or partner secret

**Before you call**

- A customer session, or an owning partner server credential without Origin.
- Use the original `preparationId` and the customer's registered wallet.
- Keep the signed bytes and any known hashes if you need to recover an uncertain submission.
- Set an Idempotency-Key and reuse it for an identical retry.

Submits a signed transaction, or reports a transaction that your wallet already sent, for a prepared transaction. Send the `preparationId`, exactly one of `signedTransaction` or `transactionHash`, and an `Idempotency-Key`. Use the owning customer session, or an authorized partner server credential without an `Origin` header.

Signed transactions. `signedTransaction` must be a serialized EIP-1559 transaction from the registered wallet. Its chain, destination, calldata and zero value must match the prepared transaction. The wallet fills in the nonce, gas and fees, so use its pending nonce. A signature over a UserOperation is not a serialized transaction. Before it broadcasts, Sinbad checks the nonce and the native balance, then simulates the call. A native gas shortage returns `400 INSUFFICIENT_BALANCE` with `details.kind: NATIVE_GAS`, `asset: POL`, the `chainId`, and the required, current and missing amounts in wei and in POL. A stale nonce returns `409 CONFLICT` first. A failed simulation or a temporary network failure can return a generic `503 UPSTREAM_ERROR`: check the allowance, the balance and the trade state before you retry identical bytes.

Transactions sent elsewhere. For a transaction executed outside Sinbad, including smart-account execution, report the included blockchain `transactionHash`, not a `userOpHash`. Partners arrange their own wallet execution and gas funding or sponsorship. An escrow hash report can start tracking before a receipt is available, and returns `202` with `PENDING_CONFIRMATION`. A hash report for a trade action that is unavailable, or below the required confirmation depth, can return `502 UPSTREAM_ERROR`: retry the same report, and do not broadcast again. The evidence must match the prepared escrow or action and its participants.

Idempotency. An `Idempotency-Key` contains 8 to 128 letters, digits, underscores or hyphens. It binds the prepared transaction and its hash for 30 days. Reusing a bound key with a different prepared transaction or hash returns `409 CONFLICT`. Accepted signed transactions, and transactions for other purposes, stay bound to their hash. After a definite failure, request a new prepared transaction if the step is still allowed. Track a pending or uncertain transaction, and never replace one just because it is slow.

Correcting a wrong escrow hash. If you reported the wrong hash for an escrow transaction that your wallet sent, report the correct included `transactionHash` for the same `preparationId` with a new key. Sinbad accepts the correction only after a successful receipt at the required confirmation depth proves that exact checkout. Unavailable or unconfirmed evidence returns `502`, invalid evidence cannot replace tracking, and confirmed tracking cannot be replaced. Original reports that Sinbad already accepted then return the current result.

After a `202`. A `202` means tracking has started, not that funding is confirmed. Poll `transaction.status` and the breakdown. `trade` stays `null` until funding is confirmed. If wallet escrow tracking stays unresolved for 24 hours, it becomes `REVIEW_REQUIRED`, and the customer's open trade stays held. Once Sinbad confirms on chain that an unfunded breakdown expired, tracking can end as `EXPIRED`. Late verified evidence can still reconcile wallet escrow tracking that is not confirmed. Signing expiry does not stop confirmation tracking. Trade action transactions have `expiresAt: null`, and approvals and escrow transactions keep the breakdown's deadline.



> 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. |
| 400 | `INSUFFICIENT_BALANCE` | Add POL when details.kind is NATIVE_GAS, then retry the identical signed bytes while the prepared transaction is valid. |
| 409 | `INSUFFICIENT_LIQUIDITY` | The BUY merchant no longer has enough liquidity. Recover any transaction you already submitted before you ask for a new offer. |
| 409 | `CONFLICT` | details.reason ACTIVE_TRADE_EXISTS means the customer already has a trade, or a breakdown with a submitted escrow transaction, on that side. Show the existing trade, or wait for it to finish. A breakdown with no submitted escrow transaction does not cause this: a new idempotency key replaces it. |

Reference: https://docs.getsinbad.com/api-reference/transactions/submit-prepared-transaction

## Authentication

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

## Request

### Headers

- `Idempotency-Key` (string, required)

### Body (application/json)

This endpoint expects a Transactions_submitPreparedTransaction_Request.

- `Transactions_submitPreparedTransaction_Request`
  - TransactionsSubmitPreparedTransactionRequest0
  - TransactionsSubmitPreparedTransactionRequest1

## Response

### 202

Durable submission/tracking result with server-derived or verified hash.

- `transaction` (TradesTransactionResultTransaction, required)
- `trade` (TradesTransactionResultTrade, required)

## Errors

### 400 Bad Request Error

The request is invalid.

- `error` (V1TransactionsPostResponsesContentApplicationJsonSchemaError, required)

### 401 Unauthorized Error

Authentication is required.

- `error` (V1TransactionsPostResponsesContentApplicationJsonSchemaError, required)

### 403 Forbidden Error

You do not have permission to perform this action.

- `error` (V1TransactionsPostResponsesContentApplicationJsonSchemaError, required)

### 404 Not Found Error

The requested resource was not found.

- `error` (V1TransactionsPostResponsesContentApplicationJsonSchemaError, required)

### 409 Conflict Error

The request conflicts with the current state of the resource.

- `error` (V1TransactionsPostResponsesContentApplicationJsonSchemaError, required)

### 502 Bad Gateway Error

A required service is unavailable.

- `error` (V1TransactionsPostResponsesContentApplicationJsonSchemaError, required)

### 503 Service Unavailable Error

Service temporarily unavailable.

- `error` (V1TransactionsPostResponsesContentApplicationJsonSchemaError, required)

## Types

### TransactionsSubmitPreparedTransactionRequest0

- `preparationId` (string, required)
- `signedTransaction` (string, required)

### TransactionsSubmitPreparedTransactionRequest1

- `preparationId` (string, required)
- `transactionHash` (string, required)

### TradesTransactionResultTransaction

- `preparationId` (string, required)
- `purpose` (string, required)
- `status` (enum, required)
  - Allowed values: `READY_TO_SIGN`, `BROADCAST_UNKNOWN`, `PENDING_CONFIRMATION`, `CONFIRMED`, `REVERTED`, `REJECTED`, `REPLACED`, `EXPIRED`, `REVIEW_REQUIRED`
- `transactionHash` (string, required, nullable)
- `confirmations` (integer, required)
- `requiredConfirmations` (integer, required)

### TradesTransactionResultTrade

- TradesTransactionResultTrade0
- map from string to any

### V1TransactionsPostResponsesContentApplicationJsonSchemaError

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

### TradesTransactionResultTrade0

- `tradeId` (string, required)
- `tradeRef` (string, required)
- `status` (enum, required) — A funded trade first appears as CREATED. PENDING, FUNDING_FAILED and FUNDING_EXPIRED are reserved compatibility values, not currently emitted.
  - Allowed values: `PENDING`, `FUNDING_FAILED`, `FUNDING_EXPIRED`, `CREATED`, `PAID`, `RELEASED`, `CANCELED`, `DISPUTED`
- `side` (enum, required)
  - Allowed values: `BUY`, `SELL`
- `chainId` (integer, required)
- `escrowAddress` (string, required)
- `tokenAddress` (string, required)
- `walletAddress` (string, required)
- `pricing` (TradesTransactionResultTradeOneOf0Pricing, required)
- `id` (string, optional)
- `source` (enum, optional)
  - Allowed values: `partner`
- `transferNumber` (string, optional, nullable)
- `counterparty` (TradesTransactionResultTradeOneOf0Counterparty, optional, nullable)
- `availableActions` (list of string, optional)
- `escrowId` (string, optional, nullable)
- `merchant` (trades__Merchant, optional)
- `fiatCurrencyId` (string, optional)
- `paymentMethodId` (string, optional)
- `displayLabel` (string, optional, nullable) — Recipient account label from the funded payment snapshot; null before funding or when unavailable. Retained after settlement.
- `transactionHash` (string, optional, nullable)
- `dispute` (trades__Dispute, optional) — Confirmed dispute only; null before opening and retained after resolution. Roles are public; no internal identity IDs are exposed.
- `proofOfPayment` (TradesTransactionResultTradeOneOf0ProofOfPayment, optional)
- `paymentInstructions` (TradesTransactionResultTradeOneOf0PaymentInstructions, optional, nullable) — Selected fiat recipient account in CREATED, PAID, and DISPUTED after confirmed funding. BUY uses the merchant account; SELL uses the customer's receiving account. Null before funding and after settlement.
- `senderDetails` (TradesTransactionResultTradeOneOf0SenderDetails, optional, nullable) — Customer view of a SELL trade only. The merchant's saved payment method the fiat is sent from, snapshotted at checkout, so the customer can verify the incoming payment. Same shape as `paymentInstructions`; `data` keys match the saved method. Present only in CREATED, PAID, and DISPUTED after confirmed funding; otherwise null (always null for BUY, merchant views, and trades funded before this field existed).
- `type` (string, optional)
- `createdAt` (datetime, optional, nullable)
- `fundedAt` (datetime, optional, nullable)
- `updatedAt` (datetime, optional, nullable)
- `settlementOutcome` (string, optional, nullable)
- `tradeDetails` (map from string to offers_quotes__DisplayValue, optional, nullable)
- `merchantRateDetails` (map from string to offers_quotes__DisplayValue, optional, nullable)
- `webhookSequence` (integer, optional) — Returned on partner-server reads only.

### TradesTransactionResultTradeOneOf0Pricing

- `usdtAmount` (string, required) — Exact decimal string in the field currency; USDT uses up to six decimal places.
- `customerFiatAmount` (string, required) — Exact decimal string in the field currency; USDT uses up to six decimal places.
- `merchantRateFiat` (string, optional) — Exact decimal string in the field currency; USDT uses up to six decimal places.
- `subtotalFiat` (string, optional) — Exact decimal string in the field currency; USDT uses up to six decimal places.
- `customerFeeFiat` (string, optional) — Exact decimal string in the field currency; USDT uses up to six decimal places.
- `platformFeeFiat` (string, optional) — Exact decimal string in the field currency; USDT uses up to six decimal places.
- `partnerFeeFiat` (string, optional) — Exact decimal string in the field currency; USDT uses up to six decimal places.
- `makerFeeUsdt` (string, optional) — Exact decimal string in the field currency; USDT uses up to six decimal places.
- `platformFeeUsdt` (string, optional) — Exact decimal string in the field currency; USDT uses up to six decimal places.
- `partnerFeeUsdt` (string, optional) — Exact decimal string in the field currency; USDT uses up to six decimal places.
- `lockAmountUsdt` (string, optional) — Exact decimal string in the field currency; USDT uses up to six decimal places.
- `recipientAmountUsdt` (string, optional) — Exact decimal string in the field currency; USDT uses up to six decimal places.
- `refundAmountUsdt` (string, optional) — Exact decimal string in the field currency; USDT uses up to six decimal places.
- `takerFeeFiat` (string, optional) — Exact decimal amount; present when retained pricing includes it.
- `takerFeeUsdt` (string, optional) — Exact decimal amount; present when retained pricing includes it.

### TradesTransactionResultTradeOneOf0Counterparty

- `displayName` (string, required)
- `partnerName` (string, required)

### trades__Merchant

- `userId` (string, required)
- `fullName` (string, required)
- `username` (string, required)
- `avatarUrl` (string, required)

### trades__Dispute

Confirmed dispute only; null before opening and retained after resolution. Roles are public; no internal identity IDs are exposed.

- `reason` (string, required, nullable) — Optional off-chain reason associated with the confirmed dispute; null when unavailable or ambiguous.
- `openedByRole` (enum, required)
  - Allowed values: `merchant`, `customer`
- `openedAtStatus` (enum, required, nullable)
  - Allowed values: `CREATED`, `PAID`
- `openedAt` (datetime, required, nullable)
- `transactionHash` (string, required, nullable)
- `resolvedAt` (datetime, required, nullable)
- `resolution` (enum, required, nullable)
  - Allowed values: `BUYER_RELEASE`, `FULL_REFUND`

### TradesTransactionResultTradeOneOf0ProofOfPayment

- TradesTransactionResultTradeOneOf0ProofOfPayment0
- map from string to any

### TradesTransactionResultTradeOneOf0PaymentInstructions

Selected fiat recipient account in CREATED, PAID, and DISPUTED after confirmed funding. BUY uses the merchant account; SELL uses the customer's receiving account. Null before funding and after settlement.

- `paymentMethodId` (string, required)
- `displayLabel` (string, required)
- `data` (map from string to string, required)

### TradesTransactionResultTradeOneOf0SenderDetails

Customer view of a SELL trade only. The merchant's saved payment method the fiat is sent from, snapshotted at checkout, so the customer can verify the incoming payment. Same shape as `paymentInstructions`; `data` keys match the saved method. Present only in CREATED, PAID, and DISPUTED after confirmed funding; otherwise null (always null for BUY, merchant views, and trades funded before this field existed).

- `paymentMethodId` (string, required)
- `displayLabel` (string, required)
- `data` (map from string to string, required)

### offers_quotes__DisplayValue

- `value` (double, required) — Display only; exact pricing strings govern execution.
- `type` (enum, required)
  - Allowed values: `fiat`, `crypto`, `percentage`

### TradesTransactionResultTradeOneOf0ProofOfPayment0

- `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)

## Examples

### Default

**Request**

```json
{
  "preparationId": "preparation_markPaid",
  "transactionHash": "0xabababababababababababababababababababababababababababababababab"
}
```

**Response**

```json
{
  "transaction": {
    "preparationId": "preparation_markPaid",
    "purpose": "markPaid",
    "status": "PENDING_CONFIRMATION",
    "transactionHash": "0xabababababababababababababababababababababababababababababababab",
    "confirmations": 0,
    "requiredConfirmations": 2
  },
  "trade": {
    "availableActions": [
      "markPaid",
      "cancelPrePaid"
    ],
    "chainId": 80002,
    "counterparty": {
      "displayName": "Alex",
      "partnerName": "Example Partner"
    },
    "createdAt": "2026-10-23T10:00:00.000Z",
    "displayLabel": "Bank transfer",
    "escrowAddress": "0x3333333333333333333333333333333333333333",
    "escrowId": "42",
    "fiatCurrencyId": "usd",
    "fundedAt": "2026-10-23T10:00:00.000Z",
    "id": "trade_demo",
    "merchant": {
      "avatarUrl": "",
      "fullName": "Example Merchant",
      "userId": "merchant_demo",
      "username": "example"
    },
    "merchantRateDetails": {
      "MarketRate": {
        "type": "fiat",
        "value": 1
      },
      "MerchantMargin": {
        "type": "percentage",
        "value": 0
      },
      "MerchantRate": {
        "type": "fiat",
        "value": 1
      }
    },
    "paymentInstructions": {
      "data": {
        "accountName": "Example Merchant",
        "accountNumber": "EXAMPLE123456"
      },
      "displayLabel": "Bank transfer",
      "paymentMethodId": "bank_transfer"
    },
    "paymentMethodId": "bank_transfer",
    "pricing": {
      "customerFeeFiat": "0",
      "customerFiatAmount": "100",
      "lockAmountUsdt": "100",
      "makerFeeUsdt": "0",
      "merchantRateFiat": "1",
      "partnerFeeFiat": "0",
      "partnerFeeUsdt": "0",
      "platformFeeFiat": "0",
      "platformFeeUsdt": "0",
      "recipientAmountUsdt": "100",
      "refundAmountUsdt": "100",
      "subtotalFiat": "100",
      "usdtAmount": "100"
    },
    "senderDetails": null,
    "settlementOutcome": null,
    "side": "BUY",
    "source": "partner",
    "status": "CREATED",
    "tokenAddress": "0x4444444444444444444444444444444444444444",
    "tradeDetails": {
      "Amount": {
        "type": "crypto",
        "value": 100
      },
      "MerchantRate": {
        "type": "fiat",
        "value": 1
      },
      "ServiceFee": {
        "type": "fiat",
        "value": 0
      },
      "Subtotal": {
        "type": "fiat",
        "value": 100
      },
      "YouPay": {
        "type": "fiat",
        "value": 100
      }
    },
    "tradeId": "trade_demo",
    "tradeRef": "0xabababababababababababababababababababababababababababababababab",
    "transactionHash": "0xabababababababababababababababababababababababababababababababab",
    "transferNumber": "B2B-DEMO",
    "type": "SELL",
    "updatedAt": "2026-10-23T10:00:00.000Z",
    "walletAddress": "0x19e7e376e7c213b7e7e7e46cc70a5dd086daff2a"
  }
}
```

**SDK Code**

```python Default
import requests

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

payload = {
    "preparationId": "preparation_markPaid",
    "transactionHash": "0xabababababababababababababababababababababababababababababababab"
}
headers = {
    "Idempotency-Key": "request_demo_001",
    "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/transactions';
const options = {
  method: 'POST',
  headers: {
    'Idempotency-Key': 'request_demo_001',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"preparationId":"preparation_markPaid","transactionHash":"0xabababababababababababababababababababababababababababababababab"}'
};

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/transactions"

	payload := strings.NewReader("{\n  \"preparationId\": \"preparation_markPaid\",\n  \"transactionHash\": \"0xabababababababababababababababababababababababababababababababab\"\n}")

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

	req.Header.Add("Idempotency-Key", "request_demo_001")
	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/transactions")

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

request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = 'request_demo_001'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"preparationId\": \"preparation_markPaid\",\n  \"transactionHash\": \"0xabababababababababababababababababababababababababababababababab\"\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/transactions")
  .header("Idempotency-Key", "request_demo_001")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"preparationId\": \"preparation_markPaid\",\n  \"transactionHash\": \"0xabababababababababababababababababababababababababababababababab\"\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/transactions', [
  'body' => '{
  "preparationId": "preparation_markPaid",
  "transactionHash": "0xabababababababababababababababababababababababababababababababab"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'Idempotency-Key' => 'request_demo_001',
  ],
]);

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

```csharp Default
using RestSharp;

var client = new RestClient("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/transactions");
var request = new RestRequest(Method.POST);
request.AddHeader("Idempotency-Key", "request_demo_001");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"preparationId\": \"preparation_markPaid\",\n  \"transactionHash\": \"0xabababababababababababababababababababababababababababababababab\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Default
import Foundation

let headers = [
  "Idempotency-Key": "request_demo_001",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "preparationId": "preparation_markPaid",
  "transactionHash": "0xabababababababababababababababababababababababababababababababab"
] 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/transactions")! 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()
```

### Already-broadcast escrow (direct wallet or AA)

**Request**

```json
{
  "preparationId": "preparation_escrow",
  "transactionHash": "0xabababababababababababababababababababababababababababababababab"
}
```

**Response**

```json
{
  "transaction": {
    "preparationId": "preparation_escrow",
    "purpose": "createEscrow",
    "status": "PENDING_CONFIRMATION",
    "transactionHash": "0xabababababababababababababababababababababababababababababababab",
    "confirmations": 0,
    "requiredConfirmations": 2
  },
  "trade": null
}
```

**SDK Code**

```python Already-broadcast escrow (direct wallet or AA)
import requests

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

payload = {
    "preparationId": "preparation_escrow",
    "transactionHash": "0xabababababababababababababababababababababababababababababababab"
}
headers = {
    "Idempotency-Key": "request_demo_001",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Already-broadcast escrow (direct wallet or AA)
const url = 'https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/transactions';
const options = {
  method: 'POST',
  headers: {
    'Idempotency-Key': 'request_demo_001',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"preparationId":"preparation_escrow","transactionHash":"0xabababababababababababababababababababababababababababababababab"}'
};

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

```go Already-broadcast escrow (direct wallet or AA)
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"preparationId\": \"preparation_escrow\",\n  \"transactionHash\": \"0xabababababababababababababababababababababababababababababababab\"\n}")

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

	req.Header.Add("Idempotency-Key", "request_demo_001")
	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 Already-broadcast escrow (direct wallet or AA)
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = 'request_demo_001'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"preparationId\": \"preparation_escrow\",\n  \"transactionHash\": \"0xabababababababababababababababababababababababababababababababab\"\n}"

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

```java Already-broadcast escrow (direct wallet or AA)
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/transactions")
  .header("Idempotency-Key", "request_demo_001")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"preparationId\": \"preparation_escrow\",\n  \"transactionHash\": \"0xabababababababababababababababababababababababababababababababab\"\n}")
  .asString();
```

```php Already-broadcast escrow (direct wallet or AA)
<?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/transactions', [
  'body' => '{
  "preparationId": "preparation_escrow",
  "transactionHash": "0xabababababababababababababababababababababababababababababababab"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'Idempotency-Key' => 'request_demo_001',
  ],
]);

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

```csharp Already-broadcast escrow (direct wallet or AA)
using RestSharp;

var client = new RestClient("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/transactions");
var request = new RestRequest(Method.POST);
request.AddHeader("Idempotency-Key", "request_demo_001");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"preparationId\": \"preparation_escrow\",\n  \"transactionHash\": \"0xabababababababababababababababababababababababababababababababab\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Already-broadcast escrow (direct wallet or AA)
import Foundation

let headers = [
  "Idempotency-Key": "request_demo_001",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "preparationId": "preparation_escrow",
  "transactionHash": "0xabababababababababababababababababababababababababababababababab"
] 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/transactions")! 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()
```

### Partner server tracks an escrow hash

**Request**

```json
{
  "preparationId": "preparation_escrow",
  "transactionHash": "0xabababababababababababababababababababababababababababababababab"
}
```

**Response**

```json
{
  "transaction": {
    "preparationId": "preparation_markPaid",
    "purpose": "markPaid",
    "status": "PENDING_CONFIRMATION",
    "transactionHash": "0xabababababababababababababababababababababababababababababababab",
    "confirmations": 0,
    "requiredConfirmations": 2
  },
  "trade": {
    "availableActions": [
      "markPaid",
      "cancelPrePaid"
    ],
    "chainId": 80002,
    "counterparty": {
      "displayName": "Alex",
      "partnerName": "Example Partner"
    },
    "createdAt": "2026-10-23T10:00:00.000Z",
    "displayLabel": "Bank transfer",
    "escrowAddress": "0x3333333333333333333333333333333333333333",
    "escrowId": "42",
    "fiatCurrencyId": "usd",
    "fundedAt": "2026-10-23T10:00:00.000Z",
    "id": "trade_demo",
    "merchant": {
      "avatarUrl": "",
      "fullName": "Example Merchant",
      "userId": "merchant_demo",
      "username": "example"
    },
    "merchantRateDetails": {
      "MarketRate": {
        "type": "fiat",
        "value": 1
      },
      "MerchantMargin": {
        "type": "percentage",
        "value": 0
      },
      "MerchantRate": {
        "type": "fiat",
        "value": 1
      }
    },
    "paymentInstructions": {
      "data": {
        "accountName": "Example Merchant",
        "accountNumber": "EXAMPLE123456"
      },
      "displayLabel": "Bank transfer",
      "paymentMethodId": "bank_transfer"
    },
    "paymentMethodId": "bank_transfer",
    "pricing": {
      "customerFeeFiat": "0",
      "customerFiatAmount": "100",
      "lockAmountUsdt": "100",
      "makerFeeUsdt": "0",
      "merchantRateFiat": "1",
      "partnerFeeFiat": "0",
      "partnerFeeUsdt": "0",
      "platformFeeFiat": "0",
      "platformFeeUsdt": "0",
      "recipientAmountUsdt": "100",
      "refundAmountUsdt": "100",
      "subtotalFiat": "100",
      "usdtAmount": "100"
    },
    "senderDetails": null,
    "settlementOutcome": null,
    "side": "BUY",
    "source": "partner",
    "status": "CREATED",
    "tokenAddress": "0x4444444444444444444444444444444444444444",
    "tradeDetails": {
      "Amount": {
        "type": "crypto",
        "value": 100
      },
      "MerchantRate": {
        "type": "fiat",
        "value": 1
      },
      "ServiceFee": {
        "type": "fiat",
        "value": 0
      },
      "Subtotal": {
        "type": "fiat",
        "value": 100
      },
      "YouPay": {
        "type": "fiat",
        "value": 100
      }
    },
    "tradeId": "trade_demo",
    "tradeRef": "0xabababababababababababababababababababababababababababababababab",
    "transactionHash": "0xabababababababababababababababababababababababababababababababab",
    "transferNumber": "B2B-DEMO",
    "type": "SELL",
    "updatedAt": "2026-10-23T10:00:00.000Z",
    "walletAddress": "0x19e7e376e7c213b7e7e7e46cc70a5dd086daff2a"
  }
}
```

**SDK Code**

```python Partner server tracks an escrow hash
import requests

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

payload = {
    "preparationId": "preparation_escrow",
    "transactionHash": "0xabababababababababababababababababababababababababababababababab"
}
headers = {
    "Idempotency-Key": "request_demo_001",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Partner server tracks an escrow hash
const url = 'https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/transactions';
const options = {
  method: 'POST',
  headers: {
    'Idempotency-Key': 'request_demo_001',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"preparationId":"preparation_escrow","transactionHash":"0xabababababababababababababababababababababababababababababababab"}'
};

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

```go Partner server tracks an escrow hash
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"preparationId\": \"preparation_escrow\",\n  \"transactionHash\": \"0xabababababababababababababababababababababababababababababababab\"\n}")

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

	req.Header.Add("Idempotency-Key", "request_demo_001")
	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 Partner server tracks an escrow hash
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = 'request_demo_001'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"preparationId\": \"preparation_escrow\",\n  \"transactionHash\": \"0xabababababababababababababababababababababababababababababababab\"\n}"

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

```java Partner server tracks an escrow hash
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/transactions")
  .header("Idempotency-Key", "request_demo_001")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"preparationId\": \"preparation_escrow\",\n  \"transactionHash\": \"0xabababababababababababababababababababababababababababababababab\"\n}")
  .asString();
```

```php Partner server tracks an escrow hash
<?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/transactions', [
  'body' => '{
  "preparationId": "preparation_escrow",
  "transactionHash": "0xabababababababababababababababababababababababababababababababab"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'Idempotency-Key' => 'request_demo_001',
  ],
]);

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

```csharp Partner server tracks an escrow hash
using RestSharp;

var client = new RestClient("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/transactions");
var request = new RestRequest(Method.POST);
request.AddHeader("Idempotency-Key", "request_demo_001");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"preparationId\": \"preparation_escrow\",\n  \"transactionHash\": \"0xabababababababababababababababababababababababababababababababab\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Partner server tracks an escrow hash
import Foundation

let headers = [
  "Idempotency-Key": "request_demo_001",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "preparationId": "preparation_escrow",
  "transactionHash": "0xabababababababababababababababababababababababababababababababab"
] 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/transactions")! 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()
```

### Synthetic signed transaction — sign your own preparation

**Request**

```json
{
  "preparationId": "preparation_markPaid",
  "signedTransaction": "0x02f8938301388280843b9aca008506fc23ac00830186a094333333333333333333333333333333333333333380a4ad207e1e000000000000000000000000000000000000000000000000000000000000002ac001a03b3d04eb69b96923ec64e8e3e05c302e60278809b8a7d44ca8073377d9eae9e4a029b6f7cc2f982f78b74e927ac7a382b41caaaa9735a17a87d5f980b34a809436"
}
```

**Response**

```json
{
  "transaction": {
    "preparationId": "preparation_markPaid",
    "purpose": "markPaid",
    "status": "PENDING_CONFIRMATION",
    "transactionHash": "0xabababababababababababababababababababababababababababababababab",
    "confirmations": 0,
    "requiredConfirmations": 2
  },
  "trade": {
    "availableActions": [
      "markPaid",
      "cancelPrePaid"
    ],
    "chainId": 80002,
    "counterparty": {
      "displayName": "Alex",
      "partnerName": "Example Partner"
    },
    "createdAt": "2026-10-23T10:00:00.000Z",
    "displayLabel": "Bank transfer",
    "escrowAddress": "0x3333333333333333333333333333333333333333",
    "escrowId": "42",
    "fiatCurrencyId": "usd",
    "fundedAt": "2026-10-23T10:00:00.000Z",
    "id": "trade_demo",
    "merchant": {
      "avatarUrl": "",
      "fullName": "Example Merchant",
      "userId": "merchant_demo",
      "username": "example"
    },
    "merchantRateDetails": {
      "MarketRate": {
        "type": "fiat",
        "value": 1
      },
      "MerchantMargin": {
        "type": "percentage",
        "value": 0
      },
      "MerchantRate": {
        "type": "fiat",
        "value": 1
      }
    },
    "paymentInstructions": {
      "data": {
        "accountName": "Example Merchant",
        "accountNumber": "EXAMPLE123456"
      },
      "displayLabel": "Bank transfer",
      "paymentMethodId": "bank_transfer"
    },
    "paymentMethodId": "bank_transfer",
    "pricing": {
      "customerFeeFiat": "0",
      "customerFiatAmount": "100",
      "lockAmountUsdt": "100",
      "makerFeeUsdt": "0",
      "merchantRateFiat": "1",
      "partnerFeeFiat": "0",
      "partnerFeeUsdt": "0",
      "platformFeeFiat": "0",
      "platformFeeUsdt": "0",
      "recipientAmountUsdt": "100",
      "refundAmountUsdt": "100",
      "subtotalFiat": "100",
      "usdtAmount": "100"
    },
    "senderDetails": null,
    "settlementOutcome": null,
    "side": "BUY",
    "source": "partner",
    "status": "CREATED",
    "tokenAddress": "0x4444444444444444444444444444444444444444",
    "tradeDetails": {
      "Amount": {
        "type": "crypto",
        "value": 100
      },
      "MerchantRate": {
        "type": "fiat",
        "value": 1
      },
      "ServiceFee": {
        "type": "fiat",
        "value": 0
      },
      "Subtotal": {
        "type": "fiat",
        "value": 100
      },
      "YouPay": {
        "type": "fiat",
        "value": 100
      }
    },
    "tradeId": "trade_demo",
    "tradeRef": "0xabababababababababababababababababababababababababababababababab",
    "transactionHash": "0xabababababababababababababababababababababababababababababababab",
    "transferNumber": "B2B-DEMO",
    "type": "SELL",
    "updatedAt": "2026-10-23T10:00:00.000Z",
    "walletAddress": "0x19e7e376e7c213b7e7e7e46cc70a5dd086daff2a"
  }
}
```

**SDK Code**

```python Synthetic signed transaction — sign your own preparation
import requests

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

payload = {
    "preparationId": "preparation_markPaid",
    "signedTransaction": "0x02f8938301388280843b9aca008506fc23ac00830186a094333333333333333333333333333333333333333380a4ad207e1e000000000000000000000000000000000000000000000000000000000000002ac001a03b3d04eb69b96923ec64e8e3e05c302e60278809b8a7d44ca8073377d9eae9e4a029b6f7cc2f982f78b74e927ac7a382b41caaaa9735a17a87d5f980b34a809436"
}
headers = {
    "Idempotency-Key": "request_demo_001",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Synthetic signed transaction — sign your own preparation
const url = 'https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/transactions';
const options = {
  method: 'POST',
  headers: {
    'Idempotency-Key': 'request_demo_001',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"preparationId":"preparation_markPaid","signedTransaction":"0x02f8938301388280843b9aca008506fc23ac00830186a094333333333333333333333333333333333333333380a4ad207e1e000000000000000000000000000000000000000000000000000000000000002ac001a03b3d04eb69b96923ec64e8e3e05c302e60278809b8a7d44ca8073377d9eae9e4a029b6f7cc2f982f78b74e927ac7a382b41caaaa9735a17a87d5f980b34a809436"}'
};

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

```go Synthetic signed transaction — sign your own preparation
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"preparationId\": \"preparation_markPaid\",\n  \"signedTransaction\": \"0x02f8938301388280843b9aca008506fc23ac00830186a094333333333333333333333333333333333333333380a4ad207e1e000000000000000000000000000000000000000000000000000000000000002ac001a03b3d04eb69b96923ec64e8e3e05c302e60278809b8a7d44ca8073377d9eae9e4a029b6f7cc2f982f78b74e927ac7a382b41caaaa9735a17a87d5f980b34a809436\"\n}")

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

	req.Header.Add("Idempotency-Key", "request_demo_001")
	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 Synthetic signed transaction — sign your own preparation
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = 'request_demo_001'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"preparationId\": \"preparation_markPaid\",\n  \"signedTransaction\": \"0x02f8938301388280843b9aca008506fc23ac00830186a094333333333333333333333333333333333333333380a4ad207e1e000000000000000000000000000000000000000000000000000000000000002ac001a03b3d04eb69b96923ec64e8e3e05c302e60278809b8a7d44ca8073377d9eae9e4a029b6f7cc2f982f78b74e927ac7a382b41caaaa9735a17a87d5f980b34a809436\"\n}"

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

```java Synthetic signed transaction — sign your own preparation
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/transactions")
  .header("Idempotency-Key", "request_demo_001")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"preparationId\": \"preparation_markPaid\",\n  \"signedTransaction\": \"0x02f8938301388280843b9aca008506fc23ac00830186a094333333333333333333333333333333333333333380a4ad207e1e000000000000000000000000000000000000000000000000000000000000002ac001a03b3d04eb69b96923ec64e8e3e05c302e60278809b8a7d44ca8073377d9eae9e4a029b6f7cc2f982f78b74e927ac7a382b41caaaa9735a17a87d5f980b34a809436\"\n}")
  .asString();
```

```php Synthetic signed transaction — sign your own preparation
<?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/transactions', [
  'body' => '{
  "preparationId": "preparation_markPaid",
  "signedTransaction": "0x02f8938301388280843b9aca008506fc23ac00830186a094333333333333333333333333333333333333333380a4ad207e1e000000000000000000000000000000000000000000000000000000000000002ac001a03b3d04eb69b96923ec64e8e3e05c302e60278809b8a7d44ca8073377d9eae9e4a029b6f7cc2f982f78b74e927ac7a382b41caaaa9735a17a87d5f980b34a809436"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'Idempotency-Key' => 'request_demo_001',
  ],
]);

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

```csharp Synthetic signed transaction — sign your own preparation
using RestSharp;

var client = new RestClient("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/transactions");
var request = new RestRequest(Method.POST);
request.AddHeader("Idempotency-Key", "request_demo_001");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"preparationId\": \"preparation_markPaid\",\n  \"signedTransaction\": \"0x02f8938301388280843b9aca008506fc23ac00830186a094333333333333333333333333333333333333333380a4ad207e1e000000000000000000000000000000000000000000000000000000000000002ac001a03b3d04eb69b96923ec64e8e3e05c302e60278809b8a7d44ca8073377d9eae9e4a029b6f7cc2f982f78b74e927ac7a382b41caaaa9735a17a87d5f980b34a809436\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Synthetic signed transaction — sign your own preparation
import Foundation

let headers = [
  "Idempotency-Key": "request_demo_001",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "preparationId": "preparation_markPaid",
  "signedTransaction": "0x02f8938301388280843b9aca008506fc23ac00830186a094333333333333333333333333333333333333333380a4ad207e1e000000000000000000000000000000000000000000000000000000000000002ac001a03b3d04eb69b96923ec64e8e3e05c302e60278809b8a7d44ca8073377d9eae9e4a029b6f7cc2f982f78b74e927ac7a382b41caaaa9735a17a87d5f980b34a809436"
] 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/transactions")! 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()
```