Create an agent deposit
Create a deposit for the authenticated agent’s customer. The returned target is a BOLT11 invoice for Lightning or an address for a supported chain. Requires the RECEIVE_FUNDS permission in the agent’s policy.
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.
Headers
Body
Request for a deposit into one of the agent customer's internal accounts. For LIGHTNING, set sourceCurrency to USD and provide amount; the user pays that exact USD amount and fees are deducted from the amount received. For chain networks, no amount is required and the returned standing deposit address does not expire. A chain request counts the first order the address receives from that network in that currency within 24 hours of the request; while that window is open with nothing paid, a second request for the same account, network and currency is refused. Where Grid funds a chain deposit through a quote instead, the address is the quote's and the deposit carries the quote's expiresAt; a payment after it is not converted (see paidAfterExpiry).
Response
Deposit created successfully
A deposit that converts funds from an external network into an internal account belonging to the agent's customer. A deposit reported FAILED or EXPIRED can still become COMPLETED when the funds arrive late; the platform then receives the INCOMING_PAYMENT webhook for the deposit's transaction again, now COMPLETED.
Whether a payment for this deposit arrived after expiresAt, so only a deposit with an expiresAt can have one. A chain payment that arrives after its quote expired is not converted: the deposit stays EXPIRED and Lightspark is alerted to recover the funds by hand, so the payment must not be sent again. Absent or false while no late payment is known.
false