Adding Webhooks

This article shows how to integrate webhooks in your Teachable school on the Basic plan and up.

What are Webhooks?

Webhooks are an easy way to send information from one app to another. They can be configured in a way that will invoke behavior on another website.

You can create your own webhook to integrate into your Teachable school. There are eleven kinds of events that can be added with webhooks:

  1. New users join your school
  2. Users update their contact information
  3. New sales
  4. Transactions for one-time/recurring payments
  5. Student cancels a subscription
  6. Enrollment is created
  7. Lecture completions
  8. Lecture Progress Created (user completes a lecture)
  9. Response Created (user completes a graded quiz)
  10. Comment Created
  11. Transaction Refunded

NOTE: using Webhooks is a more advanced feature of Teachable. 

Adding a Webhook on Your Teachable School

  1. Log into your Teachable school.
  2. Select Settings from the admin sidebar.
  3. Click Webhooks. webhooks submenu
  4. Select New Webhook. add new webhook
  5. Enter a valid Webhook URL from a third-party application and select an Event Type from the list. Set the Send as JSON Array toggle to On if your integration needs that data format. Learn more about how to set up third-party Teachable integrations hereNew_Webhook___Admin_2.png

    NOTE: Make sure you include the correct web protocol (https or http) in your Webhook URL.

  6. Click the orange Create Webhook button at the bottom.

Your webhook is now set up! When the event type you chose occurs, it will fire off a webhook event and the status of your webhook will change from “pending" to “verified." 

Editing and Deleting Webhooks

To edit a webhook, click the teal pencil icon on the main webhooks page.edit webhook

There, you can change the URL, event type, and JSON array toggle, and view the webhook's trigger history. In the trigger history you will see whether the webhook was executed successfully or unsuccessfully each time it was triggered.

Edit_Webhook___Admin.png

If a webhook fails four times, it will be automatically disabled. If this happens, you can manually enable it from the edit page. This is what a failed webhook's edit page will look like:

failed webhook

To delete a webhook, click the red trash icon on the main webhooks page. delete webhook

Data Returned From Webhooks

If you'd like to see the test data for any event type as a JSON response:

  1. Log into the school for which you would like to view the test data.
  2. In your browser URL box, go to [SCHOOL_URL].teachable.com/api/v1/hooks/example?event_type=[EVENT.TYPE]. You'll have to replace [SCHOOL_URL] with the URL of your school, and [EVENT.TYPE] with the event type you would like to see the test data for (i.e. User.updated, Enrollment.created, etc.

    For example, if you would like to see the test data for a new sale for a school at designacademy.teachable.com, you would enter "designacademy.teachable.com/api/v1/hooks/ example?event_type=sale.created" into the URL box.

NOTE: You must run the relevant webhook at least once in your school to view the test data. For example, if you'd like to see the test data for new sales, there must be at least one instance where the New Sales webhook was used in your school.

Listed below are examples of the test data that would be returned for a variety of event types:

 

Lecture Completions

[
{
 "type": "lectureprogress.created",
 "object": "event",
 "id": 1,
 "livemode": false,
 "created": 628232405,
 "data": {
   "object": {
     "id": 1,
     "is_completed": true,
     "course_id": 1,
     "lecture_id": 1,
     "school_id": 1,
     "course": {
       "id": 1
     },
     "lecture": {
       "id": 1
     },
     "user": {
       "id": 1,
       "role": "student",
       "email": "student@example.com"
     },
     "object": "lectureprogress",
     "created": 628232405,
     "livemode": false
   }
 }
}
]

New Sales

[

{
 "created": 1326853478,
 "livemode": false,
 "id": 345,
 "type": "sale.created",
 "object": "event",
 "data": {
   "object": {
     "object": "sale",
     "school_id": 1,
     "created": 1405501752,
     "id": 495,
     "price": 400,
     "currency": "USD",
     "product_id": 47,
     "course_id": 47,
     "is_active": true,
     "livemode": false,
     "is_recurring": false,
     "user_id": 1,
     "product": {
       "id": 47,
       "name": "foo"
     },
     "course": {
       "id": 47,
       "name": "foo"
     },
     "user": {
       "id": 1,
       "email": "foo@example.com"
     }
   }
 }
}

]
]

New Users Join Your School

