Connect Wallet API

POST /api/v1/payment-sessions/:paymentSessionId/connect-wallet

Connect the user's wallet and select a stablecoin. May be called multiple times until the funding transaction is linked.

Authorization

Include the payment session token in the Authorization header:

Authorization: Bearer <paymentSessionToken>

Request Body

TypeScript
{
  userAddress: string;
  paymentMethodId: string;
}

Example

curl
curl -X POST https://api.grain.inc/api/v1/payment-sessions/ps_123/connect-wallet \
  -H "Authorization: Bearer <paymentSessionToken>" \
  -H "Content-Type: application/json" \
  -d '{ "userAddress": "0xUSER", "paymentMethodId": "pm_usdc_polygon" }'

Last updated