Recurly External Payment Phases API

The external-payment-phases API from Recurly — 3 operation(s) for external-payment-phases.

GitHub OpenAPI

Operations 3

GET /external_subscriptions/{external_subscription_id}/external_payment_phases Lists an External Subscription's External Payment Phases #
GET /external_subscriptions/{external_subscription_id}/external_payment_phases/{external_payment_phase_id} Fetch an external payment phase #
GET /external_payment_phases/{external_payment_phase_id} Fetch an external payment phase #

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-external-payment-phases-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-external-payment-phases-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Recurly V2 External Payment Phases API
  description: '# Getting Started

    Welcome to the reference documentation for Recurly''s XML API v2. Here you will find a complete

    reference for all API v2 operations. If you''re building a new product, or just getting started with Recurly, we recommend

    using our newer JSON API v3. Now let''s get started with API v2. # Authentication

    ##### API Authentication (HTTP Basic)

    Recurly uses HTTP Basic Authentication—your Private API key is securely encrypted by the SSL channel. If you are testing the API calls via the command line with cURL, try:


    ```

    curl -H ''Accept: application/xml'' \

    -H ''X-Api-Version: 2.29'' \

    -H ''Content-Type: application/xml; charset=utf-8'' \

    -u ''[apikey]'' \

    https://[subdomain].recurly.com/v2/accounts

    ```


    Replace `[apikey]` and `[subdomain]` with the appropriate values for your site. ##### Calculating your own authorization header

    Most programming languages encode the authorization header automatically. With HTTP Basic Authentication, the `Authorization` header is a string containing a Base-64 encoded username and password. In the case of Recurly''s API, you need only specify the username as your API key. If your library requires a password, set it to an empty string. ```

    "Authorization": "Basic " + base64_encode(API Key)

    ```


    ##### Additional Request Headers

    **Accept Header**


    Recurly API v2 returns results as XML. Your requests should always include the header requesting the results as XML:


    ```

    Accept: application/xml

    ```


    **Content-Type Header**


    When sending data to Recurly in a POST or PUT request, your request must specify the content type of your request:


    ```

    Content-Type: application/xml; charset=utf-8

    ```


    **X-Api-Version Header**


    When sending data to Recurly, your request should specify the API version you''re attempting to interact with:

    ```

    X-Api-Version: 2.29

    ```

    You learn more about the different versions in the API Versioning section. ##### Public API Key

    Recurly uses two types of API keys: public and private. The Public API key is used by Recurly.js to identify its requests as belonging to your Recurly site. This key can be safely included in Javascript code. Recurly provides each site with one Public Key. The Public API Key can be regenerated on the API Credentials page. ##### Private API Keys


    ###### Treat your Private API Keys like passwords! The API key allows access to your site''s data. Do not include it in Javascript code exposed to browsers. Recurly supports the use of multiple Private API keys, which can be used to integrate third party services using unique, controlled credentials. **Limits & Pricing**


    Merchants on the Starter or grandfathered Recurly plans or merchants in sandbox mode will be granted 5 private API keys. Merchants on Recurly''s Professional plan will be granted 10 private API keys. **Default Key**


    Your default private API key should be used to integrate Recurly with your backend systems. There will be at least one key active at all times. **Additional Keys**


    Additional private API keys should be used to connect your Recurly data to additional sources, like analytics software, accounting packages, or email tools. Recurly recommends clearly labeling the name of each key to identify the associated vendor. **Regenerating Private API Keys**


    Your API key can be regenerated by clicking on the Regenerate button on the API credentials page. When you generate a private API key, you have two options:


    1. Block the old key immediately. This is primarily recommended when the security of a key has been compromised. 2. Allow the old key access for 12 hours. This is primarily used when updating systems and a smooth transition between keys is needed. *If a private API key is changed, an email alert will be sent to your Recurly Site Technical Contact.*


    **Read-Only Keys**


    When creating a private key, you will have the option to set the key to “read-only”. This means the API key may make GET requests but cannot not PUT, POST or DELETE requests.'
  version: '2.29'
servers:
- url: https://{subdomain}.{domain}/v2
  variables:
    subdomain:
      description: Subdomain of your Recurly site.
      default: my-super-successful-company
    domain:
      description: Domain of your Recurly site.
      default: recurly.com
security:
- api_key: []
tags:
- name: external-payment-phases
  x-displayName: External Payment Phases
