> For the complete documentation index, see [llms.txt](https://docs.zebec.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zebec.io/developer-docs/partner-api/topup-flow/canton.md).

# Canton example

Execute a Carbon card top-up from a Canton wallet through the Zebec Partner API.

Use this flow for a quote whose `payment.chain` is `CANTON`. The Partner API does not provide a Canton payment SDK, so submit the quote-defined transfer through your Canton wallet or ledger API.

Begin with the shared [top-up flow](/developer-docs/partner-api/topup-flow.md), including preflight. For Canton, `buyerAddress` is the public signing key used by your integration.

## Request and execute the quote

```http
GET /partner/v1/topup/quote?amount=100&currencyCode=USD&sourceChain=CANTON&sourceTokenMint=<token-id>
Authorization: Bearer <accessToken>
```

Use the quote's network, token identifier, base-unit amount, and receiving instructions unchanged. Save the ledger transaction identifier as `txHash` only after the transfer is confirmed by your Canton integration.

## Sign and submit

Sign the exact UTF-8 `signingMessage` from the quote. `publicKey` and `buyerAddress` must be the same Canton signing key after whitespace and an optional `0x` prefix are normalized.

```json
{
  "quoteId": "<quote-id>",
  "receipt": {
    "deposit": {
      "txHash": "<confirmed-canton-transaction-id>",
      "buyerAddress": "<canton-public-signing-key>"
    }
  },
  "userSignature": {
    "signature": "<base64-base58-or-hex-signature>",
    "publicKey": "<canton-public-signing-key>",
    "scheme": "canton",
    "cantonAlgorithm": "ed25519"
  }
}
```

`ed25519` is the default. For ECDSA keys, set `cantonAlgorithm` to `ec-dsa-sha-256` or `ec-dsa-sha-384` and send the ECDSA signature in DER format. Do not use an account identifier in place of the signing public key.
