curl -X GET "https://api.affonso.io/v1/coupons/cpn_abc123" \
-H "Authorization: Bearer sk_live_your_api_key"
{
"success": true,
"data": {
"id": "cpn_abc123",
"code": "SAVE25",
"affiliate_id": "aff_123",
"program_id": "prg_789ghi",
"discount_type": "percentage",
"discount_value": 25,
"duration": "forever",
"duration_in_months": null,
"currency": null,
"product_ids": [],
"provider": "stripe",
"provider_coupon_id": "promo_abc123",
"provider_promo_code_id": "pc_abc123",
"provider_records": [
{
"provider": "stripe",
"provider_coupon_id": "promo_abc123",
"provider_promo_code_id": "pc_abc123",
"created_at": "2024-01-15T10:30:00Z"
}
],
"created_at": "2024-01-15T10:30:00Z",
"updated_at": null
}
}
Retrieve details for a specific coupon
curl -X GET "https://api.affonso.io/v1/coupons/cpn_abc123" \
-H "Authorization: Bearer sk_live_your_api_key"
{
"success": true,
"data": {
"id": "cpn_abc123",
"code": "SAVE25",
"affiliate_id": "aff_123",
"program_id": "prg_789ghi",
"discount_type": "percentage",
"discount_value": 25,
"duration": "forever",
"duration_in_months": null,
"currency": null,
"product_ids": [],
"provider": "stripe",
"provider_coupon_id": "promo_abc123",
"provider_promo_code_id": "pc_abc123",
"provider_records": [
{
"provider": "stripe",
"provider_coupon_id": "promo_abc123",
"provider_promo_code_id": "pc_abc123",
"created_at": "2024-01-15T10:30:00Z"
}
],
"created_at": "2024-01-15T10:30:00Z",
"updated_at": null
}
}
Retrieve a single coupon by ID with optional expanded fields.Documentation Index
Fetch the complete documentation index at: https://docs.affonso.io/llms.txt
Use this file to discover all available pages before exploring further.
affiliate.true for successful responsesShow Data Object Properties
percentage or fixedforever, once, or repeatingrepeating)fixed)stripe, dodo, creem).provider (string): The payment provider nameprovider_coupon_id (string): The coupon ID at this providerprovider_promo_code_id (string): The promo code ID at this providercreated_at (string): ISO 8601 timestamp of when the provider record was createdcurl -X GET "https://api.affonso.io/v1/coupons/cpn_abc123" \
-H "Authorization: Bearer sk_live_your_api_key"
{
"success": true,
"data": {
"id": "cpn_abc123",
"code": "SAVE25",
"affiliate_id": "aff_123",
"program_id": "prg_789ghi",
"discount_type": "percentage",
"discount_value": 25,
"duration": "forever",
"duration_in_months": null,
"currency": null,
"product_ids": [],
"provider": "stripe",
"provider_coupon_id": "promo_abc123",
"provider_promo_code_id": "pc_abc123",
"provider_records": [
{
"provider": "stripe",
"provider_coupon_id": "promo_abc123",
"provider_promo_code_id": "pc_abc123",
"created_at": "2024-01-15T10:30:00Z"
}
],
"created_at": "2024-01-15T10:30:00Z",
"updated_at": null
}
}
Was this page helpful?