Enables assigning specific coupons to a customer.
Requiresprice_rulesaccess scope. More access scope
The Receive Coupons API enables assigning specific coupons to a customer.
This API is especially useful for:
- Distributing promotional coupons to targeted customers.
- Managing coupon assignments for specific users.
- Automating coupon distribution in bulk.
Request Parameters
Public Request Parameters
Query Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
customer_id | string | Yes | Customer's unique ID to assign the coupons | "cus_123456789" |
coupon_ids | array of strings | Yes | Array of coupon IDs to be assigned to the customer | ["cpn_1", "cpn_2"] |
Response Explanation
Public Response Parameters
Successful Response
Parameter | Type | Example | Description |
|---|---|---|---|
| string |
| Status code of the response |
| string | Descriptive message of the response | |
| int32 |
| Operation status code
|
| string |
| The ID of the assigned coupon |
| int32 |
| The available stock of the coupon (-1 indicates unlimited) |
| int32 |
| Whether coupon can be received only once per customer |
| int32 |
| The current status of the coupon
|
| int32 |
| The count of times the coupon has been received |
| string |
| Coupon ID in receive info |
| string |
| Discount code ID |
| string |
| Actual discount code |
Error Response
| Field | Type | Example | Description |
|---|---|---|---|
code | string | InvalidParameter | Error http message |
message | string | `` | Error message |
