# transferEvent(\[payload,])

{% code overflow="wrap" %}

```typescript
const campaignId = 'aSlud3293';

const amount = 100; // required, this is the amount of token you want us to convert
const usd_value = 100; //required, the USD value of the token at the time of the conversion
const external_identifier = 'ABC123'; //optional (e.g. a user ID in your system)
const chain_id = '1'; // optional
const fee = 20; // optional
const transaction_hash = '0x1234567890'; //optional
const token_address = '0x1234567890'; //optional
const requirement_id = 'abc123def'; //optional

const completion = await userClient.transferEvent({
    requirement_id,
    campaign: {
        id: campaignId
    },
    transaction_hash,
    chain_id,
    network,
    token_address,
    amount,
    usd_value
    external_identifier
    fee,
});
```

{% endcode %}

## Params

<table><thead><tr><th width="190">Param</th><th width="102">Required</th><th width="111">Type</th><th>Description</th></tr></thead><tbody><tr><td>amount</td><td>required</td><td>number</td><td>an amount to associate with the completion</td></tr><tr><td>campaign.id</td><td>required</td><td>string</td><td>the id of the program/campaign requirement belongs to</td></tr><tr><td>usd_value</td><td>optional</td><td>string</td><td>the value of the amount field in USD</td></tr><tr><td>fee</td><td>optional</td><td>number</td><td>an optional fee to pass into the SDK</td></tr><tr><td>transaction_hash</td><td>optional</td><td>string</td><td>The hash of the transaction that this completion should be linked to</td></tr><tr><td>token_address</td><td>optional</td><td>string</td><td>a token address (token, NFT, smart contract) that should be associated with this completion</td></tr><tr><td>external_identifier</td><td>optional</td><td>string</td><td>a user identifier known to your system, if passed in, ChainVine will associate this with the wallet address if none has been associated yet, this value will be returned to you if present</td></tr><tr><td>requirement_id</td><td>optional</td><td>string</td><td>The requirement to track the transfer against, this is only required if you have a program with multiple transfer objectives</td></tr></tbody></table>

## **Response**

<table><thead><tr><th width="180">Field</th><th width="141">Type</th><th>Description</th></tr></thead><tbody><tr><td>message</td><td>String</td><td>Ok status message on success</td></tr></tbody></table>

## Examples

{% tabs %}
{% tab title="Browser" %}

```typescript
import { ChainvineClient } from '@chainvine/sdk';

const userWalletAddress = '0x293kdo0ij0';

const campaignId = 'aSlug123';

// Generate your ChainvineClient instance
const client = new ChainvineClient(); //Make sure to whitelist your domain
const userClient = await client.syncUser(userWalletAddress);

const amount = 100; // required, this is the amount of token you want us to convert
const usd_value = 100; //required, the USD value of the token at the time of the conversion
const external_identifier = 'ABC123'; //optional (e.g. a user ID in your system)
const chain_id = '1'; // optional
const fee = 20; // optional
const transaction_hash = '0x1234567890'; //optional
const token_address = '0x1234567890'; //optional
const requirement_id = 'abc123def'; //optional

const completion = await userClient.transferEvent({
    requirement_id,
    campaign: {
        id: campaignId
    },
    transaction_hash,
    chain_id,
    network,
    token_address,
    amount,
    usd_value
    external_identifier
    fee,
});

```

{% endtab %}

{% tab title="Server" %}

```typescript
import { ChainvineClient } from '@chainvine/sdk';

const userWalletAddress = '0x293kdo0ij0';

const campaignId = 'aSlug123';

// Generate your ChainvineClient instance
const client = new ChainvineClient({ apiKey: 'your-api-key'});
const userClient = await client.syncUser(userWalletAddress);

const amount = 100; // required, this is the amount of token you want us to convert
const usd_value = 100; //required, the USD value of the token at the time of the conversion
const external_identifier = 'ABC123'; //optional (e.g. a user ID in your system)
const chain_id = '1'; // optional
const fee = 20; // optional
const transaction_hash = '0x1234567890'; //optional
const token_address = '0x1234567890'; //optional
const requirement_id = 'abc123def'; //optional

const completion = await userClient.transferEvent({
    requirement_id,
    campaign: {
        id: campaignId
    },
    transaction_hash,
    chain_id,
    network,
    token_address,
    amount,
    usd_value
    external_identifier
    fee,
});

```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chainvine.xyz/developers/sdk/classes-and-functions/chainvineuser/transferevent-payload.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
