Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .claude/skills/grid-api/references/endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ Internal accounts are auto-created when customers are created based on platform

- `ACCOUNT`: External or internal account. Fields: `accountId`, `currency`
- `UMA_ADDRESS`: UMA address. Fields: `umaAddress`, `currency`
- `EXTERNAL_ACCOUNT_DETAILS`: Inline account creation (creates external account + quote in one step). Fields: `externalAccountDetails` (same shape as external account create request)

### Quote Request Fields

Expand Down
2 changes: 1 addition & 1 deletion components/grid-visualizer/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ Stablecoins: `SOLANA_WALLET` (USDC), `TRON_WALLET` (USDT), `POLYGON_WALLET` (USD
```json
{
"source": { "sourceType": "ACCOUNT" | "REALTIME_FUNDING", ... },
"destination": { "destinationType": "ACCOUNT" | "EXTERNAL_ACCOUNT_DETAILS" | "UMA_ADDRESS", ... },
"destination": { "destinationType": "ACCOUNT" | "UMA_ADDRESS", ... },
"lockedCurrencySide": "SENDING" | "RECEIVING",
"lockedCurrencyAmount": 10000
}
Expand Down
47 changes: 2 additions & 45 deletions mintlify/openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 23 additions & 14 deletions mintlify/payouts-and-b2b/platform-tools/sandbox-testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,26 @@ The transfer will instantly simulate the bank transfer process and complete with

### Creating Quotes with Test Accounts

When creating quotes with the `externalAccountDetails` destination type, you can provide test account patterns inline:
When creating quotes with test external accounts, first create an external account with a test account pattern, then reference it in the quote:

```bash
# Step 1: Create the external account with a test pattern
POST /customers/external-accounts

{
"customerId": "Customer:123",
"currency": "EUR",
"accountInfo": {
"accountType": "IBAN_ACCOUNT",
"iban": "DE89370400440532013003",
"beneficiary": {
"beneficiaryType": "INDIVIDUAL",
"fullName": "Test User"
}
}
}

# Step 2: Create the quote using the external account ID
POST /quotes

{
Expand All @@ -121,25 +138,17 @@ POST /quotes
"accountId": "InternalAccount:abc123"
},
"destination": {
"destinationType": "EXTERNAL_ACCOUNT_DETAILS",
"externalAccountDetails": {
"customerId": "Customer:123",
"currency": "EUR",
"accountInfo": {
"accountType": "IBAN_ACCOUNT",
"iban": "DE89370400440532013003", // Ends in 003 = slow payment
"beneficiary": {
"beneficiaryType": "INDIVIDUAL",
"fullName": "Test User"
}
}
}
"destinationType": "ACCOUNT",
"accountId": "ExternalAccount:...",
"currency": "EUR"
},
"lockedCurrencySide": "SENDING",
"lockedCurrencyAmount": 100000
}
```

The IBAN ending in `003` triggers the slow payment test pattern.

### Executing Quotes in Sandbox

For quotes from an external account source, execute as in production via `/quotes/{quoteId}/execute`. The sandbox will:
Expand Down
32 changes: 0 additions & 32 deletions mintlify/platform-overview/core-concepts/quote-system.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -306,38 +306,6 @@ curl -X POST https://api.lightspark.com/grid/2025-10-13/quotes \
Customer doesn't see rate before execution. If you want to lock a quote and confirm fees and exchange rate details before executing the quote, set `immediatelyExecute` to `false` or omit the field.
</Warning>

## Creating External Accounts in Quotes

You can create an external account inline when creating a quote:

```json
{
"source": {
"sourceType": "ACCOUNT",
"accountId": "InternalAccount:abc123"
},
"destination": {
"destinationType": "EXTERNAL_ACCOUNT_DETAILS",
"externalAccountDetails": {
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001",
"currency": "EUR",
"accountInfo": {
"accountType": "IBAN_ACCOUNT",
"iban": "DE89370400440532013000",
"beneficiary": {
"beneficiaryType": "INDIVIDUAL",
"fullName": "Alice Smith"
}
}
}
},
"lockedCurrencySide": "SENDING",
"lockedCurrencyAmount": 100000
}
```

This is useful for one-time recipients or when you don't want to manage external accounts separately.

## Fees

All fees are transparently displayed in the quote response:
Expand Down
34 changes: 0 additions & 34 deletions mintlify/ramps/accounts/external-accounts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -152,40 +152,6 @@ curl -X POST 'https://api.lightspark.com/grid/2025-10-13/customers/external-acco
}'
```

## Creating accounts inline with quotes

For one-time conversions, create external accounts inline using `externalAccountDetails`:

