Elastic Path Invoices API

Invoices represent the amount a customer owes for a subscription. Elastic Path Subscriptions generates an invoice for every period in a subscription billing cycle. Invoices provide: - an itemized list of goods and services provided by a subscription. - the cost of a subscription. - if applicable, any taxes. The invoice lifecycle is described below. 1. When a subscription is created, an invoice for the first billing period is created. When a subscription is created as part of an order, the payment for the order covers the first billing period. 2. Subscription invoices are created by [**billing runs**](/docs/api/subscriptions/jobs). The billing run identifies subscriptions that require a new invoice for their next billing period and creates them. At this point, invoices are marked as outstanding. 3. Invoices where `tax_required` is `true` will not have payment taken until a tax run has added the required tax to the invoice. 3. The [**payment run**](/docs/api/subscriptions/jobs) identifies invoices that are still outstanding and attempts to take payment for them. If the payment succeeds the the invoice is no longer outstanding. If the payment fails for any reason, then the invoice remains outstanding and is picked up by the next payment run to retry the payment. If an invoice has a failed payment, payment is only retried if the fixed interval has passed from the last payment attempt as defined in Settings. ### Payment Retries It is important to limit the number of times Subscriptions retries a failed payment request for many reasons, including: frequent payment retries can indicate fraudulent activities; multiple failed payment attempts can lead to customers accounts being locked out or flagged for suspicious activity resulting in poor customer experience; and excessive retries places an unnecessary load on your payment processing system. In Subscriptions, by default, the number of payment retries is 10. You can set this to a limit between 0 - 20, depending on your requirements. Each payment retry is made as a payment run. Once the number of payment retries reaches the limit, the payment retries stop, resulting in status of the invoice being unpaid. See [Invoices](#invoices). When configuring payment retries, you have the following options. | Attribute | Required | Description | | --- | --- | --- | | `payment_retry_type` | Optional | One of the following options: `fixed` - use `fixed` if you want a fixed time interval between payment retries.`backoff` - use `backoff` if you want the time between retry attempts to increase exponentially.`tiered` - use `tiered` if you want to specify a list of time durations. | | `payment_retry_interval` | Optional | Represents the retry interval. For example, if `payment_retry_unit` is `week` and `payment_retry_interval` is `1` then, the payment retry interval is 1 week. | | `payment_retry_multiplier` | Optional | Use when `payment_retry_type` is `tiered` and represents the factor by which the time duration increases after each retry. | | `payment_retry_unit` | Optional | Represents the unit of time, either `day` or `week`. | ### Rounding Subscriptions always rounds down to the penny. ### Tax Subscriptions allows you to apply any number of tax rates to your invoices and subscriptions. When applying a tax rate, you must specify: - a name that appears on your customer's invoice that describes the specific type of tax. - the tax rate which is the percentage of the subscription amount that is required to be paid as tax. In addition, you can optionally specify the jurisdiction which is the geographic area or political entity that has authority to levey and collect taxes. You can apply more than one tax rate for all items in an invoice. You cannot apply a tax rate per line item. ### Payments When your customers add a subscription to a cart and the cart is checked out, an unpaid order is returned. You can process the payment for the order though a payment gateway. You can do this using: - Elastic Path Payments Powered by Stripe. The Elastic Path Payments Powered by Stripe gateway interacts with Stripe to allow your subscribers to pay for their subscriptions. - Authorize.Net. #### Using Elastic Path Payments Powered by Stripe To use Elastic Path Payments Powered by Stripe gateway, contact the [**Customer Success Team**](mailto:customersuccess@elasticpath.com). Create your Stripe account in [**Stripe Dashboard**](https://dashboard.stripe.com/login) and complete an onboarding form to make payments using the gateway. For more information, see [**Onboarding**](/docs/payments/onboarding). Once you have signed up for Elastic Path Payments Powered by Stripe, you must configure the payment gateway so that your shoppers can make payments. See [**Configure Elastic Path Payments Powered by Stripe**](/docs/payments/onboarding). #### Using Authorize.Net To use Authorize.Net, you must have: - an active merchant account with Authorize.Net - obtained API credentials. These include an **API Login ID** and a **Transaction Key**. - Enabled Authorize.Net in Commerce Manager. See [Enabling Authorize.net](/docs/commerce-manager/payments/configure-other-payment-gateways#enabling-authorizenet). #### Payment Requests Subscriptions only supports the `purchase` payment mechanism. The gateway attempts to charge the customer immediately, and the result of the attempt is returned. If a payment fails, the invoice is kept as outstanding and the payment information, with the reason for the failure is attached to the invoice. A new payment run is required to attempt another payment. When sending a payment request to the Payments service, you must specify the following. | Attribute | Required | Description | | --- | --- | --- | | `gateway` | Required| One of `elastic_path_payments_stripe`, `authorize_net` and `stripe_payment_intents`. | | `method` | Required | Must be `purchase`. | `payment` | Required | The type of payment, for example, `pm_card_visa_debit`. | `options` | Required | These options must be set as they set up the card to be used in future without the customer being present. If these options are not set, future payments may fail. There are two options. `off_session`. Must be set to `true`. `confirm`. Must be set to `true`. | #### External Payments External payments are payment methods not offered by Elastic Path Subscriptions (such as Elastic Path Payments powered by Stripe or Authorize.net), but they can still be integrated with Subscriptions. To do this, you must configure your subscriptions to use external payments by setting `manual_payments` to `true`. See [Create a Subscription](/docs/api/subscriptions/create-subscription). When a subscription is created with `manual_payments` set to `true`: 1. When the payment run processes the generated invoice, it creates a pending payment. A `subscription-invoice-created` event is emitted that includes the `subscription_id`, `invoice_id` and `payment_id`. No payment is taken. 2. You can use the events generated by Elastic Path Subscriptions to configure your external payment system to respond to these events, ensuring that your external payment system knows when the payment schedule has run and it's time to process the payment. 3. When the external payment system handles the payment (either takes the payment successfully or the payment fails) the [Update Invoice Payment](/docs/api/subscriptions/update-invoice-payment) endpoint, enables the update of the pending payment. - If payment is successful, the invoice is updated to `paid` and the billing/payment cycle continues as normal. - If payment fails, the invoice continues to be marked as `outstanding`. The payment is not `pending` anymore. This is because a payment attempt has been made. Following on from this, the next payment run generates another manual pending payment. The external system is notified of this using the `subscription-invoice-payment-updated`. #### Card Declines Card payments can fail for a variety of reasons, including insufficient funds, incorrect card data or fraudulent activity. You can use the `card_id` and `customer_id` attributes to program your front-end implementation to allow your preferred payment service provider to update a subscription with new card details, enabling you to easily manage your subscription changes.

