Skip to main content
Payhip logo
  • Category: ecommerce
  • Auth: API_KEY
  • Composio-managed OAuth available? N/A
  • Tools: 9
  • Triggers: 0
  • Slug: PAYHIP
  • Version: 20261101_00

Tools

Slug: PAYHIP_CREATE_COUPONTool 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

string
required
The coupon code the customer is required to enter at checkout
string
For administrative purposes you can remind yourself why you created this coupon by adding a note - not visible to customers
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.
string ("single" | "multi" | "collection")
required
Specifies if the coupon will be applied for a single product, all your products or a single collection
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.
string
The unique product key. Required if coupon_type is set to ‘single’
integer
The maximum number of times this coupon can be redeemed before it becomes invalid
string
The unique collection ID. Required if coupon_type is set to ‘collection’

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PAYHIP_DELETE_COUPONTool 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

string
required
The unique identifier for the coupon to delete.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PAYHIP_GET_COUPONTool to retrieve a coupon with the given ID. Use when you need to fetch details about a specific coupon from Payhip.

Input Parameters

integer
required
Unique identifier for the coupon object

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PAYHIP_UPDATE_COUPONTool 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

string
required
The unique identifier for the coupon.
string
The code for the coupon.
string
The maximum limit for the coupon usage.
string
The expiry of the coupon in a timestamp format.
string
The percentage discount for the coupon.
string
The product ID if coupon is specific to a product.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PAYHIP_VERIFY_COUPONTool 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

string
required
The coupon code to verify.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PAYHIP_WEBHOOK_EVENT_PAIDValidate and return a supplied Payhip paid webhook payload for a purchase completion event. The signature is not verified.

Input Parameters

string
required
Unique ID of the transaction
integer
required
Unix timestamp when purchase occurred
string
required
Event type identifier
string
required
Customer’s email address
array
required
List of items in the order
integer
required
Total price in cents
boolean
required
Whether the purchase was a gift
string
required
Three-letter currency code
string
required
HMAC SHA-256 signature of the payload using your API key
string
required
Customer’s IP address
integer
required
Payhip fee in cents
integer
required
Stripe fee in cents
boolean
required
Whether VAT was applied to the purchase
string ("card" | "paypal")
required
Payment method used
boolean
required
Whether customer has opted out of emails

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PAYHIP_WEBHOOK_EVENT_REFUNDEDValidate and return a supplied Payhip refunded webhook payload for a payment refund event. The signature is not verified.

Input Parameters

string
required
Transaction ID
string
required
Event type identifier
string
required
Buyer email address
array
required
List of items included in the transaction
integer
required
Original price in cents or pennies
boolean
required
Whether purchase was a gift
string
required
ISO 4217 currency code, e.g., USD
string
required
HMAC SHA-256 signature of the payload using your API key
string
required
IP address of the buyer
integer
required
Payhip fee in cents
integer
required
Stripe fee in cents
boolean
required
Whether VAT was applied
integer
required
Unix timestamp when transaction was created
string
required
Payment method used, e.g., card
integer
required
Unix timestamp when refund occurred
integer
required
Amount refunded in cents or pennies
boolean
required
Whether buyer did not consent to marketing emails

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PAYHIP_WEBHOOK_EVENT_SUBSCRIPTION_CREATEDValidate and return a supplied Payhip subscription.created webhook payload for a subscription start event. The signature is not verified.

Input Parameters

string
required
Event type identifier
string
required
Subscription status at creation; always ‘active’ for this event
string
required
Name of the subscription plan
string
required
HMAC SHA-256 signature of the payload using your API key
string
required
Unique identifier for the customer
Customer’s GDPR consent status
Payhip product link identifier
string
required
Name of the product
string
required
Customer’s email address
string
required
Unique identifier for the subscription
string
required
Customer’s last name
string
required
Customer’s first name
integer
required
Unix timestamp when the subscription started

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PAYHIP_WEBHOOK_EVENT_SUBSCRIPTION_DELETEDValidate and return a supplied Payhip subscription.deleted webhook payload for a subscription cancellation event. The signature is not verified.

Input Parameters

string
required
Event type identifier
string
required
Current subscription status; always ‘canceled’ for this event
string
required
Name of the subscription plan
string
required
HMAC SHA-256 signature of the payload using your API key
string
required
Unique identifier for the customer
Whether the customer gave GDPR consent (‘Yes’ or ‘No’)
Payhip product link identifier
string
required
Name of the product
string
required
Customer’s email address
string
required
Unique identifier for the subscription
string
required
Customer’s last name
string
required
Customer’s first name
integer
required
Unix timestamp when subscription was canceled
integer
required
Unix timestamp when subscription started

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not