Crossmint icon

Crossmint

Hybrid integration: transfer money using Crossmint with external wallet support

Overview

The "Pay Order" operation of the Checkout resource enables users to complete a product purchase by submitting a payment transaction on a blockchain network. This node is designed for scenarios where an automated crypto checkout process is required, such as purchasing products from e-commerce platforms (Amazon, Shopify) using cryptocurrency payments managed via Crossmint wallets.

Typical use cases include:

  • Automating crypto payments for online orders.
  • Integrating blockchain-based payment flows into e-commerce workflows.
  • Using external wallet private keys to sign and approve transactions securely.

For example, after finding a product and receiving a serialized transaction from the "Find Product" operation, this node signs that transaction with a provided private key and submits the approval to finalize the payment.

Properties

Name Meaning
Serialized Transaction The serialized transaction string obtained from the "Find Product" response; required to pay the order.
Payment Chain Blockchain network to use for payment. Options include: Arbitrum Sepolia, Base Sepolia, Ethereum Sepolia, Optimism Sepolia, Polygon Amoy, World Chain Sepolia, Arbitrum, Base, Ethereum, Optimism, Polygon. Default is Arbitrum Sepolia.
Payer Wallet Address The wallet address of the payer (agent) used for crypto payments. Must be a Crossmint-managed wallet funded with USDC.
Private Key Private key corresponding to the payer wallet to sign the transaction. Supports 32-byte hex for EVM chains or base58 for Solana. External signer is required.

Output

The node outputs a JSON object containing:

  • transaction: The full transaction object returned from the Crossmint API after submitting the serialized transaction.
  • approval: The approval response after signing and submitting the transaction signature.
  • signingDetails: Details about the signing process including:
    • signature: The generated cryptographic signature.
    • messageToSign: The original message that was signed.
    • signerAddress: The address of the signer.
    • chainType: Either "evm" or "solana" depending on the blockchain.
    • chain: The blockchain network used.

This output provides both raw API responses and simplified metadata about the transaction and its approval status.

Dependencies

  • Requires an API key credential for authenticating with the Crossmint API.
  • Uses the ethers library for EVM wallet operations and signing.
  • Uses @solana/web3.js and bs58 libraries for Solana key decoding and signing.
  • Requires the user to provide a valid private key for signing transactions externally.
  • Network access to Crossmint's API endpoints (https://www.crossmint.com/api for production or https://staging.crossmint.com/api for staging).

Troubleshooting

  • Missing or invalid serialized transaction: Ensure the serialized transaction string is copied exactly from the "Find Product" operation response.
  • Invalid private key format: For EVM chains, the private key must be a 32-byte hex string (optionally prefixed with "0x"). For Solana, it must be a base58 encoded key of appropriate length.
  • No pending approval found: The transaction response must contain a pending approval message to sign. If missing, verify the serialized transaction and payer wallet.
  • Incorrect payer wallet address: The payer address must be a Crossmint-managed wallet with sufficient USDC funds.
  • API errors: Check the API key validity and network connectivity to Crossmint endpoints.
  • Chain mismatch: The payment chain selected must correspond to the chain used in the serialized transaction.

Links and References


This summary covers the static analysis of the "Pay Order" operation within the Checkout resource, focusing on input properties, execution logic, output structure, dependencies, and common troubleshooting points.

Discussion