Components

Authorization

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

nameStringRequired. Set as authorization to mount the authorization component.
clientIdStringRequired. Client ID generated for a given application in our developer sandbox.
targetStringbodyOptional. DOM selector to specify which element this component should be injected in.
environmentStringproductionOptional. Environment to run the component against. Options are production and sandbox.
onCompleteFunctionOptional. 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.
onExitFunctionOptional. Callback triggered when user logs out or attempts to close the component.
onErrorFunctionOptional. Callback triggered when an internal error occurs.

Note: See Error Handling for more details
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.

PropertyFunctionDefault valueDescription
nameStringRequired. Set as sendPayment to mount the send payment component.
clientIdStringRequired. Client ID generated for a given application in our developer sandbox.
targetStringbodyOptional. DOM selector to specify which element this component should be injected in.
environmentStringproductionOptional. Environment to run the component against. Options are production and sandbox.
onCompleteFunctionOptional. Callback triggered when payment is initiated.

Arguments:
event:
id: (Number) ID of the created payment
onExitFunctionOptional. Callback triggered when user logs out or attempts to close the component.
onErrorFunctionOptional. Callback triggered when an internal error occurs.

Note: See Error Handling for more details.
presetObject{}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.
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',
  },
})