[

{
 "type": "user.created",
 "object": "event",
 "id": 1,
 "livemode": false,
 "created": 628232400,
 "data": {
   "object": {
     "id": 1,
     "role": "student",
     "email": "student@example.com",
     "name": "John Doe",
     "school_id": 1,
     "object": "user",
     "created": 628232400,
     "livemode": false,

}
 }
}

]
]

Transactions for One-time/Recurring Sales

[

{
 "type": "transaction.created",
 "object": "event",
 "id": 1,
 "livemode": false,
 "created": 628232401,
 "data": {
   "object": {

"id": 12345,

"price": 4900,

"currency": "USD",

"is_active": true,

"is_recurring": false,

"user_id": 1,

"school_id": 12345,

"course": {

"id": 12345,

"name": "AngularJS: Fundamentals",

"url": "http://school.codecraftpro.com/courses/angularjs-1x-fundamentals"

},

"product": {

"id": 29514,

"is_recurring": false,

"price": 4900,

"name": "Paid Course",

"currency": "USD"

},

"user": {

"id": 667725,

"role": "guest",

"email": "jmonteroc@gmail.com",

"name": "John Montero",

"school_id": 12345,

"src": null,

"first_touch": null,

"last_touch": null,

"last_sign_in_at": "2015-09-16T15:58:01Z",

"sign_in_count": 2

},

"coupon": {

"calculate_discount_amount": 4900,

"calculate_final_price": 0,

"calculate_percent_off": 100,

"usable?": true,

"id": 10424991,

"school_id": 17424,

"discount_percent": 1.0,

"discount_amount": null,

"number_available": 9868,

"code": "SOCIAL100",

"name": null,

"expiration_date": "2017-09-15",

"product_id": 12345,

"is_published": true,

"duration_kind": "once",

"currency": "USD",

"discount_in_months": null,

"number_of_uses": 132,

"is_single_use": false,

"class_period_id": null,

"meta": {

"class": "coupon",

"url": null,

"name": null,

"description": null,

"image_url": null

},

"product": {

"currency_symbol": "$",

"formatted_price": "$49",

"accepts_paypal?": true,

"effective_author_revenue_share": 0.0,

"id": 29514,

"name": "Paid Course",

"description": null,

"billing_interval": "f",

"created_at": "2015-09-14T22:08:41Z",

"detailed_description": null,

"currency": "USD",

"position": 4,

"price": 4900,

"cc_statement_description": "cc description",

"is_recurring": false,

"is_published": true,

"course_id": 28017,

"author_revenue_share": null,

"meta": {

"class": "product",

"url": "/courses/28017/products/29514",

"name": "Paid Course",

"description": null,

"image_url": null

}

}

},

"affiliate": {

"id": 667725,

"role": "guest",

"email": "jmonteroc@gmail.com",

"name": "John Montero",

"school_id": 12345,

"src": null,

"first_touch": null,

"last_touch": null,

"last_sign_in_at": "2015-09-16T15:58:01Z",

"sign_in_count": 2

}

}
 }
}

]
]

Users Update Their Profiles

[
{
 "type":"User.updated",
      "id":1234567,
      "livemode":true,
      "created":"2017-05-15T18:49:45+00:00",
      "hook_event_id":1,
      "object":{  
         "id":1234567,
         "role":"student",
         "email":"test@teachable.com",
         "name":"john doe",
         "school_id":12345,
         "src":null,
         "first_touch":null,
         "last_touch":null,
         "last_sign_in_at":"2017-04-11T17:58:41Z",
         "sign_in_count":2,
         "unsubscribe_from_marketing_emails":null,
         "old_email":"test@teachable.com",
         "new_email":"test@teachable.com",
         "old_name":"john doe",
         "new_name":"john doe"
  }
}
]
 

Student Cancels A Subscription