Operations 8

GET /v2/subscriptions/invoices List invoices #
GET /v2/subscriptions/invoices/{invoice_uuid} Get invoice #
GET /v2/subscriptions/invoices/{invoice_uuid}/payments List invoice payments #
GET /v2/subscriptions/invoices/{invoice_uuid}/payments/{payment_uuid} Get invoice payment #
PUT /v2/subscriptions/invoices/{invoice_uuid}/payments/{payment_uuid} Update Invoice Payment #
POST /v2/subscriptions/invoices/{invoice_uuid}/payments/{payment_uuid}/refunds Create a refund for an invoice payment #
GET /v2/subscriptions/invoices/{invoice_uuid}/payments/{payment_uuid}/refunds List invoice payment refunds #
GET /v2/subscriptions/invoices/{invoice_uuid}/payments/{payment_uuid}/refunds/{refund_uuid} Get a refund for an invoice payment #

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/elastic-path-invoices-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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

elastic-path-invoices-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 26.0427.7514362
  x-version-timestamp: 2026-04-27 13:44:44+00:00
  title: Subscriptions Introduction Invoices API
  description: 'Elastic Path Subscriptions allows you to offer your customers subscriptions and recurring billing for your plans and services. Elastic Path Subscriptions gives you the flexibility to pause, update, or reactivate your subscription offerings, change subscription cycles and apply discounts.


    You can create subscriptions using the Elastic Path Subscriptions API or Commerce Manager See [Subscriptions](/docs/commerce-manager/subscriptions/overview).


    Scenarios include:


    - repeat products that your customers purchase on a recurring basis.

    - membership subscriptions where your customers pay a recurring fee to become members of a particular service, program or organization.

    - subscribe and save that allows your customers to subscribe to regular deliveries of products they use frequently, for example, household essentials, or personal care items.


    ### How Subscriptions Work


    Elastic Path Subscriptions enables you to manage your subscriptions plans and pricing options, using offerings. Offerings can contain any combination of plans and pricing options.


    Here''s how a typical subscription works:


    1. Create your offerings. Offerings are the plan and pricing options that a customer can choose. An offering can consist of many combinations of a plan or pricing options, depending on the plans and services you offer. See [**Offerings**](/docs/api/subscriptions/offerings).

    2. When a [**customer**](/docs/api/subscriptions/subscribers) chooses a pricing option, a subscription is created. See [**Subscriptions**](/docs/api/subscriptions/subscriptions).

    3. Elastic Path Subscriptions manages the billing and recurring payments associated with the subscription. See [**Invoicing and Payments**](/docs/api/subscriptions/invoices).


    ### Subscriber Management


    Elastic Path Subscriptions enables you to create customer accounts that you can use to manage their subscription details, including payment methods and billing information. See [**Subscribers**](/docs/api/subscriptions/subscribers).


    ### Invoicing & Payments


    Elastic Path Subscriptions enables you to manage the billing and recurring payments associated with your customers subscriptions. Elastic Path Subscriptions provides seamless integration with Elastic Path Payments powered by Stripe. See [**Invoicing and Payments**](/docs/api/subscriptions/invoices).

    '
