Skip to main content
PATCH
/
config
JavaScript
import LightsparkGrid from '@lightsparkdev/grid';

const client = new LightsparkGrid({
  username: process.env['GRID_CLIENT_ID'], // This is the default and can be omitted
  password: process.env['GRID_CLIENT_SECRET'], // This is the default and can be omitted
});

const platformConfig = await client.config.update({
  supportedCurrencies: [
    {
      currencyCode: 'USD',
      minAmount: 100,
      maxAmount: 1000000,
      enabledTransactionTypes: ['OUTGOING', 'INCOMING'],
      requiredCounterpartyFields: [
        { name: 'FULL_NAME', mandatory: true },
        { name: 'NATIONALITY', mandatory: true },
        { name: 'BIRTH_DATE', mandatory: true },
      ],
    },
  ],
  umaDomain: 'mycompany.com',
  webhookEndpoint: 'https://api.mycompany.com/webhooks/uma',
});

console.log(platformConfig.id);
{
  "id": "PlatformConfig:019542f5-b3e7-1d02-0000-000000000003",
  "umaDomain": "platform.uma.domain",
  "proxyUmaSubdomain": "platform",
  "webhookEndpoint": "https://api.mycompany.com/webhooks/uma",
  "supportedCurrencies": [
    {
      "currencyCode": "USD",
      "minAmount": 100,
      "maxAmount": 1000000,
      "requiredCounterpartyFields": [
        {
          "name": "FULL_NAME",
          "mandatory": true
        },
        {
          "name": "BIRTH_DATE",
          "mandatory": true
        },
        {
          "name": "NATIONALITY",
          "mandatory": true
        }
      ],
      "enabledTransactionTypes": [
        "OUTGOING",
        "INCOMING"
      ],
      "providerRequiredCustomerFields": [
        "NATIONALITY",
        "BIRTH_DATE"
      ],
      "providerRequiredCounterpartyCustomerFields": [
        "FULL_NAME",
        "COUNTRY_OF_RESIDENCE"
      ]
    }
  ],
  "isRegulatedFinancialInstitution": false,
  "createdAt": "2025-06-15T12:30:45Z",
  "updatedAt": "2025-06-15T12:30:45Z"
}

Authorizations

Authorization
string
header
required

API token authentication using format <api token id>:<api client secret>

Body

application/json
umaDomain
string
Example:

"mycompany.com"

webhookEndpoint
string
Example:

"https://api.mycompany.com/webhooks/uma"

supportedCurrencies
object[]

Response

Configuration updated successfully

id
string

System-generated unique identifier

Example:

"PlatformConfig:019542f5-b3e7-1d02-0000-000000000003"

umaDomain
string

UMA domain for this platform

Example:

"platform.uma.domain"

proxyUmaSubdomain
string

The subdomain that incoming requests will be proxied to

Example:

"platform"

webhookEndpoint
string

URL where webhook notifications will be sent

Example:

"https://api.mycompany.com/webhooks/uma"

supportedCurrencies
object[]

List of currencies supported by the platform. This is what the platform's customers are able to hold, send, and receive.

isRegulatedFinancialInstitution
boolean

Whether the platform is a regulated financial institution. This is used to determine if the platform's customers must be KYC/KYB'd by Lightspark via the KYC link flow. This can only be set by Lightspark during platform creation.

Example:

false

createdAt
string<date-time>

Creation timestamp

Example:

"2025-06-15T12:30:45Z"

updatedAt
string<date-time>

Last update timestamp

Example:

"2025-06-15T12:30:45Z"