[

{
       "type" => "Sale.subscription_canceled",
         "id" => 4242424242,
   "livemode" => "true",
    "created" => "2016-03-24T11:26:30-04:00",
     "object" => {
                 "id" => 1289757,
              "price" => 1000,
           "currency" => "USD",
          "is_active" => false,
       "is_recurring" => true,
            "user_id" => 4567,
          "school_id" => 1234,
        "final_price" => 1000,
             "course" => {
             "id" => 686868,
           "name" => "How To Groove: A Songwriter's Guide To Drum-Writing",
            "url" => "http://holistic-songwriting.teachable.com/courses/how-to-groove"
       },
            "product" => {
                     "id" => 73593,
           "is_recurring" => true,
                  "price" => 1000,
                   "name" => "Monthly Payment (12 months)",
               "currency" => "USD"
       },
               "user" => {
                        "id" => 4567,
                      "role" => "guest",
                     "email" => "test@testing.com",
                      "name" => "Barry",
                 "school_id" => 1234,
                       "src" => nil,
               "first_touch" => nil,
                "last_touch" => nil,
           "last_sign_in_at" => "2016-03-08T19:31:05Z",
             "sign_in_count" => 6
       },
             "coupon" => nil,
          "affiliate" => nil,
       "transactions" => [
           [0] {
                   "custom_gateway?" => nil,
                   "fully_refunded?" => false,
                                "id" => 166020,
                           "user_id" => 4567,
                         "school_id" => 1234,
                        "created_at" => "2016-02-08T18:39:32Z",
                        "updated_at" => "2016-03-08T18:40:32Z",
                       "final_price" => 1000,
                          "currency" => "USD",
                 "affiliate_percent" => nil,
                    "author_percent" => 0.0,
                         "author_id" => nil,
                    "fedora_percent" => 0.1,
               "total_processor_fee" => 59,
                   "amount_refunded" => 0,
                            "status" => "paid",
                    "affiliate_fees" => 0,
                       "author_fees" => 0,
                         "coupon_id" => nil,
                        "net_charge" => 1000,
                      "earnings_usd" => 747,
                    "net_charge_usd" => 1000,
                        "fedora_fee" => 1,
                  "total_fedora_fee" => 194,
                   "net_revenue_usd" => 747,
                      "purchased_at" => "2016-02-08T18:39:32Z",
                        "refundable" => true,
                          "vat_fees" => 0,
                     "is_chargeback" => nil,
                              "meta" => {
                         "class" => "transaction",
                           "url" => nil,
                          "name" => nil,
                   "description" => nil,
                     "image_url" => nil
         }

     }

  }

]
]

Enrollment Created

[

  {

     "type":"Enrollment.created",

     "id":1,

     "livemode":"true",

     "created":"2016-08-08T10:38:24-04:00",

     "hook_event_id":31,

     "object":{

        "created_at":null,

        "coupon":null,

        "user_id":1,

        "course_id":2,

        "primary_course_id":2,

        "sale_id":1,

        "is_active":true,

        "enrolled_at":"2016-08-08T14:38:24Z",

        "percent_complete":0.0,

        "has_full_access":false,

        "id":1,

        "meta":{

           "class":"enrollment",

           "url":null,

           "name":"1",

           "description":null,

           "image_url":null

        },

        "course":{

           "created_at":"2016-08-05T20:38:32Z",

           "path":"/courses/good-course",

           "safe_image_url":"//d6xfpzo6h49n1.cloudfront.net/O3FPQEI9tlnWDtlA0vVKvDA8gLM=/fit-in/705x0/https://d3gvvapon6fqzo.cloudfront.net/icons/default-course-image.png",

           "default_product_formatted_price":"$10",

           "has_published_lecture":false,

           "has_published_product":true,

           "promo_video":null,

           "name":"Good course",

           "heading":null,

           "page_title":"Good course",

           "meta_description":null,

           "friendly_url":"good-course",

           "description":null,

           "author_bio_id":1,

           "position":0,

           "conversion_pixels":null,

           "closing_letter":null,

           "image_url":null,

           "hero_image_url":"https://d3gvvapon6fqzo.cloudfront.net/bg/default-hero.png",

           "is_published":false,

           "bundled_courses_count":0,

           "child_course_ids":[

           ],

           "preenrollment_call_to_action":"Sign up to get this course when it launches",

           "is_open":true,

           "is_accepting_preenrollments":false,

           "use_old_course_page":null,

           "purchase_redirect_url":null,

           "skip_thank_you_page":null,

           "onboarded_at":null,

           "id":2,

           "meta":{

              "class":"course",

              "url":"/courses/2/",

              "name":"Good course",

              "description":null,

              "image_url":null

           },

           "categories":[

           ],

           "author_bio":{

              "created_at":"2016-08-03T04:03:58Z",

              "headline":"Da Boss",

              "profile_image_url":null,

              "bio":"Bacon ipsum dolor amet shankle ham pork belly jowl.",

              "position":null,

              "user_id":2,

              "name":"Noah",

              "id":1,

              "meta":{

                 "class":"authorbio",

                 "url":"/author_bios/1",

                 "name":"Noah",

                 "description":null,

                 "image_url":null

              }

           }

        },

        "user":{

           "created_at":"2016-08-03T04:03:58Z",

           "Role":"owner",

"gravatar_url":"https://s.gravatar.com/avatar/4cb1f144288e5d61695b0d3f9c63835c?d=mm\u0026s=70",

"email":"owner@example.com",

           "notes":null,

           "affiliate_code":"1_12orpy2s",

           "name":"John Doe",

           "is_owner":true,

           "sign_in_count":7,

           "is_student":true,

           "is_affiliate":false,

           "is_author":false,

           "src":null,

           "current_sign_in_at":"2016-08-05T20:17:15Z",

           "last_four":null,

           "paypal_email":"owner@example.com",

           "affiliate_revenue_share":null,

           "joined_at":"2016-08-03T14:13:37Z",

           "transactions_gross":0,

           "signed_up_affiliate_code":null,

           "author_revenue_share":0.0,

           "last_sign_in_ip":"::1",

           "current_sign_in_ip":"::1",

           "id":1,

           "school_id":1,

           "meta":{

              "class":"user",

              "url":null,

              "name":"John Doe",

              "description":"owner@example.com",

"image_url":"https://s.gravatar.com/avatar/4cb1f144288e5d61695b0d3f9c63835c?d=mm\u0026s=100"

   },

           "author_bio_id":null,

           "total_sales":0,

           "author_bio":null

        }

     }

  }

]
]

