Create an internal account
Changed onCreate a rule-based internal account.
A rule-based account is an additional account number for an account holder that already holds an account in the same currency. It carries a routing rule: every payment that settles into it is attributed to that account number and then swept to the rule's destination, so you can issue one number per payer and reconcile incoming payments without matching on remittance text.
Only RULE_BASED accounts can be created here. INTERNAL_FIAT, INTERNAL_CRYPTO, and EMBEDDED_WALLET accounts are provisioned automatically when an account holder is created or approved.
The response carries the account's own fundingPaymentInstructions — the routable number payers send to for a USD account, or one deposit address per supported network for a USDC or USDT account. Rule-based accounts are currently available in USD, USDC, and USDT, for a customer or for your platform itself. USDC and USDT rule-based accounts are enabled per platform.
Sandbox platforms can create rule-based accounts and exercise the whole flow. The account number is generated locally rather than issued by a partner bank, and POST /sandbox/internal-accounts/{accountId}/fund stands in for a settled deposit — funding the account triggers its sweep just as a real deposit would.
Send an Idempotency-Key header to make retries safe: a request carrying a key already used returns the account created by the first request with a 200 instead of a 201. Reusing a key for a materially different account is rejected with 409. Without a key a retry cannot be recognised, so each request creates its own account and mints its own account number.
Request
- Base URLhttps://api.lightspark.com/grid/2025-10-13
- URLhttps://api.lightspark.com/grid/2025-10-13/internal-accounts
- AuthHTTP basic
Headers
A unique identifier for the request. Strongly recommended: creating the account mints an account number that cannot be reversed, and the key is what lets a retry return the first account rather than minting a second.
Request body
Example request
{
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001",
"currency": "USD",
"onBehalfOfCustomerId": "Customer:019542f5-b3e7-1d02-0000-000000000002",
"label": "invoice-4417",
"sweepRule": {
"destination": {
"accountId": "ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965",
"paymentRail": "ACH"
},
"description": "Rent sweep",
"remittanceInformation": "Unit 4B March",
"platformFeeOverride": {
"platformFixedFee": {
"amount": 50,
"currency": "USD"
},
"platformVariableFeeBps": 30
}
}
}Response
The Idempotency-Key was already used to create this account. The account created by the first request is returned unchanged.
Example response
{
"id": "InternalAccount:12dcbd6-dced-4ec4-b756-3c3a9ea3d123",
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001",
"status": "ACTIVE",
"balance": {
"amount": 12550,
"currency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
}
},
"totalBalance": {
"amount": 12550,
"currency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
}
},
"fundingPaymentInstructions": [
{
"instructionsNotes": "Please ensure the reference code is included in the payment memo/description field",
"isPlatformAccount": true,
"accountOrWalletInfo": {
"accountType": "USD_ACCOUNT",
"accountNumber": "1234567890",
"routingNumber": "021000021",
"bankName": "Chase Bank",
"intermediaryBankName": "JPMorgan Chase Bank",
"intermediaryRoutingNumber": "021000021",
"fiToFiInformation": "/BNF/Invoice 4471",
"bankAccountType": "CHECKING"
}
}
],
"onBehalfOfCustomerId": "Customer:019542f5-b3e7-1d02-0000-000000000002",
"label": "invoice-4417",
"sweepRule": {
"destination": {
"accountId": "ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123",
"paymentRail": "ACH"
},
"minimumAmount": {
"amount": 12550,
"currency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
}
},
"maximumAmount": {
"amount": 12550,
"currency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
}
},
"description": "Rent sweep",
"remittanceInformation": "Unit 4B March",
"platformFeeOverride": {
"platformFixedFee": {
"amount": 50,
"currency": "USD"
},
"platformVariableFeeBps": 30
}
},
"privateEnabled": true,
"cardCapabilities": {
"supportsVelocityLimits": true,
"supportsPanReveal": true,
"supportsDigitalWalletTokenization": true
},
"createdAt": "2025-10-03T12:30:00Z",
"updatedAt": "2025-10-03T12:30:00Z"
}Changes
- info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status
- info
- warning
added the new
CORRIDOR_UNDER_MAINTENANCEenum value to theresponse property for the response status
- warning