---
updatedAt: 2026-08-25T19:36:01.000Z
agentTools:
  projectIndex: https://developer.veem.com/llms.txt
---

# Components

Configure Veem Web SDK components and authorization.

## Authorization

Allows your users to authorize Veem to provide your platform with an account details, which can be used in subsequent components.

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th style={{ textAlign: "left" }}>

      </th>

      <th style={{ textAlign: "left" }}>

      </th>

      <th style={{ textAlign: "left" }}>

      </th>

      <th style={{ textAlign: "left" }}>

      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td style={{ textAlign: "left" }}>
        `name`
      </td>

      <td style={{ textAlign: "left" }}>
        String
      </td>

      <td style={{ textAlign: "left" }}>

      </td>

      <td style={{ textAlign: "left" }}>
        * \*Required. \*\* Set as `authorization` to mount the authorization component.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        `clientId`
      </td>

      <td style={{ textAlign: "left" }}>
        String
      </td>

      <td style={{ textAlign: "left" }}>

      </td>

      <td style={{ textAlign: "left" }}>
        * \*Required. \*\* Client ID generated for a given application in our [developer sandbox](https://developer.veem.com/page/dev-dashboard-sandbox).
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        `target`
      </td>

      <td style={{ textAlign: "left" }}>
        String
      </td>

      <td style={{ textAlign: "left" }}>
        `body`
      </td>

      <td style={{ textAlign: "left" }}>
        * \*Optional.\*\* DOM selector to specify which element this component should be injected in.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        `environment`
      </td>

      <td style={{ textAlign: "left" }}>
        String
      </td>

      <td style={{ textAlign: "left" }}>
        `production`
      </td>

      <td style={{ textAlign: "left" }}>
        * \*Optional.\*\* Environment to run the component against. Options are `production` and `sandbox`.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        `onComplete`
      </td>

      <td style={{ textAlign: "left" }}>
        Function
      </td>

      <td style={{ textAlign: "left" }}>

      </td>

      <td style={{ textAlign: "left" }}>
        * \*Optional.\*\* Callback triggered when authenticated account confirms authorization to provide you with account details.

        Arguments:

        * `event`: 
          * `referenceId`: (String) Account reference ID associated to the account at hand.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        `onExit`
      </td>

      <td style={{ textAlign: "left" }}>
        Function
      </td>

      <td style={{ textAlign: "left" }}>

      </td>

      <td style={{ textAlign: "left" }}>
        * \*Optional.\*\* Callback triggered when user logs out or attempts to close the component.
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        `onError`
      </td>

      <td style={{ textAlign: "left" }}>
        Function
      </td>

      <td style={{ textAlign: "left" }}>

      </td>

      <td style={{ textAlign: "left" }}>
        * \*Optional.\*\* Callback triggered when an internal error occurs.

        * \*Note:\*\* See [Error Handling](https://developer.veem.com/docs/error-handling) for more details
      </td>
    </tr>
  </tbody>
</Table>

```javascript
new Veem.WebSDK({
  name: 'authorization',
  clientId: '<application_client_id>',
  target: '#container',
  onComplete: ({ referenceId }) => console.log('Account referenceId:', referenceId),
})
```

## Send payment

Allow the ability to your users to initiate payments. Allows you to provide preset payment data on their behalf.

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        Property
      </th>

      <th>
        Function
      </th>

      <th>
        Default value
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `name`
      </td>

      <td>
        String
      </td>

      <td>

      </td>

      <td>
        * \*Required. \*\* Set as `sendPayment` to mount the send payment component.
      </td>
    </tr>

    <tr>
      <td>
        `clientId`
      </td>

      <td>
        String
      </td>

      <td>

      </td>

      <td>
        * \*Required. \*\* Client ID generated for a given application in our [developer sandbox](https://developer.veem.com/page/dev-dashboard-sandbox).
      </td>
    </tr>

    <tr>
      <td>
        `target`
      </td>

      <td>
        String
      </td>

      <td>
        `body`
      </td>

      <td>
        * \*Optional.\*\* DOM selector to specify which element this component should be injected in.
      </td>
    </tr>

    <tr>
      <td>
        `environment`
      </td>

      <td>
        String
      </td>

      <td>
        `production`
      </td>

      <td>
        * \*Optional.\*\* Environment to run the component against. Options are `production` and `sandbox`.
      </td>
    </tr>

    <tr>
      <td>
        `onComplete`
      </td>

      <td>
        Function
      </td>

      <td>

      </td>

      <td>
        * \*Optional.\*\* Callback triggered when payment is initiated.

        Arguments:

        * `event`: 
          * `id`: (Number) ID of the created payment
      </td>
    </tr>

    <tr>
      <td>
        `onExit`
      </td>

      <td>
        Function
      </td>

      <td>

      </td>

      <td>
        * \*Optional.\*\* Callback triggered when user logs out or attempts to close the component.
      </td>
    </tr>

    <tr>
      <td>
        `onError`
      </td>

      <td>
        Function
      </td>

      <td>

      </td>

      <td>
        * \*Optional.\*\* Callback triggered when an internal error occurs.

        * \*Note:\*\* See [Error Handling](https://developer.veem.com/docs/error-handling) for more details.
      </td>
    </tr>

    <tr>
      <td>
        `preset`
      </td>

      <td>
        Object
      </td>

      <td>
        `{}`
      </td>

      <td>
        * \*Optional.\*\* Data structure supporting preset data to be autofilled in the user's send payment flow.

        * \*Note:\*\* for supported preset properties, refer to [Preset Deeplinking](https://developer.veem.com/docs/preset-deeplinking#interface---supported-properties).
      </td>
    </tr>
  </tbody>
</Table>

```javascript
new Veem.WebSDK({
  name: 'sendPayment',
  clientId: '<application_client_id>',
  target: '#container',
  onComplete: ({ id }) => console.log('Payment created with ID:', id), 
  preset: {
    accountId: 12345,
    payerAmount: 500,
    payerCurrencyCode: 'USD',
  },
})
```