Lecture Progress Created (user completes a lecture)

[
  {
     "type":"LectureProgress.created",
     "id":45454545454,
     "livemode":true,
     "created":"2016-08-31T16:54:47+00:00",
     "hook_event_id":1,
     "object":{
        "id":54545454545,
        "is_completed":true,
        "course_id":444444,
        "lecture_id":32322,
        "school_id":859,
        "percent_complete":21.0,
        "course":{
           "id":232323232,
           "name":"The Profitable Teacher",
           "url":"http://academy.teachable.com/courses/the-profitable-teacher"
        },
        "user":{
           "id":111111,
           "role":"student",
           "email":"test@gmail.com",
           "name":"Test Wilson",
           "school_id":859,
           "src":null,
           "first_touch":null,
           "last_touch":null,
           "last_sign_in_at":"2016-08-28T18:07:23Z",
           "sign_in_count":10
        },
        "lecture":{
           "id":43444344444,
           "name":"Lead Magnet #1: The \"Checklist\"",
           "is_published":true
        }
     }
  }
]
]

Response Created (User Completes a graded quiz)

[
  {
     "type":"Response.created",
     "id":3333333,
     "livemode":true,
     "created":"2016-08-31T16:56:00+00:00",
     "hook_event_id":1,
     "object":{
        "id":323232,
        "user_id":33333,
        "custom_form_id":122,
        "answers":{
           "answer-1":[
              "Make a quiz"
           ],
           "answer-2":[
              "Ankur"
           ]
        },
        "created_at":"2016-08-28T08:14:03Z",
        "updated_at":"2016-08-28T08:14:22Z",
        "school_id":859,
        "submitted_at":"2016-08-28T08:14:22Z",
        "grade":{
           "total":2,
           "correct":1,
           "answered":2,
           "remaining":0,
           "percent_correct":0.5,
           "percent_answered":1.0
        },
        "custom_form":{
           "id":122,
           "type":"Quiz",
           "topic_id":3333334,
           "topic_type":"Attachment",
           "data":{
              "graded":true,
              "answerKey":{
                 "answer-1":[
                    "Make a quiz"
                 ],
                 "answer-2":[
                    "Conrad",
                    "Ankur"
                 ]
              }
           },
           "school_id":859,
           "is_published":false,
           "identifier":null,
           "created_at":"2015-06-08T17:05:26Z",
           "updated_at":"2015-06-08T17:50:23Z",
           "schema":{
              "type":"object",
              "required":[
                 "answer-1",
                 "answer-2"
              ],
              "properties":{
                 "answer-1":{
                    "enum":[
                       "Make a quiz",
                       "Start a blog",
                       "Create an email campaign"
                    ],
                    "type":"string",
                    "title":"What is one of the easiest ways to engage your audience?"
                 },
                 "answer-2":{
                    "enum":[
                       "Conrad",
                       "Ankur",
                       "Oprah Winfrey"
                    ],
                    "type":"string",
                    "title":"Who are the founders of Fedora?"
                 }
              }
           },
           "attachment":{
              "id":22222222,
              "attachable_type":"Lecture",
              "attachable_id":22222222,
              "kind":"quiz"
           }
        },
        "user":{
           "id":22222222,
           "role":"student",
           "email":"thedrumboostermail@gmail.com",
           "name":"Ruggero",
           "school_id":859,
           "src":null,
           "first_touch":null,
           "last_touch":null,
           "last_sign_in_at":"2016-08-30T07:51:52Z",
           "sign_in_count":46
        }
     }
  }
]

