Circle Internet Financial
Circle Internet Financial Logo

Oct 01, 2024

April 19, 2024

How to Build Global Payroll Solutions with USDC

what you’ll learn

Using Programmable Wallets you can quickly build a global payroll solution that is fast and efficient. Learn more.

How to Build Global Payroll Solutions with USDC

In this article, we’ll cover just how it can be done.

How Circle is Evolving the Future of Global Payroll

Circle provides the building blocks needed to build a global payroll solution that is fast and cost effective with near-instant settlement. Let’s look at the pieces.

On/Off-Ramps

Circle Mint allows financial institutions and enterprise businesses to convert USD to USDC 1:1. Its availability is limited to large-scale businesses that process high volumes. For the majority of businesses and developers, you can explore on/off-ramp services for USDC from digital asset exchanges like Coinbase, Kraken, and Binance.

Additionally, Circle Access is an upcoming offering that will enable developers to offer on/off-ramps to their users via an embeddable widget in their app. You can sign up for the early access waitlist here.

Wallet Issuance and Payment Disbursement

Circle’s Programmable Wallets allow you, as the developer, to easily issue wallets to your employees, enabling seamless payroll execution on-chain.

Convert USD to USDC

To build our global payroll solution, we first need to use your on/off-ramp provider to convert USD to USDC.

For testing purposes you can also deposit testnet USDC directly into your wallet using Circle’s Developer Console Faucet.

Create Employee Address Book

Now we need our employee wallets. As mentioned, we’ll use developer-controlled Programmable Wallets so that we can control the wallets ourselves.

Create Wallet set and Employee Wallets

First, we’ll use the Programmable Wallets API to create a treasury wallet, wallet set and individual wallets for our employees. You can follow this tutorial, which will walk you through how to register your entity secret ciphertext, create a wallet set, and finally create your employee wallets.

const { initiateDeveloperControlledWalletsClient } = require('@circle-fin/developer-controlled-wallets')

const client = initiateDeveloperControlledWalletsClient({ 
apiKey: '', 
entitySecret: '' 
})

async function createEmployeeWallet() {
const walletSetResponse = await client.createWalletSet({     
name: 'Treasury Wallet', 
}) 

console.log('Created WalletSet', walletSetResponse.data?.walletSet) 

const walletsResponse = await client.createWallets({ 
blockchains: ['MATIC-AMOY'], 
count: 2, walletSetId: walletSetResponse.data?.walletSet?.id ?? '',
}) 

console.log('Created Wallets', walletsResponse.data?.wallets)
    }

createEmployeeWallet()

Process Our Payouts

We have our USDC and the recipient wallets are created using the Programmable Wallets API. Now, let's first transfer funds from our external wallet holding USDC to the USDC treasury wallet you created earlier using the Programmable Wallets API. Then, we'll execute a transfer that will disburse the payroll to the employee wallets from the treasury wallet.

Next, we’ll make a request to transfer the USDC on-chain from your external treasury wallet to the Programmable Wallets treasury wallet. Upon the funds settling in the treasury wallet, we'll use the Programmable Wallets API to execute a transfer from the treasury wallet to the employee wallets, completing the payroll disbursement.

const { initiateDeveloperControlledWalletsClient } = require('@circle-fin/developer-controlled-wallets')

const client = initiateDeveloperControlledWalletsClient({ 
apiKey: '', 
entitySecret: '' 
})


async function createPayout() {
const transactionResponse = await client.createTransaction({ 
idempotencyKey: "", 
amount: 10, 
destinationAddress: "", 
walletId: "", 
tokenId: "" 
})
    }

createPayout()

Conclusion

Global payroll can be complicated and expensive. With USDC and Programmable Wallets you can build a robust, global payroll solution with just a few lines of code.

To get started with Smart Contract Platform, check out the documentation available here.

Sign up for an account to get started.

New call-to-action

*Services are provided by Circle Technology Services, LLC (“CTS”). Services do not include financial, investment, tax, legal, regulatory, accounting, business, or other advice. CTS is only a provider of software and related technology and is not engaged in any regulated money transmission activity in connection with the services it provides. For additional details, please click here to see the Circle Developer terms of service.Global payroll can be difficult. It can involve expensive currency conversions, long settlement times and global wire transfers that involve multiple hops through corresponding banks. We’re all familiar with the long and costly payroll payments to clear.But at Circle, we’re building a new financial infrastructure that can make global payroll fast and easy. We want to streamline your payroll process and reduce your costs and complexity.

Related posts

Web3 Services: November 2024 Updates

Web3 Services: November 2024 Updates

December 4, 2024
Monitoring your smart contract activity just got easier

Monitoring your smart contract activity just got easier

December 3, 2024
Circle Announces 3rd Cohort of USDC Grant Program Recipients

Circle Announces 3rd Cohort of USDC Grant Program Recipients

November 27, 2024
Blog
How to Build Global Payroll Solutions with USDC
how-to-build-global-payroll-solutions-with-usdc
April 19, 2024
Using Programmable Wallets you can quickly build a global payroll solution that is fast and efficient. Learn more.
Developer
Web3 Services
Programmable Wallets