paths:
  /external_subscriptions/{external_subscription_id}/external_payment_phases:
    get:
      summary: Lists an External Subscription's External Payment Phases
      description: Returns a list of external payment phases for an external subscription.
      tags:
      - external-payment-phases
      operationId: listExternalSubscriptionsExternalPaymentPhases
      parameters:
      - $ref: '#/components/parameters/external_subscription_id'
      responses:
        '200':
          description: ''
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/ExternalPaymentPhase'
              example: "<external_payment_phases>\n  <external_payment_phase href=\"https://your-subdomain.recurly.com/v2/external_payment_phases/tws7x821sv1z\">\n    <id>tws7x821sv1z</id>\n    <started_at type=\"datetime\">2023-11-08T21:02:39Z</started_at>\n    <ends_at type=\"datetime\">2023-12-06T21:02:39Z</ends_at>\n    <starting_billing_period_index>1</starting_billing_period_index>\n    <ending_billing_period_index>4</ending_billing_period_index>\n    <offer_type nil=\"nil\"></offer_type>\n    <offer_name nil=\"nil\"></offer_name>\n    <period_count>1</period_count>\n    <period_length>TWO_MONTHS</period_length>\n    <amount>0.0</amount>\n    <currency>USD</currency>\n    <created_at>2022-10-10T21:40:57Z</created_at>\n    <updated_at>2022-10-10T21:40:57Z</updated_at>\n  </external_payment_phase>\n</external_payment_phases>"
        '404':
          description: Incorrect site or external subscription ID.
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
              example: "<error>\n  <symbol>not_found</symbol>\n  <description lang=\"en-US\">Couldn't find ExternalSubscription with id</description>\n</error>"
        default:
          description: Unexpected error.
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
      - lang: PHP
        source: "<?php\n\ntry {\n  $external_payment_phases = Recurly_ExternalPaymentPhaseList::get('b6f5783');\n  foreach ($external_payment_phases as $external_payment_phase) {\n    print \"External PaymentPhase: {$external_payment_phase}\\n\";\n  }\n} catch (Recurly_NotFoundError $e) {\n  print \"External Subscription not found: $e\";\n}"
      - lang: Ruby
        source: "external_subscription = Recurly::ExternalSubscription.find('1')\nexternal_subscription.external_payment_phases.find_each do |external_payment_phase|\n  puts \"External PaymentPhase: #{external_payment_phase.inspect}\"\nend"
      - lang: Python
        source: "#client version <= 2.1.5\nexternal_subscription = ExternalSubscription.get('1')\nexternal_payment_phases = external_subscription.external_payment_phases()\nwhile external_payment_phases:\n    for external_payment_phase in external_payment_phases:\n        print 'External PaymentPhase: %s' % external_payment_phase\n    try:\n        external_payment_phases = external_payment_phases.next_page()\n    except PageError:\n        external_payment_phases = ()\n\n#client version 2.1.6+\nexternal_subscription = ExternalSubscription.get('1')\nfor external_payment_phase in external_subscription.external_payment_phases():\n    print 'External PaymentPhase: %s' % external_payment_phase"
      - lang: Dotnet
        source: "using System.Linq;\n\n// Get the list of external payment_phases through the ExternalSubscription\nvar externalSubscription = ExternalSubscriptions.Get(\"1\");\nvar externalPaymentPhases = externalSubscription.GetExternalPaymentPhases();\n\n// OR directly through ExternalPaymentPhases\nvar externalPaymentPhases = ExternalPaymentPhases.List(\"1\"); // account code\n\nwhile (externalPaymentPhases.Any())\n{\n  foreach (var externalPaymentPhase in externalPaymentPhases)\n    Console.WriteLine(\"External PaymentPhase: \" + externalPaymentPhase);\n    externalPaymentPhases = externalPaymentPhases.Next;\n}"
  /external_subscriptions/{external_subscription_id}/external_payment_phases/{external_payment_phase_id}:
    parameters:
    - $ref: '#/components/parameters/external_subscription_id'
    - $ref: '#/components/parameters/external_payment_phase_id'
    get:
      tags:
      - external-payment-phases
      operationId: getExternalSubscriptionExternalPaymentPhase
      summary: Fetch an external payment phase
      responses:
        '200':
          description: Details for an external payment phase.
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/ExternalPaymentPhase'
              example: "<external_payment_phase href=\"https://your-subdomain.recurly.com/v2/external_payment_phases/tws7x821sv1z\">\n  <id>tws7x821sv1z</id>\n  <started_at type=\"datetime\">2023-11-08T21:02:39Z</started_at>\n  <ends_at type=\"datetime\">2023-12-06T21:02:39Z</ends_at>\n  <starting_billing_period_index>1</starting_billing_period_index>\n  <ending_billing_period_index>4</ending_billing_period_index>\n  <offer_type nil=\"nil\"></offer_type>\n  <offer_name nil=\"nil\"></offer_name>\n  <period_count>1</period_count>\n  <period_length>TWO_MONTHS</period_length>\n  <amount>0.0</amount>\n  <currency>USD</currency>\n  <created_at>2022-10-10T21:40:57Z</created_at>\n  <updated_at>2022-10-10T21:40:57Z</updated_at>\n</external_payment_phase>"
        '404':
          description: Incorrect site, external subscription, or external payment phase ID.
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
              example: "<error>\n  <symbol>not_found</symbol>\n  <description lang=\"en-US\">Couldn't find ExternalPaymentPhase with id</description>\n</error>"
        default:
          description: Unexpected error.
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
      - lang: PHP
        source: "<?php\ntry {\n  $external_subscription = new Recurly_ExternalSubscription();\n  $external_subscription->uuid = 'swifdu8c9om9';\n  $external_payment_phase = $external_subscription->getExternalPaymentPhase(\"swifdua3cvtp\");\n  print \"External Payment Phase: $external_payment_phase->id\\n\";\n} catch (Recurly_ValidationError $e) {\n  print \"Validation error: $e\";\n} catch (Recurly_Error $e) {\n  // Could not find external payment phase\n  print \"Bad request: $e\";\n}"
      - lang: Ruby
        source: 'external_subscription = Recurly::ExternalSubscription.find(''pbux7jvmauhe'')

          external_payment_phase = external_subscription.get_external_payment_phase(''swifdua3cvtp'')'
      - lang: Python
        source: 'external_subscription = recurly.ExternalSubscription.get("pbux7jvmauhe")

          external_payment_phase = external_subscription.get_external_payment_phase("swifdua3cvtp")'
      - lang: Dotnet
        source: 'var externalSubscription = ExternalSubscription.Get("pbux7jvmauhe");

          var externalPaymentPhase = externalSubscription.GetExternalPaymentPhase("swifdua3cvtp");'
  /external_payment_phases/{external_payment_phase_id}:
    parameters:
    - $ref: '#/components/parameters/external_payment_phase_id'
    get:
      tags:
      - external-payment-phases
      operationId: getExternalPaymentPhase
      summary: Fetch an external payment phase
      responses:
        '200':
          description: Details for an external payment phase.
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/ExternalPaymentPhase'
              example: "<external_payment_phase href=\"https://your-subdomain.recurly.com/v2/external_payment_phases/tws7x821sv1z\">\n  <id>tws7x821sv1z</id>\n  <started_at type=\"datetime\">2023-11-08T21:02:39Z</started_at>\n  <ends_at type=\"datetime\">2023-12-06T21:02:39Z</ends_at>\n  <starting_billing_period_index>1</starting_billing_period_index>\n  <ending_billing_period_index>4</ending_billing_period_index>\n  <offer_type nil=\"nil\"></offer_type>\n  <offer_name nil=\"nil\"></offer_name>\n  <period_count>1</period_count>\n  <period_length>TWO_MONTHS</period_length>\n  <amount>0.0</amount>\n  <currency>USD</currency>\n  <created_at>2022-10-10T21:40:57Z</created_at>\n  <updated_at>2022-10-10T21:40:57Z</updated_at>\n</external_payment_phase>"
        '404':
          description: Incorrect site or external payment phase ID.
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
              example: "<error>\n  <symbol>not_found</symbol>\n  <description lang=\"en-US\">Couldn't find ExternalPaymentPhase with id</description>\n</error>"
        default:
          description: Unexpected error.
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
      - lang: PHP
        source: "<?php\n\ntry {\n  $external_payment_phase = Recurly_ExternalPaymentPhase::get('p7gnbhfxbe8o');\n  print \"External Payment Phase: $external_payment_phase\\n\";\n} catch (Recurly_NotFoundError $e) {\n  print \"External Payment Phase does not exist\";\n}"
      - lang: Ruby
        source: external_payment_phase = Recurly::ExternalPaymentPhase.find('p7gnbhfxbe8o')
      - lang: Python
        source: external_payment_phase = ExternalPaymentPhase.get('p7gnbhfxbe8o')
      - lang: Dotnet
        source: var external_payment_phase = ExternalPaymentPhases.Get("p7gnbhfxbe8o");