servers:
- url: https://euwest.api.elasticpath.com
  description: EU west cluster
- url: https://useast.api.elasticpath.com
  description: US east cluster
security:
- BearerToken: []
tags:
- name: Invoices
  description: "Invoices represent the amount a customer owes for a subscription. Elastic Path Subscriptions generates an invoice for every period in a subscription billing cycle. Invoices provide:\n\n- an itemized list of goods and services provided by a subscription.\n- the cost of a subscription.\n- if applicable, any taxes.\n\nThe invoice lifecycle is described below.\n\n1. When a subscription is created, an invoice for the first billing period is created. When a subscription is created as part of an order, the payment for the order covers the first billing period.\n2. Subscription invoices are created by [**billing runs**](/docs/api/subscriptions/jobs). The billing run identifies subscriptions that require a new invoice for their next billing period and creates them. At this point, invoices are marked as outstanding.\n3. Invoices where `tax_required` is `true` will not have payment taken until a tax run has added the required tax to the invoice.  \n3. The [**payment run**](/docs/api/subscriptions/jobs) identifies invoices that are still outstanding and attempts to take payment for them. If the payment succeeds the the invoice is no longer outstanding. If the payment fails for any reason, then the invoice remains outstanding and is picked up by the next payment run to retry the payment. If an invoice has a failed payment, payment is only retried if the fixed interval has passed from the last payment attempt as defined in Settings.\n\n### Payment Retries\n\nIt is important to limit the number of times Subscriptions retries a failed payment request for many reasons, including: frequent payment retries can indicate fraudulent activities; multiple failed payment attempts can lead to customers accounts being locked out or flagged for suspicious activity resulting in poor customer experience; and excessive retries places an unnecessary load on your payment processing system.\n\nIn Subscriptions, by default, the number of payment retries is 10. You can set this to a limit between 0 - 20, depending on your requirements. Each payment retry is made as a payment run. \n\nOnce the number of payment retries reaches the limit, the payment retries stop, resulting in status of the invoice being unpaid. See [Invoices](#invoices).\n\nWhen configuring payment retries, you have the following options.\n\n| Attribute | Required | Description |\n| --- | --- | --- |\n| `payment_retry_type` | Optional | One of the following options: <ul><li>`fixed` - use `fixed` if you want a fixed time interval between payment retries.</li><li>`backoff` - use `backoff` if you want the time between retry attempts to increase exponentially.</li><li>`tiered` - use `tiered` if you want to specify a list of time durations.</li></ul>  |\n| `payment_retry_interval` | Optional | Represents the retry interval. For example, if `payment_retry_unit` is `week` and `payment_retry_interval` is `1` then, the payment retry interval is 1 week.  |\n| `payment_retry_multiplier` | Optional | Use when `payment_retry_type` is `tiered` and represents the factor by which the time duration increases after each retry.   |\n| `payment_retry_unit` | Optional | Represents the unit of time, either `day` or `week`. |\n\n### Rounding\n\nSubscriptions always rounds down to the penny. \n\n### Tax\n\nSubscriptions allows you to apply any number of tax rates to your invoices and subscriptions. When applying a tax rate, you must specify:\n\n- a name that appears on your customer's invoice that describes the specific type of tax.\n- the tax rate which is the percentage of the subscription amount that is required to be paid as tax.\n\nIn addition, you can optionally specify the jurisdiction which is the geographic area or political entity that has authority to levey and collect taxes.\n\nYou can apply more than one tax rate for all items in an invoice. You cannot apply a tax rate per line item.\n\n### Payments\n\nWhen your customers add a subscription to a cart and the cart is checked out, an unpaid order is returned. You can process the payment for the order though a payment gateway. You can do this using:\n\n- Elastic Path Payments Powered by Stripe. The Elastic Path Payments Powered by Stripe gateway interacts with Stripe to allow your subscribers to pay for their subscriptions. \n- Authorize.Net. \n\n#### Using Elastic Path Payments Powered by Stripe\n\nTo use Elastic Path Payments Powered by Stripe gateway, contact the [**Customer Success Team**](mailto:customersuccess@elasticpath.com). \n\nCreate your Stripe account in [**Stripe Dashboard**](https://dashboard.stripe.com/login) and complete an onboarding form to make payments using the gateway. For more information, see [**Onboarding**](/docs/payments/onboarding).\n\nOnce you have signed up for Elastic Path Payments Powered by Stripe, you must configure the payment gateway so that your shoppers can make payments. See [**Configure Elastic Path Payments Powered by Stripe**](/docs/payments/onboarding).\n\n#### Using Authorize.Net\n\nTo use Authorize.Net, you must have: \n\n- an active merchant account with Authorize.Net\n- obtained API credentials. These include an **API Login ID** and a **Transaction Key**.\n- Enabled Authorize.Net in Commerce Manager. See [Enabling Authorize.net](/docs/commerce-manager/payments/configure-other-payment-gateways#enabling-authorizenet).\n\n#### Payment Requests\n\nSubscriptions only supports the `purchase` payment mechanism. The gateway attempts to charge the customer immediately, and the result of the attempt is returned. If a payment fails, the invoice is kept as outstanding and the payment information, with the reason for the failure is attached to the invoice. A new payment run is required to attempt another payment. \n\nWhen sending a payment request to the Payments service, you must specify the following.\n\n| Attribute | Required | Description |\n| --- | --- | --- |\n| `gateway` | Required| One of `elastic_path_payments_stripe`, `authorize_net` and `stripe_payment_intents`. |\n| `method` | Required | Must be `purchase`.\n| `payment` | Required | The type of payment, for example, `pm_card_visa_debit`.\n| `options` | Required | These options must be set as they set up the card to be used in future without the customer being present. If these options are not set, future payments may fail. There are two options. <ul><li>`off_session`. Must be set to `true`. </li><li>`confirm`. Must be set to `true`.</li></ul> |\n\n#### External Payments\n\nExternal payments are payment methods not offered by Elastic Path Subscriptions (such as Elastic Path Payments powered by Stripe or Authorize.net), but they can still be integrated with Subscriptions. To do this, you must configure your subscriptions to use external payments by setting `manual_payments` to `true`. See [Create a Subscription](/docs/api/subscriptions/create-subscription).\n\nWhen a subscription is created with `manual_payments` set to `true`:\n\n1. When the payment run processes the generated invoice, it creates a pending payment. A `subscription-invoice-created` event is emitted that includes the `subscription_id`, `invoice_id` and `payment_id`. No payment is taken. \n2. You can use the events generated by Elastic Path Subscriptions to configure your external payment system to respond to these events, ensuring that your external payment system knows when the payment schedule has run and it's time to process the payment.\n3. When the external payment system handles the payment (either takes the payment successfully or the payment fails) the [Update Invoice Payment](/docs/api/subscriptions/update-invoice-payment) endpoint, enables the update of the pending payment. \n    - If payment is successful, the invoice is updated to `paid` and the billing/payment cycle continues as normal.\n    - If payment fails, the invoice continues to be marked as `outstanding`. The payment is not `pending` anymore. This is because a payment attempt has been made. Following on from this, the next payment run generates another manual pending payment. The external system is notified of this using the `subscription-invoice-payment-updated`.\n\n#### Card Declines\n\nCard payments can fail for a variety of reasons, including insufficient funds, incorrect card data or fraudulent activity. You can use the `card_id` and `customer_id` attributes to program your front-end implementation to allow your preferred payment service provider to update a subscription with new card details, enabling you to easily manage your subscription changes.\n"
