Offers
Create Offer
Creates an offer within your site.
Offers allow you to package complicated combinations of products, components and coupons into a convenient package which can then be subscribed to just like products.
Once an offer is defined it can be used as an alternative to the product when creating subscriptions.
For more information, see Offers in the product documentation.
Using a Product Price Point
You can optionally pass in a product_price_point_id that corresponds with the product_id and the offer will use that price point. If a product_price_point_id is not passed in, the product's default price point will be used.
Authorization
BasicAuth AuthorizationBasic <token>
The username is a Maxio Chargify API key. The password is x.
In: header
Request Body
application/json
offer*
Response Body
application/json
application/json
curl -X POST "https://example.com/offers.json" \ -H "Content-Type: application/json" \ -d '{ "offer": { "name": "Solo", "handle": "han_shot_first", "description": "A Star Wars Story", "product_id": 31, "product_price_point_id": 102, "components": [ { "component_id": 24, "starting_quantity": 1 } ], "coupons": [ "DEF456" ] } }'{ "offer": { "id": 3, "site_id": 2, "product_family_id": 4, "product_family_name": "Chargify", "product_id": 31, "product_name": "30-Day Square Trial", "product_price_in_cents": 2000, "product_revisable_number": 0, "name": "Solo", "handle": "han_shot_first", "description": "A Star Wars Story", "created_at": "2018-06-08T14:51:52-04:00", "updated_at": "2018-06-08T14:51:52-04:00", "archived_at": null, "product_price_point_name": "Default", "offer_items": [ { "component_id": 24, "component_name": "Invoices", "component_unit_price": "3.0", "price_point_id": 104, "price_point_name": "Original", "starting_quantity": "1.0", "editable": false } ], "offer_discounts": [ { "coupon_id": 3, "coupon_code": "DEF456", "coupon_name": "IB Loyalty" } ] }}