Comment Created

[
   {
      "type":"Comment.created",
      "id":214950,
      "livemode":true,
      "created":"2017-05-15T18:53:43+00:00",
      "hook_event_id":1,
      "object":{
         "id":214950,
         "user_id":3119253,
         "school_id":69842,
         "created_at":"2017-01-19T17:39:02Z",
         "updated_at":"2017-01-19T17:39:02Z",
         "user":{
            "id":3119253,
            "role":"student",
            "email":"johnandmary@gmail.com",
            "name":"John Smith \u0026 Mary Jones",
            "school_id":69842,
            "src":null,
            "first_touch":null,
            "last_touch":null,
            "last_sign_in_at":"2017-01-19T17:38:48Z",
            "sign_in_count":11,
            "unsubscribe_from_marketing_emails":null
         },
         "commentable":{
            "created_at":"2017-01-19T17:30:13Z",
            "plain_text_html":"",
            "content_type":null,
            "audio_type":null,
            "should_be_uploaded_to_wistia?":false,
            "data":null,
            "schema":null,
            "url":null,
            "host_id":null,
            "source":"user",
            "kind":"native_comments",
            "name":null,
            "host":null,
            "position":1,
            "attachable_id":2034508,
            "is_published":true,
            "downloadable":false,
            "text":null,
            "attachable_type":"Lecture",
            "thumbnail_url":null,
            "embeddable":true,
            "id":3910132,
            "meta":{
               "class":"attachment",
               "url":null,
               "name":null,
               "description":null,
               "image_url":null
            }
         }
      }
   }
]

Transaction Refunded

