Transaction-Related Push Notifications
Transaction-related push notifications inform users about order and payment activity in your Sharetribe marketplace.
These notifications are critical for keeping users updated about transactions in real time.
What Are Transaction Push Notifications?
Transaction push notifications are sent when events related to transactions occur, such as:
- Transaction created
- Transaction updated
- Transaction completed
- Transaction cancelled
Each event triggers a one-time push notification to the relevant user.
Create Zap for Transaction Events
Create this Zap only if you want push notifications for transaction-related events.
Step 1: Create a New Zap
- Click Create Zap
Step 2: Select Sharetribe as Trigger App
- Choose Sharetribe
- Select Transaction Events

- Connect your Sharetribe account
- Click Continue
- Choose any Event Type

- Test the trigger
Step 3: (Optional) Run JavaScript Logic
This step identifies who should receive the notification.
- Add a new step → Code by Zapier
- Choose Run Javascript
Input Data
| Field Name | Value |
|---|---|
| customerId | Transaction → Customer → ID |
| providerId | Transaction → Provider → ID |
Code Snippet
return {
notifyUserId: inputData.providerId,
sendNotification: true
};
🔹 In Sharetribe, the customer always initiates the transaction, so the provider is the opposite user.
Step 4: Fetch User Details (Optional)
- Add action → Sharetribe
- Choose Show User
- Map User ID →
notifyUserId(from Code step) - Test the step
🔹 This step fetches user details required for sending notifications.
Step 5: Filter Conditions (Recommended)
- Add Filter by Zapier
- Allow Zap to continue only if
app_idexists - This ensures notifications are sent only to valid Twinr users
Step 6: Send Push Notification to Twinr
- Add Webhooks by Zapier
- Choose POST / GET / PUT / Custom Request
- Enter the Twinr Webhook Endpoint
Headers
The endpoint authenticates with an account secret. Under Headers, add:
| Key | Value |
|---|---|
Authorization |
Bearer twnr_live_... |
Create the secret at My Profile → Account secrets, scoped to this app. It is shown once, when you create it — copy it before closing the dialog. See Account Secrets.
Anyone holding the secret can send notifications that appear to come from your app. It belongs in Zapier and on your own servers, never in a web page.
Request Body (API Payload)
{
"application_id": "string",
"click_action": {},
"push_image": "string",
"push_message": "string",
"push_title": "string",
"push_tokens": [
"string"
]
}
Field description (API-aligned, concise):
- application_id – Your Twinr app ID. Map it from Show User → Metadata → app_id (Step 4), or copy it from the address bar when your app is open in the Twinr Builder. Required.
- push_title – Title text displayed in the push notification.
- push_message – Body message of the push notification.
- push_image – (Optional) Image URL to be displayed in the notification.
- click_action – Defines the action or screen to open when the user taps the notification.
- push_tokens – List of device tokens that should receive the push notification. Map it from Show User → Metadata → device_push_token (Step 4).
- Map transaction data
- Test successfully
Step 7: Publish Zap
- Click Publish
- Transaction event notifications are now enabled
Alternative: Store the Token Yourself
By default, Twinr writes the device token to the user's Sharetribe profile metadata, and the Zap reads it with Show User. If you prefer to manage the token yourself, call twinr_push_token_fetch() on your marketplace page and save the returned token to the user's own profile data in your own code. Then map that field in the Zap instead of metadata.device_push_token. See Push Notification - Device Token.
Twinr writes the token for you only when your app is built with the latest Twinr version and has a paid app subscription. The JS bridge needs Personalized Push Notification enabled.
Final Notes
- Listing and Transaction Zaps are optional
- Each Zap triggers one push notification
- Only published Zaps will work
- Login Script & Firebase are mandatory