Learn how to build solutions on top of Stablepay
@stable-pay/ui-builder
package provides a TypeScript function that helps Merchants build a QR code destop solution for their checkout.
handleTransferRequest
. Here’s its signature:
connection
: A Connection
object to interact with the Solana networksender
: The PublicKey
or Keypair
of the transaction senderCreateTransferFields
: An object containing:
recipient
: The receiving address (PublicKey)amount
: The amount to transferreference
: A unique identifier for the transactioncustomReference
: A custom reference (e.g., for merchant tracking)commitment
: (Optional) The desired commitment level for the transactionsponsor
: (Optional) A Keypair
object for a sponsor to pay transaction feesPromise
that resolves to a Transaction
object.
handleTransferRequest
function to create and send a Stablepay transaction:
customReference
field for internal tracking and reconciliation purposes.