- 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
Retrieve a coupon
GET
/v1/coupons/{id}
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
Path Params
id
string
required
Header Params
Accept
string
required
Default:
application/json
Content-Type
string
required
Default:
application/json
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 GET 'https://apitest.wooshpay.com/v1/coupons/?members&reference&Type&_postman_listIndexKey=key&_postman_listAllowsMultipleValues'
Responses
🟢200OK
application/json
Body
id
string
optional
amount_off
integer | null
optional
currency
string | null
optional
duration
enum<string>
optional
Allowed values:
foreveroncerepeating
duration_in_months
integer
optional
duration_in_weeks
string
required
duration_in_days
string
required
object
string
optional
created
integer
optional
livemode
boolean
optional
metadata
object
optional
name
string
optional
percent_off
number | null
optional
max_redemptions
integer | null
optional
redeem_by
integer | null
optional
times_redeemed
integer
optional
valid
boolean
optional
applies_to
object
optional
products
array[string]
optional
Example
{
"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"
]
}
}
Modified at 2024-05-14 07:22:50