Skip to main content
Grid provides two options to fund an account:
  • Prefund
  • Just-in-time funding
With prefunding, you’ll deposit funds into internal accounts via Wire, PIX, or crypto transfers. You can then use the balances as the source of funds for quotes and transfers. With just-in-time funding, you’ll receive payment instructions as part of the quote. Once funds arrive, the payment to the receiver is automatically initiated.
Just-in-time funding supports instant payment rails only (for example: RTP, PIX, SEPA Instant).

Prerequisites

  • You have created a customer (for customer-scoped internal accounts)
  • You have GRID_CLIENT_ID and GRID_CLIENT_SECRET
Export your credentials for use with cURL:
export GRID_CLIENT_ID="your_client_id"
export GRID_CLIENT_SECRET="your_client_secret"

Prefunding an account via push payments (Wire, SEPA, PIX, etc.)

When customers need to deposit funds themselves, display the funding payment instructions in your application:
1

Retrieve the internal account

Fetch the customer’s internal account for their desired currency using the API.
curl -X GET 'https://api.lightspark.com/grid/2025-10-13/customers/internal-accounts?customerId=Customer:019542f5-b3e7-1d02-0000-000000000001' \
  -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET"
2

Extract payment instructions

Parse the fundingPaymentInstructions array and select the appropriate instructions based on your customer’s preferred payment method.
const instructions = account.fundingPaymentInstructions[0];
const bankInfo = instructions.bankAccountInfo;
3

Display instructions clearly

Show the payment details prominently in your UI and enable copy / paste:
  • Account holder name
  • Bank name and routing information (account/routing number, CLABE, PIX key, etc.)
  • Reference code (if provided)
  • Any additional notes from instructionsNotes
4

Customer initiates a push payment from their bank or wallet to the account/address specified.
5

Monitor for deposits

Set up webhook listeners to receive updates for the deposit transaction and account balance updates. The account balance will update automatically.
You’ll receive ACCOUNT_STATUS webhook events when the internal account balance changes.

Just-in-time funding (payment instructions from a quote)

With just-in-time funding, you request a quote and receive payment instructions (for example, a bank account or instant rail details). When your customer confirms the transaction, you trigger payment from your app. More details of just-in-time funding can be found in the Sending Payments guides.
I