> ## Documentation Index
> Fetch the complete documentation index at: https://help.kajabi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Purchase sample

> Returns sample webhook payload for the `purchase` event:
```
[
  {
    "id": "0",
    "type": "purchases",
    "attributes": {
      "amount_in_cents": 1000,
      "payment_type": "single",
      "multipay_payments_made": null,
      "opt_in": false,
      "raw_extra_contact_information": {},
      "currency": "USD",
      "effective_start_at": null,
      "cardholder_name": null,
      "billing_address_zip": null,
      "deactivated_at": null,
      "deactivation_reason": null,
      "coupon_code": null,
      "source": null,
      "referrer": null,
      "quantity": 1,
      "created_at": "2025-07-31T16:59:27.580Z",
      "updated_at": "2025-07-31T16:59:27.580Z"
    },
    "relationships": {
      "customer": {
        "data": {
          "id": "0",
          "type": "customers"
        }
      },
      "offer": {
        "data": {
          "id": "0",
          "type": "offers"
        }
      },
      "products": {
        "data": []
      }
    }
  },
  {
    "id": "0",
    "type": "offers",
    "attributes": {
      "title": "Kajabi Test Offer",
      "description": null,
      "internal_title": null,
      "currency": "USD",
      "price_in_cents": 1000,
      "payment_type": "single",
      "token": "n8NtoHUZ",
      "image_url": null,
      "payment_method": "stripe_and_paypal",
      "price_description": "$10.00 USD",
      "checkout_url": "https://bill-heaton.kajabi-products.test/offers/n8NtoHUZ",
      "recurring_offer": false,
      "subscription": false,
      "one_time": true,
      "single": true,
      "free": false
    },
    "relationships": {
      "site": {
        "data": {
          "id": "2",
          "type": "sites"
        }
      },
      "products": {
        "data": []
      },
      "forms": {
        "data": []
      }
    }
  },
  {
    "id": "0",
    "type": "customers",
    "attributes": {
      "name": "John Doe",
      "email": "john.doe@example.com",
      "avatar": null,
      "external_user_id": null,
      "public_bio": null,
      "public_location": null,
      "public_website": null,
      "socials": null,
      "net_revenue": "0.0",
      "sign_in_count": 0,
      "last_request_at": null,
      "bounced_at": null,
      "created_at": "2025-07-31T16:59:27.552Z",
      "updated_at": "2025-07-31T16:59:27.552Z"
    },
    "links": {
      "contact": "https://www.kajabi.test/api/v1/contacts/0"
    },
    "relationships": {
      "site": {
        "data": {
          "id": "2",
          "type": "sites"
        }
      },
      "contact": {
        "data": {
          "id": "0",
          "type": "contacts"
        }
      },
      "offers": {
        "data": [],
        "links": {
          "self": "https://www.kajabi.test/api/v1/customers/0/relationships/offers"
        }
      },
      "products": {
        "data": []
      }
    }
  }
]
```
## Actual Payloads
The actual payloads are sent to the `target_url` as a POST request with the following JSON body:
```json
{
  "id": "hash_id",
  "event": "purchase",
  "payload": [],
}
```
The `payload` array is the sample response above




## OpenAPI

