curl --request POST \
--url https://api.lightspark.com/grid/2025-10-13/agents/me/stored-cards/{storedCardId}/reveal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actionId": "AgentAction:019542f5-b3e7-1d02-0000-000000000099",
"merchant": "example-store.com",
"amount": 4999,
"currency": "USD",
"purpose": "Running shoes, size 10",
"needsCvc": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
actionId: 'AgentAction:019542f5-b3e7-1d02-0000-000000000099',
merchant: 'example-store.com',
amount: 4999,
currency: 'USD',
purpose: 'Running shoes, size 10',
needsCvc: true
})
};
fetch('https://api.lightspark.com/grid/2025-10-13/agents/me/stored-cards/{storedCardId}/reveal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"actionId\": \"AgentAction:019542f5-b3e7-1d02-0000-000000000099\",\n \"merchant\": \"example-store.com\",\n \"amount\": 4999,\n \"currency\": \"USD\",\n \"purpose\": \"Running shoes, size 10\",\n \"needsCvc\": true\n}")
val request = Request.Builder()
.url("https://api.lightspark.com/grid/2025-10-13/agents/me/stored-cards/{storedCardId}/reveal")
.post(body)
.addHeader("Authorization", "Bearer <token>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute(){
"detailsUrl": "https://relay.example.com/grid/2025-10-13/stored-card-reveals/abc",
"expiresAt": "2026-11-06T15:05:00Z",
"actionId": "AgentAction:019542f5-b3e7-1d02-0000-000000000099",
"cvcIncluded": false,
"card": {
"lastFour": "0005",
"brand": "VISA",
"funding": "CREDIT",
"expiryMonth": 8,
"expiryYear": 2029,
"id": "StoredCard:019542f5-b3e7-1d02-0000-000000000077",
"issuerCountry": "US",
"nickname": "Personal Visa"
},
"holderName": "Jane Doe",
"billingAddress": {
"line1": "123 Main Street",
"postalCode": "94105",
"country": "US",
"line2": "Apt 4B",
"city": "San Francisco",
"state": "CA"
}
}{
"id": "AgentAction:019542f5-b3e7-1d02-0000-000000000099",
"agentId": "Agent:019542f5-b3e7-1d02-0000-000000000042",
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000010",
"platformCustomerId": "user-a1b2c3",
"status": "PENDING_APPROVAL",
"type": "EXECUTE_QUOTE",
"expiresAt": "2025-10-03T15:05:00Z",
"createdAt": "2025-10-03T15:00:00Z",
"updatedAt": "2025-10-03T15:02:00Z",
"quote": {
"id": "Quote:019542f5-b3e7-1d02-0000-000000000006",
"status": "PENDING",
"createdAt": "2025-10-03T12:00:00Z",
"expiresAt": "2025-10-03T12:05:00Z",
"source": {
"sourceType": "ACCOUNT",
"accountId": "InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965",
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001"
},
"destination": {
"destinationType": "ACCOUNT",
"accountId": "ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123",
"paymentRail": "ACH"
},
"sendingCurrency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
},
"receivingCurrency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
},
"totalSendingAmount": 123010,
"totalReceivingAmount": 1000,
"exchangeRate": 123,
"feesIncluded": 10,
"transactionId": "Transaction:019542f5-b3e7-1d02-0000-000000000005",
"platformFeesIncluded": 5,
"paymentInstructions": [
{
"accountOrWalletInfo": {
"accountType": "USD_ACCOUNT",
"paymentRails": [
"ACH",
"WIRE"
],
"accountNumber": "1234567890",
"routingNumber": "021000021",
"bankName": "Chase Bank",
"reference": "UMA-Q12345-REF"
},
"instructionsNotes": "Include reference UMA-Q12345-REF in memo"
},
{
"accountOrWalletInfo": {
"accountType": "SPARK_WALLET",
"assetType": "BTC",
"address": "spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu",
"invoice": "lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs"
}
}
],
"counterpartyInformation": {
"FULL_NAME": "John Sender",
"BIRTH_DATE": "1985-06-15",
"NATIONALITY": "DE"
},
"rateDetails": {
"counterpartyMultiplier": 1.08,
"counterpartyFixedFee": 10,
"gridApiMultiplier": 0.925,
"gridApiFixedFee": 10,
"gridApiVariableFeeRate": 0.003,
"gridApiVariableFeeAmount": 30
},
"purposeOfPayment": "GIFT",
"documentIds": [
"PaymentDocument:019542f5-b3e7-1d02-0000-000000000001",
"PaymentDocument:019542f5-b3e7-1d02-0000-000000000002",
"PaymentDocument:019542f5-b3e7-1d02-0000-000000000003"
],
"scaChallenge": {
"id": "ScaChallenge:019542f5-b3e7-1d02-0000-000000000007",
"expiresAt": "2025-10-03T12:05:00Z",
"factor": "SMS_OTP",
"availableFactors": [
"SMS_OTP"
],
"purpose": "PAYOUT",
"passkeyAssertionOptions": {},
"passkeyAllowedOrigins": [
"https://app.example.com"
]
},
"minimumReceivingAmount": 1000,
"destinationSparkAddress": "spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu",
"destinationChainAddress": {
"destinationType": "CHAIN_ADDRESS",
"network": "BASE",
"currency": "USDC",
"address": "0x1234567890abcdef1234567890abcdef12345678"
},
"destinationLightningInvoice": {
"destinationType": "LIGHTNING_INVOICE",
"invoice": "lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs"
}
},
"previousQuote": {
"id": "Quote:019542f5-b3e7-1d02-0000-000000000006",
"status": "PENDING",
"createdAt": "2025-10-03T12:00:00Z",
"expiresAt": "2025-10-03T12:05:00Z",
"source": {
"sourceType": "ACCOUNT",
"accountId": "InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965",
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001"
},
"destination": {
"destinationType": "ACCOUNT",
"accountId": "ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123",
"paymentRail": "ACH"
},
"sendingCurrency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
},
"receivingCurrency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
},
"totalSendingAmount": 123010,
"totalReceivingAmount": 1000,
"exchangeRate": 123,
"feesIncluded": 10,
"transactionId": "Transaction:019542f5-b3e7-1d02-0000-000000000005",
"platformFeesIncluded": 5,
"paymentInstructions": [
{
"accountOrWalletInfo": {
"accountType": "USD_ACCOUNT",
"paymentRails": [
"ACH",
"WIRE"
],
"accountNumber": "1234567890",
"routingNumber": "021000021",
"bankName": "Chase Bank",
"reference": "UMA-Q12345-REF"
},
"instructionsNotes": "Include reference UMA-Q12345-REF in memo"
},
{
"accountOrWalletInfo": {
"accountType": "SPARK_WALLET",
"assetType": "BTC",
"address": "spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu",
"invoice": "lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs"
}
}
],
"counterpartyInformation": {
"FULL_NAME": "John Sender",
"BIRTH_DATE": "1985-06-15",
"NATIONALITY": "DE"
},
"rateDetails": {
"counterpartyMultiplier": 1.08,
"counterpartyFixedFee": 10,
"gridApiMultiplier": 0.925,
"gridApiFixedFee": 10,
"gridApiVariableFeeRate": 0.003,
"gridApiVariableFeeAmount": 30
},
"purposeOfPayment": "GIFT",
"documentIds": [
"PaymentDocument:019542f5-b3e7-1d02-0000-000000000001",
"PaymentDocument:019542f5-b3e7-1d02-0000-000000000002",
"PaymentDocument:019542f5-b3e7-1d02-0000-000000000003"
],
"scaChallenge": {
"id": "ScaChallenge:019542f5-b3e7-1d02-0000-000000000007",
"expiresAt": "2025-10-03T12:05:00Z",
"factor": "SMS_OTP",
"availableFactors": [
"SMS_OTP"
],
"purpose": "PAYOUT",
"passkeyAssertionOptions": {},
"passkeyAllowedOrigins": [
"https://app.example.com"
]
},
"minimumReceivingAmount": 1000,
"destinationSparkAddress": "spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu",
"destinationChainAddress": {
"destinationType": "CHAIN_ADDRESS",
"network": "BASE",
"currency": "USDC",
"address": "0x1234567890abcdef1234567890abcdef12345678"
},
"destinationLightningInvoice": {
"destinationType": "LIGHTNING_INVOICE",
"invoice": "lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs"
}
},
"priceTolerance": {
"basisPoints": 100,
"minimumAmount": 100,
"currency": "USD"
},
"purchaseCard": {
"amount": 4999,
"spendLimit": 5749,
"currency": "USD",
"fundingSource": "InternalAccount:019542f5-b3e7-1d02-0000-000000000002",
"increaseCardId": "Card:019542f5-b3e7-1d02-0000-000000000011",
"previousAmount": 4999,
"previousSpendLimit": 5749,
"description": "Running shoes from example-store.com",
"recurring": false,
"expiresAt": "2026-10-26T15:30:00Z"
},
"claimablePayout": {
"id": "ClaimablePayout:019542f5-b3e7-1d02-0000-000000000077",
"agentId": "Agent:019542f5-b3e7-1d02-0000-000000000042",
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000010",
"platformCustomerId": "user-a1b2c3",
"status": "PENDING_APPROVAL",
"sourceAccountId": "InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123",
"amount": {
"amount": 12550,
"currency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
}
},
"recipient": {
"name": "Maria",
"phoneNumber": "+639171234567",
"email": "maria@example.com",
"country": "PH"
},
"expiresAt": "2025-10-10T15:00:00Z",
"createdAt": "2025-10-03T15:00:00Z",
"updatedAt": "2025-10-03T15:02:00Z",
"note": "Happy birthday, Mom",
"agentActionId": "AgentAction:019542f5-b3e7-1d02-0000-000000000099",
"externalAccountId": "ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965",
"transactionId": "Transaction:019542f5-b3e7-1d02-0000-000000000030",
"receivedAmount": {
"amount": 12550,
"currency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
}
},
"paymentRail": "ACH",
"failureReason": "INSUFFICIENT_FUNDS"
},
"storedCardUse": {
"storedCardId": "StoredCard:019542f5-b3e7-1d02-0000-000000000077",
"card": {
"lastFour": "0005",
"brand": "VISA",
"funding": "CREDIT",
"expiryMonth": 8,
"expiryYear": 2029,
"issuerCountry": "US",
"nickname": "Personal Visa"
},
"merchant": "example-store.com",
"amount": 4999,
"currency": "USD",
"purpose": "Running shoes, size 10",
"needsCvc": false,
"autoApproved": false,
"linkIssuedAt": "2026-11-06T15:00:30Z",
"revealedAt": "2026-11-06T15:00:41Z"
},
"settlementRule": {
"id": "SettlementRule:019542f5-b3e7-1d02-0000-000000000001",
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001",
"name": "Glossier deal",
"status": "PENDING_APPROVAL",
"priority": 1,
"currency": "USD",
"match": [
{
"creditedAccountId": "InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965",
"ruleBasedAccountId": "InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d001",
"counterpartyName": {
"prefix": "GLOSSIER",
"contains": "glossier inc"
},
"receivedAtWalletAddress": "spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu",
"rail": "ACH"
}
],
"splits": [
{
"share": {
"type": "PERCENT",
"basisPoints": 4000,
"amount": 50000
},
"destination": {
"destinationType": "EXTERNAL_ACCOUNT",
"externalAccountId": "ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123"
},
"position": 0
}
],
"holdSeconds": 0,
"achHoldSeconds": 86400,
"limits": {
"maxAmountPerExecution": 1000000,
"maxAmountPerDay": 5000000
},
"createdAt": "2026-11-06T18:00:00Z",
"updatedAt": "2026-11-06T18:00:00Z",
"agentId": "Agent:019542f5-b3e7-1d02-0000-000000000042",
"agentActionId": "AgentAction:019542f5-b3e7-1d02-0000-000000000099",
"pendingChangeActionId": "AgentAction:019542f5-b3e7-1d02-0000-000000000098"
},
"payoutRun": {
"id": "PayoutRun:019542f5-b3e7-1d02-0000-000000000001",
"status": "VALIDATING",
"sourceAccountId": "InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965",
"total": {
"amount": 12550,
"currency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
}
},
"rowCount": 12,
"rows": [
{
"clientRowId": "contractor-0042",
"amount": 25000000,
"destination": {
"destinationType": "EXTERNAL_ACCOUNT",
"externalAccountId": "ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123"
},
"description": "October invoice"
}
]
},
"cardId": "Card:019542f5-b3e7-1d02-0000-000000000011",
"transaction": {
"id": "Transaction:019542f5-b3e7-1d02-0000-000000000004",
"status": "CREATED",
"type": "INCOMING",
"direction": "CREDIT",
"destination": {
"destinationType": "ACCOUNT",
"accountId": "ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123",
"currency": "EUR",
"railDetails": {
"paymentRail": "ONCHAIN",
"transactionHash": "h82pJGF9p7kpzb6eU326EFZf2cDnimbTFVeJtx1qtBmUNJAEqN76R7PwPfHt3oWb8R6cKvhgyxQdDn53jFrK6wFx",
"network": "SOLANA"
},
"onChainTransaction": {
"transactionHash": "h82pJGF9p7kpzb6eU326EFZf2cDnimbTFVeJtx1qtBmUNJAEqN76R7PwPfHt3oWb8R6cKvhgyxQdDn53jFrK6wFx",
"network": "SOLANA"
}
},
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001",
"platformCustomerId": "18d3e5f7b4a9c2",
"pendingReason": "COUNTERPARTY_DECLARATION_REQUIRED",
"ruleBasedAccountId": "InternalAccount:019542f5-b3e7-1d02-0000-000000000011",
"settledAt": "2025-08-15T14:30:00Z",
"createdAt": "2025-08-15T14:25:18Z",
"updatedAt": "2025-08-15T14:30:00Z",
"receiptDeliveryConfirmedAt": "2025-08-15T14:31:00Z",
"agentId": "Agent:019542f5-b3e7-1d02-0000-000000000042",
"description": "Payment for invoice #1234",
"sentAmount": {
"amount": 12550,
"currency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
}
},
"exchangeRate": 1.08,
"quoteId": "Quote:019542f5-b3e7-1d02-0000-000000000006",
"refund": {
"reference": "UMA-Q12345-REFUND",
"initiatedAt": "2025-08-15T14:30:00Z",
"status": "COMPLETED",
"settledAt": "2025-08-15T14:35:00Z",
"reason": "TRANSACTION_FAILED"
},
"counterpartyInformation": {
"FULL_NAME": "John Sender",
"BIRTH_DATE": "1985-06-15",
"NATIONALITY": "DE"
},
"source": {
"sourceType": "ACCOUNT",
"accountId": "InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965",
"currency": "USD",
"railDetails": {
"paymentRail": "ONCHAIN",
"transactionHash": "h82pJGF9p7kpzb6eU326EFZf2cDnimbTFVeJtx1qtBmUNJAEqN76R7PwPfHt3oWb8R6cKvhgyxQdDn53jFrK6wFx",
"network": "SOLANA"
},
"onChainTransaction": {
"transactionHash": "h82pJGF9p7kpzb6eU326EFZf2cDnimbTFVeJtx1qtBmUNJAEqN76R7PwPfHt3oWb8R6cKvhgyxQdDn53jFrK6wFx",
"network": "SOLANA"
}
},
"receivedAmount": {
"amount": 12550,
"currency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
}
},
"fees": 10,
"reconciliationInstructions": {
"reference": "UMA-Q12345-REF",
"transactionHash": "0x9f2c6b6f4b6c8f2a8d9e0b1c2d3e4f5061728394a5b6c7d8e9f00112233445566"
},
"failureReason": "LNURLP_FAILED"
},
"rejectionReason": "Transaction amount exceeds customer's current risk limit.",
"failureReason": "QUOTE_EXPIRED"
}{
"code": "INVALID_INPUT",
"reason": "<string>",
"details": {
"errors": [
{
"field": "identifier",
"constraint": {
"format": "email",
"pattern": "^\\d{5}(-\\d{4})?$",
"enum": [
"SSN",
"ITIN",
"NON_US_TAX_ID"
],
"minLength": 1,
"maxLength": 500
},
"message": "Value is not one of the allowed enum members."
}
],
"missingRequirements": [
"SUPPORTING_PROOF"
],
"refusalReason": "AGENT_POLICY_DENIED",
"missingFields": [
"PHONE_NUMBER"
]
}
}{
"code": "UNAUTHORIZED",
"reason": "<string>",
"details": {}
}{
"code": "FORBIDDEN",
"reason": "<string>",
"details": {
"refusalReason": "AGENT_POLICY_DENIED",
"permission": "ISSUE_CARDS",
"policyDenialReason": "DAILY_LIMIT_EXCEEDED"
}
}{
"code": "TRANSACTION_NOT_FOUND",
"reason": "<string>",
"details": {}
}{
"code": "TRANSACTION_NOT_PENDING_PLATFORM_APPROVAL",
"reason": "<string>",
"details": {}
}{
"code": "RATE_LIMITED",
"reason": "<string>",
"details": {}
}{
"code": "GRID_SWITCH_ERROR",
"reason": "<string>",
"details": {}
}Ask for a stored card's details
Ask to use a stored card for one purchase. The agent names the merchant, the amount it expects to be charged and what the purchase is; Grid cannot enforce the amount, since the merchant charges the customer’s own card.
The customer approves every use unless they chose to auto-approve this agent at this merchant up to the amount. A use that waits answers 202 with a USE_STORED_CARD action in PENDING_APPROVAL; once it is APPROVED, call again with only its actionId to collect the link. A use with needsCvc always waits, since the customer enters the security code when approving.
An approved use answers 200 with a single-use detailsUrl, valid for five minutes. The number reaches the agent through Evervault’s Relay, which decrypts it on the way; Grid never sends it. Open the URL once, right away, where the purchase is being made, and never store or log it. Each approved use issues one link: asking again with the same actionId is refused with 409.
Every use is audit-logged with the agent as the actor. Uses are rate limited per card, per agent and per customer; beyond the limit the request is rejected with 429 RATE_LIMITED. Requires the USE_STORED_CARDS permission and the customer’s permission for this agent to use the card.
curl --request POST \
--url https://api.lightspark.com/grid/2025-10-13/agents/me/stored-cards/{storedCardId}/reveal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actionId": "AgentAction:019542f5-b3e7-1d02-0000-000000000099",
"merchant": "example-store.com",
"amount": 4999,
"currency": "USD",
"purpose": "Running shoes, size 10",
"needsCvc": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
actionId: 'AgentAction:019542f5-b3e7-1d02-0000-000000000099',
merchant: 'example-store.com',
amount: 4999,
currency: 'USD',
purpose: 'Running shoes, size 10',
needsCvc: true
})
};
fetch('https://api.lightspark.com/grid/2025-10-13/agents/me/stored-cards/{storedCardId}/reveal', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"actionId\": \"AgentAction:019542f5-b3e7-1d02-0000-000000000099\",\n \"merchant\": \"example-store.com\",\n \"amount\": 4999,\n \"currency\": \"USD\",\n \"purpose\": \"Running shoes, size 10\",\n \"needsCvc\": true\n}")
val request = Request.Builder()
.url("https://api.lightspark.com/grid/2025-10-13/agents/me/stored-cards/{storedCardId}/reveal")
.post(body)
.addHeader("Authorization", "Bearer <token>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute(){
"detailsUrl": "https://relay.example.com/grid/2025-10-13/stored-card-reveals/abc",
"expiresAt": "2026-11-06T15:05:00Z",
"actionId": "AgentAction:019542f5-b3e7-1d02-0000-000000000099",
"cvcIncluded": false,
"card": {
"lastFour": "0005",
"brand": "VISA",
"funding": "CREDIT",
"expiryMonth": 8,
"expiryYear": 2029,
"id": "StoredCard:019542f5-b3e7-1d02-0000-000000000077",
"issuerCountry": "US",
"nickname": "Personal Visa"
},
"holderName": "Jane Doe",
"billingAddress": {
"line1": "123 Main Street",
"postalCode": "94105",
"country": "US",
"line2": "Apt 4B",
"city": "San Francisco",
"state": "CA"
}
}{
"id": "AgentAction:019542f5-b3e7-1d02-0000-000000000099",
"agentId": "Agent:019542f5-b3e7-1d02-0000-000000000042",
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000010",
"platformCustomerId": "user-a1b2c3",
"status": "PENDING_APPROVAL",
"type": "EXECUTE_QUOTE",
"expiresAt": "2025-10-03T15:05:00Z",
"createdAt": "2025-10-03T15:00:00Z",
"updatedAt": "2025-10-03T15:02:00Z",
"quote": {
"id": "Quote:019542f5-b3e7-1d02-0000-000000000006",
"status": "PENDING",
"createdAt": "2025-10-03T12:00:00Z",
"expiresAt": "2025-10-03T12:05:00Z",
"source": {
"sourceType": "ACCOUNT",
"accountId": "InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965",
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001"
},
"destination": {
"destinationType": "ACCOUNT",
"accountId": "ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123",
"paymentRail": "ACH"
},
"sendingCurrency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
},
"receivingCurrency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
},
"totalSendingAmount": 123010,
"totalReceivingAmount": 1000,
"exchangeRate": 123,
"feesIncluded": 10,
"transactionId": "Transaction:019542f5-b3e7-1d02-0000-000000000005",
"platformFeesIncluded": 5,
"paymentInstructions": [
{
"accountOrWalletInfo": {
"accountType": "USD_ACCOUNT",
"paymentRails": [
"ACH",
"WIRE"
],
"accountNumber": "1234567890",
"routingNumber": "021000021",
"bankName": "Chase Bank",
"reference": "UMA-Q12345-REF"
},
"instructionsNotes": "Include reference UMA-Q12345-REF in memo"
},
{
"accountOrWalletInfo": {
"accountType": "SPARK_WALLET",
"assetType": "BTC",
"address": "spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu",
"invoice": "lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs"
}
}
],
"counterpartyInformation": {
"FULL_NAME": "John Sender",
"BIRTH_DATE": "1985-06-15",
"NATIONALITY": "DE"
},
"rateDetails": {
"counterpartyMultiplier": 1.08,
"counterpartyFixedFee": 10,
"gridApiMultiplier": 0.925,
"gridApiFixedFee": 10,
"gridApiVariableFeeRate": 0.003,
"gridApiVariableFeeAmount": 30
},
"purposeOfPayment": "GIFT",
"documentIds": [
"PaymentDocument:019542f5-b3e7-1d02-0000-000000000001",
"PaymentDocument:019542f5-b3e7-1d02-0000-000000000002",
"PaymentDocument:019542f5-b3e7-1d02-0000-000000000003"
],
"scaChallenge": {
"id": "ScaChallenge:019542f5-b3e7-1d02-0000-000000000007",
"expiresAt": "2025-10-03T12:05:00Z",
"factor": "SMS_OTP",
"availableFactors": [
"SMS_OTP"
],
"purpose": "PAYOUT",
"passkeyAssertionOptions": {},
"passkeyAllowedOrigins": [
"https://app.example.com"
]
},
"minimumReceivingAmount": 1000,
"destinationSparkAddress": "spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu",
"destinationChainAddress": {
"destinationType": "CHAIN_ADDRESS",
"network": "BASE",
"currency": "USDC",
"address": "0x1234567890abcdef1234567890abcdef12345678"
},
"destinationLightningInvoice": {
"destinationType": "LIGHTNING_INVOICE",
"invoice": "lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs"
}
},
"previousQuote": {
"id": "Quote:019542f5-b3e7-1d02-0000-000000000006",
"status": "PENDING",
"createdAt": "2025-10-03T12:00:00Z",
"expiresAt": "2025-10-03T12:05:00Z",
"source": {
"sourceType": "ACCOUNT",
"accountId": "InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965",
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001"
},
"destination": {
"destinationType": "ACCOUNT",
"accountId": "ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123",
"paymentRail": "ACH"
},
"sendingCurrency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
},
"receivingCurrency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
},
"totalSendingAmount": 123010,
"totalReceivingAmount": 1000,
"exchangeRate": 123,
"feesIncluded": 10,
"transactionId": "Transaction:019542f5-b3e7-1d02-0000-000000000005",
"platformFeesIncluded": 5,
"paymentInstructions": [
{
"accountOrWalletInfo": {
"accountType": "USD_ACCOUNT",
"paymentRails": [
"ACH",
"WIRE"
],
"accountNumber": "1234567890",
"routingNumber": "021000021",
"bankName": "Chase Bank",
"reference": "UMA-Q12345-REF"
},
"instructionsNotes": "Include reference UMA-Q12345-REF in memo"
},
{
"accountOrWalletInfo": {
"accountType": "SPARK_WALLET",
"assetType": "BTC",
"address": "spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu",
"invoice": "lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs"
}
}
],
"counterpartyInformation": {
"FULL_NAME": "John Sender",
"BIRTH_DATE": "1985-06-15",
"NATIONALITY": "DE"
},
"rateDetails": {
"counterpartyMultiplier": 1.08,
"counterpartyFixedFee": 10,
"gridApiMultiplier": 0.925,
"gridApiFixedFee": 10,
"gridApiVariableFeeRate": 0.003,
"gridApiVariableFeeAmount": 30
},
"purposeOfPayment": "GIFT",
"documentIds": [
"PaymentDocument:019542f5-b3e7-1d02-0000-000000000001",
"PaymentDocument:019542f5-b3e7-1d02-0000-000000000002",
"PaymentDocument:019542f5-b3e7-1d02-0000-000000000003"
],
"scaChallenge": {
"id": "ScaChallenge:019542f5-b3e7-1d02-0000-000000000007",
"expiresAt": "2025-10-03T12:05:00Z",
"factor": "SMS_OTP",
"availableFactors": [
"SMS_OTP"
],
"purpose": "PAYOUT",
"passkeyAssertionOptions": {},
"passkeyAllowedOrigins": [
"https://app.example.com"
]
},
"minimumReceivingAmount": 1000,
"destinationSparkAddress": "spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu",
"destinationChainAddress": {
"destinationType": "CHAIN_ADDRESS",
"network": "BASE",
"currency": "USDC",
"address": "0x1234567890abcdef1234567890abcdef12345678"
},
"destinationLightningInvoice": {
"destinationType": "LIGHTNING_INVOICE",
"invoice": "lnbc15u1p3xnhl2pp5jptserfk3zk4qy42tlucycrfwxhydvlemu9pqr93tuzlv9cc7g3sdqsvfhkcap3xyhx7un8cqzpgxqzjcsp5f8c52y2stc300gl6s4xswtjpc37hrnnr3c9wvtgjfuvqmpm35evq9qyyssqy4lgd8tj637qcjp05rdpxxykjenthxftej7a2zzmwrmrl70fyj9hvj0rewhzj7jfyuwkwcg9g2jpwtk3wkjtwnkdks84hsnu8xps5vsq4gj5hs"
}
},
"priceTolerance": {
"basisPoints": 100,
"minimumAmount": 100,
"currency": "USD"
},
"purchaseCard": {
"amount": 4999,
"spendLimit": 5749,
"currency": "USD",
"fundingSource": "InternalAccount:019542f5-b3e7-1d02-0000-000000000002",
"increaseCardId": "Card:019542f5-b3e7-1d02-0000-000000000011",
"previousAmount": 4999,
"previousSpendLimit": 5749,
"description": "Running shoes from example-store.com",
"recurring": false,
"expiresAt": "2026-10-26T15:30:00Z"
},
"claimablePayout": {
"id": "ClaimablePayout:019542f5-b3e7-1d02-0000-000000000077",
"agentId": "Agent:019542f5-b3e7-1d02-0000-000000000042",
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000010",
"platformCustomerId": "user-a1b2c3",
"status": "PENDING_APPROVAL",
"sourceAccountId": "InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123",
"amount": {
"amount": 12550,
"currency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
}
},
"recipient": {
"name": "Maria",
"phoneNumber": "+639171234567",
"email": "maria@example.com",
"country": "PH"
},
"expiresAt": "2025-10-10T15:00:00Z",
"createdAt": "2025-10-03T15:00:00Z",
"updatedAt": "2025-10-03T15:02:00Z",
"note": "Happy birthday, Mom",
"agentActionId": "AgentAction:019542f5-b3e7-1d02-0000-000000000099",
"externalAccountId": "ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965",
"transactionId": "Transaction:019542f5-b3e7-1d02-0000-000000000030",
"receivedAmount": {
"amount": 12550,
"currency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
}
},
"paymentRail": "ACH",
"failureReason": "INSUFFICIENT_FUNDS"
},
"storedCardUse": {
"storedCardId": "StoredCard:019542f5-b3e7-1d02-0000-000000000077",
"card": {
"lastFour": "0005",
"brand": "VISA",
"funding": "CREDIT",
"expiryMonth": 8,
"expiryYear": 2029,
"issuerCountry": "US",
"nickname": "Personal Visa"
},
"merchant": "example-store.com",
"amount": 4999,
"currency": "USD",
"purpose": "Running shoes, size 10",
"needsCvc": false,
"autoApproved": false,
"linkIssuedAt": "2026-11-06T15:00:30Z",
"revealedAt": "2026-11-06T15:00:41Z"
},
"settlementRule": {
"id": "SettlementRule:019542f5-b3e7-1d02-0000-000000000001",
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001",
"name": "Glossier deal",
"status": "PENDING_APPROVAL",
"priority": 1,
"currency": "USD",
"match": [
{
"creditedAccountId": "InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965",
"ruleBasedAccountId": "InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d001",
"counterpartyName": {
"prefix": "GLOSSIER",
"contains": "glossier inc"
},
"receivedAtWalletAddress": "spark1pgssyuuuhnrrdjswal5c3s3rafw9w3y5dd4cjy3duxlf7hjzkp0rqx6dj6mrhu",
"rail": "ACH"
}
],
"splits": [
{
"share": {
"type": "PERCENT",
"basisPoints": 4000,
"amount": 50000
},
"destination": {
"destinationType": "EXTERNAL_ACCOUNT",
"externalAccountId": "ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123"
},
"position": 0
}
],
"holdSeconds": 0,
"achHoldSeconds": 86400,
"limits": {
"maxAmountPerExecution": 1000000,
"maxAmountPerDay": 5000000
},
"createdAt": "2026-11-06T18:00:00Z",
"updatedAt": "2026-11-06T18:00:00Z",
"agentId": "Agent:019542f5-b3e7-1d02-0000-000000000042",
"agentActionId": "AgentAction:019542f5-b3e7-1d02-0000-000000000099",
"pendingChangeActionId": "AgentAction:019542f5-b3e7-1d02-0000-000000000098"
},
"payoutRun": {
"id": "PayoutRun:019542f5-b3e7-1d02-0000-000000000001",
"status": "VALIDATING",
"sourceAccountId": "InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965",
"total": {
"amount": 12550,
"currency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
}
},
"rowCount": 12,
"rows": [
{
"clientRowId": "contractor-0042",
"amount": 25000000,
"destination": {
"destinationType": "EXTERNAL_ACCOUNT",
"externalAccountId": "ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123"
},
"description": "October invoice"
}
]
},
"cardId": "Card:019542f5-b3e7-1d02-0000-000000000011",
"transaction": {
"id": "Transaction:019542f5-b3e7-1d02-0000-000000000004",
"status": "CREATED",
"type": "INCOMING",
"direction": "CREDIT",
"destination": {
"destinationType": "ACCOUNT",
"accountId": "ExternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123",
"currency": "EUR",
"railDetails": {
"paymentRail": "ONCHAIN",
"transactionHash": "h82pJGF9p7kpzb6eU326EFZf2cDnimbTFVeJtx1qtBmUNJAEqN76R7PwPfHt3oWb8R6cKvhgyxQdDn53jFrK6wFx",
"network": "SOLANA"
},
"onChainTransaction": {
"transactionHash": "h82pJGF9p7kpzb6eU326EFZf2cDnimbTFVeJtx1qtBmUNJAEqN76R7PwPfHt3oWb8R6cKvhgyxQdDn53jFrK6wFx",
"network": "SOLANA"
}
},
"customerId": "Customer:019542f5-b3e7-1d02-0000-000000000001",
"platformCustomerId": "18d3e5f7b4a9c2",
"pendingReason": "COUNTERPARTY_DECLARATION_REQUIRED",
"ruleBasedAccountId": "InternalAccount:019542f5-b3e7-1d02-0000-000000000011",
"settledAt": "2025-08-15T14:30:00Z",
"createdAt": "2025-08-15T14:25:18Z",
"updatedAt": "2025-08-15T14:30:00Z",
"receiptDeliveryConfirmedAt": "2025-08-15T14:31:00Z",
"agentId": "Agent:019542f5-b3e7-1d02-0000-000000000042",
"description": "Payment for invoice #1234",
"sentAmount": {
"amount": 12550,
"currency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
}
},
"exchangeRate": 1.08,
"quoteId": "Quote:019542f5-b3e7-1d02-0000-000000000006",
"refund": {
"reference": "UMA-Q12345-REFUND",
"initiatedAt": "2025-08-15T14:30:00Z",
"status": "COMPLETED",
"settledAt": "2025-08-15T14:35:00Z",
"reason": "TRANSACTION_FAILED"
},
"counterpartyInformation": {
"FULL_NAME": "John Sender",
"BIRTH_DATE": "1985-06-15",
"NATIONALITY": "DE"
},
"source": {
"sourceType": "ACCOUNT",
"accountId": "InternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965",
"currency": "USD",
"railDetails": {
"paymentRail": "ONCHAIN",
"transactionHash": "h82pJGF9p7kpzb6eU326EFZf2cDnimbTFVeJtx1qtBmUNJAEqN76R7PwPfHt3oWb8R6cKvhgyxQdDn53jFrK6wFx",
"network": "SOLANA"
},
"onChainTransaction": {
"transactionHash": "h82pJGF9p7kpzb6eU326EFZf2cDnimbTFVeJtx1qtBmUNJAEqN76R7PwPfHt3oWb8R6cKvhgyxQdDn53jFrK6wFx",
"network": "SOLANA"
}
},
"receivedAmount": {
"amount": 12550,
"currency": {
"code": "USD",
"name": "United States Dollar",
"symbol": "$",
"decimals": 2
}
},
"fees": 10,
"reconciliationInstructions": {
"reference": "UMA-Q12345-REF",
"transactionHash": "0x9f2c6b6f4b6c8f2a8d9e0b1c2d3e4f5061728394a5b6c7d8e9f00112233445566"
},
"failureReason": "LNURLP_FAILED"
},
"rejectionReason": "Transaction amount exceeds customer's current risk limit.",
"failureReason": "QUOTE_EXPIRED"
}{
"code": "INVALID_INPUT",
"reason": "<string>",
"details": {
"errors": [
{
"field": "identifier",
"constraint": {
"format": "email",
"pattern": "^\\d{5}(-\\d{4})?$",
"enum": [
"SSN",
"ITIN",
"NON_US_TAX_ID"
],
"minLength": 1,
"maxLength": 500
},
"message": "Value is not one of the allowed enum members."
}
],
"missingRequirements": [
"SUPPORTING_PROOF"
],
"refusalReason": "AGENT_POLICY_DENIED",
"missingFields": [
"PHONE_NUMBER"
]
}
}{
"code": "UNAUTHORIZED",
"reason": "<string>",
"details": {}
}{
"code": "FORBIDDEN",
"reason": "<string>",
"details": {
"refusalReason": "AGENT_POLICY_DENIED",
"permission": "ISSUE_CARDS",
"policyDenialReason": "DAILY_LIMIT_EXCEEDED"
}
}{
"code": "TRANSACTION_NOT_FOUND",
"reason": "<string>",
"details": {}
}{
"code": "TRANSACTION_NOT_PENDING_PLATFORM_APPROVAL",
"reason": "<string>",
"details": {}
}{
"code": "RATE_LIMITED",
"reason": "<string>",
"details": {}
}{
"code": "GRID_SWITCH_ERROR",
"reason": "<string>",
"details": {}
}Authorizations
Bearer token authentication for agent-scoped endpoints. The token is the accessToken returned when redeeming a device code via POST /agents/device-codes/redeem. Agent credentials are user-scoped: all requests are automatically bound to the agent's associated customer and subject to the agent's policy.
Body
Either the purchase the agent wants the card for (merchant, amount, currency, purpose and optionally needsCvc), or actionId alone, to collect the link for a use the customer has since approved.
Response
Link issued
A single-use link to the card's details. Open detailsUrl once, right away, where the purchase is being made; it answers once and expires at expiresAt. The number reaches the agent through Evervault's Relay, which decrypts it on the way: Grid never sends it. Never store or log the URL or what it returns.