components:
  schemas:
    ExternalPaymentPhase:
      type: object
      properties:
        started_at:
          type: string
          format: date-time
        ends_at:
          type: string
          format: date-time
        starting_billing_period_index:
          type: integer
          title: Starting Billing Period Index
        ending_billing_period_index:
          type: integer
          title: Ending Billing Period Index
        offer_type:
          type: string
          title: Offer Type
          description: Type of discount offer given, e.g. "FREE_TRIAL"
        offer_name:
          type: string
          title: Offer Name
          description: Name of the discount offer given, e.g. "introductory"
        period_count:
          type: integer
          title: Period Count
          description: Number of billing periods
        period_length:
          type: string
          title: Period Length
          description: Billing cycle length
        amount:
          type: string
          format: decimal
          title: Amount
          minimum: 0
          description: Allows up to 9 decimal places
        currency:
          type: string
          title: Currency
          description: 3-letter ISO 4217 currency code.
        created_at:
          type: string
          format: date-time
          title: Created at
          description: When the external charge was created in Recurly.
        updated_at:
          type: string
          format: date-time
          title: Updated at
          description: When the external charge was updated in Recurly.
    Error:
      type: object
      title: Error
      properties:
        symbol:
          type: string
        description:
          type: string
      xml:
        name: error
  parameters:
    external_payment_phase_id:
      name: external_payment_phase_id
      in: path
      description: External payment phase ID, e.g. `d39iun2fw1v4`.
      required: true
      schema:
        type: string
    external_subscription_id:
      name: external_subscription_id
      in: path
      description: External subscription ID, e.g. `d39iun2fw1v4`.
      required: true
      schema:
        type: string
  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