Use Case Overview
This recipe demonstrates a split payment flow where:- ✅ Users deposit USD into dedicated virtual accounts
- ✅ USD automatically converts to USDC stablecoin
- ✅ Payments are split among multiple recipients using one of two methods
- ✅ Operational overhead is minimized through automation
- Settlement Rules (Option 1): Configure split percentages or amounts once, then every deposit automatically splits according to your rules. Perfect for recurring splits with fixed recipients and ratios.
- Batch Transfers (Option 2): Manually initiate split payments on-demand with full control over amounts and recipients. Perfect for bill payments or dynamic splits that vary per transaction.
Prerequisites
Before you start, make sure you have:- API keys from the Dashboard (Get API keys)
- A tool for making API calls (cURL, Postman, or similar)
- Basic understanding of REST APIs
- Your sandbox endpoint:
https://sandbox.hifibridge.com
All examples in this guide use the sandbox environment. When you’re ready for
production, simply replace the sandbox URL with the production endpoint and
use your production API keys.
What you’ll build
Here’s what we’ll accomplish in this recipe:- Generate API Keys - Set up authentication for HIFI API
- Create User - Onboard a user and complete KYC for USD rail
- Add Virtual Account - Set up account for collecting USD payments that convert to USDC
- Choose Your Split Method:
- Option 1: Settlement Rules - Configure automatic split payment distribution
- Option 2: Batch Transfers - Execute on-demand split payments
Generate API Keys
Access to the HIFI API requires authentication via API keys. Generate your keys from the HIFI Dashboard before making any API calls.Get Your API Keys
Get Your API Keys
Steps:For a complete guide on API authentication, see our Authentication Documentation.
- Navigate to dashboard.hifibridge.com
- Log in to your account
- Go to Developer → API Keys
- Click Generate New Key
- Select your environment: Sandbox (for testing) or Production (for live transactions)
- Copy the key immediately - it’s only shown once
- Store your API key securely (environment variables, secrets manager, etc.)
- Never commit API keys to version control
- Your key authenticates all HIFI API requests
- If compromised, immediately revoke in the Dashboard and generate a new one
Authorization header of all API requests:Create User
Create a verified user account for the person making the split payment. Every user must accept HIFI’s Terms of Service and complete KYC verification before they can access fiat rails and make payments.Complete Onboarding Guide: For a comprehensive walkthrough of user
onboarding and KYC verification, see our User Guide.
User Creation Flow
Creating a user involves four steps:- Generate Terms of Service Link - Get acceptance link for your customer
- Create User - Create the user account after TOS acceptance
- Update KYC Information - Provide required personal details
- Submit KYC - Submit for verification to unlock USD rail
Generate Terms of Service Link
Generate Terms of Service Link
Before creating a user, they must accept HIFI’s Terms of Service. Generate a unique acceptance link using the Generate Terms of Service Link endpoint.Request:Request Fields:Response:Response Fields:What to do with this response:
A unique UUID that becomes your
signedAgreementId after the user accepts the
terms. Generate this using any UUID
generator.The unique link where your user will review and accept HIFI’s Terms of
Service.
The agreement ID (same as your
idempotencyKey). Save this - you’ll need
it to create the user in the next step.- Direct your user to the
url- Present this link to your end user (via email, in your app, etc.) - Save the
signedAgreementId- You’ll need this to create the user in the next step - Wait for acceptance - The
signedAgreementIdbecomes valid only after the user clicks “Accept”
Real-time Notifications: HIFI triggers the
TOS_LINK.UPDATE webhook event
when the user accepts the terms, allowing you to proceed with user creation
immediately. Learn about webhooks →Create User
Create User
Once your user has accepted the Terms of Service, create the user account with the Create User endpoint.Request:Request Fields:Response:✅ User created successfully!Response Fields:What you get:
User type. Use
individual for personal accounts or business for business
accounts.User’s first name.
User’s last name.
User’s email address.
User’s date of birth in YYYY-MM-DD format.
User’s residential address.
The
signedAgreementId from the Terms of Service acceptance.Unique identifier (UUID) for this request to ensure idempotency.
The unique user ID. Save this - you’ll use it for all future operations
with this user.
Automatically provisioned wallet addresses on supported blockchain networks.
- User ID (
3b77cec8-1bb9-5ea0-91a1-e8c1411dd429) - Save this for all future operations - Wallet addresses - Pre-provisioned on multiple blockchains, ready to use immediately
Automatic Wallet Provisioning: Every user automatically receives wallet
addresses on supported blockchain networks (Polygon, Ethereum, etc.). These
wallets are fully functional immediately - no additional setup required.
Update KYC Information
Update KYC Information
Provide the required personal information for KYC verification using the Update KYC endpoint.Request:Request Fields:Response:✅ Personal information updated!
User’s first name (can be used to update if needed).
User’s phone number with country code (E.164 format).
Tax identification number (e.g., SSN for US users).
User’s nationality (ISO 3166-1 alpha-3 country code).
Document Upload: For a complete KYC submission in production, you’ll also
need to upload identity documents (passport, driver’s license, etc.). See the
Quickstart Guide for detailed document upload
instructions.
Submit KYC for USD Rail
Submit KYC for USD Rail
Submit the KYC application to unlock the USD rail using the Submit KYC endpoint.Request:Request Fields:Response:✅ KYC approved! USD rail is now active.Response Fields:
The currency rail to unlock. Use
USD for US Dollar operations.Overall KYC status.
ACTIVE means the USD rail is unlocked and the user can
now onramp and offramp USD.High-level review outcome.
Detailed review results broken down by category.
Sandbox Auto-Approval: In sandbox, KYC applications are typically
automatically approved within minutes. In production, review typically takes
1-3 business days.
Add Virtual Account
Now that the user has passed KYC, create a Virtual Account for collecting the payment to be split. This is a bank account number automatically created by HIFI that users can deposit USD into. When fiat arrives, it’s automatically converted to USDC and ready for distribution.Virtual Account for Split Payments: Each virtual account comes with unique
ACH/wire/RTP details you can surface in your app. When deposits arrive, HIFI
detects the funds and applies your conversion settings (e.g., USD → USDC). You
can then use settlement rules for automatic splitting or batch transfers for
on-demand splitting.
Create Virtual Account
Create Virtual Account
A Virtual Account enables users to deposit USD from their bank, which automatically converts to USDC on Polygon for split payment distribution.Request:Request Fields:Response:✅ Virtual account created!Response Fields:For a complete guide on virtual accounts and onramping, see our Virtual Accounts Guide.
Fiat currency to deposit. Use
usd for US Dollars.Stablecoin to receive after conversion. Use
usdc for USD Coin.Blockchain network for the stablecoin. Options:
POLYGON, ETHEREUMThe unique virtual account ID. Save this for monitoring deposits.
Account status.
activated means it’s ready to receive deposits.Banking partner providing the virtual account infrastructure.
Source configuration for fiat deposits.
Destination configuration for crypto conversion.
Most Important: Bank account details users need to send money to.
How to Use: Provide these deposit instructions to your users through your
app/website. When they send money to this account via their bank, HIFI
automatically detects the deposit and converts it to USDC. You can then split
the payment using settlement rules (automatic) or batch transfers (on-demand).
For monitoring deposits, subscribe to
ONRAMP.CREATE webhook events.Option 1: Split Payments with Settlement Rules
Settlement rules automatically distribute funds to multiple recipients whenever a deposit arrives at the virtual account. Configure the split percentages or amounts once, and every deposit will automatically split according to your rules.When to Use Settlement Rules: Use settlement rules when you have: - Fixed
recipient lists that don’t change frequently - Consistent split ratios (e.g.,
always split 50/50 or 33/33/34) - Recurring split payments that should happen
automatically - Set-and-forget split configurations Perfect for shared
expenses, recurring bill splits, or fixed revenue sharing.
Create Settlement Rule
Create Settlement Rule
Create a settlement rule that defines how to split payments among multiple recipients. Each rule in the array sends a portion of the payment to a different wallet address.Request:Request Fields:Response:✅ Settlement rule created!Response Fields:
Unique identifier (UUID) for this request to ensure idempotency.
Blockchain network for the settlement rule. Must match the virtual account’s
destination chain (e.g.,
POLYGON, ETHEREUM, BASE, SOLANA).Whether to include HIFI’s platform fee in the calculation. Defaults to
false. Contact HIFI support if you want to include HIFI’s fee.Array of settlement rules. Each rule defines a portion of the payment to send to a recipient wallet.
The unique settlement rule ID. Save this - you’ll need it to apply the
rule to the virtual account.
Blockchain network the rule is configured for. Must match your virtual
account’s destination chain.
Array of rules defining how the payment is split among recipients.
Split Payment Example: In this example, we’re splitting payments equally
among three recipients (33.33%, 33.33%, 33.34%). You can adjust the
percentages to split unevenly, or use fixed amounts if you prefer. The
remaining amount after all rules are applied goes to the user’s wallet.
Apply Settlement Rule to Virtual Account
Apply Settlement Rule to Virtual Account
After creating the settlement rule, apply it to the virtual account. Once applied, every deposit will automatically be split according to the rule.Request:Path Parameters:Response:✅ Settlement rule applied!For a complete guide on settlement rules including tiered pricing and advanced configurations, see our Settlement Rules Guide.
The user ID who owns the virtual account.
The virtual account ID to apply the rule to.
The settlement rule ID from the create response.
Automatic Split Payments: Once the settlement rule is applied, every
deposit to this virtual account will automatically be split according to your
rules. No manual intervention required! Monitor split payments by subscribing
to
ONRAMP.CREATE and ONRAMP.UPDATE webhook events.Option 2: Split Payments with Batch Transfers
Batch transfers let you manually initiate split payments with full control over amounts and recipients for each transaction. You decide when to split and can customize the distribution for each payment.When to Use Batch Transfers: Use batch transfers when you need: -
On-demand split payments that vary per transaction - Dynamic recipient lists
that change based on the payment - Conditional logic before splitting (e.g.,
verify amounts, check balances) - Bill payments where amounts differ each time
- One-time or irregular split payments Perfect for bill payment services, dynamic revenue sharing, or variable expense splits.
Create Batch Transfer
Create Batch Transfer
Create a batch transfer to split a payment among multiple recipients in a single transaction using the Create Batch Transfer endpoint.In this example, we’ll split a payment to three different recipients with 10 USDC each from the user’s wallet.Request:Request Fields:Response:✅ Batch transfer created!Response Fields:Understanding the Batch Transfer:In this example:For a complete guide on batch transfers including advanced features like approval workflows and error handling, see our Batch Transfers Guide.
Unique identifier (UUID) for this batch transfer request to ensure
idempotency.
Cryptocurrency to transfer. Use
usdc for USD Coin.Blockchain network for the transfer. Options:
POLYGON, ETHEREUMSource of the batch transfer (the user making the split payment).
Destination configuration containing the batch of recipients.
Whether the batch transfer requires manual approval before execution. Set to
false for automatic processing.Unique batch transfer ID. Save this to monitor the batch status and
retrieve transaction details.
Transfer type. Always
WALLET.TRANSFER.BATCH for batch transfers.Current batch status. Starts as
CREATED, then progresses through: -
CREATED - Batch transfer initiated - PENDING - Being processed on
blockchain - COMPLETED - All payments successfully delivered - FAILED -
One or more payments failed (check individual statuses)Blockchain network where the transfer is being executed.
Cryptocurrency being transferred.
Smart contract address handling the USDC transfers on the blockchain.
Source details showing the user’s wallet information.
Destination details showing all recipients in the batch.
Transaction receipt information.
- Source: User’s wallet (
0x63dA...C338) with 30+ USDC available - Batch: 3 recipients receiving 10 USDC each
- Total: 30 USDC distributed in a single blockchain transaction
- Cost Savings: One transaction fee instead of three separate transactions
Monitoring Batch Transfers: Subscribe to
WALLET.TRANSFER.BATCH.UPDATE
webhook events to receive real-time notifications as the batch progresses. You
can also poll the Retrieve Batch
Transfer
endpoint to check individual payment statuses within the batch.🎉 Congratulations!
You’ve successfully built a split payment system! By following this recipe, you can now:- ✅ Generate API keys and authenticate with HIFI
- ✅ Onboard users and complete KYC for USD operations
- ✅ Create virtual accounts for collecting payments with automatic conversion
- ✅ Configure settlement rules for automatic split payments (Option 1)
- ✅ Execute batch transfers for on-demand split payments (Option 2)
- ✅ Choose the right method based on your use case
- ✅ Reduce operational overhead with automated or consolidated transactions
Next Steps
Ready to scale your split payment service? Here’s what to explore next:- Settlement Rules Guide - Deep dive into advanced settlement rule features like tiered pricing, fixed amounts, and multiple rule configurations
- Batch Transfers Guide - Learn about batch transfers with approval workflows, failure handling, and advanced features
- Webhooks - Set up real-time notifications for deposit detection, conversion completion, and split payment distribution
- Virtual Accounts Guide - Learn about monitoring deposits and handling multiple virtual accounts per user
- API Reference - Explore all available endpoints and parameters for advanced features