Funding Transaction API

POST /api/v1/payment-sessions/:paymentSessionId/funding-transaction

Optionally associate the transaction that funded the OTW. If the required amount is detected, the session transitions to FUNDED automatically.

The JavaScript SDK handles this automatically.

Authorization

Authorization: Bearer <paymentSessionToken>

Request Body

body.ts
{
  fundingTransactionHash: string;
  wait?: boolean; // default: false
}

Response

response.ts
{ "success": true }

Example

curl
curl -X POST https://api.grain.inc/api/v1/payment-sessions/ps_123/funding-transaction \
  -H "Authorization: Bearer <paymentSessionToken>" \
  -H "Content-Type: application/json" \
  -d '{ "fundingTransactionHash": "0xFUNDHASH" }'

Last updated