paths:
  /v2/subscriptions/invoices:
    get:
      tags:
      - Invoices
      summary: List invoices
      description: "Retrieves a list of all invoices.\n\n### Filtering\n\nThis endpoint supports filtering. For the general syntax, see [**Filtering**](/guides/Getting-Started/filtering).\n\nThe following attributes and operators are supported.\n\n| Operator |Attribute | Description |\n| --- | --- | --- | \n| `eq` | `subscriber_id`, `subscription_id`, `outstanding`, `tax_required` | Equals. Checks if the values of two operands are equal. If they are, the condition is true. |\n| `in` | `subscriber_id`, `subscription_id` | In. Checks if the value is in the specified list. If it is, the condition is true. |\n"
      parameters:
      - $ref: '#/components/parameters/Filter'
      - $ref: '#/components/parameters/PageOffset'
      - $ref: '#/components/parameters/PageLimit'
      operationId: ListInvoices
      responses:
        '200':
          description: Success. A list of invoices is returned.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/SubscriptionInvoice'
                  links:
                    $ref: '#/components/schemas/Links'
        '400':
          $ref: '#/components/responses/ValidationError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v2/subscriptions/invoices/{invoice_uuid}:
    parameters:
    - name: invoice_uuid
      in: path
      description: The unique identifier of the invoice.
      required: true
      schema:
        $ref: '#/components/schemas/UUID'
    get:
      tags:
      - Invoices
      summary: Get invoice
      operationId: GetInvoice
      responses:
        '200':
          description: Success. The details of the invoice are returned.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/SubscriptionInvoice'
        '400':
          $ref: '#/components/responses/ValidationError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v2/subscriptions/invoices/{invoice_uuid}/payments:
    parameters:
    - name: invoice_uuid
      in: path
      description: The unique identifier of the invoice.
      required: true
      schema:
        $ref: '#/components/schemas/UUID'
    get:
      tags:
      - Invoices
      summary: List invoice payments
      parameters:
      - $ref: '#/components/parameters/PageOffset'
      - $ref: '#/components/parameters/PageLimit'
      operationId: ListInvoicePayments
      responses:
        '200':
          description: Success. Payments for the invoice are returned
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/SubscriptionInvoicePayment'
                  links:
                    $ref: '#/components/schemas/Links'
  /v2/subscriptions/invoices/{invoice_uuid}/payments/{payment_uuid}:
    parameters:
    - name: invoice_uuid
      in: path
      description: The unique identifier of the invoice.
      required: true
      schema:
        $ref: '#/components/schemas/UUID'
    - name: payment_uuid
      in: path
      description: The unique identifier of the payment.
      required: true
      schema:
        $ref: '#/components/schemas/UUID'
    get:
      tags:
      - Invoices
      summary: Get invoice payment
      operationId: GetInvoicePayment
      responses:
        '200':
          description: Success. Specific payment for the invoice is returned
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/SubscriptionInvoicePayment'
        '404':
          $ref: '#/components/responses/NotFoundError'
    put:
      tags:
      - Invoices
      summary: Update Invoice Payment
      description: 'External payment methods are payment methods not offered by Elastic Path Subscriptions (such as Elastic Path Payments powered by Stripe or Authorize.net), but they can still be integrated with Subscriptions. You can use the `Update Invoice Payment` endpoint to manually update a payment against an invoice where an external payment method is handling the payment of your invoices. See [External Payments](/docs/api/subscriptions/invoices#external-payments).

        '
      operationId: UpdateInvoicePayment
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - data
              properties:
                data:
                  $ref: '#/components/schemas/UpdateInvoicePayment'
      responses:
        '200':
          description: Success. Invoice payment has been updated.
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/SubscriptionInvoicePayment'
        '400':
          $ref: '#/components/responses/ValidationError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '409':
          $ref: '#/components/responses/WriteConflictError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v2/subscriptions/invoices/{invoice_uuid}/payments/{payment_uuid}/refunds:
    parameters:
    - name: invoice_uuid
      in: path
      description: The unique identifier of the invoice.
      required: true
      schema:
        $ref: '#/components/schemas/UUID'
    - name: payment_uuid
      in: path
      description: The unique identifier of the payment.
      required: true
      schema:
        $ref: '#/components/schemas/UUID'
    post:
      operationId: CreateInvoicePaymentRefund
      summary: Create a refund for an invoice payment
      description: Creates a refund for a paid invoice.
      tags:
      - Invoices
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - data
              properties:
                data:
                  $ref: '#/components/schemas/CreateInvoicePaymentRefund'
      responses:
        '201':
          description: Success. The payment refund is completed.
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/SubscriptionInvoicePaymentRefund'
        '400':
          $ref: '#/components/responses/ValidationError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/UnprocessableContent'
        '500':
          $ref: '#/components/responses/InternalServerError'
    get:
      parameters:
      - $ref: '#/components/parameters/PageOffset'
      - $ref: '#/components/parameters/PageLimit'
      operationId: ListInvoicePaymentRefunds
      summary: List invoice payment refunds
      description: List all refunds for an invoice payments
      tags:
      - Invoices
      responses:
        '200':
          description: Success. Refunds for an invoice payment are returned.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/SubscriptionInvoicePaymentRefund'
                  links:
                    $ref: '#/components/schemas/Links'
        '400':
          $ref: '#/components/responses/ValidationError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /v2/subscriptions/invoices/{invoice_uuid}/payments/{payment_uuid}/refunds/{refund_uuid}:
    parameters:
    - name: invoice_uuid
      in: path
      description: The unique identifier of the invoice.
      required: true
      schema:
        $ref: '#/components/schemas/UUID'
    - name: payment_uuid
      in: path
      description: The unique identifier of the payment.
      required: true
      schema:
        $ref: '#/components/schemas/UUID'
    - name: refund_uuid
      in: path
      description: The unique identifier of the refund.
      required: true
      schema:
        $ref: '#/components/schemas/UUID'
    get:
      operationId: GetInvoicePaymentRefund
      summary: Get a refund for an invoice payment
      description: Get a refund for a paid invoice.
      tags:
      - Invoices
      responses:
        '200':
          description: Success. Specific refund for the invoice payment is returned
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    $ref: '#/components/schemas/SubscriptionInvoicePaymentRefund'
        '400':
          $ref: '#/components/responses/ValidationError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    SubscriptionInvoicePaymentAttributes:
      required:
      - success
      - amount
      - gateway
      properties:
        success:
          type: boolean
          example: true
          description: Whether the payment was successful.
        pending:
          type: boolean
          example: true
          description: Whether the payment is pending (only for manual payments).
        gateway:
          type: string
          maxLength: 1024
          example: elastic_path_payments_stripe
          description: Specifies the payment gateway.
        external_payment_id:
          type: string
          maxLength: 1024
          example: 33e7ec6b-8b34-4c92-a95b-2e2647922e47
          description: An optional external ID that is specific to the gateway used.
        failure_detail:
          $ref: '#/components/schemas/PaymentFailureDetail'
        amount:
          $ref: '#/components/schemas/SingleCurrencyPrice'
    RelationshipData:
      type: object
      required:
      - id
      - type
      properties:
        id:
          $ref: '#/components/schemas/UUID'
        type:
          type: string
          description: This represents the type of resource being returned.
          example: 11111111-2222-3333-4444-555555555555
    SubscriptionInvoice:
      required:
      - type
      - attributes
      - meta
      properties:
        id:
          $ref: '#/components/schemas/UUID'
        type:
          $ref: '#/components/schemas/SubscriptionInvoiceType'
        attributes:
          $ref: '#/components/schemas/SubscriptionInvoiceAttributes'
        relationships:
          $ref: '#/components/schemas/Relationships'
        meta:
          $ref: '#/components/schemas/SubscriptionInvoiceMeta'
    TimePeriod:
      description: A period of time between a start and end point.
      required:
      - start
      - end
      properties:
        start:
          description: The date and time a billing period started.
          type: string
          format: date-time
          example: '2017-07-21T17:32:28Z'
        end:
          description: The date and time a billing period ended.
          type: string
          format: date-time
          example: '2017-07-21T17:32:28Z'
    PaymentFailureDetail:
      type: object
      description: The reason the payment failed.
      properties:
        reason:
          type: string
          example: Card Failure
    SubscriptionInvoicePaymentMeta:
      readOnly: true
      required:
      - owner
      - timestamps
      - invoice_id
      - subscription_id
      - job_id
      - manual_payment
      properties:
        owner:
          $ref: '#/components/schemas/OwnerMeta'
        subscription_id:
          $ref: '#/components/schemas/UUID'
        invoice_id:
          $ref: '#/components/schemas/UUID'
        job_id:
          $ref: '#/components/schemas/UUID'
        timestamps:
          $ref: '#/components/schemas/InvoicePaymentTimestamps'
        manual_payment:
          type: boolean
          example: false
          description: Whether manual payments are enabled or the payment will be handled by the configured gateway.
    LinkURI:
      type:
      - string
      - 'null'
      format: uri
      example: http://example.com/articles/1/comments
    UpdateInvoicePaymentAttributes:
      required:
      - success
      properties:
        success:
          type: boolean
          example: true
          description: Whether the payment was successful.
        external_payment_id:
          type: string
          maxLength: 1024
          example: 33e7ec6b-8b34-4c92-a95b-2e2647922e47
          description: An optional external ID that is specific to the gateway used.
        failure_detail:
          description: A message generated by an external payment method that describes why a payment fails.
          type: string
          example: Card Failure
        payment_taken_at:
          description: The date and time the invoice payment was taken at.
          type: string
          example: '2017-01-10T11:41:19.244842Z'
    Relationship:
      anyOf:
      - $ref: '#/components/schemas/SingleRelationship'
      - $ref: '#/components/schemas/ManyRelationship'
    Link:
      anyOf:
      - $ref: '#/components/schemas/LinkURI'
      - $ref: '#/components/schemas/LinkObject'
    SubscriptionInvoicePaymentRefundAttributes:
      required:
      - amount
      - reason
      - gateway
      - external_refund_id
      - created_at
      properties:
        amount:
          type: integer
          format: int64
          minimum: 1
          description: The value as a whole number of the currency's smallest subdivision.
          example: 100
        reason:
          type: string
          maxLength: 1024
          description: The reason or note for the refund
          example: Customer requested cancellation
        gateway:
          type: string
          maxLength: 1024
          example: elastic_path_payments_stripe
          description: Specifies the payment gateway.
        external_refund_id:
          type: string
          maxLength: 1024
          example: 33e7ec6b-8b34-4c92-a95b-2e2647922e47
          description: An optional external ID that is specific to the gateway used.
        created_at:
          description: The date and time a resource was created.
          type: string
          example: '2017-01-10T11:41:19.244842Z'
    InvoiceNotification:
      description: A notification scheduled for an invoice.
      required:
      - name
      - due
      properties:
        name:
          description: The name of the notification schedule that generated this notification.
          type: string
          example: 7 days before renewal
        due:
          description: The date and time when the notification is due to be sent.
          type: string
          format: date-time
          example: '2024-01-24T00:00:00Z'
        sent_at:
          description: The date and time when the notification was sent.
          type: string
          format: date-time
          example: '2024-01-24T00:00:00Z'
    SubscriptionInvoiceAttributes:
      required:
      - billing_period
      - pro_forma
      - invoice_items
      - outstanding
      - tax_required
      - payment_retries_limit_reached
      - manual_payment_pending
      properties:
        billing_period:
          $ref: '#/components/schemas/TimePeriod'
        invoice_items:
          type: array
          items:
            $ref: '#/components/schemas/SubscriptionInvoiceItem'
        tax_items:
          type: array
          items:
            $ref: '#/components/schemas/TaxItem'
        outstanding:
          type: boolean
          description: The invoice still requires payment if `true`.
          example: true
        number:
          type: integer
          description: A sequential number assigned by the billing run.
          example: 1
        tax_required:
          type: boolean
          description: Whether tax is required for this invoice.
          example: true
        payment_retries_limit_reached:
          type: boolean
          description: Whether the limit of payment retries has been reached.
          example: false
        updated_at:
          description: The date and time an invoice was updated.
          type: string
          example: '2017-01-10T11:41:19.244842Z'
        created_at:
          description: The date and time an invoice was created.
          type: string
          example: '2017-01-10T11:41:19.244842Z'
        pro_forma:
          description: 'Whether the invoice is a Pro Forma invoice (generated ahead of payment) or not.


            Pro Forma Invoices are created ahead of payment time (for example, a week in advance of payment so

            you can notify customers) and will not be picked up by a payment run until on or after their valid_from

            date.

            '
          type: boolean
          example: false
        valid_from:
          description: 'The date and time at which an invoice will be valid from.


            If generated with no lead time then the invoice will be valid immediately.


            If generated with a lead time, then the valid_from will be the data at which the Invoice transitions from

            it''s Pro Forma state to one that can have payment taken.

            '
          type: string
          example: '2017-01-10T11:41:19.244842Z'
        manual_payment_pending:
          type: boolean
          description: Whether there is a manual pending payment pending on the invoice.
          example: true
    LinkObject:
      type: object
      properties:
        href:
          type: string
          format: uri
          example: http://example.com/articles/1/comments
        title:
          type: string
          example: Comments
        describedby:
          type: string
          format: uri
          example: http://example.com/schemas/article-comments
    RelationshipLinks:
      description: "Links are used to allow you, as an API consumer, to move between requests. Single entities use a self parameter with a link to that specific resource. Sometimes, there aren’t enough entities for a project to fill multiple pages. In this situation, we return some defaults, instead of expecting you to check for these special cases. \n\n - current - Always the current page.\n - first - Always the first page.\n - last - always `null`.\n - next - `null` if the user is on the first page.\n - previous - `null` if there is only one page.\n"
      type: object
      properties:
        related:
          type: string
          example: foo.bar
    Relationships:
      description: Relationships are established between different subscription entities. For example, a plan and a pricing option are related to an offering, as both are attached to it.
      additionalProperties:
        $ref: '#/components/schemas/Relationship'
      example:
        pricing-options:
          links:
            related: /offerings/:offering-id/pricing-options
            self: /offerings/:offering-id
          data:
            type: offering-pricing-option
            id: 625fe958-7b4b-40a0-a2c0-dbb8f31eec0d
    SubscriptionInvoiceMeta:
      readOnly: true
      required:
      - owner
      - timestamps
      - proration_events
      - pro_rata_remaining_value
      - display_price
      properties:
        owner:
          $ref: '#/components/schemas/OwnerMeta'
        subscription_id:
          $ref: '#/components/schemas/UUID'
        subscriber_id:
          $ref: '#/components/schemas/UUID'
        price:
          $ref: '#/components/schemas/SingleCurrencyPrice'
        display_price:
          description: 'Invoice totals formatted for display (`with_tax`, `without_tax`, `tax`). Amounts are in the

            currency''s smallest subdivision.

            '
          $ref: '#/components/schemas/DisplayPrice'
        notifications:
          description: 'A list of notifications scheduled for this invoice. These are derived from the notification

            schedules configured on the pricing option at the time the invoice was created. Each notification

            has a due date calculated relative to the billing period end date.

            '
          type: array
          items:
            $ref: '#/components/schemas/InvoiceNotification'
        timestamps:
          $ref: '#/components/schemas/InvoiceTimestamps'
        proration_events:
          type: array
          items:
            $ref: '#/components/schemas/ProrationEvent'
        pro_rata_remaining_value:
          type: integer
 

# --- truncated at 32 KB (45 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/elastic-path/refs/heads/main/openapi/elastic-path-invoices-api-openapi.yml