Skip to main content
POST
/
api
/
grid
/
v1
/
accounts
/
{address}
/
payment-intent
Create a payment intent
curl --request POST \
  --url https://grid.squads.xyz/api/grid/v1/accounts/{address}/payment-intent \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": "<string>",
  "destination": {
    "currency": "<string>",
    "details": "<unknown>",
    "payment_rail": "<string>"
  },
  "source": {
    "currency": "<string>",
    "details": "<unknown>",
    "payment_rail": "<string>"
  },
  "fee_config": {
    "currency": "sol",
    "payer_address": "<string>",
    "self_managed_fees": true
  }
}
'
{
  "amount": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "currency": "<string>",
  "destination": "<unknown>",
  "id": "<string>",
  "payment_rail": "<string>",
  "source": "<unknown>",
  "status": "<string>",
  "transaction_signers": [
    "<string>"
  ],
  "valid_until": "2023-11-07T05:31:56Z",
  "fee": {
    "amount": "<string>",
    "amount_decimal": "<string>",
    "currency": "sol",
    "sol_equivalent": {
      "amount": "<string>",
      "amount_decimal": "<string>"
    }
  },
  "kms_payloads": [
    {
      "address": "<string>",
      "payload": "<string>",
      "provider": "privy"
    }
  ],
  "source_deposit_instructions": "<unknown>",
  "threshold": 123,
  "transaction": "<string>"
}

Fee Config Breaking Change

The fee_config field is required for non-enterprise tier customers. Requests without it return a missing_fee_config error.

Migration

Add fee_config to your create_payment_intent request body:
{
  "source": { "type": "smart_account" },
  "destination": { "address": "<DESTINATION>", "network": "solana" },
  "amount": "1000000",
  "currency": "usdc",
  "fee_config": {
    "currency": "sol",
    "payer_address": "<PUBKEY_THAT_WILL_PAY_THE_FEE>"
  }
}
fee_config
object
required
Fee configuration specifying who pays the transaction fee and in which currency.

How Fees Work

  1. You submit a payment intent with fee_config.
  2. The API builds the transaction and calculates the fee (compute, signatures, and ATA rent if needed).
  3. A repayment instruction is appended that transfers the fee from payer_address to the paymaster.
  4. The response includes a fee object with the exact amount charged.

Fee Payer Signing

The payer_address must sign the transaction. The API automatically adds it as a required signer.
  • SOL fees: The payer needs enough SOL to cover the fee.
  • USDC fees: The payer needs enough USDC in their associated token account.

Response

When fee_config is provided, the response includes a fee field:
fee
object
Breakdown of the transaction fee charged.

Errors

missing_fee_config — Request has no fee_config (required for non-enterprise tier).

Authorizations

Authorization
string
header
required

Your Grid API key from the Grid Dashboard

Path Parameters

address
string
required

Smart account address

Body

application/json
amount
string
required
destination
object
required
source
object
required
fee_config
object

Response

Payment intent created successfully

amount
string
required
created_at
string<date-time>
required
currency
string
required
destination
any
required
id
string
required
payment_rail
string
required
source
any
required
status
string
required
transaction_signers
string[]
required
valid_until
string<date-time>
required
fee
object
kms_payloads
object[]
source_deposit_instructions
any
threshold
integer<int32> | null
transaction
string | null