Recurly Coupon Redemptions API

The coupon-redemptions API from Recurly — 3 operation(s) for coupon-redemptions.

Operations 4

GET /accounts/{account_code}/redemption Lookup a Coupon Redemption on an Account #
DELETE /accounts/{account_code}/redemption Remove a Coupon from an Account #
GET /invoices/{invoice_number}/redemption Lookup a Coupon Redemption on an Invoice #
POST /coupons/{coupon_code}/redeem Redeem a Coupon Before or After a Subscription #

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-line-item-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-subscription-create-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-invoice-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-subscription-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-add-on-create-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-purchase-create-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-subscription-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-billing-attempt-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-subscription-create-request-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-subscription-line-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-subscription-offer-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-subscriber-dto-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-transaction-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-recovery-invoice-create-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-dunning-campaign-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-invoice-collection-schema.json
📊
JSONSchema
https://artifacts.apis.io/recurly/json-schema/recurly-dunning-campaign-list-schema.json

Other Resources

Work with this as data

Every API 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 apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/recurly:recurly-coupon-redemptions-api"
All apis
curl "https://apis.io/api/v1/apis?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. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

recurly-coupon-redemptions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Recurly Coupon Redemptions API
  version: '1.0'
  description: 'Operations tagged coupon-redemptions across 2 of this provider''s published API definitions: recurly-v2-api.yaml, recurly-v2-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://{subdomain}.recurly.com/v2
  variables:
    subdomain:
      description: Subdomain of your Recurly site.
      default: my-super-successful-company
security:
- api_key: []
tags:
- name: coupon-redemptions
  x-displayName: Coupon Redemptions