[
   {
      "type":"Transaction.refunded",
      "id":867110,
      "livemode":true,
      "created":"2017-05-15T18:57:24+00:00",
      "hook_event_id":1,
      "object":{
         "id":867110,
         "user_id":4831317,
         "school_id":5783,
         "final_price":500,
         "currency":"USD",
         "affiliate_percent":null,
         "author_percent":0.0,
         "fedora_percent":0.2,
         "amount_refunded":500,
         "status":"paid",
         "is_recurring":false,
         "sale_id":5810934,
         "coupon_id":null,
         "net_charge":0,
         "stripe_charge_token":"ch_AY0FKRtbaknGkg",
         "net_charge_usd":0,
         "fedora_fee":0,
         "net_revenue_usd":0,
         "processor_fee_description":null,
         "affiliate_fees":0,
         "earnings_usd":0,
         "paypal_payment_id":null,
         "legacy_id":null,
         "purchased_at":"2017-04-26T17:47:53Z",
         "author_fees":0,
         "stripe_invoice_id":null,
         "stripe_event_id":null,
         "refunder_id":2184202,
         "processor_fee":0,
         "total_fedora_fee":0,
         "is_chargeback":null,
         "is_stripe_connect":null,
         "author_id":null,
         "credential_id":null,
         "is_custom_paypal":null,
         "data":{
            "id":"ch_AY0FKRtbaknGkg",
            "paid":true,
            "order":null,
            "amount":500,
            "object":"charge",
            "review":null,
            "source":{
               "id":"card_AY0FxSi8RQOeB5",
               "name":null,
               "brand":"Visa",
               "last4":"3649",
               "object":"card",
               "country":"US",
               "funding":"debit",
               "customer":"cus_AY0FVVai6WZzXI",
               "exp_year":2020,
               "metadata":{

               },
               "cvc_check":"pass",
               "exp_month":6,
               "address_zip":null,
               "fingerprint":"fP9eBiwm0Vv87jVC",
               "address_city":null,
               "address_line1":null,
               "address_line2":null,
               "address_state":null,
               "dynamic_last4":null,
               "address_country":null,
               "address_zip_check":null,
               "address_line1_check":null,
               "tokenization_method":null
            },
            "status":"succeeded",
            "created":1493228874,
            "dispute":null,
            "invoice":null,
            "outcome":{
               "type":"authorized",
               "reason":null,
               "risk_level":"normal",
               "network_status":"approved_by_network",
               "seller_message":"Payment complete."
            },
            "refunds":{
               "url":"/v1/charges/ch_AY0FKRtbaknGkg/refunds",
               "data":[
                  {
                     "id":"re_AY0GAxB9SEbnZT",
                     "amount":500,
                     "charge":"ch_AY0FKRtbaknGkg",
                     "object":"refund",
                     "reason":null,
                     "status":"succeeded",
                     "created":1493228931,
                     "currency":"usd",
                     "metadata":{

                     },
                     "receipt_number":null,
                     "balance_transaction":{
                        "id":"txn_AY0GA2XjmR7MOE",
                        "fee":-43,
                        "net":-457,
                        "type":"refund",
                        "amount":-500,
                        "object":"balance_transaction",
                        "source":"ch_AY0FKRtbaknGkg",
                        "status":"pending",
                        "created":1493228931,
                        "currency":"usd",
                        "description":"REFUND FOR CHARGE (Paid Course)",
                        "fee_details":[
                           {
                              "type":"stripe_fee",
                              "amount":-43,
                              "currency":"usd",
                              "application":null,
                              "description":"Stripe processing fee refund"
                           }
                        ],
                        "available_on":1493337600,
                        "sourced_transfers":{
                           "url":"/v1/transfers?source_transaction=re_AY0GAxB9SEbnZT",
                           "data":[

                           ],
                           "object":"list",
                           "has_more":false,
                           "total_count":0
                        }
                     }
                  }
               ],
               "object":"list",
               "has_more":false,
               "total_count":1
            },
            "captured":true,
            "currency":"usd",
            "customer":"cus_AY0FVVai6WZzXI",
            "livemode":true,
            "metadata":{
               "name":"mack",
               "email":"mike+another-test@teachable.com",
               "country":"US",
               "sale_id":"5810934",
               "user_id":"4831317",
               "school_id":"5783",
               "product_id":"300137",
               "course_name":"Bundle Course",
               "product_name":"Paid Course"
            },
            "refunded":true,
            "shipping":null,
            "application":null,
            "description":"Paid Course",
            "destination":null,
            "failure_code":null,
            "on_behalf_of":null,
            "fraud_details":{

            },
            "receipt_email":null,
            "receipt_number":null,
            "transfer_group":null,
            "amount_refunded":500,
            "application_fee":null,
            "failure_message":null,
            "source_transfer":null,
            "balance_transaction":{
               "id":"txn_AY0GPvRLx8rVIh",
               "fee":43,
               "net":457,
               "type":"charge",
               "amount":500,
               "object":"balance_transaction",
               "source":"ch_AY0FKRtbaknGkg",
               "status":"pending",
               "created":1493228914,
               "currency":"usd",
               "description":"Paid Course",
               "fee_details":[
                  {
                     "type":"stripe_fee",
                     "amount":43,
                     "currency":"usd",
                     "application":null,
                     "description":"Stripe processing fees"
                  }
               ],
               "available_on":1493337600,
               "sourced_transfers":{
                  "url":"/v1/transfers?source_transaction=ch_AY0FKRtbaknGkg",
                  "data":[

                  ],
                  "object":"list",
                  "has_more":false,
                  "total_count":0
               }
            },
            "statement_descriptor":"This works now?"
         },
         "vat_fees":0,
         "usd_conversion_rate":null,
         "school_plan_id":3,
         "sale":{
            "id":5810934,
            "price":500,
            "currency":"USD",
            "is_active":true,
            "is_recurring":false,
            "user_id":4831317,
            "school_id":5783,
            "final_price":500,
            "course":{
               "id":82791,
               "name":"Bundle Course",
               "url":"http://faheyhalvorsonharber.teachable.com/courses/82791",
               "friendly_url":"terms",
               "meta_description":"master cleanse DIY",
               "description":"\u003cp\u003e\u003cbr\u003e\n\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"http:google.com\u0026quot;\u0026gt;\u0026lt;/a\u0026gt; \u0026lt;script\u0026gt;alert(\u0026quot;xss\u0026quot;);\u0026lt;/script\u0026gt;\u0026lt;a href=\u0026quot;http://google.com\"\u003enice job garfield\u003c/a\u003e\u003cbr\u003e\n\u003c/p\u003e\n\u003cp\u003efff\n\u003c/p\u003e\n\u003cp\u003exxx{{ course}}\n\u003c/p\u003e\n\u003cp\u003e{{current_user}}\n\u003c/p\u003e\n\u003cp\u003eThis is great!!!! Ooooo no obama\n\u003c/p\u003e\n\u003cscript src=\"https://zapier.com/zapbook/embed/widget.js?services=teachable\u0026limit=6\"\u003e\u003c/script\u003e\n\u003cscript\u003e$(document).ready(function(){\n  if ($(\".enrolled-in-course-alert\").length \u0026gt; 0 ) {\n    window.location = \"http://google.com\"\n  }\n});\n\u003c/script\u003e",
               "author_bio":{
                  "created_at":"2015-03-09T16:08:46Z",
                  "headline":"foasdf",
                  "profile_image_url":null,
                  "bio":null,
                  "position":null,
                  "user_id":null,
                  "name":"Reggie Bush",
                  "id":5083,
                  "meta":{
                     "class":"authorbio",
                     "url":"/author_bios/5083",
                     "name":"Reggie Bush",
                     "description":null,
                     "image_url":null
                  }
               }
            },
            "product":{
               "id":300137,
               "is_recurring":false,
               "price":500,
               "name":"Paid Course",
               "currency":"USD"
            },
            "user":{
               "id":4831317,
               "role":"student",
               "email":"mike+another-test@teachable.com",
               "name":"mack",
               "school_id":5783,
               "src":null,
               "first_touch":null,
               "last_touch":null,
               "last_sign_in_at":"2017-04-26T17:47:20Z",
               "sign_in_count":2,
               "unsubscribe_from_marketing_emails":null
            },
            "coupon":null,
            "affiliate":{
               "id":250053,
               "role":"affiliate",
               "email":"poage@usefedora.com",
               "name":"Mike Poage",
               "school_id":5783,
               "src":null,
               "first_touch":null,
               "last_touch":null,
               "last_sign_in_at":"2015-02-03T17:43:29Z",
               "sign_in_count":1,
               "unsubscribe_from_marketing_emails":null
            },
            "transactions":[
               {
                  "created_at":"2017-04-26T17:47:55Z",
                  "custom_gateway?":null,
                  "fully_refunded?":true,
                  "is_stripe_connect?":false,
                  "is_custom_paypal?":false,
                  "user_id":4831317,
                  "final_price":500,
                  "currency":"USD",
                  "affiliate_percent":null,
                  "author_percent":0.0,
                  "author_id":null,
                  "teachable_percent":0.2,
                  "teachable_processor_fee":0,
                  "amount_refunded":500,
                  "status":"paid",
                  "affiliate_fees":0,
                  "author_fees":0,
                  "sale_id":5810934,
                  "coupon_id":null,
                  "net_charge":0,
                  "earnings_usd":0,
                  "net_charge_usd":0,
                  "teachable_fixed_fee":0,
                  "total_teachable_fee":0,
                  "is_recurring":false,
                  "stripe_charge_token":"ch_AY0FKRtbaknGkg",
                  "paypal_payment_id":null,
                  "stripe_invoice_id":null,
                  "purchased_at":"2017-04-26T17:47:53Z",
                  "refundable":false,
                  "vat_fees":0,
                  "is_chargeback":null,
                  "id":867110,
                  "net_tax_charge":0,
                  "net_product_charge_usd":0,
                  "meta":{
                     "class":"transaction",
                     "url":null,
                     "name":"867110",
                     "description":null,
                     "image_url":null
                  }
               }
            ]
         },
         "user":{
            "id":4831317,
            "role":"student",
            "email":"mike+another-test@teachable.com",
            "name":"mack",
            "school_id":5783,
            "src":null,
            "first_touch":null,
            "last_touch":null,
            "last_sign_in_at":"2017-04-26T17:47:20Z",
            "sign_in_count":2,
            "unsubscribe_from_marketing_emails":null
         },
         "coupon":null
      }
   }
]
thanks_illustration

Can't find what you're looking for?

Contact us
thanks_illustration