payments-ai · Schema
PublicApiDiscountCode
CompanyPaymentsArtificial IntelligenceFintechMerchant of RecordPayment Orchestration
Properties
| Name | Type | Description |
|---|---|---|
| id | string | |
| merchantId | string | |
| internalName | string | |
| code | string | |
| promoType | object | |
| amountOff | string | Decimal string. A flat amount uses its currency's minor units, for example "10.00" usd or "500" jpy; a percentage has two decimals, for example "20.00". |
| currency | stringnull | |
| billingPeriod | object | |
| billingPeriodLength | integernull | |
| billingPeriodUnit | object | |
| productId | stringnull | Null for a store-wide code. |
| expiresAt | stringnull | |
| status | object | |
| scopeLabel | string | All Products, or the scoped product's name. |
| amountDisplay | string | Display text, for example "20% OFF". |
| billingPeriodLabel | string | Display text, for example "Once" or "3 Months". |
| createdAt | string | |
| updatedAt | string |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/payments-ai/json-schema/payments-ai-public-api-discount-code-schema.json",
"title": "PublicApiDiscountCode",
"x-generated": "2026-11-10",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/payments-ai-public-api-api-openapi.yml#/components/schemas/PublicApiDiscountCode",
"type": "object",
"required": [
"id",
"merchantId",
"internalName",
"code",
"promoType",
"amountOff",
"currency",
"billingPeriod",
"billingPeriodLength",
"billingPeriodUnit",
"productId",
"expiresAt",
"status",
"scopeLabel",
"amountDisplay",
"billingPeriodLabel",
"createdAt",
"updatedAt"
],
"properties": {
"id": {
"type": "string"
},
"merchantId": {
"type": "string"
},
"internalName": {
"type": "string"
},
"code": {
"type": "string"
},
"promoType": {
"$ref": "#/$defs/PublicApiDiscountPromoType"
},
"amountOff": {
"type": "string",
"description": "Decimal string. A flat amount uses its currency's minor units, for example \"10.00\" usd or \"500\" jpy; a percentage has two decimals, for example \"20.00\"."
},
"currency": {
"type": [
"string",
"null"
],
"allOf": [
{
"$ref": "#/$defs/SharedTypes.CurrencyCode"
}
]
},
"billingPeriod": {
"$ref": "#/$defs/PublicApiDiscountBillingPeriod"
},
"billingPeriodLength": {
"type": [
"integer",
"null"
],
"format": "int32"
},
"billingPeriodUnit": {
"allOf": [
{
"$ref": "#/$defs/PublicApiDiscountBillingPeriodUnit"
}
],
"nullable": true
},
"productId": {
"type": [
"string",
"null"
],
"description": "Null for a store-wide code."
},
"expiresAt": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"status": {
"$ref": "#/$defs/PublicApiDiscountCodeStatus"
},
"scopeLabel": {
"type": "string",
"description": "All Products, or the scoped product's name."
},
"amountDisplay": {
"type": "string",
"description": "Display text, for example \"20% OFF\"."
},
"billingPeriodLabel": {
"type": "string",
"description": "Display text, for example \"Once\" or \"3 Months\"."
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
},
"$defs": {
"PublicApiDiscountBillingPeriod": {
"type": "string",
"enum": [
"once",
"repeating",
"forever"
],
"description": "How long the discount applies to a subscription: the first payment only (once), a number of billing periods (repeating), or every payment (forever)."
},
"PublicApiDiscountBillingPeriodUnit": {
"type": "string",
"enum": [
"day",
"week",
"month",
"year"
]
},
"PublicApiDiscountCodeStatus": {
"type": "string",
"enum": [
"active",
"expired",
"archived"
],
"description": "`expired` is derived from expiresAt. `archived` codes stay readable but cannot be redeemed or updated."
},
"PublicApiDiscountPromoType": {
"type": "string",
"enum": [
"percentage",
"flat_amount"
]
},
"SharedTypes.CurrencyCode": {
"type": "string",
"pattern": "^[a-z]{3}$",
"description": "ISO 4217 currency code. Always lowercase (e.g. 'usd', 'eur')."
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/payments-ai-public-api-discount-code"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.