Skip to content

User Flow Guide

This guide shows the simple flow of how Sawfish’s APIs work together for payments.

First, the system makes sure you have a valid token (a short-lived key for security). If it expires, you either refresh or generate a new one. Once authorised, the GraphQL API takes over - you can either:

Finally, Sawfish confirms the result by sending a webhook back to your system.

Payment flow: REST token endpoints (generate, refresh, revoke) leading into the GraphQL API - fee calculation via paymentCreditCardFeeCalc or paymentGatewayFeesCalc, then processPaymentRequest, finishing with the payment confirmation webhook

  1. Authenticate - call Generate Token with your x-client-id and x-api-key. Tokens expire after 10 minutes; use Refresh Token to obtain a new one.
  2. Calculate fees - use Get Payment Gateway Fees for a list of fees by card type, or Get Fee of Credit Card for the exact fee once card details are known.
  3. Process the payment - call Process Payment with the card, contact, amount, and fees.
  4. Handle the result - the initial response confirms the payment request was initiated. The final status (success or failure) is delivered to your registered webhook URL.