paths:
  /accounts/{account_code}/redemption:
    get:
      summary: Lookup a Coupon Redemption on an Account
      description: Lookup information about the 'active' coupon redemption on an account
      tags:
      - coupon-redemptions
      operationId: lookupACouponRedemptionOnAnAccount
      parameters:
      - in: query
        name: single_use
        schema:
          type: boolean
          default: ''
        required: false
        description: True if the coupon is valid for one use only
      - in: query
        name: total_discounted_in_cents
        schema:
          type: integer
          default: ''
        required: false
        description: Total amount saved by the coupon
      - in: query
        name: currency
        schema:
          type: string
          default: ''
        required: false
        description: Currency of the redemption
      - in: query
        name: state
        schema:
          type: string
          default: ''
        required: false
        description: State of the redemption
      - in: query
        name: created_at
        schema:
          type: string
          format: date-time
          default: ''
        required: false
        description: Date the coupon was redeemed
      - in: path
        name: account_code
        schema:
          type: string
        required: true
        description: Account Code.
      responses:
        '200':
          description: ''
          content:
            application/xml:
              example: "Status: 200 OK\nContent-Type: application/xml; charset=utf-8\n\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<redemption href=\"https://your-subdomain.recurly.com/v2/accounts/1/redemption\">\n  <coupon href=\"https://your-subdomain.recurly.com/v2/coupons/special\"/>\n  <account href=\"https://your-subdomain.recurly.com/v2/accounts/b6f5783\"/>\n  <single_use type=\"boolean\">false</single_use>\n  <total_discounted_in_cents type=\"integer\">0</total_discounted_in_cents>\n  <currency>USD</currency>\n  <state>active</state>\n  <created_at type=\"datetime\">2015-06-27T12:34:56Z</created_at>\n</redemption>"
      x-codeSamples:
      - lang: PHP
        source: "try {\n  $account = Recurly_Account::get('b6f5783');\n  if ($account->redemption) {\n    $redemption = $account->redemption->get();\n    print \"Redemption: $redemption\";\n  }\n} catch (Recurly_NotFoundError $e) {\n  print \"Account not found: $e\";\n}"
      - lang: Ruby
        source: 'account = Recurly::Account.find(''1'')

          redemption = account.redemption'
      - lang: Python
        source: 'account = Account.get(''1'')

          redemption = account.redemption()'
      - lang: Dotnet
        source: 'var account = Accounts.Get("1");

          var redemption = account.GetActiveRedemption();'
    delete:
      summary: Remove a Coupon from an Account
      description: 'Occasionally, you may want to remove a coupon from an account. Recurly will automatically remove coupons after they expire or are otherwise no longer valid for an account. If you want to remove a coupon from an account before it expires, you may use the examples below. Please note: the coupon will still count towards the "maximum redemption total" of a coupon.'
      tags:
      - coupon-redemptions
      operationId: removeACouponFromAnAccount
      parameters:
      - in: path
        name: account_code
        schema:
          type: string
        required: true
        description: Account Code.
      responses:
        '200':
          description: ''
          content:
            application/text:
              example: ''
      x-codeSamples:
      - lang: PHP
        source: '$redemption = Recurly_CouponRedemption::get(''account_code'');

          $redemption->delete();'
      - lang: Ruby
        source: 'account = Recurly::Account.find(''1'')

          redemption = account.redemption

          redemption.destroy'
      - lang: Python
        source: 'account = Account.get(''1'')

          redemption = account.redemption()

          redemption.delete()'
      - lang: Dotnet
        source: 'var account = Accounts.Get("1");

          var redemption = account.GetActiveRedemption();

          redemption.Delete();'
    servers:
    - url: https://{subdomain}.recurly.com/v2
      variables:
        subdomain:
          description: Subdomain of your Recurly site.
          default: my-super-successful-company
  /invoices/{invoice_number}/redemption:
    get:
      summary: Lookup a Coupon Redemption on an Invoice
      description: Lookup information about a coupon redemption applied to an invoice
      tags:
      - coupon-redemptions
      operationId: lookupACouponRedemptionOnAnInvoice
      parameters:
      - in: query
        name: single_use
        schema:
          type: boolean
          default: ''
        required: false
        description: True if the coupon is valid for one use only
      - in: query
        name: total_discounted_in_cents
        schema:
          type: integer
          default: ''
        required: false
        description: Total amount saved by the coupon
      - in: query
        name: currency
        schema:
          type: string
          default: ''
        required: false
        description: Currency of the redemption
      - in: query
        name: state
        schema:
          type: string
          default: ''
        required: false
        description: State of the redemption
      - in: query
        name: created_at
        schema:
          type: string
          format: date-time
          default: ''
        required: false
        description: Date the coupon was redeemed
      - in: path
        name: invoice_number
        schema:
          type: string
        required: true
        description: Invoice Number.
      responses:
        '200':
          description: ''
          content:
            application/xml:
              example: "Status: 200 OK\nContent-Type: application/xml; charset=utf-8\n\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<redemption href=\"https://your-subdomain.recurly.com/v2/accounts/1/redemption\">\n  <coupon href=\"https://your-subdomain.recurly.com/v2/coupons/special\"/>\n  <account href=\"https://your-subdomain.recurly.com/v2/accounts/1\"/>\n  <single_use type=\"boolean\">true</single_use>\n  <total_discounted_in_cents type=\"integer\">0</total_discounted_in_cents>\n  <currency>USD</currency>\n  <state>inactive</state>\n  <created_at type=\"datetime\">2011-06-27T12:34:56Z</created_at>\n</redemption>"
      x-codeSamples:
      - lang: PHP
        source: "$invoice = Recurly_Invoice::get('1');\nif($invoice->redemption) {\n  $redemption = $invoice->redemption->get();\n}"
      - lang: Ruby
        source: 'invoice = Recurly::Invoice.find(''1'')

          redemption = invoice.redemption'
      - lang: Python
        source: 'invoice = Invoice.get(''1'')

          redemption = invoice.redemption()'
      - lang: Dotnet
        source: 'var invoice = Invoices.Get(1);

          var redemption = invoice.GetRedemption();'
    servers:
    - url: https://{subdomain}.recurly.com/v2
      variables:
        subdomain:
          description: Subdomain of your Recurly site.
          default: my-super-successful-company
  /coupons/{coupon_code}/redeem:
    post:
      summary: Redeem a Coupon Before or After a Subscription
      description: Most coupons are redeemed during a new subscription. This endpoint allows you to redeem a coupon for a customer after their initial subscription, or in anticipation of a future subscription. When you redeem a coupon on an account, the coupon will be applied to the next subscription creation (new subscription), modification (e.g. upgrade or downgrade), or renewal.
      tags:
      - coupon-redemptions
      operationId: redeemACouponBeforeOrAfterASubscription
      parameters:
      - in: path
        name: coupon_code
        schema:
          type: string
        required: true
        description: Coupon Code.
      requestBody:
        required: true
        content:
          application/xml:
            schema:
              type: object
              properties:
                account_code:
                  type: integer
                  default: ''
                  description: Account code to apply redemption
                currency:
                  type: string
                  default: ''
                  description: Currency for the redemption
      responses:
        '201':
          description: ''
          content:
            application/xml:
              example: "Status: 201 Created\nContent-Type: application/xml; charset=utf-8\nLocation: https://your-subdomain.recurly.com/v2/accounts/1/redemption\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<redemption href=\"https://your-subdomain.recurly.com/v2/accounts/1/redemption\">\n  <coupon href=\"https://your-subdomain.recurly.com/v2/coupons/special\"/>\n  <account href=\"https://your-subdomain.recurly.com/v2/accounts/1\"/>\n  <single_use type=\"boolean\">false</single_use>\n  <total_discounted_in_cents type=\"integer\">0</total_discounted_in_cents>\n  <currency>USD</currency>\n  <created_at type=\"datetime\">2011-06-27T12:34:56Z</created_at>\n</redemption>"
      x-codeSamples:
      - lang: PHP
        source: '$coupon = Recurly_Coupon::get(''special'');

          $redemption = $coupon->redeemCoupon(''1'', ''USD'');'
      - lang: Ruby
        source: 'account = Recurly::Account.find(''1'')

          coupon = Recurly::Coupon.find(''special'')

          redemption = coupon.redeem(account)'
      - lang: Python
        source: 'coupon = Coupon.get(''special'')

          redemption = Redemption(account_code=''1'', currency=''USD'')

          redemption = coupon.redeem(redemption)'
      - lang: Dotnet
        source: 'var account = Accounts.Get("1");

          var redemption = account.Redeem("special", "USD");'
      - lang: xml
        source: "Accept-Type: application/xml\nContent-Type: application/xml; charset=utf-8\n<redemption>\n  <account_code>1</account_code>\n  <currency>USD</currency>\n</redemption>"
    servers:
    - url: https://{subdomain}.recurly.com/v2
      variables:
        subdomain:
          description: Subdomain of your Recurly site.
          default: my-super-successful-company
components:
  securitySchemes:
    api_key:
      type: http
      description: Enter the API key as the username and set the password to an empty string. You can locate and manage your API keys from the [API Credentials](https://app.recurly.com/go/developer/api_keys) page.
      scheme: basic
x-refined-from:
- recurly-v2-api.yaml
- recurly-v2-openapi.yml
x-readme:
  explorer-enabled: false