```bash
curl -X POST 'https://api.lightspark.com/grid/2025-10-13/quotes' \
-H 'Authorization: Basic $GRID_CLIENT_ID:$GRID_CLIENT_SECRET' \
-H 'Content-Type: application/json' \
-d '{
"source": {
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001",
"currency": "USD"
},
"destination": {
"externalAccountDetails": {
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001",
"currency": "BTC",
"accountInfo": {
"accountType": "SPARK_WALLET",
"address": "spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu"
}
}
},
"lockedCurrencySide": "SENDING",
"lockedCurrencyAmount": 10000
}'
```

<Tip>
Use `externalAccountDetails` for one-time destinations. The external account
will be automatically created and can be reused for future quotes using its
returned ID.
</Tip>

## Listing external accounts

### List customer external accounts
Expand Down
108 changes: 35 additions & 73 deletions mintlify/ramps/conversion-flows/fiat-crypto-conversion.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,24 @@ Grid enables seamless conversion between fiat currencies and cryptocurrencies vi

### Create a quote

<CodeGroup>
First, create an external account for the crypto destination:

```bash cURL
curl -X POST 'https://api.lightspark.com/grid/2025-10-13/customers/external-accounts' \
-H 'Authorization: Basic $GRID_CLIENT_ID:$GRID_CLIENT_SECRET' \
-H 'Content-Type: application/json' \
-d '{
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001",
"currency": "BTC",
"accountInfo": {
"accountType": "SPARK_WALLET",
"address": "spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu"
}
}'
```

Then create a quote using the external account ID:

```bash cURL
curl -X POST 'https://api.lightspark.com/grid/2025-10-13/quotes' \
-H 'Authorization: Basic $GRID_CLIENT_ID:$GRID_CLIENT_SECRET' \
Expand All @@ -36,63 +53,15 @@ curl -X POST 'https://api.lightspark.com/grid/2025-10-13/quotes' \
"currency": "USD"
},
"destination": {
"externalAccountDetails": {
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001",
"currency": "BTC",
"beneficiary": {
"counterPartyType": "INDIVIDUAL",
"fullName": "John Doe",
"email": "john@example.com"
},
"accountInfo": {
"accountType": "SPARK_WALLET",
"address": "spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu"
}
}
"destinationType": "ACCOUNT",
"accountId": "ExternalAccount:b23dcbd6-dced-4ec4-b756-3c3a9ea3d456"
},
"lockedCurrencySide": "RECEIVING",
"lockedCurrencyAmount": 100000,
"description": "Buy 0.001 BTC"
}'
```

```javascript Node.js
const quote = await fetch("https://api.lightspark.com/grid/2025-10-13/quotes", {
method: "POST",
headers: {
Authorization: `Basic ${credentials}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
source: {
customerId: "Customer:019542f5-b3e7-1d02-0000-000000000001",
currency: "USD",
},
destination: {
externalAccountDetails: {
customerId: "Customer:019542f5-b3e7-1d02-0000-000000000001",
currency: "BTC",
beneficiary: {
counterPartyType: "INDIVIDUAL",
fullName: "John Doe",
email: "john@example.com",
},
accountInfo: {
accountType: "SPARK_WALLET",
address:
"spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu",
},
},
},
lockedCurrencySide: "RECEIVING",
lockedCurrencyAmount: 100000, // 0.001 BTC in satoshis
description: "Buy 0.001 BTC",
}),
}).then((r) => r.json());
```

</CodeGroup>

**Response includes payment instructions:**

```json
Expand Down Expand Up @@ -212,30 +181,23 @@ app.post("/webhooks/grid", async (req, res) => {

For instant on-ramps (e.g., reward payouts), use `immediatelyExecute: true` with an internal account source:

```javascript
const quote = await fetch("https://api.lightspark.com/grid/2025-10-13/quotes", {
method: "POST",
body: JSON.stringify({
source: {
sourceType: "ACCOUNT",
accountId: "InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123",
```bash cURL
curl -X POST 'https://api.lightspark.com/grid/2025-10-13/quotes' \
-H 'Authorization: Basic $GRID_CLIENT_ID:$GRID_CLIENT_SECRET' \
-H 'Content-Type: application/json' \
-d '{
"source": {
"sourceType": "ACCOUNT",
"accountId": "InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123"
},
destination: {
destinationType: "EXTERNAL_ACCOUNT_DETAILS",
externalAccountDetails: {
customerId: "Customer:...",
currency: "BTC",
accountInfo: {
accountType: "SPARK_WALLET",
address: "spark1...",
},
},
"destination": {
"destinationType": "ACCOUNT",
"accountId": "ExternalAccount:b23dcbd6-dced-4ec4-b756-3c3a9ea3d456"
},
lockedCurrencySide: "RECEIVING",
lockedCurrencyAmount: 100000,
immediatelyExecute: true,
}),
}).then((r) => r.json());
"lockedCurrencySide": "RECEIVING",
"lockedCurrencyAmount": 100000,
"immediatelyExecute": true
}'
```

<Info>
Expand Down
Loading
Loading