> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fossapay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sign a Master Wallet Transaction

> Validate, simulate, sign, and broadcast a Solana transaction with the merchant master wallet

The active Solana master wallet resolved from the API key must be both a required signer and the fee payer. A successful `202` response means the transaction was submitted, not finalized.

## Headers

<ParamField header="x-api-key" type="string" required>
  Active production API key for the merchant that owns the master wallet.
</ParamField>

<ParamField header="X-Idempotency-Key" type="string" required>
  Unique key for this logical signing request, up to 255 characters. Retain it with the exact serialized transaction.
</ParamField>

## Request body

<ParamField body="serializedTransaction" type="string" required>
  Base64-encoded serialized Solana `VersionedTransaction`, up to 4,096 characters. The selected wallet must be the fee payer and a required signer. Other required signers must sign before serialization.
</ParamField>

```bash theme={null}
curl --request POST \
  --url https://api-production.fossapay.com/api/v1/wallets/crypto/master/transactions/sign-and-broadcast \
  --header "x-api-key: $FOSSAPAY_API_KEY" \
  --header "X-Idempotency-Key: $IDEMPOTENCY_KEY" \
  --header 'Content-Type: application/json' \
  --data "{\"serializedTransaction\":\"$SERIALIZED_TRANSACTION\"}"
```

## Response

<ResponseExample>
  ```json Submitted theme={null}
  {
    "status": "success",
    "statusCode": 202,
    "message": "Solana transaction signed and submitted successfully",
    "data": {
      "requestId": "7a7de73d-92a8-4cd8-b18c-c70e6c922a66",
      "walletType": "master",
      "customerId": null,
      "walletId": "65028962-9369-4f62-8758-0fc9f2e35fb2",
      "walletAddress": "7EcJ1eB6J3ggRrGkQWsT4ZP8dkqPZ4JmW4YRwR7Qp5cY",
      "network": "solana",
      "cluster": "mainnet-beta",
      "feePayer": "7EcJ1eB6J3ggRrGkQWsT4ZP8dkqPZ4JmW4YRwR7Qp5cY",
      "status": "submitted",
      "providerTransactionId": "63946f15-e605-47f4-813b-ac79f1303db9",
      "transactionHash": "5KtPn1yXj9DmhHVQJPNfV4PfA3BC6GgZ6JDfnYMYLXLPNqqsV5RrTRVqQJ6eTdBBL9SHSknUT9v2GkA9SGscTdQH",
      "explorerLink": "https://explorer.solana.com/tx/5KtPn1yXj9DmhHVQJPNfV4PfA3BC6GgZ6JDfnYMYLXLPNqqsV5RrTRVqQJ6eTdBBL9SHSknUT9v2GkA9SGscTdQH",
      "simulation": {
        "unitsConsumed": 18094,
        "logs": ["Program MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr success"]
      }
    }
  }
  ```
</ResponseExample>

## Important behavior

* FossaPay simulates before signing and broadcasting.
* The wallet initiating the transaction pays the Solana network fee.
* Requests are limited to 10 per minute.
* Repeating the identical submitted request with the same idempotency key returns the stored result.
* A failed or expired transaction must be rebuilt with a fresh blockhash and submitted with a new key.
* Finality is reconciled through Solana RPC; this flow does not emit a merchant webhook.

See [Solana Transaction Signing](/guides/solana-transaction-signing) for transaction construction, statuses, retries, and security controls.


## OpenAPI

````yaml POST /api/v1/wallets/crypto/master/transactions/sign-and-broadcast
openapi: 3.1.0
info:
  title: FossaPay API
  description: >-
    FossaPay API for checkout wallets, master-wallet payouts, customer
    management, NGN wallets, crypto wallets, transfers, fees, banks, and
    webhooks.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api-production.fossapay.com
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /api/v1/wallets/crypto/master/transactions/sign-and-broadcast:
    post:
      tags:
        - Crypto Wallets
      summary: Sign and broadcast with the master Solana wallet
      description: >-
        Validates and simulates a serialized Solana versioned transaction, then
        signs and broadcasts it with the authenticated merchant's active master
        wallet. The selected wallet must be a required signer and the fee payer.
        A 202 response represents submission, not on-chain finality.
      operationId: CryptoWalletsController_signAndBroadcastMasterTransaction
      parameters:
        - name: X-Idempotency-Key
          in: header
          required: true
          description: >-
            Unique merchant-scoped key for this exact signing request. Maximum
            255 characters.
          schema:
            type: string
            minLength: 1
            maxLength: 255
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SolanaSigningRequest'
      responses:
        '202':
          description: Transaction simulated, signed, and submitted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SolanaSigningResponse'
        '400':
          description: >-
            Malformed or unsupported transaction, wrong fee payer, missing
            co-signer, or invalid idempotency header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Active master Solana wallet not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: Idempotency key conflict or request already processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: Solana transaction simulation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: Signing rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    SolanaSigningRequest:
      type: object
      required:
        - serializedTransaction
      properties:
        serializedTransaction:
          type: string
          minLength: 1
          maxLength: 4096
          description: >-
            Base64-encoded serialized Solana VersionedTransaction. The selected
            FossaPay wallet must be a required signer and the fee payer; all
            other required signers must already have signed.
          example: >-
            AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQAB...
      additionalProperties: false
    SolanaSigningResponse:
      type: object
      required:
        - status
        - statusCode
        - message
        - data
      properties:
        status:
          type: string
          const: success
        statusCode:
          type: integer
          const: 202
        message:
          type: string
        data:
          $ref: '#/components/schemas/SolanaSigningSubmission'
      additionalProperties: true
    ApiError:
      type: object
      properties:
        status:
          oneOf:
            - type: string
            - type: boolean
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
        code:
          type: string
        errors:
          type: object
          additionalProperties: true
      additionalProperties: true
    SolanaSigningSubmission:
      type: object
      required:
        - requestId
        - walletType
        - walletId
        - walletAddress
        - network
        - cluster
        - feePayer
        - status
        - providerTransactionId
        - transactionHash
        - explorerLink
        - simulation
      properties:
        requestId:
          type: string
          format: uuid
        walletType:
          type: string
          enum:
            - master
            - customer
        customerId:
          type:
            - string
            - 'null'
          format: uuid
        walletId:
          type: string
          format: uuid
        walletAddress:
          type: string
        network:
          type: string
          const: solana
        cluster:
          type: string
          const: mainnet-beta
        feePayer:
          type: string
        status:
          type: string
          const: submitted
        providerTransactionId:
          type: string
        transactionHash:
          type: string
        recentBlockhash:
          type: string
        explorerLink:
          type: string
          format: uri
        simulation:
          $ref: '#/components/schemas/SolanaSigningSimulation'
      additionalProperties: true
    SolanaSigningSimulation:
      type: object
      properties:
        unitsConsumed:
          type:
            - integer
            - 'null'
        logs:
          type: array
          items:
            type: string
      additionalProperties: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````