Beans
ProductsPricingBlog
  • 🚀Getting Started
  • Members
    • Add a member
    • Adjust a member's balance
    • Deactivating a member
    • Import members
    • Custom fields
      • Custom fields on registration
  • rewards
    • Rules
      • Registration
      • Loyalty
      • Cart Booster
      • Facebook Page Like
      • Twitter Follow
      • Instagram Follow
      • Refer a friend
      • Accept referral Invitation
      • Inactivity
      • Celebration
      • Expiration
      • Birthday
    • Tiers
    • Display
      • Redemption block
    • Redemption
      • Redeem points
      • Pending Debits
      • Redemption rate
      • Redemption conditions
      • Buy products with points
      • Redemption issues
    • FAQ
      • How are loyalty revenues generated?
      • Adding Custom CSS
      • Disable checkout auto-redirect
      • Enrollment of customers in the rewards program
      • Why do rules have minimum points?
      • Loyalty points calculation
  • Referrals
    • Getting started
    • Rules
      • Accept Invitation
      • Successful Referral
    • Display
      • Link your referral page to your Shopify store.
      • Link your referral page to your Woocommerce store.
    • Conditions
    • Referrals
    • FAQ
      • Adding Custom CSS
      • Why registration is enforced for referrals.
      • Can Bamboo be used for affiliate marketing?
      • How to test Bamboo?
  • Emails
    • Rules
      • Loyalty â–¸ Welcome
      • Loyalty â–¸ Balance reminder
      • Loyalty â–¸ New transaction
      • Loyalty â–¸ Post-purchase invitation
      • Referral â–¸ Invitation
      • Referral â–¸ Referrer reward
      • Referral â–¸ Friend reward
    • Campaigns
    • Sender email
    • FAQ
      • Replacement tags
      • Sender address
      • Gmail's warning messages
      • Testing email notifications
  • More Apps
    • Social Connect
      • Display
    • Widget
      • Messages
  • INTEGRATIONS
    • Getting Started with Integrations
    • Shopify
      • Referencing Shopify pages
      • Enable customer accounts
      • Template Migration
      • Shopify OS 2.0
      • Using discount codes with redemption
      • Shopify POS
      • Shopify Limitations
      • Uninstallation
      • Shopify customers tags
    • Woocommerce
      • Account Synchronization
      • Referencing WooCommerce pages
      • Setting up permalinks
      • Edit Beans pages
      • Updating your shop domain
      • Manually Installing Beans
      • Reset and reconnect
      • Caching issues
      • Connection Issues
    • Facebook Integration
    • Judge.me Integration
    • Mailchimp Integration
    • Omnisend Integration
    • Sendinblue Integration
    • Weglot Integration
    • API
      • Webhooks
      • Storefront
  • Settings
    • General
    • App activation
    • Plan & Billing
      • Account Suspension
      • List of plans
      • Refund Policy
      • Supported currencies
    • Team access
    • Live Testing
  • FAQ
    • Limitations
    • Phone Support
    • Why is Beans better than the other options?
    • What will my customers see?
    • Can I reach an engineer to talk about technical issues?
    • POS Support
    • Security
    • Terms of Service
    • Privacy Policy
    • GDPR
Powered by GitBook
On this page
  • Customer Webhook
  • Order Webhook

Was this helpful?

  1. INTEGRATIONS
  2. API

Webhooks

Setting up Beans Webhooks for your online shop

Incoming webhooks are a simple way to let Beans know about new events in your shop, such as when a customer completes an order so that they can be rewarded for their loyalty. They are simple URLs to which you send a JSON payload with the message text and some options.

Customer Webhook

Customer Webhook is to let Beans know when a new customer registers in your shop. To post new customer information to Beans just use an HTTP POST request like this one:

Customer data

{
    "id": 1847,
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@example.com",
    "is_newsletter": True,
    "tags": ["loyal", "paying"],
    "created_at": "2020-02-06T12:49:47-05:00",
    "updated_at": "2022-02-06T12:49:47-05:00",
}

Create or update a customer

curl https://hooks.radix.trybeans.com/v3/hook/radix/vanilla/customer/hook_created \
  --request POST \
  --user :sk_xxxxxxxxxxxxxxxxx \
  --header "Content-Type: application/json" \
  --data '<<customer_data>>'

Delete a customer

curl https://hooks.radix.trybeans.com/v3/hook/radix/vanilla/customer/hook_deleted \
  --request POST \
  --user :sk_xxxxxxxxxxxxxxxxx \
  --header "Content-Type: application/json" \
  --data '<<customer_data>>'

Order Webhook

Order Webhook is to let Beans know when a new order is placed in your shop. To post new order information to Beans just use an HTTP POST request like this one:

Order data

An order can contain a customer object.

order_data = {
    "id": 13207,
    "currency": "USD",
    "email": "john.doe@example.com",
    "ref": "13207",
    "total": "53.00",
    "subtotal": "33.00",
    "amount_shipping": "20.00",
    "amount_giftcard": "0.00",
    "amount_tax": "0.00",
    "cancelled_at": None,
    "processed_at": "2022-02-06T12:49:47-05:00",
    "is_fulfilled": False,
    "is_refunded": True,
    "is_paid": True,
    "customer": {
        "id": 1847,
        "first_name": "John",
        "last_name": "Doe",
        "email": "john.doe@example.com",
        "is_newsletter": True,
        "tags": ["loyal", "paying"],
        "created_at": "2020-02-06T12:49:47-05:00",
        "updated_at": "2022-02-06T12:49:47-05:00",
    }
}

Create or update an order

curl https://hooks.radix.trybeans.com/v3/hook/radix/vanilla/order/hook_created \
  --request POST \
  --user :sk_xxxxxxxxxxxxxxxxx \
  --header "Content-Type: application/json" \
  --data '<<order_data>>'

PreviousAPINextStorefront

Last updated 3 years ago

Was this helpful?