Skip to main content

Transfer Process

Every stablecoin transfer on PayWithZ automatically goes through compliance checks. This happens at the blockchain protocol level - it cannot be bypassed.

Step-by-Step Flow

1. User Initiates Transfer

User requests to send tokens:
{
  "from": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
  "to": "9zLYuh3DX98e98UYJTSEcqE6kCifUqB94UaSvKptLhBvV",
  "amount": 100
}

2. Backend Validates Request

  • Checks wallet balances
  • Validates request format
  • Prepares transaction

3. Transfer Hook Triggered

This happens automatically - Solana calls the Compliance Hook program:

Automatic

No manual intervention needed. Solana handles it.

Cannot Bypass

Enforced at protocol level. Impossible to skip.

4. Compliance Checks

The Compliance Hook program verifies:
Both sender and receiver must have valid, non-expired SBTs.
Neither wallet can be on the blacklist (checked via Merkle tree).
Transaction amount and frequency must be within limits.
Must pass all configured risk rules and policies.

5. Transfer Decision

All Checks Pass ✓

Transfer executes successfully. Tokens move from sender to receiver.

Check Fails ✗

Transfer is blocked. Reason logged in database. User receives error.

Visual Flow

Gasless Experience

Users never need SOL. The platform authority wallet pays all transaction fees, providing a seamless user experience.

API Example

curl -X POST http://api.paywithz.com/api/stablecoin/transfer \
  -H "Content-Type: application/json" \
  -d '{
    "from": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
    "to": "9zLYuh3DX98e98UYJTSEcqE6kCifUqB94UaSvKptLhBvV",
    "amount": 100
  }'

Key Features

Automatic

No manual approval needed. Compliance is automatic.

Fast

Checks happen in milliseconds. No delays.

Transparent

All checks visible on-chain. Fully auditable.

Secure

Cannot be bypassed. Enforced by blockchain.

Next Steps