````yaml /openapi.yaml get /v1/hooks/purchase_sample
openapi: 3.1.1
info:
  title: Kajabi API V1
  version: 1.0.1
  description: >
    ## Public API

    * Server URL `https://api.kajabi.com`

    * Endpoint paths are prefixed with `/v1`

    * Version endpoint `GET https://api.kajabi.com/v1/version`

    * See the [Developers Site](https://developers.kajabi.com) for documentation
    and examples.

    * Try the demo [Postman
    collection](https://www.postman.com/kajabi-apis/beta-public-api-demo/collection/fg4iyaz/kajabi-public-api-v1)

    ## API Keys

    * Your API `client_id` and `client_secret` are available on the [User API
    Keys](https://app.kajabi.com/admin/settings/security) section of the Kajabi
    Admin Portal.
      * Custom API Keys can be created with specific permissions.
      * Click the "Create User API Key" button, enter a name (e.g. "My project"), select the user and permissions, and click "Create".
      * For security purposes, you may "Delete" or "Rotate" the api credentials at any time; which will invalidate any access tokens granted with the credentials.
    ## Video Walkthroughs

    *
    [Capabilities](https://drive.google.com/file/d/1Puc9B2sSdA-RQb7YMxmUXg4FVoEXytoc/view?usp=sharing)

    * [Getting
    Started](https://drive.google.com/file/d/1hbGRShkxven_QMWvgYrerHKURbcZrnvJ/view?usp=sharing)

    * [Error
    Examples](https://drive.google.com/file/d/1i0wQK71I1jpaZVsxYwsn62gVj40S_E7Y/view?usp=sharing)

    * [External Contact
    Form](https://drive.google.com/file/d/1HqpULXvan5TOK3LvM7nILCuCkCaX0kFT/view?usp=sharing)
  contact:
    email: support@kajabi.com
    name: Support
    url: >-
      https://help.kajabi.com/hc/en-us/articles/4404549690523-How-to-Get-Help-From-Kajabi-Live-Agents
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.kajabi.com
    description: Production
security: []
paths:
  /v1/hooks/purchase_sample:
    get:
      tags:
        - Webhooks
      summary: Purchase sample
      description: >
        Returns sample webhook payload for the `purchase` event:

        ```

        [
          {
            "id": "0",
            "type": "purchases",
            "attributes": {
              "amount_in_cents": 1000,
              "payment_type": "single",
              "multipay_payments_made": null,
              "opt_in": false,
              "raw_extra_contact_information": {},
              "currency": "USD",
              "effective_start_at": null,
              "cardholder_name": null,
              "billing_address_zip": null,
              "deactivated_at": null,
              "deactivation_reason": null,
              "coupon_code": null,
              "source": null,
              "referrer": null,
              "quantity": 1,
              "created_at": "2025-07-31T16:59:27.580Z",
              "updated_at": "2025-07-31T16:59:27.580Z"
            },
            "relationships": {
              "customer": {
                "data": {
                  "id": "0",
                  "type": "customers"
                }
              },
              "offer": {
                "data": {
                  "id": "0",
                  "type": "offers"
                }
              },
              "products": {
                "data": []
              }
            }
          },
          {
            "id": "0",
            "type": "offers",
            "attributes": {
              "title": "Kajabi Test Offer",
              "description": null,
              "internal_title": null,
              "currency": "USD",
              "price_in_cents": 1000,
              "payment_type": "single",
              "token": "n8NtoHUZ",
              "image_url": null,
              "payment_method": "stripe_and_paypal",
              "price_description": "$10.00 USD",
              "checkout_url": "https://bill-heaton.kajabi-products.test/offers/n8NtoHUZ",
              "recurring_offer": false,
              "subscription": false,
              "one_time": true,
              "single": true,
              "free": false
            },
            "relationships": {
              "site": {
                "data": {
                  "id": "2",
                  "type": "sites"
                }
              },
              "products": {
                "data": []
              },
              "forms": {
                "data": []
              }
            }
          },
          {
            "id": "0",
            "type": "customers",
            "attributes": {
              "name": "John Doe",
              "email": "john.doe@example.com",
              "avatar": null,
              "external_user_id": null,
              "public_bio": null,
              "public_location": null,
              "public_website": null,
              "socials": null,
              "net_revenue": "0.0",
              "sign_in_count": 0,
              "last_request_at": null,
              "bounced_at": null,
              "created_at": "2025-07-31T16:59:27.552Z",
              "updated_at": "2025-07-31T16:59:27.552Z"
            },
            "links": {
              "contact": "https://www.kajabi.test/api/v1/contacts/0"
            },
            "relationships": {
              "site": {
                "data": {
                  "id": "2",
                  "type": "sites"
                }
              },
              "contact": {
                "data": {
                  "id": "0",
                  "type": "contacts"
                }
              },
              "offers": {
                "data": [],
                "links": {
                  "self": "https://www.kajabi.test/api/v1/customers/0/relationships/offers"
                }
              },
              "products": {
                "data": []
              }
            }
          }
        ]

        ```

        ## Actual Payloads

        The actual payloads are sent to the `target_url` as a POST request with
        the following JSON body:

        ```json

        {
          "id": "hash_id",
          "event": "purchase",
          "payload": [],
        }

        ```

        The `payload` array is the sample response above
      responses:
        '200':
          description: Success, returns sample webhook payload
          content:
            application/vnd.api+json:
              schema:
                type: array
                items:
                  anyOf:
                    - type: object
                      properties:
                        id:
                          type: string
                        type:
                          type: string
                          enum:
                            - purchases
                        attributes:
                          $ref: '#/components/schemas/purchases_attributes'
                        relationships:
                          type: object
                          properties:
                            customer:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                    type:
                                      type: string
                                      enum:
                                        - customers
                            offers:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                      type:
                                        type: string
                                        enum:
                                          - offers
                            products:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: string
                                      type:
                                        type: string
                                        enum:
                                          - offers
                    - type: object
                      properties:
                        id:
                          type: string
                        type:
                          type: string
                          enum:
                            - customers
                        attributes:
                          $ref: '#/components/schemas/customers_attributes'
                    - type: object
                      properties:
                        id:
                          type: string
                        type:
                          type: string
                          enum:
                            - offers
                        attributes:
                          $ref: '#/components/schemas/offers_attributes'
        '401':
          description: Unauthorized, Authorization header is missing or invalid
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/errors_unauthorized'
        '403':
          description: Forbidden, insufficient permission to access the resource
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/errors_forbidden'
      security:
        - Bearer: []
components:
  schemas:
    purchases_attributes:
      type: object
      properties:
        amount_in_cents:
          type: integer
        payment_type:
          type: string
        multipay_payments_made:
          type:
            - integer
            - 'null'
        opt_in:
          type: boolean
        raw_extra_contact_information:
          type: object
        currency:
          type: string
        effective_start_at:
          type:
            - string
            - 'null'
        cardholder_name:
          type:
            - string
            - 'null'
        billing_address_zip:
          type:
            - string
            - 'null'
        deactivated_at:
          type:
            - string
            - 'null'
        deactivation_reason:
          type:
            - string
            - 'null'
        coupon_code:
          type:
            - string
            - 'null'
        source:
          type:
            - string
            - 'null'
        referrer:
          type:
            - string
            - 'null'
        quantity:
          type: integer
          nullable: true
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: ISO 8601 date-time, read only
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: ISO 8601 date-time, read only
    customers_attributes:
      type: object
      properties:
        name:
          type: string
        email:
          type: string
        avatar:
          type:
            - string
            - 'null'
        external_user_id:
          type: string
          nullable: true
          description: Supported once contact is granted an offer or makes a purchase
        public_bio:
          type:
            - string
            - 'null'
        public_location:
          type:
            - string
            - 'null'
        public_website:
          type:
            - string
            - 'null'
        socials:
          type: object
          nullable: true
          properties:
            twitter:
              type:
                - string
                - 'null'
            facebook:
              type:
                - string
                - 'null'
            instagram:
              type:
                - string
                - 'null'
        net_revenue:
          type:
            - string
            - 'null'
        sign_in_count:
          type: integer
          nullable: true
          description: Read only
        last_request_at:
          type: string
          nullable: true
          description: ISO 8601 date-time, read only
        bounced_at:
          type: string
          nullable: true
          description: ISO 8601 date-time, read only
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: ISO 8601 date-time, read only
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: ISO 8601 date-time, read only
    offers_attributes:
      type: object
      properties:
        title:
          type: string
        description:
          type:
            - string
            - 'null'
        internal_title:
          type:
            - string
            - 'null'
        currency:
          type: string
        price_in_cents:
          type: integer
        payment_type:
          type: string
        token:
          type: string
        payment_method:
          type: string
        price_description:
          type: string
        checkout_url:
          type: string
        recurring_offer:
          type: boolean
        subscription:
          type: boolean
        one_time:
          type: boolean
        single:
          type: boolean
        free:
          type: boolean
        image_url:
          type:
            - string
            - 'null'
      required:
        - title
    errors_unauthorized:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errors_attributes'
    errors_forbidden:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errors_attributes'
    errors_attributes:
      type: object
      properties:
        status:
          type: string
        source:
          type: object
          nullable: true
          properties:
            pointer:
              type: string
        title:
          type: string
        detail:
          type: string
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````