> ## Documentation Index
> Fetch the complete documentation index at: https://docs.etherfuse.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate EVM token approval transaction

> Generates an unsigned ERC20 `approve()` transaction that enables gasless offramps
on EVM chains. When this feature is enabled for your organization, EVM offramp
transactions no longer require the user to hold native gas tokens (e.g., ETH on Base)
for the cross-chain bridging fee — Etherfuse covers the bridging cost and bundles it
into the offramp fee.

**This approval must be completed before creating an offramp order** via
`POST /ramp/order` for EVM wallets with this feature enabled. If the user has not
approved, the offramp transaction will fail on-chain.

**Prerequisites:**
- This feature must be enabled for your organization. Contact Etherfuse to enable
  sponsored EVM offramps for your org and sub-orgs.
- The user must have a registered EVM wallet on a supported chain.

**Flow:**
1. Call this endpoint to get the approval transaction
2. Have the user sign and submit the transaction in their wallet
3. Once confirmed, create the offramp order via `POST /ramp/order`

**Approval amount options:**
- **Omit `amount`** (recommended): Approves for an unlimited amount. The user only
  needs to do this once per token per chain, and all future offramps will work
  without needing another approval.
- **Pass `amount`**: Approves for a specific amount in base units. The amount should
  match what you plan to offramp. After the offramp, the approval is consumed and
  you will need to call this endpoint again before the next offramp.

If the user has already approved a sufficient amount, the endpoint returns
`"transaction": null` with a message indicating no approval is needed.

The `amount` field is in **base units** (e.g., for a token with 6 decimals,
pass `10000000` for 10 tokens).




## OpenAPI

````yaml /openapi.yaml post /ramp/evm/approve
openapi: 3.1.0
info:
  title: FX API
  version: 1.0.0
  description: >
    API for managing FX operations including onboarding, quotes, orders, and
    customer management.

    This API provides endpoints for managing customers, bank accounts, crypto
    wallets, orders, and webhooks.
servers:
  - url: https://api.etherfuse.com
    description: Production API
  - url: https://api.sand.etherfuse.com
    description: Sandbox API (for testing)
security: []
tags:
  - name: Lookup
    description: Public endpoints for looking up stablebond and exchange rate data
  - name: Assets
    description: Get available assets for ramping
  - name: Onboarding
    description: Customer onboarding and KYC
  - name: Bank Accounts
    description: Manage customer bank accounts
  - name: Agreements
    description: Handle customer agreements and consents
  - name: Quotes
    description: Get quotes for conversions
  - name: Orders
    description: Create and manage orders
  - name: Swaps
    description: Create and manage swaps
  - name: Customers
    description: Manage customers
  - name: Crypto Wallets
    description: Manage crypto wallets
  - name: Webhooks
    description: Manage webhook subscriptions
  - name: Organizations
    description: Manage organizations and child organizations
paths:
  /ramp/evm/approve:
    post:
      tags:
        - Orders
      summary: Generate EVM token approval transaction
      description: >
        Generates an unsigned ERC20 `approve()` transaction that enables gasless
        offramps

        on EVM chains. When this feature is enabled for your organization, EVM
        offramp

        transactions no longer require the user to hold native gas tokens (e.g.,
        ETH on Base)

        for the cross-chain bridging fee — Etherfuse covers the bridging cost
        and bundles it

        into the offramp fee.


        **This approval must be completed before creating an offramp order** via

        `POST /ramp/order` for EVM wallets with this feature enabled. If the
        user has not

        approved, the offramp transaction will fail on-chain.


        **Prerequisites:**

        - This feature must be enabled for your organization. Contact Etherfuse
        to enable
          sponsored EVM offramps for your org and sub-orgs.
        - The user must have a registered EVM wallet on a supported chain.


        **Flow:**

        1. Call this endpoint to get the approval transaction

        2. Have the user sign and submit the transaction in their wallet

        3. Once confirmed, create the offramp order via `POST /ramp/order`


        **Approval amount options:**

        - **Omit `amount`** (recommended): Approves for an unlimited amount. The
        user only
          needs to do this once per token per chain, and all future offramps will work
          without needing another approval.
        - **Pass `amount`**: Approves for a specific amount in base units. The
        amount should
          match what you plan to offramp. After the offramp, the approval is consumed and
          you will need to call this endpoint again before the next offramp.

        If the user has already approved a sufficient amount, the endpoint
        returns

        `"transaction": null` with a message indicating no approval is needed.


        The `amount` field is in **base units** (e.g., for a token with 6
        decimals,

        pass `10000000` for 10 tokens).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - blockchain
                - wallet
                - assetId
              properties:
                blockchain:
                  type: string
                  description: The EVM chain to approve on
                  example: base
                  enum:
                    - base
                wallet:
                  type: string
                  description: The user's EVM wallet address
                  example: '0xf82567432381D1326484E5A9140ABCa4294f82D0'
                  pattern: ^0x[a-fA-F0-9]{40}$
                assetId:
                  type: string
                  description: The token contract address to approve
                  example: '0xcC77c598d42f2f78Beb42C91d12B9d4041a5cE29'
                  pattern: ^0x[a-fA-F0-9]{40}$
                amount:
                  type: string
                  description: >
                    Amount to approve in base units (token smallest
                    denomination).

                    For a token with 6 decimals, `10000000` = 10 tokens.

                    If omitted, approves for the maximum amount (recommended for
                    one-time approval).
                  example: '10000000'
            examples:
              unlimited_approval:
                summary: Unlimited approval (recommended)
                value:
                  blockchain: base
                  wallet: '0xf82567432381D1326484E5A9140ABCa4294f82D0'
                  assetId: '0xcC77c598d42f2f78Beb42C91d12B9d4041a5cE29'
              specific_amount:
                summary: Approve specific amount
                value:
                  blockchain: base
                  wallet: '0xf82567432381D1326484E5A9140ABCa4294f82D0'
                  assetId: '0xcC77c598d42f2f78Beb42C91d12B9d4041a5cE29'
                  amount: '10000000'
      responses:
        '200':
          description: Approve transaction generated (or already approved)
          content:
            application/json:
              schema:
                type: object
                properties:
                  transaction:
                    type: string
                    nullable: true
                    description: |
                      JSON-serialized unsigned transaction for the user to sign.
                      Null if the user has already approved a sufficient amount.
                  message:
                    type: string
                    description: Human-readable status message
                  currentAllowance:
                    type: string
                    description: >-
                      Current token allowance (only present when already
                      approved)
              examples:
                needs_approval:
                  summary: Approval needed
                  value:
                    transaction: >-
                      {"to":"0xcC77c598...","data":"0x095ea7b3...","value":"0","gasLimit":"51861","nonce":39,"gasPrice":"6000000","chainId":84532}
                    message: Approve transaction for gasless offramps on base
                already_approved:
                  summary: Already approved
                  value:
                    transaction: null
                    message: Already approved — no transaction needed
                    currentAllowance: >-
                      115792089237316195423570985008687907853269984665640564039457584007913129639935
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                not_enabled:
                  summary: Feature not enabled on this chain
                  value:
                    error: Sponsored transactions not available on polygon
                invalid_wallet:
                  summary: Invalid wallet address
                  value:
                    error: Invalid wallet address format
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
      example:
        error: Invalid request parameters
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key for authentication. Pass the key directly (e.g., `Authorization:
        your-api-key`). Do not use a `Bearer` prefix.

````