Skip to content

Commit 573d704

Browse files
authored
fix: updating claude skill for latest grid api changes (#278)
### TL;DR Updated Grid API skill documentation to reflect new API version with standardized account types, authentication credentials, and enhanced features like exchange rate checking and crypto withdrawal fee estimation. ### What changed? - **Authentication**: Changed from `GRID_API_TOKEN_ID` to `GRID_CLIENT_ID` and `GRID_API_CLIENT_SECRET` to `GRID_CLIENT_SECRET` with backward compatibility - **Account Types**: Standardized all fiat account types to use currency-specific naming (e.g., `CLABE` → `MXN_ACCOUNT`, `PIX` → `BRL_ACCOUNT`, `IBAN` → `EUR_ACCOUNT`) and added required `paymentRails` field - **New Features**: Added exchange rates endpoint (`GET /exchange-rates`) for pre-quote FX rate checking and crypto withdrawal fee estimation endpoint (`POST /crypto/estimate-withdrawal-fee`) - **Expanded Coverage**: Added support for 24 fiat account types across 28 countries including mobile money accounts for African markets - **Enhanced Documentation**: Updated all curl examples, added new workflow for FX rate checking, and improved account type reference with validation patterns ### How to test? 1. Verify authentication works with both old and new credential formats 2. Test creating external accounts with new account types and `paymentRails` field 3. Query exchange rates endpoint for various currency corridors 4. Test crypto withdrawal fee estimation for supported networks 5. Validate account creation examples for all 24 fiat account types ### Why make this change? The Grid API has evolved to support more payment corridors and provide better rate transparency. The standardized account types and payment rails make the API more consistent, while the new exchange rates endpoint allows integrators to show indicative pricing before committing to quotes. The expanded geographic coverage enables payments to more markets globally.
1 parent 02447bc commit 573d704

4 files changed

Lines changed: 676 additions & 179 deletions

File tree

.claude/skills/grid-api/SKILL.md

Lines changed: 107 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ description: >
66
"what currencies does Grid support", "how do I use the Grid API", "send money to [country]",
77
"pay [UMA address]", "send to CLABE", "send to PIX", "send to IBAN", "send to UPI",
88
"fund sandbox account", "test a payment", "on-ramp", "off-ramp", "convert crypto to fiat",
9-
"convert fiat to crypto", "look up UMA", "real-time quote", "JIT funding", or any payment
10-
operations using the Grid API CLI.
9+
"convert fiat to crypto", "look up UMA", "real-time quote", "JIT funding", "check exchange rate",
10+
"FX rate", "payment corridor", "what rate will I get", "estimate withdrawal fee",
11+
"crypto withdrawal fee", or any payment operations using the Grid API CLI.
1112
allowed-tools:
1213
- Bash
1314
- Read
@@ -28,7 +29,7 @@ Assist users with global payment operations via the Grid API. Core capabilities:
2829

2930
For detailed information, read these reference files in the `references/` directory:
3031

31-
- **`references/account-types.md`** - Country-specific external account requirements (CLABE, PIX, IBAN, UPI, etc.) with field requirements and curl examples. Read this when creating external accounts for international payments.
32+
- **`references/account-types.md`** - Country-specific external account requirements (MXN, BRL, EUR, INR, GBP, NGN, and 18 more) with field requirements and curl examples. Read this when creating external accounts for international payments.
3233
- **`references/endpoints.md`** - Complete API endpoint reference with methods, paths, and response codes. Read this when answering questions about specific API capabilities.
3334
- **`references/workflows.md`** - Step-by-step payment workflow guides for common scenarios (UMA payments, international transfers, on-ramp, off-ramp). Read this when guiding users through multi-step payment flows.
3435

@@ -46,7 +47,7 @@ For detailed information, read these reference files in the `references/` direct
4647

4748
- **Platform internal accounts**: For pooled funds, rewards distribution, treasury
4849
- **Customer internal accounts**: Per-currency holding accounts created automatically for each customer
49-
- **External accounts**: Traditional bank accounts (CLABE, IBAN, UPI, etc.) or crypto wallets
50+
- **External accounts**: Traditional bank accounts (MXN_ACCOUNT, EUR_ACCOUNT, USD_ACCOUNT, etc.) or crypto wallets
5051

5152
### Account Status Lifecycle
5253

@@ -62,15 +63,15 @@ For detailed information, read these reference files in the `references/` direct
6263

6364
The Grid API uses HTTP Basic Auth. Before making any API calls, ensure credentials and base URL are set as environment variables:
6465

65-
- `GRID_API_TOKEN_ID` - API token ID
66-
- `GRID_API_CLIENT_SECRET` - API client secret
66+
- `GRID_CLIENT_ID` - API client ID
67+
- `GRID_CLIENT_SECRET` - API client secret
6768
- `GRID_BASE_URL` - API base URL
6869

6970
If not set, load them from `~/.grid-credentials`:
7071

7172
```bash
72-
export GRID_API_TOKEN_ID=$(jq -r .apiTokenId ~/.grid-credentials)
73-
export GRID_API_CLIENT_SECRET=$(jq -r .apiClientSecret ~/.grid-credentials)
73+
export GRID_CLIENT_ID=$(jq -r '.clientId // .apiTokenId' ~/.grid-credentials)
74+
export GRID_CLIENT_SECRET=$(jq -r '.clientSecret // .apiClientSecret' ~/.grid-credentials)
7475
export GRID_BASE_URL=$(jq -r '.baseUrl // "https://api.lightspark.com/grid/2025-10-13"' ~/.grid-credentials)
7576
```
7677

@@ -94,14 +95,14 @@ For questions not covered by this skill's reference files, fetch additional info
9495
All API calls use HTTP Basic Auth via `curl -u`:
9596

9697
```bash
97-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
98+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
9899
"$GRID_BASE_URL/<endpoint>"
99100
```
100101

101102
For POST/PATCH requests, add the JSON body:
102103

103104
```bash
104-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
105+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
105106
-X POST \
106107
-H "Content-Type: application/json" \
107108
-d '<json-body>' \
@@ -116,11 +117,11 @@ Pipe through `jq` for readable output: `| jq .`
116117

117118
```bash
118119
# Get platform config (currencies, limits)
119-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
120+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
120121
"$GRID_BASE_URL/config" | jq .
121122

122123
# Update platform config (e.g., set webhook endpoint)
123-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
124+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
124125
-X PATCH -H "Content-Type: application/json" \
125126
-d '{"webhookEndpoint": "https://example.com/webhooks"}' \
126127
"$GRID_BASE_URL/config" | jq .
@@ -130,15 +131,15 @@ curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
130131

131132
```bash
132133
# List customers
133-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
134+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
134135
"$GRID_BASE_URL/customers?limit=20" | jq .
135136

136137
# Get customer details
137-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
138+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
138139
"$GRID_BASE_URL/customers/<customerId>" | jq .
139140

140141
# Create customer
141-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
142+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
142143
-X POST -H "Content-Type: application/json" \
143144
-d '{
144145
"platformCustomerId": "<platform-id>",
@@ -148,44 +149,45 @@ curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
148149
"$GRID_BASE_URL/customers" | jq .
149150

150151
# Update customer (customerType is required)
151-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
152+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
152153
-X PATCH -H "Content-Type: application/json" \
153154
-d '{"customerType": "INDIVIDUAL", "fullName": "New Name"}' \
154155
"$GRID_BASE_URL/customers/<customerId>" | jq .
155156

156157
# Delete customer
157-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
158+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
158159
-X DELETE \
159160
"$GRID_BASE_URL/customers/<customerId>" | jq .
160161

161162
# Generate KYC link (GET with query params)
162-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
163+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
163164
"$GRID_BASE_URL/customers/kyc-link?platformCustomerId=<platformCustomerId>&redirectUri=https://example.com/callback" | jq .
164165
```
165166

166167
### Account Management
167168

168169
```bash
169170
# List customer internal accounts
170-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
171+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
171172
"$GRID_BASE_URL/customers/internal-accounts?customerId=<customerId>" | jq .
172173

173174
# List platform internal accounts
174-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
175+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
175176
"$GRID_BASE_URL/platform/internal-accounts" | jq .
176177

177178
# List customer external accounts
178-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
179+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
179180
"$GRID_BASE_URL/customers/external-accounts?customerId=<customerId>" | jq .
180181

181-
# Create external account (example: Mexico CLABE - Individual)
182-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
182+
# Create external account (example: Mexico MXN_ACCOUNT - Individual)
183+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
183184
-X POST -H "Content-Type: application/json" \
184185
-d '{
185186
"customerId": "<customerId>",
186187
"currency": "MXN",
187188
"accountInfo": {
188-
"accountType": "CLABE",
189+
"accountType": "MXN_ACCOUNT",
190+
"paymentRails": ["SPEI"],
189191
"clabeNumber": "<18-digit-number>",
190192
"beneficiary": {
191193
"beneficiaryType": "INDIVIDUAL",
@@ -198,13 +200,72 @@ curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
198200
"$GRID_BASE_URL/customers/external-accounts" | jq .
199201
```
200202

201-
For all supported account types (PIX, IBAN, UPI, NGN, US, crypto wallets) and their field requirements, read `references/account-types.md`.
203+
For all 24 supported fiat account types and 6 crypto wallet types with their field requirements, read `references/account-types.md`.
204+
205+
### Exchange Rates (Pre-Quote FX Rates)
206+
207+
Use this to check indicative FX rates for a payment corridor **before** creating a receiving account or a quote. Rates are cached ~5 minutes and include platform-specific fees.
208+
209+
```bash
210+
# Get all available corridors from USD
211+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
212+
"$GRID_BASE_URL/exchange-rates?sourceCurrency=USD" | jq .
213+
214+
# Get rate for a specific corridor (USD → INR)
215+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
216+
"$GRID_BASE_URL/exchange-rates?sourceCurrency=USD&destinationCurrency=INR" | jq .
217+
218+
# Get rate with a specific sending amount (10000 = $100.00 in cents)
219+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
220+
"$GRID_BASE_URL/exchange-rates?sourceCurrency=USD&destinationCurrency=INR&sendingAmount=10000" | jq .
221+
222+
# Get rates for multiple destination currencies
223+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
224+
"$GRID_BASE_URL/exchange-rates?sourceCurrency=USD&destinationCurrency=INR&destinationCurrency=EUR" | jq .
225+
```
226+
227+
The response includes per-corridor:
228+
- `sourceCurrency` / `destinationCurrency` with code, decimals, name, symbol
229+
- `destinationPaymentRail` (e.g., UPI, SEPA_INSTANT, MOBILE_MONEY, FASTER_PAYMENTS)
230+
- `sendingAmount` / `receivingAmount` in smallest currency units
231+
- `minSendingAmount` / `maxSendingAmount` — corridor limits
232+
- `exchangeRate` — units of destination per unit of source
233+
- `fees.fixed` — fixed fee in smallest unit of sending currency
234+
- `updatedAt` — when the rate was last refreshed
235+
236+
**Note:** These are indicative cached rates. For a locked, executable rate, create a quote via `POST /quotes`.
237+
238+
### Crypto Withdrawal Fee Estimation
239+
240+
Estimate network and application fees before a crypto withdrawal:
241+
242+
```bash
243+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
244+
-X POST -H "Content-Type: application/json" \
245+
-d '{
246+
"internalAccountId": "<internalAccountId>",
247+
"currency": "USDC",
248+
"cryptoNetwork": "SOLANA_MAINNET",
249+
"amount": 1000000,
250+
"destinationAddress": "<blockchain-address>"
251+
}' \
252+
"$GRID_BASE_URL/crypto/estimate-withdrawal-fee" | jq .
253+
```
254+
255+
Returns:
256+
- `networkFee` — gas fee in `networkFeeAsset` units (e.g., lamports for SOL)
257+
- `networkFeeAsset` — asset used for network fee (e.g., SOL)
258+
- `applicationFee` — platform fee in withdrawal currency units
259+
- `totalFee` — total cost in withdrawal currency (network fee converted + application fee)
260+
- `netAmount` — amount recipient receives after all fees
261+
262+
Supported networks: `SOLANA_MAINNET`, `SOLANA_DEVNET`, `ETHEREUM_MAINNET`, `POLYGON_MAINNET`, `TRON_MAINNET`
202263

203264
### Quotes (Cross-Currency Transfers)
204265

205266
```bash
206267
# Account-funded to UMA: Use when funds are already in an internal account
207-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
268+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
208269
-X POST -H "Content-Type: application/json" \
209270
-d '{
210271
"source": {
@@ -222,7 +283,7 @@ curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
222283
"$GRID_BASE_URL/quotes" | jq .
223284

224285
# Account-funded to external account: IMPORTANT - always include destination currency
225-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
286+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
226287
-X POST -H "Content-Type: application/json" \
227288
-d '{
228289
"source": {
@@ -240,7 +301,7 @@ curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
240301
"$GRID_BASE_URL/quotes" | jq .
241302

242303
# Real-time/JIT funded: Returns paymentInstructions for funding
243-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
304+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
244305
-X POST -H "Content-Type: application/json" \
245306
-d '{
246307
"source": {
@@ -259,24 +320,24 @@ curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
259320
"$GRID_BASE_URL/quotes" | jq .
260321

261322
# Execute a quote
262-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
323+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
263324
-X POST \
264325
"$GRID_BASE_URL/quotes/<quoteId>/execute" | jq .
265326

266327
# List quotes
267-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
328+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
268329
"$GRID_BASE_URL/quotes?status=PENDING" | jq .
269330

270331
# Get quote details
271-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
332+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
272333
"$GRID_BASE_URL/quotes/<quoteId>" | jq .
273334
```
274335

275336
### Same-Currency Transfers
276337

277338
```bash
278339
# Transfer in (external → internal, same currency)
279-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
340+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
280341
-X POST -H "Content-Type: application/json" \
281342
-d '{
282343
"source": {"accountId": "<externalAccountId>"},
@@ -286,7 +347,7 @@ curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
286347
"$GRID_BASE_URL/transfer-in" | jq .
287348

288349
# Transfer out (internal → external, same currency)
289-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
350+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
290351
-X POST -H "Content-Type: application/json" \
291352
-d '{
292353
"source": {"accountId": "<internalAccountId>"},
@@ -300,20 +361,20 @@ curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
300361

301362
```bash
302363
# List transactions
303-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
364+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
304365
"$GRID_BASE_URL/transactions?status=PENDING" | jq .
305366

306367
# Get transaction details
307-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
368+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
308369
"$GRID_BASE_URL/transactions/<transactionId>" | jq .
309370

310371
# Approve incoming payment
311-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
372+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
312373
-X POST \
313374
"$GRID_BASE_URL/transactions/<transactionId>/approve" | jq .
314375

315376
# Reject incoming payment
316-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
377+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
317378
-X POST -H "Content-Type: application/json" \
318379
-d '{"reason": "Reason for rejection"}' \
319380
"$GRID_BASE_URL/transactions/<transactionId>/reject" | jq .
@@ -323,11 +384,11 @@ curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
323384

324385
```bash
325386
# Look up UMA address capabilities
326-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
387+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
327388
"$GRID_BASE_URL/receiver/uma/%24alice%40example.com" | jq .
328389

329390
# Look up external account capabilities
330-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
391+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
331392
"$GRID_BASE_URL/receiver/external-account/<accountId>" | jq .
332393
```
333394

@@ -337,19 +398,19 @@ curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
337398

338399
```bash
339400
# Fund an internal account in sandbox
340-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
401+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
341402
-X POST -H "Content-Type: application/json" \
342403
-d '{"amount": 100000}' \
343404
"$GRID_BASE_URL/sandbox/internal-accounts/<internalAccountId>/fund" | jq .
344405

345406
# Simulate sending funds to a real-time quote
346-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
407+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
347408
-X POST -H "Content-Type: application/json" \
348409
-d '{"quoteId": "<quoteId>", "currencyCode": "<code>"}' \
349410
"$GRID_BASE_URL/sandbox/send" | jq .
350411

351412
# Simulate receiving a UMA payment
352-
curl -s -u "$GRID_API_TOKEN_ID:$GRID_API_CLIENT_SECRET" \
413+
curl -s -u "$GRID_CLIENT_ID:$GRID_CLIENT_SECRET" \
353414
-X POST -H "Content-Type: application/json" \
354415
-d '{
355416
"senderUmaAddress": "$sender@sandbox.grid.uma.money",
@@ -397,6 +458,7 @@ Internal Account (USD) → External Account (USD) [transfer-out]
397458

398459
For step-by-step payment workflows, read `references/workflows.md`. Common workflows:
399460

461+
- **Check FX Rate (Pre-Quote)**: Query `GET /exchange-rates` for indicative rates before setting up accounts or quotes
400462
- **UMA Payment**: Receiver lookup -> Quote -> Confirm -> Execute
401463
- **International Bank Transfer**: Create external account -> Receiver lookup -> Quote -> Confirm -> Execute
402464
- **On-Ramp (Fiat to Crypto)**: Verify KYC -> Deposit fiat -> Create crypto external account -> Quote with `immediatelyExecute`
@@ -416,7 +478,7 @@ Use this flow when the user asks for a "realtime quote" or "just in time" funded
416478

417479
1. Create a quote with `sourceType: "REALTIME_FUNDING"`. Destination can be an internal account, external account, or UMA address.
418480
2. The response includes `paymentInstructions` with **multiple funding options simultaneously** (e.g., Lightning + Spark for BTC, Solana + Base + Polygon for USDC). Show all options to the user.
419-
3. **Auto-execution**: Once the user sends funds to ANY of the provided addresses, Grid automatically detects the deposit and executes at the locked rate. Do NOT call the execute endpoint for JIT quotes. Webhooks sent: `ACCOUNT_STATUS` on deposit, `OUTGOING_PAYMENT` on completion.
481+
3. **Auto-execution**: Once the user sends funds to ANY of the provided addresses, Grid automatically detects the deposit and executes at the locked rate. Do NOT call the execute endpoint for JIT quotes. Webhooks sent: `internal-account-status` on deposit, `outgoing-payment` on completion.
420482
4. **Quote expiration**: Quotes expire in 1-5 minutes. If expired, create a new quote.
421483

422484
## Best Practices and Common Pitfalls
@@ -428,9 +490,9 @@ Use this flow when the user asks for a "realtime quote" or "just in time" funded
428490
5. **Pipe through jq**: Always append `| jq .` for readable output, or `| jq -r .field` to extract specific values
429491
6. **URL-encode special characters**: UMA addresses contain `$` — encode as `%24` in URL paths
430492
7. **Always include destination currency in quotes**: When specifying a destination account, you MUST include `currency` in the destination object even though the external account already has a currency
431-
8. **Individual beneficiary fields are all required**: For `beneficiaryType: "INDIVIDUAL"`, you MUST include `fullName`, `birthDate` (YYYY-MM-DD), and `nationality` (2-letter code) in the `beneficiary` object
493+
8. **Individual beneficiary requires fullName**: For `beneficiaryType: "INDIVIDUAL"`, `fullName` is required. `birthDate` (YYYY-MM-DD) and `nationality` (2-letter code) are optional but recommended
432494
9. **Use correct Nigerian field names**: Use `bankName` (NOT `bankCode`) and include `purposeOfPayment`
433-
10. **Don't forget country-specific required fields**: Brazil (PIX) requires `pixKey`, `pixKeyType`, and `taxId`; Europe (IBAN) requires `swiftBic`
495+
10. **Don't forget country-specific required fields**: Brazil (BRL_ACCOUNT) requires `pixKey`, `pixKeyType`, and `taxId`; Europe (EUR_ACCOUNT) requires `iban`; all fiat accounts require `paymentRails`
434496

435497
## Error Handling
436498

0 commit comments

Comments
 (0)