username:password
Authorization: Basic *****************
{
"coupon": "string",
"code": "string",
"metadata": {},
"active": true,
"customer": "string",
"expires_at": "string",
"max_redemptions": 0,
"restrictions": {
"first_time_transaction": true,
"minimum_amount": 0,
"minimum_amount_currency": "string"
}
}
curl --location --request POST 'https://apitest.wooshpay.com/v1/promotion_code' \
--header 'Accept;' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Og==' \
--data-raw '{
"coupon": "string",
"code": "string",
"metadata": {},
"active": true,
"customer": "string",
"expires_at": "string",
"max_redemptions": 0,
"restrictions": {
"first_time_transaction": true,
"minimum_amount": 0,
"minimum_amount_currency": "string"
}
}'
{
"id": "string",
"object": "string",
"active": true,
"code": "string",
"coupon": {
"id": "string",
"amount_off": 0,
"currency": "string",
"duration": "forever",
"duration_in_months": 0,
"duration_in_weeks": "string",
"duration_in_days": "string",
"object": "string",
"created": 0,
"livemode": true,
"metadata": {},
"name": "string",
"percent_off": 0,
"max_redemptions": 0,
"redeem_by": 0,
"times_redeemed": 0,
"valid": true,
"applies_to": {
"products": [
"string"
]
},
"currency_options": {
"<currency>.amount_off": 0
}
},
"created": 0,
"customer": null,
"expires_at": null,
"livemode": true,
"max_redemptions": null,
"metadata": {},
"restrictions": {
"first_time_transaction": true,
"minimum_amount": null,
"minimum_amount_currency": null
},
"times_redeemed": 0
}