Archive a discount
Archive (soft delete) a discount by its ID. Archived discounts can no longer be used at checkout but remain in the system for reporting purposes. This action is reversible.
Authorization
Public key Secret key In: header
In: header
Path Parameters
PATCH /v0/discounts/:discountId/archive Parameter
uuidRequest Body
application/json
PATCH /v0/discounts/:discountId/archive Request body
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/v0/discounts/497f6eca-6276-4993-bfeb-53cbbbba6f08/archive" \ -H "Content-Type: application/json" \ -d '{}'{ "status": "success", "data": { "success": true }}Update a discount PATCH
Update an existing discount's details. You can modify the name, amount, expiration, and other properties. Note: Changing the discount code may affect customers who have saved the old code.
Create a new Checkout Element POST
Create a new Checkout Element with specified offers. Checkout Elements are embeddable or hosted checkout experiences that can be integrated into your website or application. They handle the entire checkout flow including payment collection, tax calculation, and order creation. Supported configurations: - Single one-time purchase: One offer for a standard product - Multiple one-time purchases: Multiple offers in a cart - Subscription: One subscription offer (cannot be combined with other offers)