Skip to main content

Base URL


Payment Sessions

Create Payment Session

Create a new payment session. Returns a session ID and token for the client-side SDK. Headers: Request Body: Example:
Response 200 OK:

Get Payment Session

Retrieve the current state of a payment session. Headers: Example:
Response 200 OK:

Captures

Create Capture

Transfer funds from the one-time wallet (OTW) to your treasury wallet. Supports partial and final captures. Only available when the session status is FUNDED. Headers: Request Body: Example:
Response 202 Accepted:

Get Capture

Check the status of a capture operation. Headers: Example:
Response 200 OK:

Capture Object


Webhooks

Payment Status Update

Grain sends payment status updates to your registered webhook URL as JSON-RPC 2.0 requests. Payload:
Status Values: Expected Response: Return 200 with a JSON-RPC acknowledgment:

Response Fields Reference

Payment Session Object

All endpoints require authentication. See Error Codes for error response formats.