> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.paymentkit.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.paymentkit.com/_mcp/server.

# Get Coupon

GET https://app.paymentkit.com/api/{account_id}/coupons/{coupon_id}

Get a coupon by ID.

Reference: https://docs.paymentkit.com/api-reference/api-reference/coupons/get-coupon

## Authentication

- `Authorization` header (bearer token, required)

## Servers

- `https://app.paymentkit.com` (Production, default)
- `https://staging.paymentkit.com` (Staging)

## Request

### Path parameters

- `coupon_id` (string, required)
- `account_id` (string, required)

## Response

### 200

Successful Response

- `id` (string, required)
- `status` (string, required)
- `name` (string, required, nullable)
- `discount_type` (string, required)
- `amount_atom_off` (integer, required, nullable)
- `percent_off` (double, required, nullable)
- `trial_days_off` (integer, required, nullable)
- `currency` (enum, required, nullable) — ISO 4217 currency codes.
  - Allowed values: `aed`, `afn`, `all`, `amd`, `ang`, `aoa`, `ars`, `aud`, `awg`, `azn`, `bam`, `bbd`, `bdt`, `bgn`, `bhd`, `bif`, `bmd`, `bnd`, `bob`, `brl`, `bsd`, `btn`, `bwp`, `byn`, `bzd`, `cad`, `cdf`, `chf`, `clp`, `cny`, `cop`, `crc`, `cuc`, `cup`, `cve`, `czk`, `djf`, `dkk`, `dop`, `dzd`, `egp`, `ern`, `etb`, `eur`, `fjd`, `fkp`, `gbp`, `gel`, `ghs`, `gip`, `gmd`, `gnf`, `gtq`, `gyd`, `hkd`, `hnl`, `hrk`, `htg`, `huf`, `idr`, `ils`, `inr`, `iqd`, `irr`, `isk`, `jmd`, `jod`, `jpy`, `kes`, `kgs`, `khr`, `kmf`, `kpw`, `krw`, `kwd`, `kyd`, `kzt`, `lak`, `lbp`, `lkr`, `lrd`, `lsl`, `lyd`, `mad`, `mdl`, `mga`, `mkd`, `mmk`, `mnt`, `mop`, `mru`, `mur`, `mvr`, `mwk`, `mxn`, `myr`, `mzn`, `nad`, `ngn`, `nio`, `nok`, `npr`, `nzd`, `omr`, `pab`, `pen`, `pgk`, `php`, `pkr`, `pln`, `pyg`, `qar`, `ron`, `rsd`, `rub`, `rwf`, `sar`, `sbd`, `scr`, `sdg`, `sek`, `sgd`, `shp`, `sle`, `sos`, `srd`, `ssp`, `stn`, `svc`, `syp`, `szl`, `thb`, `tjs`, `tmt`, `tnd`, `top`, `try`, `ttd`, `twd`, `tzs`, `uah`, `ugx`, `usd`, `uyu`, `uzs`, `ves`, `vnd`, `vuv`, `wst`, `xaf`, `xcd`, `xof`, `xpf`, `yer`, `zar`, `zmw`, `zwl`
- `duration` (string, required)
- `duration_in_months` (integer, required, nullable)
- `max_redemptions` (integer, required, nullable)
- `redemption_count` (integer, required)
- `valid_from` (datetime, required, nullable)
- `valid_until` (datetime, required, nullable)
- `validity_period_days` (integer, required, nullable)
- `products` (list of string, required)
- `metadata` (map from string to any, required, nullable)
- `created_at` (datetime, required)
- `updated_at` (datetime, required)
- `promotion_code_count` (integer, optional, default: 0)
- `product_details` (list of object, optional)
  - `id` (string, required)
  - `name` (string, optional, nullable)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "id": "c9f1a7d2-4b3e-4f8a-9d2e-1a2b3c4d5e6f",
  "status": "active",
  "name": "Spring Sale 2024",
  "discount_type": "percent_off",
  "amount_atom_off": null,
  "percent_off": 15,
  "trial_days_off": null,
  "currency": "usd",
  "duration": "repeating",
  "duration_in_months": 3,
  "max_redemptions": 100,
  "redemption_count": 25,
  "valid_from": "2024-04-01T00:00:00Z",
  "valid_until": "2024-06-30T23:59:59Z",
  "validity_period_days": null,
  "products": [
    "prod_12345"
  ],
  "metadata": {
    "campaign": "spring_launch",
    "created_by": "marketing_team"
  },
  "created_at": "2024-03-15T12:00:00Z",
  "updated_at": "2024-04-10T08:30:00Z",
  "promotion_code_count": 5,
  "product_details": [
    {
      "id": "prod_12345",
      "name": "Premium Subscription"
    }
  ]
}
```

**SDK Code**

```python
from payment_kit import PaymentKit

client = PaymentKit(
    token="YOUR_TOKEN_HERE",
)

client.coupons.get_coupon(
    account_id="account_id",
    coupon_id="coupon_id",
)

```

```javascript
const url = 'https://app.paymentkit.com/api/account_id/coupons/coupon_id';
const options = {
  method: 'GET',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.paymentkit.com/api/account_id/coupons/coupon_id"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.paymentkit.com/api/account_id/coupons/coupon_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://app.paymentkit.com/api/account_id/coupons/coupon_id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.paymentkit.com/api/account_id/coupons/coupon_id', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.paymentkit.com/api/account_id/coupons/coupon_id");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.paymentkit.com/api/account_id/coupons/coupon_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```