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, including preflight. For Canton, buyerAddress is the public signing key used by your integration.
Request and execute the quote
GET /partner/v1/topup/quote?amount=100¤cyCode=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.
{
"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.
Last updated