TradeMate + ReturnMate
ReturnMate integrates with TradeMate B2B so trade orders flow into the same workflow as Shopify orders. Admins create a trade return, enter the TOxxxxxx number, and the rest is auto-populated from TradeMate. Credits flow back as webhooks so TradeMate stays authoritative for the financial record.
What the integration does.
- OAuth 2.0 per-tenant connect — no API-key copy-paste
- Per-shop encrypted access + refresh token storage, auto-refresh
- "Lookup TO number" auto-populates customer, company, line items, address
- ACCOUNT_CREDIT and CREDIT_NOTE resolution methods skip Shopify refund
- trade_return.* webhooks signed with HMAC-SHA256 (created, status_changed, credit_requested, resolved)
- Signed-JWT customer portal redirect for B2B self-service
- API-key fallback for pre-OAuth-deployment testing
How merchants use it.
Admin-initiated trade return
From /create-trade the admin enters a TOxxxxxx number, clicks Lookup, and the form auto-populates with company name, customer email, shipping address, and line items from TradeMate. Pick a reason, submit, and the RMA enters the standard return workflow.
Customer portal redirect
Customer clicks "Return this" inside a TradeMate portal → signed JWT redirects to ReturnMate → pre-filled return form → submit creates the RMA. Single sign-in, no second identity check.
Credit webhooks for financial reconciliation
When an admin resolves a trade RMA with ACCOUNT_CREDIT or CREDIT_NOTE, a trade_return.credit_requested webhook fires to TradeMate with amount, line items, currency, and tenant metadata. TradeMate creates the authoritative credit record; ReturnMate stays the RMA system of record.
Connect TradeMate in minutes.
- 1
Enable on ReturnMate side
Settings → Integrations → TradeMate. Enter your tenant API URL (e.g. https://acme.admin.matehq.com.au). Click Connect to TradeMate — popup runs OAuth → tokens stored encrypted.
- 2
Provision an inbound API key
Settings → External API. Generate a key for TradeMate so their side can call our /external/v1/trade-returns endpoints. Copy the key + webhook secret once (never shown again).
- 3
(Optional) Portal redirect secret
Generate a shared HS256 secret in the TradeMate section for the customer portal redirect flow. Paste the same value into TradeMate's admin so both sides can verify signed tokens.
Questions about TradeMate.
Is TradeMate required to use ReturnMate?
No. TradeMate is optional — enable only if you need B2B trade returns alongside Shopify. Shopify-only merchants skip this integration entirely.
How are OAuth URLs resolved for multi-tenant TradeMate?
ReturnMate derives /oauth/authorize and /oauth/token from the apiUrl host (e.g. acme.admin.matehq.com.au). Per-tenant subdomains mean the merchant's existing session cookie is reused — no central OAuth host, no cross-tenant consent confusion.
What happens to a trade RMA if I refund through Shopify instead?
Trade RMAs are gated at the resolution step — Shopify refund options are hidden and only ACCOUNT_CREDIT / CREDIT_NOTE appear. This prevents accidental double-credit across the two financial systems.
Ready to connect TradeMate?
14-day free trial. No credit card required. Billed through Shopify.