> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Payhip

> Payhip is an e-commerce platform that enables individuals and businesses to sell digital products, memberships, and physical goods directly to their audience.

![Payhip logo](https://mintcdn.com/composio-preview/gqjBKmmJCINafaiK/images/toolkits/payhip.svg?fit=max\&auto=format\&n=gqjBKmmJCINafaiK\&q=85\&s=86645a587da34301f1ad99007ed14802)

* **Category:** ecommerce
* **Auth:** API\_KEY
* **Composio-managed OAuth available?** N/A
* **Tools:** 9
* **Triggers:** 0
* **Slug:** `PAYHIP`
* **Version:** 20261101\_00

## Tools

> [accordion] Create Coupon
>
> **Slug:** `PAYHIP_CREATE_COUPON`
>
> Tool to create a coupon for discounts in Payhip. Use when you need to create a new coupon code with either percentage or fixed amount discounts. Coupons can apply to single products, all products, or collections.
>
> #### Input Parameters
>
> **code** `string` *required*
>
> The coupon code the customer is required to enter at checkout
>
> **notes** `string`
>
> For administrative purposes you can remind yourself why you created this coupon by adding a note - not visible to customers
>
> **amount\_off** `integer`
>
> A positive integer representing the amount to subtract from the cart total in cents. For example \$5 off would be 500. Required if percent\_off is not provided. Cannot be used together with percent\_off.
>
> **coupon\_type** `string ("single" | "multi" | "collection")` *required*
>
> Specifies if the coupon will be applied for a single product, all your products or a single collection
>
> **percent\_off** `number`
>
> A positive float larger than 0, and smaller or equal to 100, that represents the discount percentage the coupon will apply. Required if amount\_off is not provided. Cannot be used together with amount\_off.
>
> **product\_key** `string`
>
> The unique product key. Required if coupon\_type is set to 'single'
>
> **usage\_limit** `integer`
>
> The maximum number of times this coupon can be redeemed before it becomes invalid
>
> **collection\_id** `string`
>
> The unique collection ID. Required if coupon\_type is set to 'collection'
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Delete Coupon
>
> **Slug:** `PAYHIP_DELETE_COUPON`
>
> Tool to delete a coupon by ID. Use when you need to remove a coupon from the Payhip account. Only available in v1 API.
>
> #### Input Parameters
>
> **id** `string` *required*
>
> The unique identifier for the coupon to delete.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Coupon
>
> **Slug:** `PAYHIP_GET_COUPON`
>
> Tool to retrieve a coupon with the given ID. Use when you need to fetch details about a specific coupon from Payhip.
>
> #### Input Parameters
>
> **id** `integer` *required*
>
> Unique identifier for the coupon object
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Update Coupon
>
> **Slug:** `PAYHIP_UPDATE_COUPON`
>
> Tool to edit an existing coupon in Payhip. Use when you need to modify coupon details like code, percentage, expiry, or usage limit. Only available in v1 API.
>
> #### Input Parameters
>
> **id** `string` *required*
>
> The unique identifier for the coupon.
>
> **code** `string`
>
> The code for the coupon.
>
> **limit** `string`
>
> The maximum limit for the coupon usage.
>
> **expiry** `string`
>
> The expiry of the coupon in a timestamp format.
>
> **percentage** `string`
>
> The percentage discount for the coupon.
>
> **product\_id** `string`
>
> The product ID if coupon is specific to a product.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Verify Coupon
>
> **Slug:** `PAYHIP_VERIFY_COUPON`
>
> Tool to verify a Payhip coupon code. Use when you need to check if a coupon code is valid and retrieve its details. Only available in v1 API.
>
> #### Input Parameters
>
> **code** `string` *required*
>
> The coupon code to verify.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Webhook Event - Paid
>
> **Slug:** `PAYHIP_WEBHOOK_EVENT_PAID`
>
> Validate and return a supplied Payhip paid webhook payload for a purchase completion event. The signature is not verified.
>
> #### Input Parameters
>
> **id** `string` *required*
>
> Unique ID of the transaction
>
> **date** `integer` *required*
>
> Unix timestamp when purchase occurred
>
> **type** `string` *required*
>
> Event type identifier
>
> **email** `string` *required*
>
> Customer's email address
>
> **items** `array` *required*
>
> List of items in the order
>
> **price** `integer` *required*
>
> Total price in cents
>
> **is\_gift** `boolean` *required*
>
> Whether the purchase was a gift
>
> **currency** `string` *required*
>
> Three-letter currency code
>
> **signature** `string` *required*
>
> HMAC SHA-256 signature of the payload using your API key
>
> **ip\_address** `string` *required*
>
> Customer's IP address
>
> **payhip\_fee** `integer` *required*
>
> Payhip fee in cents
>
> **stripe\_fee** `integer` *required*
>
> Stripe fee in cents
>
> **vat\_applied** `boolean` *required*
>
> Whether VAT was applied to the purchase
>
> **payment\_type** `string ("card" | "paypal")` *required*
>
> Payment method used
>
> **unconsented\_from\_emails** `boolean` *required*
>
> Whether customer has opted out of emails
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Webhook Event - Refunded Payment
>
> **Slug:** `PAYHIP_WEBHOOK_EVENT_REFUNDED`
>
> Validate and return a supplied Payhip refunded webhook payload for a payment refund event. The signature is not verified.
>
> #### Input Parameters
>
> **id** `string` *required*
>
> Transaction ID
>
> **type** `string` *required*
>
> Event type identifier
>
> **email** `string` *required*
>
> Buyer email address
>
> **items** `array` *required*
>
> List of items included in the transaction
>
> **price** `integer` *required*
>
> Original price in cents or pennies
>
> **is\_gift** `boolean` *required*
>
> Whether purchase was a gift
>
> **currency** `string` *required*
>
> ISO 4217 currency code, e.g., USD
>
> **signature** `string` *required*
>
> HMAC SHA-256 signature of the payload using your API key
>
> **ip\_address** `string` *required*
>
> IP address of the buyer
>
> **payhip\_fee** `integer` *required*
>
> Payhip fee in cents
>
> **stripe\_fee** `integer` *required*
>
> Stripe fee in cents
>
> **vat\_applied** `boolean` *required*
>
> Whether VAT was applied
>
> **date\_created** `integer` *required*
>
> Unix timestamp when transaction was created
>
> **payment\_type** `string` *required*
>
> Payment method used, e.g., card
>
> **date\_refunded** `integer` *required*
>
> Unix timestamp when refund occurred
>
> **amount\_refunded** `integer` *required*
>
> Amount refunded in cents or pennies
>
> **unconsented\_from\_emails** `boolean` *required*
>
> Whether buyer did not consent to marketing emails
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Webhook Event - Subscription Created
>
> **Slug:** `PAYHIP_WEBHOOK_EVENT_SUBSCRIPTION_CREATED`
>
> Validate and return a supplied Payhip subscription.created webhook payload for a subscription start event. The signature is not verified.
>
> #### Input Parameters
>
> **type** `string` *required*
>
> Event type identifier
>
> **status** `string` *required*
>
> Subscription status at creation; always 'active' for this event
>
> **plan\_name** `string` *required*
>
> Name of the subscription plan
>
> **signature** `string` *required*
>
> HMAC SHA-256 signature of the payload using your API key
>
> **customer\_id** `string` *required*
>
> Unique identifier for the customer
>
> **gdpr\_consent** `string ("Yes" | "No")` *required*
>
> Customer's GDPR consent status
>
> **product\_link** `string` *required*
>
> Payhip product link identifier
>
> **product\_name** `string` *required*
>
> Name of the product
>
> **customer\_email** `string` *required*
>
> Customer's email address
>
> **subscription\_id** `string` *required*
>
> Unique identifier for the subscription
>
> **customer\_last\_name** `string` *required*
>
> Customer's last name
>
> **customer\_first\_name** `string` *required*
>
> Customer's first name
>
> **date\_subscription\_started** `integer` *required*
>
> Unix timestamp when the subscription started
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Webhook Event - Subscription Deleted
>
> **Slug:** `PAYHIP_WEBHOOK_EVENT_SUBSCRIPTION_DELETED`
>
> Validate and return a supplied Payhip subscription.deleted webhook payload for a subscription cancellation event. The signature is not verified.
>
> #### Input Parameters
>
> **type** `string` *required*
>
> Event type identifier
>
> **status** `string` *required*
>
> Current subscription status; always 'canceled' for this event
>
> **plan\_name** `string` *required*
>
> Name of the subscription plan
>
> **signature** `string` *required*
>
> HMAC SHA-256 signature of the payload using your API key
>
> **customer\_id** `string` *required*
>
> Unique identifier for the customer
>
> **gdpr\_consent** `string ("Yes" | "No")` *required*
>
> Whether the customer gave GDPR consent ('Yes' or 'No')
>
> **product\_link** `string` *required*
>
> Payhip product link identifier
>
> **product\_name** `string` *required*
>
> Name of the product
>
> **customer\_email** `string` *required*
>
> Customer's email address
>
> **subscription\_id** `string` *required*
>
> Unique identifier for the subscription
>
> **customer\_last\_name** `string` *required*
>
> Customer's last name
>
> **customer\_first\_name** `string` *required*
>
> Customer's first name
>
> **date\_subscription\_deleted** `integer` *required*
>
> Unix timestamp when subscription was canceled
>
> **date\_subscription\_started** `integer` *required*
>
> Unix timestamp when subscription started
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not
