_USDC is a “stablecoin,” a cryptocurrency that provides a stable level of purchasing power. As such, it is a popular currency for online transactions, and your customers will want to use it as a payment medium. This guide will walk you through the basics of accepting USDC on your site. Here we use the Ethereum blockchain as an example, but the same steps apply to other currencies and chains as well._

Steps:

  1. Set up payment intent to pay with Crypto

  2. Acquire blockchain address customer will pay to

  3. Customer pays

  4. Receive payment



# 1. Pay with Crypto

Once the customer reaches checkout and confirms they would like to pay with USDC on Ethereum, your system will send Circle a request to [create a payment intent](🔗). Within this payment intent request you will specify the amount, currency, settlement currency, and chain.

Create a payment intent:





If you wish, you can create “long-lived” payment intent at a sub-wallet level (e.g., one deposit address and sub-wallet per sender). Start by creating a deposit wallet using the [Create a Wallet](🔗) endpoint, then, send a request to create a continuous payment intent. Within this payment intent request specify the `type: "continuous"`, `currency`, `settlementCurrency`, `chain`, and `merchantWalletId` (optional) to receive funds into the sub-wallet instead of a master wallet.

# 2. Acquire blockchain address customer will pay to

For security reasons, we do not synchronously return the deposit blockchain address. To retrieve the blockchain deposit address, you have two options:

  1. Subscribe to webhook notifications

  2. Poll Circle APIs

## Option 1: Webhook Notification

To receive webhook notifications, visit the [notification quickstart](🔗). and follow the steps shown. After you subscribe to notifications, you will receive updates for the payment intent whenever the resource has been updated. In this case, when the `paymentMethods.address` has been set, a notification will be sent with a new `timeline` object with a`status` of `pending`.



## Option 2: Poll Payment Intent Endpoint

If you prefer to poll [get a payment intent](🔗), you can send `get` request until you receive`paymentMethods.address`.

Retrieve payment intent:




# 3. Enable customer payment

Once you receive the deposit address via `paymentMethods.address`, you’ll provide it to the customer along with the amount and currency to be paid. You can present the address two ways:

  1. as plain text the customer can cut and paste; or

  2. as a QR code the customer can scan via an app.

The customer then sends payment from their wallet (custodial or non-custodial).



You can specify the timeframe in which the customer must send payment by adjusting the `exipiresOn` setting.

# 4. Receive payment from Circle

Once Circle obtains payment on-chain, we create a Payment resource linked to the Payment Intent created earlier and update the status of that Payment Intent. Your firm will then receive payment via the method specified. See the State Management Timeline for more details.

## Option 1: Webhook Notifications




## Option 2: Retrieve Payment Intent and Payment

Retrieve a payment intent:




Retrieve a payment:






For blockchains that require a 'memo' or 'address tag' (XLM, HBAR, etc.), the optional `addressTag` field will be present in the `depositAddress` object.

# Gas Abstracted Payment: Network Fee Flexibility

In a regular payment, the customer pays for the gas fees (e.g., blockchain transaction fees). In a pull-based payment, the gas fees can be paid by you or by the customer. In the latter case, customers can pay via USDC on an EVM-compatible chain such as Ethereum rather than in a native token. For example, while making a USDC payment on Ethereum, the customer can pay for the gas in USDC rather than ETH. By doing so, the customer does not need native tokens and can solely rely on USDC for both gas and the actual payment. Gas fees and the preferences can be configured by working with Circle’s customer success team.

In the case where a customer is paying for gas, Circle makes a real-time gas fee estimate and adds that in the total amount of payment that the customer authorizes. There are four steps in the flow:

  1. Set up payment intent and acquire blockchain address for deposits

  2. Receive a typed message for customers to sign and authorize the payment

  3. Circle will receive the signature and broadcast the transaction for payment

  4. Receive payment



Refer to the Pay with Crypto section to set up payment intent and retrieve a blockchain address. Once that has been completed, follow the steps below for gas decoupled payments.

## 1. Get a Typed Message for Signing

Call the `GET: /payment/presign` endpoint to fetch the typed message. The two required parameters are `paymentIntentId` , which can be retrieved from the `GET: /paymentIntent` response or webhook notification; and `endUserAddress` which is the consumer wallet address.




## 2. Customers Sign the Transaction From Their Wallet

You will need to trigger the customer’s wallet using the response from `/presign`.

For example, if you use the [signTypedData function from wagmi](🔗), you will need to fill out the domain, types and values fields.



Once the customer signs into the wallet, you will receive a string of raw signatures.

## 3. Create a Crypto Payment with Customers’ Signature

With a customer’s raw signature, Circle can create a crypto payment with the POST /payment/crypto endpoint. After the payment has been created, Circle will be able to track the payment status following the instructions [here](🔗).




## 4. Payment Received

Refer to the [payments received](🔗) section for more details.