- API Introduction
- Error Code
- Payment Intents
- Charges
- Payment Methods
- Refunds
- Webhooks
- Events
- Files
- Disputes
- Payouts
- Balance
- Products
- Prices
- Payment Links
- Checkout
- Customers
- Setup Intents
- Invoices
- Invoice Items
- Invoice Line Item
- Subscriptions
- Subscription Items
- Issuing
- Authorizations
- Cardholders
- Cards
- Transactions
- Coupons
- Promotion Code
- Accounts
Create a Coupon
POST
/v1/coupons
Request
Authorization
Send your HTTP requests with an
Authorization
header that contains the word Basic followed by a space and a base64-encoded string {{Username}}:{{Password}}Example:
Authorization: Basic YWRtaW46MTIzNDU2
Header Params
Accept
string
required
Default:
application/json
Content-Type
string
required
Default:
application/json
Body Params application/json
amount_off
integer | null
optional
currency
string | null
optional
duration
enum<string>
optional
Allowed values:
foreveroncerepeating
metadata
object
optional
name
string
optional
percent_off
number | null
optional
Example
{
"amount_off": 0,
"currency": "string",
"duration": "forever",
"metadata": {},
"name": "string",
"percent_off": 0
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://apitest.wooshpay.com/v1/coupons?members&reference&Type&_postman_listIndexKey=key&_postman_listAllowsMultipleValues' \
--data-raw ''
Responses
🟢200OK
application/json
Body
id
string
optional
amount_off
integer | null
optional
currency
string | null
optional
duration
enum<string>
optional
Allowed values:
foreveroncerepeating
object
string
optional
created
integer
optional
livemode
boolean
optional
metadata
object
optional
name
string
optional
percent_off
number | null
optional
Example
{
"id": "string",
"amount_off": 0,
"currency": "string",
"duration": "forever",
"object": "string",
"created": 0,
"livemode": true,
"metadata": {},
"name": "string",
"percent_off": 0
}
Modified at 2024-12-10 11:41:10