> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thanx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pre Cert Checklist Campaign Reward Issuance

# Pre-Certification Self-Check: Campaign & Reward Issuance Integration

Complete ALL items before contacting [developer.support@thanx.com](mailto:developer.support@thanx.com) for certification.

***

## API Headers & General

* [ ] All requests include `Authorization` header (Bearer token)
* [ ] All requests include `X-ClientId` header
* [ ] All requests include `Accept-Version: v4.0` header
* [ ] All requests include `Content-Type: application/json` header
* [ ] All requests include `User-Agent` header
* [ ] No unnecessary duplicate API requests
* [ ] Error messages handled gracefully
* [ ] API requests issued at a reasonable frequency (no rapid polling)

## Discovery

* [ ] Get Merchants endpoint called to retrieve accessible merchants
* [ ] List Reward Templates endpoint called for each merchant to discover available reward templates
* [ ] Merchant and reward template data cached and refreshed periodically (not fetched on every operation)

## Campaign Creation

* [ ] Create Campaign endpoint called with required fields:
  * [ ] `merchant_id`
  * [ ] `name` — descriptive campaign name
  * [ ] `objective` — campaign purpose
  * [ ] `fine_print` — terms and conditions
  * [ ] `start_at` / `end_at` — campaign window in ISO 8601
  * [ ] `redeemable_from` / `redeemable_to` — reward redemption window in ISO 8601
  * [ ] `variants` — array of 1-4 variants
* [ ] Each treatment variant references a valid `reward_template_id`
* [ ] Control variants (named "Control") correctly omit `reward_template_id` (for A/B testing)
* [ ] `redeemable_from`, `redeemable_to`, `start_at`, and `end_at` are not all set to the same date — ensure the campaign allows enough time for users to redeem and use the reward
* [ ] Campaign creation and reuse strategy defined (per use case vs. per event)

## Reward Issuance

* [ ] Issue Rewards endpoint called with user identifiers (email or phone)
* [ ] Phone numbers in E.164 format (e.g., `+12025551234`)
* [ ] Batch size does not exceed 10,000 identifiers per job
* [ ] `X-Idempotency-Key` header included to prevent duplicate issuance
* [ ] 202 Accepted response handled correctly (asynchronous processing)

## Monitoring & Completion

* [ ] Get Issuance Job endpoint polled for job status (OR webhook subscription active)
* [ ] Job state transitions handled: `pending` -> `processing` -> `completed` / `failed`
* [ ] On completion: `success_count` and `failure_count` surfaced
* [ ] Failed issuances: error details (identifier\_index, identifier\_type, error message) handled
* [ ] Failure information surfaced to merchants (not silently dropped)

## Revocation (If Applicable)

* [ ] Revoke Issuance Job endpoint tested for error correction / fraud prevention
* [ ] Only `completed` or `failed` jobs revoked (422 expected for pending/processing/revoking/revoked)
* [ ] Asynchronous revocation handled (202 Accepted -> `revoking` state)

## Webhooks (If Subscribed)

> **Note:** Webhooks are an alternative to polling the Get Issuance Job endpoint — you do not need both. Complete this section only if using webhooks instead of polling.

* [ ] Webhook endpoint is a valid HTTPS URL
* [ ] Endpoint responds to POST requests within 15 seconds
* [ ] `reward.issued` webhook handled (individual reward notifications)
* [ ] `reward.batch_completed` webhook handled (batch completion summary)

## Rate Limits

* [ ] Rate limits respected: max 5 requests/second, 2,000 requests/15 minutes
* [ ] 429 Too Many Requests handled with exponential backoff retry strategy

## Submission Format

* [ ] Integration tested against Thanx Sandbox environment
* [ ] All sandbox API calls visible in DataDog logs
* [ ] Ready to demo on a video call: discovery, campaign creation, reward issuance, job monitoring, error handling, revocation (if applicable)

***

**After completing all items above, email [developer.support@thanx.com](mailto:developer.support@thanx.com) to schedule your certification call.**
