# Renewal invoice reminder, 15 days past due

`POST invoice-past-due-reminder-15-days`

> This is a subset of the full specification, limited to the `POST invoice-past-due-reminder-15-days` operation.
>
> You can find the full specification here: /_bundle/docs/dev-docs/api/index.yaml

```yaml
openapi: 3.1.1
info:
  version: latest
  title: Core APIs
  contact:
    name: Rebilly API Support
    url: https://www.rebilly.com/contact/
    email: integrations@rebilly.com
  license:
    name: Rebilly
    url: https://www.rebilly.com/api-license/
  termsOfService: https://www.rebilly.com/terms-of-use/
  x-logo:
    url: https://rebilly-core.redoc.ly/rb_apiLogo.svg
    backgroundColor: '#0044d4'
  description: This is a subset of the full specification, limited to the `POST invoice-past-due-reminder-15-days` operation. Components more than 3 `$ref` hops away are not included.
  x-metadata:
    description: The most common APIs used to automate common workflows.
    redocly_category: API Reference
servers:
  - url: https://api-sandbox.rebilly.com/organizations/{organizationId}
    description: Sandbox server
    variables:
      organizationId:
        default: '{organizationId}'
        description: |-
          Unique organization identifier.
          An organization is an entity that represents a company.
          For more information, see [Obtain an organization ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
  - url: https://api.rebilly.com/organizations/{organizationId}
    description: Live server
    variables:
      organizationId:
        default: '{organizationId}'
        description: |-
          Unique organization identifier.
          An organization is an entity that represents a company.
          For more information, see [Obtain an organization ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
security:
  - SecretApiKey: []
  - JWT: []
tags:
  - name: Invoices
    description: |-
      Use invoices to bill for the goods or services that you provide.
      If your invoice includes subscription items, it also includes the corresponding service periods and prices.
x-tagGroups:
  - name: Orders & Invoices
    tags:
      - Invoices
paths: {}
webhooks:
  invoice-past-due-reminder-15-days:
    post:
      summary: Renewal invoice reminder, 15 days past due
      description: |-
        Sends a reminder when an unpaid renewal invoice is 15 days past its due date.
        The reminder is sent once for that due date,
        and remains available until 30 days after the due date.
        For more information, see [Invoice past due reminders](https://www.rebilly.com/docs/dev-docs/invoices/#invoice-past-due-reminders).
      operationId: invoice-past-due-reminder-15-days
      x-products:
        - Core
      tags:
        - Invoices
      requestBody:
        $ref: '#/components/requestBodies/InvoicePastDueReminderWebhook'
      responses:
        2xx:
          description: Returns any 2xx status to indicate that data is received.
components:
  securitySchemes:
    JWT:
      description: |-
        JWT is a short lifetime token that can be assigned a specific expiration time.

        Usage format: `Bearer <JWT>`.
      type: http
      scheme: bearer
      bearerFormat: JWT
    SecretApiKey:
      description: |-
        Never share your secret keys.
        Keep them guarded and secure.

        Use your secret API key only to make requests from the server side.
        To authenticate, provide your secret key in the request header.
      name: REB-APIKEY
      type: apiKey
      in: header
  schemas:
    CreatedTime:
      type: string
      description: |-
        Date and time when the resource is created.
        This value is set automatically when the resource is created.
      format: date-time
      readOnly: true
      x-sortable: true
      x-label: Creation Time
    UpdatedTime:
      type: string
      description: |-
        Date and time when the resource is updated.
        This value is set automatically when the resource is updated.
      format: date-time
      readOnly: true
      x-sortable: true
      x-label: Last Update Time
    ResourceId:
      type: string
      description: Unique resource ID.
      maxLength: 50
      example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
    OrganizationId:
      type: string
      description: |-
        Unique organization identifier.
        An organization is an entity that represents a company.
        For more information, see [Obtain an organization ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
      maxLength: 50
      example: org_0YVDM8RC7GDADADSBSMW124JA8
    CustomerId:
      type: string
      description: ID of the customer resource.
      maxLength: 50
      example: cus_0YV7DDSDD1C8DA64KHH2W33CPF
      x-basic: true
    CurrencyCode:
      type: string
      description: Currency code in ISO 4217 format.
      minLength: 3
      maxLength: 3
      example: USD
      x-label: Currency
    DiscountContext:
      type: string
      description: Context in which the discount applies.
      default: items
      x-label: Context
      x-sortable: true
      x-basic: true
      x-enumDescriptions:
        items: items (less discounts)
        shipping: shipping (less discounts)
        items-and-shipping: items and shipping (less discounts)
      enum:
        - items
        - shipping
        - items-and-shipping
    WebsiteId:
      type: string
      description: |-
        ID of the website.
        A website is where an organization obtains a customer.
        For more information, see [Obtain an organization ID and website ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
      maxLength: 50
      example: web_0YV7DE4Z26DQSA1AC92FBJ7SEG
    ContactObject:
      type: object
      description: Contact's information.
      properties:
        firstName:
          description: Contact's first name.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 45
          example: Benjamin
        lastName:
          description: Contact's last name.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 45
          example: Franklin
        organization:
          description: Contact's organization.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 255
          example: Rebilly
        address:
          description: First line of the contact's street address.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 60
          example: 36 Craven St
        address2:
          description: Second line of the contact's street address.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 60
        city:
          description: Contact's city of residence.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 45
          example: Austin
        region:
          description: Contact's region of residence.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 45
          example: Texas
        country:
          description: |-
            Contact's country of residence in ISO 3166 alpha-2 country code.
            For examples, see [ISO.org](https://www.iso.org/obp/ui/#search/code/).
          type:
            - string
            - 'null'
          pattern: ^[A-Z]{2}$
          maxLength: 2
          example: GB
        postalCode:
          description: Contact's postal code.
          type:
            - string
            - 'null'
          pattern: ^[\w\s\-]+$
          maxLength: 10
          example: WC2N 5NF
        phoneNumbers:
          $ref: '#/components/schemas/ContactPhoneNumbers'
        emails:
          $ref: '#/components/schemas/ContactEmails'
        dob:
          description: Contact's date of birth in ISO-8601 `YYYY-MM-DD` format.
          type:
            - string
            - 'null'
          format: date
          example: '1980-04-01'
        jobTitle:
          description: Contact's job title.
          type:
            - string
            - 'null'
          pattern: ^[\u0000-\uFFFF]+$
          maxLength: 255
          example: CEO
        hash:
          description: |-
            Hash value for the contact.
            Use this value to compare contacts for identical attribute values.
          type: string
          maxLength: 40
          example: 056ae6d97c788b9e98b049ebafd7b229bf852221
          readOnly: true
    ServerTimestamp:
      type: string
      description: Read-only timestamp in ISO 8601 date-time format.
      format: date-time
      readOnly: true
    Shipping:
      description: Shipping settings.
      type: object
      discriminator:
        propertyName: calculator
        mapping:
          manual: '#/components/schemas/ManualShipping'
          rebilly: '#/components/schemas/RebillyShipping'
      oneOf:
        - $ref: '#/components/schemas/ManualShipping'
        - $ref: '#/components/schemas/RebillyShipping'
    Taxes:
      description: Taxes.
      type: object
      discriminator:
        propertyName: calculator
        mapping:
          manual: '#/components/schemas/ManualTax'
          rebilly-taxjar: '#/components/schemas/RebillyTaxJarTax'
          rebilly-avalara: '#/components/schemas/RebillyAvalaraTax'
      oneOf:
        - $ref: '#/components/schemas/ManualTax'
        - $ref: '#/components/schemas/RebillyTaxJarTax'
        - $ref: '#/components/schemas/RebillyAvalaraTax'
    InvoiceItem:
      type: object
      required:
        - type
        - unitPrice
      properties:
        id:
          type: string
          description: ID of the invoice item.
          readOnly: true
          maxLength: 50
          example: ii_0YVFDEQS2KCFTBN9HXWJFY55GV
        type:
          description: Type of invoice item.
          type: string
          x-basic: true
          enum:
            - debit
            - credit
        description:
          description: Description of the invoice item.
          type: string
          maxLength: 1000
        unitPrice:
          description: Unit price of the invoice item.
          type: number
          format: double
        quantity:
          description: Quantity of the invoice item.
          type: integer
        price:
          description: Total price of the invoice item.
          type: number
          format: double
          readOnly: true
        productId:
          type:
            - string
            - 'null'
          description: ID of the product.
          maxLength: 50
          example: prod_0YV7DES3WPC5J8JD8QTVNZBZNZ
        planId:
          type:
            - string
            - 'null'
          description: ID of the plan.
          maxLength: 50
          readOnly: true
          example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X
        subscriptionId:
          type:
            - string
            - 'null'
          description: ID of the order.
          maxLength: 50
          readOnly: true
          example: sub_01HRF27SATGE4Z6PBJE6PD8328
        periodStartTime:
          description: Date and time when the billing period starts.
          type:
            - string
            - 'null'
          format: date-time
        periodEndTime:
          description: Date and time when the billing period ends.
          type:
            - string
            - 'null'
          format: date-time
        periodNumber:
          description: |-
            Billing period number that is associated with the invoice item.
            For example, an invoice item for a service is included in billing period number 3.
            The invoice item is only applied to billing period number 3.
          type:
            - integer
            - 'null'
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        tax:
          description: Invoice item tax.
          readOnly: true
          oneOf:
            - $ref: '#/components/schemas/TaxItem'
            - type: 'null'
        _links:
          type: array
          description: Related links.
          readOnly: true
          items:
            type: object
            properties:
              href:
                description: Link URL.
                type: string
              rel:
                description: Type of link.
                type: string
                enum:
                  - self
                  - product
                  - subscription
                  - plan
        _embedded:
          type: object
          description: Embedded objects that are requested by the `expand` query parameter.
          readOnly: true
          properties:
            product:
              type: object
            plan:
              type: object
    CreditMemoInvoiceAllocation:
      type: object
      properties:
        invoiceId:
          type: string
          description: ID of invoice to which the credit memo is allocated.
          maxLength: 50
          example: in_0YVF9605RKC62BP14NE2R7V2XT
        amount:
          description: |-
            Amount of credit that is allocated from the credit memo to the invoice.
            When a credit memo is updated, the specified `amount` replaces the existing allocation to the invoice.
            It is not added to the existing allocation.
            If the credit memo is already allocated to the invoice,
            the unused amount of the credit memo and the amount due on the invoice both include the existing allocation.
            If the `amount` value is not supplied or exceeds the unused amount of the credit memo or the invoice due amount, the lesser of the following two values is used:
            - The unused amount of the credit memo.
            - The invoice due amount.
          type: number
          format: double
        currency:
          readOnly: true
          $ref: '#/components/schemas/CurrencyCode'
        createdTime:
          description: Date and time at which a credit memo is allocated.
          $ref: '#/components/schemas/ServerTimestamp'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
    Transaction:
      type: object
      description: Transaction information.
      properties:
        id:
          readOnly: true
          $ref: '#/components/schemas/TransactionId'
        websiteId:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/WebsiteId'
        customerId:
          x-basic: true
          x-sortable: true
          allOf:
            - $ref: '#/components/schemas/CustomerId'
        type:
          description: Type of transaction.
          type: string
          x-basic: true
          readOnly: true
          enum:
            - 3ds-authentication
            - authorize
            - capture
            - credit
            - refund
            - sale
            - setup
            - void
        status:
          description: Status of the transaction.
          type: string
          readOnly: true
          enum:
            - completed
            - conn-error
            - disputed
            - never-sent
            - offsite
            - partially-refunded
            - pending
            - refunded
            - sending
            - timeout
            - voided
            - waiting-approval
            - waiting-capture
            - waiting-gateway
            - waiting-refund
        result:
          description: Result of the transaction.
          type: string
          x-basic: true
          readOnly: true
          enum:
            - abandoned
            - approved
            - canceled
            - declined
            - unknown
        amount:
          x-type: Money
          x-sortable: true
          x-basic: true
          description: Total amount of the transaction.
          type: number
          format: double
          readOnly: true
        currency:
          readOnly: true
          $ref: '#/components/schemas/CurrencyCode'
        purchaseAmount:
          description: |-
            Amount by which the purchase is completed.
            If an adjustment occurs, the purchased amount may differ from the requested amount.
          type: number
          format: double
          x-type: Money
          x-currency-field: purchaseCurrency
          x-sortable: true
          readOnly: true
        purchaseCurrency:
          readOnly: true
          $ref: '#/components/schemas/CurrencyCode'
        requestAmount:
          description: |-
            Amount of the payment request.
            If an adjustment occurs,
            the purchase amount may differ from the billing amount.
          type: number
          x-type: Money
          x-currency-field: requestCurrency
          format: double
          readOnly: true
        requestCurrency:
          readOnly: true
          $ref: '#/components/schemas/CurrencyCode'
        parentTransactionId:
          description: ID of the parent transaction.
          type:
            - string
            - 'null'
          $ref: '#/components/schemas/TransactionId'
        childTransactions:
          description: IDs of child transactions.
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/ResourceId'
        invoiceIds:
          description: Related invoice IDs.
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/ResourceId'
        subscriptionIds:
          description: Subscription IDs of invoices that are related to the transaction.
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/ResourceId'
        planIds:
          description: Plan IDs of orders that are related to the transaction.
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/ResourceId'
        isRebill:
          description: Specifies if the transaction is one of a number of recurring payments in a subscription, excluding trials or setup fees.
          type: boolean
          readOnly: true
        rebillNumber:
          description: |-
            Rebill number of the transaction.
            A rebill number is the number of recurring payments in a subscription, excluding trials or setup fees.
          type: integer
          readOnly: true
          x-sortable: true
        billingAddress:
          description: Billing address.
          $ref: '#/components/schemas/ContactObject'
        has3ds:
          description: Specifies if the transaction uses 3D Secure.
          type: boolean
          readOnly: true
        3ds:
          type: object
          description: |-
            Authentication object.
            For more information, see [3D Secure (3DS)](https://www.rebilly.com/docs/settings/3ds/).
          readOnly: true
          properties:
            server:
              description: Name of the 3D Secure server.
              type: string
            version:
              description: Version of 3D Secure.
              type: string
              enum:
                - 1.0.2
                - 2.1.0
                - 2.2.0
            enrolled:
              description: Specifies if the cardholder is enrolled in 3D Secure.
              type: string
              enum:
                - 'yes'
                - 'no'
                - invalid card/timeout
                - unavailable
            authenticated:
              description: Authentication response status for 3D Secure.
              type: string
              enum:
                - 'yes'
                - 'no'
                - not applicable
                - attempted
            liability:
              type: string
              enum:
                - protected
                - not protected
                - protected (attempt)
            flow:
              description: Authentication flow for 3D Secure 2.
              type: string
              enum:
                - frictionless
                - challenge
            isDowngraded:
              description: Specifies if 3D Secure 2 is attempted and downgraded to 3D Secure 1.
              type: boolean
              default: false
              deprecated: true
        redirectUrl:
          description: |-
            URL where the end-user is redirected to when an offsite transaction is completed.
            The default value is the website URL.
          type:
            - string
            - 'null'
          maxLength: 2083
          format: uri
        retryNumber:
          type: integer
          readOnly: true
          description: Position of the transaction in the sequence of retries.
          x-sortable: true
        isRetry:
          type: boolean
          readOnly: true
          description: Specifies if a transaction is a retry.
        billingDescriptor:
          type:
            - string
            - 'null'
          readOnly: true
          description: |-
            Billing descriptor that appears on the periodic billing statement.
            For a credit card statement, this field commonly contains 12 or fewer characters.
        description:
          type: string
          description: Description of the payment.
          maxLength: 255
        requestId:
          description: |-
            Request ID of the transaction.
            This ID must be unique within a 24-hour period.
            Use this field to prevent duplicate transactions.
          type: string
          x-sortable: true
        hasAmountAdjustment:
          description: Specifies if the transaction has amount adjustment.
          type: boolean
          readOnly: true
        gatewayName:
          readOnly: true
          description: |-
            Name of the payment gateway that processed, or is selected to process, the transaction.
            This value is only available after a gateway is selected for the transaction.
          x-label: Gateway
          x-basic: true
          allOf:
            - $ref: '#/components/schemas/GatewayName'
        customFields:
          $ref: '#/components/schemas/ResourceCustomFields'
        processedTime:
          description: Date and time when the transaction is processed.
          x-sortable: true
          x-basic: true
          $ref: '#/components/schemas/ServerTimestamp'
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        gatewayAccountId:
          type:
            - string
            - 'null'
          description: ID of the gateway account that processed the transaction.
          maxLength: 50
          example: gw_acc_0YVCXMF26DDNKAERE5NW727S34
          readOnly: true
        gatewayTransactionId:
          description: ID of the gateway transaction.
          readOnly: true
          type:
            - string
            - 'null'
          maxLength: 50
          example: txn_0YVDTQJ8YWDGQACV2N2N5SPWQ0
        gateway:
          type: object
          description: Related gateway information.
          readOnly: true
          properties:
            response:
              description: Gateway response.
              type: object
              properties:
                code:
                  description: Gateway response code.
                  type:
                    - string
                    - 'null'
                message:
                  description: Gateway response message.
                  type:
                    - string
                    - 'null'
                type:
                  description: Gateway response type.
                  type:
                    - string
                    - 'null'
                originalCode:
                  description: Raw, unmapped gateway response code.
                  type:
                    - string
                    - 'null'
                originalMessage:
                  description: Raw, unmapped gateway response message.
                  type:
                    - string
                    - 'null'
            avsResponse:
              description: Gateway Address Verification System (AVS) response.
              type: object
              properties:
                code:
                  description: Response code.
                  type:
                    - string
                    - 'null'
                message:
                  description: Response message.
                  type:
                    - string
                    - 'null'
                originalCode:
                  description: Raw response code.
                  type:
                    - string
                    - 'null'
                originalMessage:
                  description: Raw response message.
                  type:
                    - string
                    - 'null'
            cvvResponse:
              description: Gateway Card Verification Value (CVV) response.
              type: object
              properties:
                code:
                  description: Response code.
                  type:
                    - string
                    - 'null'
                message:
                  description: Response message.
                  type:
                    - string
                    - 'null'
                originalCode:
                  description: Raw response code.
                  type:
                    - string
                    - 'null'
                originalMessage:
                  description: Raw response message.
                  type:
                    - string
                    - 'null'
        acquirerName:
          readOnly: true
          description: |-
            Acquirer name.
            This value is only available when a transaction uses a payment gateway.
            If a transaction does not use a payment gateway, this value is `null`.
          allOf:
            - $ref: '#/components/schemas/AcquirerName'
        method:
          deprecated: true
          description: |-
            Payment method.

            >**Note:** Use `paymentInstrument.method` instead.
          allOf:
            - $ref: '#/components/schemas/PaymentMethod'
        velocity:
          description: Number of transactions by the same customer in the past 24 hours.
          type: integer
        revision:
          description: |-
            Number of times the transaction data has been modified.

            This revision number is useful when analyzing webhook data to determine if the change takes precedence over the current representation.
          type: integer
          readOnly: true
        referenceData:
          description: Transaction reference data.
          type:
            - object
            - 'null'
          additionalProperties:
            type: string
          example:
            gatewayTransactionId: GAT123
          readOnly: true
        bin:
          description: Payment card Bank Identification Number (BIN).
          x-label: BIN
          type:
            - string
            - 'null'
          format: bin
          readOnly: true
        paymentInstrumentFingerprint:
          description: |-
            Unique value that is used to identify the payment instrument of the transaction.
            This value is `null` if the transaction has no payment instrument,
            or the payment instrument has no fingerprint.
          type:
            - string
            - 'null'
          readOnly: true
        paymentInstrument:
          type: object
          oneOf:
            - $ref: '#/components/schemas/VaultedInstrument'
            - $ref: '#/components/schemas/AlternativePaymentInstrument'
            - $ref: '#/components/schemas/CashInstrument'
            - $ref: '#/components/schemas/CheckInstrument'
        hasDcc:
          description: Specifies if Dynamic Currency Conversion (DCC) applies to the transaction.
          type: boolean
          readOnly: true
        dcc:
          description: |-
            Detailed Dynamic currency conversion (DCC).
            If DCC is not applied to the transaction, this value is `null`.
          type:
            - object
            - 'null'
          readOnly: true
          properties:
            base:
              description: Initial amount and currency to convert from.
              $ref: '#/components/schemas/Money'
            quote:
              description: Suggested amount and currency to convert to.
              $ref: '#/components/schemas/Money'
            usdMarkup:
              description: Markup amount converted to USD.
              $ref: '#/components/schemas/MoneyAmount'
            outcome:
              type: string
              description: Dynamic currency conversion outcome.
              enum:
                - unprocessed
                - rejected
                - selected
            isForceDcc:
              description: Specifies if Dynamic Currency Conversion (DCC) is forced for the transaction.
              type: boolean
        riskScore:
          description: Risk score for the transaction.
          type: integer
          readOnly: true
          x-sortable: true
        riskMetadata:
          oneOf:
            - $ref: '#/components/schemas/RiskMetadata'
            - type: 'null'
        notificationUrl:
          description: |-
            URL where a server-to-server POST notification is sent.
            This notification is sent when the transaction result is finalized after a timeout or an offsite interaction.

            Do not interpret this notification as a confirmation,
            complete a `GET` request to confirm the result of the transaction.
            To ensure the request is not reattempted,
            when the result is confirmed, respond with a `2xx` HTTP status code.

            The following placeholders are available to use in this URI: `{id}` and `{result}`.
            These placeholders are replaced the with the transaction ID and result accordingly.
          type:
            - string
            - 'null'
          maxLength: 2083
          format: uri
        isDisputed:
          description: Specifies if a transaction is disputed.
          type: boolean
          readOnly: true
        disputeTime:
          description: |-
            Date and time when the dispute is created.
            If the transaction is not disputed, this value is `null`.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
          x-sortable: true
        disputeStatus:
          description: Status of the dispute.
          type:
            - string
            - 'null'
          readOnly: true
          enum:
            - null
            - response-needed
            - under-review
            - forfeited
            - won
            - lost
            - unknown
        isReconciled:
          description: Specifies if the transaction is verified with gateway batch data.
          type: boolean
          readOnly: true
        isProcessedOutside:
          description: Specifies if the transaction is processed outside of Rebilly.
          type: boolean
        isMerchantInitiated:
          description: Specifies if the transaction is initiated by the merchant.
          type: boolean
        hadDiscrepancy:
          description: Specifies if the transaction is updated due to a discrepancy with its source of truth.
          type: boolean
          readOnly: true
        orderId:
          deprecated: true
          description: |-
            Order ID of the transaction.
            This ID must be unique within a 24 hour period.

            > **Note:** Use the `requestId` field instead.
          type: string
          x-sortable: true
        arn:
          x-label: ARN
          type:
            - string
            - 'null'
          readOnly: true
          description: Acquirer reference number.
          example: '74836950144358910018150'
        reportAmount:
          description: Transaction amount converted to the report currency of the organization.
          type: number
          x-type: Money
          x-sortable: true
          x-currency-field: reportCurrency
          format: double
          readOnly: true
        reportCurrency:
          readOnly: true
          $ref: '#/components/schemas/CurrencyCode'
        settlementTime:
          type:
            - string
            - 'null'
          description: Date and time when the transaction is settled by the banking institution.
          format: date-time
          readOnly: true
          x-sortable: true
        discrepancyTime:
          type:
            - string
            - 'null'
          description: Date and time of the most recent discrepancy on the transaction.
          format: date-time
          readOnly: true
          x-sortable: true
        limits:
          $ref: '#/components/schemas/TransactionLimitAmount'
        organizationId:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/OrganizationId'
        depositRequestId:
          readOnly: true
          type:
            - string
            - 'null'
          description: |-
            ID of the deposit request if applicable.
            The created transaction is based on the properties of this deposit request.
          maxLength: 50
          example: dep_req_0YVJ65BSGYC3EAT58SEX8KY6J7
        transferId:
          readOnly: true
          type:
            - string
            - 'null'
          description: |-
            ID of the ledger transfer if applicable.
            The transaction is linked to this transfer when processed in the wallet ledger.
          maxLength: 50
          example: tb_0YVDTQJ8YWDGQACV2N2N5SPWQ0
        payoutRequestId:
          readOnly: true
          type:
            - string
            - 'null'
          description: |-
            ID of the payout request if applicable.
            The created transaction is based on the properties of this payout request.
          maxLength: 50
          example: pout_req_0YVDMDE2BMC6KBB5MX76RF6T80
        _links:
          type: array
          description: Related links.
          readOnly: true
          items:
            type: object
            properties:
              href:
                description: Link URL.
                type: string
              rel:
                description: Type of link.
                type: string
                enum:
                  - self
                  - attachments
                  - website
                  - customer
                  - gatewayAccount
                  - paymentCard
                  - parentTransaction
                  - leadSource
                  - approvalUrl
                  - refundUrl
                  - updateUrl
                  - disputes
                  - invoices
                  - queryUrl
                  - redirectUrl
        _embedded:
          type: object
          description: Embedded objects that are requested by the `expand` query parameter.
          readOnly: true
          properties:
            parentTransaction:
              type: object
            childTransactions:
              type: array
              maxItems: 10
              description: Most recent child transactions.
            gatewayAccount:
              type: object
            customer:
              type: object
            leadSource:
              type: object
            website:
              type: object
            invoices:
              type: array
              maxItems: 10
              description: Most recent related invoices.
            organization:
              type: object
            dispute:
              type: object
            paymentCard:
              type: object
            bankAccount:
              type: object
    InvoiceRetryScheduleInstruction:
      type: object
      description: Specifies when the payment retry instruction is performed.
      discriminator:
        propertyName: method
        mapping:
          date-interval: '#/components/schemas/SchedulingMethodDateInterval'
          day-of-month: '#/components/schemas/SchedulingMethodDayOfMonth'
          day-of-week: '#/components/schemas/SchedulingMethodDayOfWeek'
          immediately: '#/components/schemas/SchedulingMethodImmediately'
          intelligent: '#/components/schemas/SchedulingMethodIntelligent'
      oneOf:
        - $ref: '#/components/schemas/SchedulingMethodDateInterval'
        - $ref: '#/components/schemas/SchedulingMethodDayOfMonth'
        - $ref: '#/components/schemas/SchedulingMethodDayOfWeek'
        - $ref: '#/components/schemas/SchedulingMethodImmediately'
        - $ref: '#/components/schemas/SchedulingMethodIntelligent'
    InvoiceRetryAmountAdjustmentInstruction:
      type: object
      description: Specifies if the payment amount must be adjusted for the retry.
      discriminator:
        propertyName: method
        mapping:
          partial: '#/components/schemas/AmountAdjustmentInstructionPartial'
          none: '#/components/schemas/AmountAdjustmentInstructionNone'
      oneOf:
        - $ref: '#/components/schemas/AmountAdjustmentInstructionPartial'
        - $ref: '#/components/schemas/AmountAdjustmentInstructionNone'
    Invoice:
      required:
        - customerId
        - currency
        - websiteId
      properties:
        id:
          type: string
          description: ID of the invoice.
          readOnly: true
          maxLength: 50
          example: in_0YVF9605RKC62BP14NE2R7V2XT
        websiteId:
          $ref: '#/components/schemas/WebsiteId'
        invoiceNumber:
          description: Auto-incrementing number based on the sequence of invoices for any particular customer.
          readOnly: true
          type: integer
          x-basic: true
        orderId:
          description: ID of the order (experimental).
          readOnly: true
          example: ord_01HVKA5975PJBSQ1SX72G3MSZC
          type:
            - string
            - 'null'
        subscriptionId:
          type: string
          description: |-
            ID of the related subscription order, if available.
            This field is `null` if there are no related subscription orders.
          readOnly: true
          maxLength: 50
          example: sub_01HRF27SATGE4Z6PBJE6PD8328
        quoteId:
          type:
            - string
            - 'null'
          description: |-
            ID of the related quote, if available.
            This field is `null` if there are no related quotes.
          readOnly: true
          maxLength: 50
          example: qt_01HXBZMEGPETPHJZH6V4RHBMA8
        currency:
          x-sortable: true
          x-basic: true
          $ref: '#/components/schemas/CurrencyCode'
        amount:
          description: Amount of the invoice.
          type: number
          x-type: Money
          x-sortable: true
          x-basic: true
          format: double
          readOnly: true
        amountDue:
          description: Amount that is due on the invoice.
          type: number
          x-type: Money
          x-sortable: true
          format: double
          readOnly: true
        subtotalAmount:
          description: Subtotal amount of the invoice.
          type: number
          x-type: Money
          format: double
          readOnly: true
        discountAmount:
          description: Discount amount that is applied to the invoice.
          type: number
          x-type: Money
          format: double
          readOnly: true
        shipping:
          description: |-
            Shipping settings of the invoice.
            The `calculator` property is `manual` when the shipping amount is provided
            and `rebilly` when the amount is calculated from shipping rates.
            If `calculator` is `manual` and an issued invoice is recalculated or its items change,
            the shipping amount is not changed, even if no invoice item requires shipping.
            If `calculator` is `manual` and no invoice item requires shipping, the shipping amount is 0 in these cases:

            - A draft invoice is issued with the [Issue an invoice](https://www.rebilly.com/catalog/all/invoices/postinvoiceissuance) operation, a renewal invoice is issued, or a scheduled draft invoice is recalculated.
            - An order is created or previewed, a quote is created, or a `pending` order is updated.
              This applies to the order invoice. The order keeps its shipping amount.

            To change the shipping amount of an issued invoice, use the [Upsert an invoice](https://www.rebilly.com/catalog/all/invoices/putinvoice) operation.
          $ref: '#/components/schemas/Shipping'
        tax:
          $ref: '#/components/schemas/Taxes'
        organizationTaxIdNumber:
          description: Organization tax ID number that is displayed on the invoice.
          type:
            - object
            - 'null'
          required:
            - type
            - value
          properties:
            type:
              type: string
              description: Type of the tax ID number.
              enum:
                - eu-vat
                - other
              example: eu-vat
            value:
              type: string
              description: Value of the tax ID number.
              example: GB980780684
        customerTaxIdNumber:
          description: Customer tax ID number that is displayed on the invoice.
          type:
            - object
            - 'null'
          required:
            - type
            - value
          properties:
            type:
              type: string
              description: Type of the tax ID number.
              enum:
                - eu-vat
                - other
              example: eu-vat
            value:
              type: string
              description: Value of the tax ID number.
              example: GB980780684
        billingAddress:
          description: |-
            Billing address of the invoice.
            After the first payment is made for an invoice, this value cannot be changed.
          $ref: '#/components/schemas/ContactObject'
        deliveryAddress:
          description: Delivery address of the invoice.
          $ref: '#/components/schemas/ContactObject'
        poNumber:
          description: Purchase order number that is displayed on the invoice.
          type:
            - string
            - 'null'
          example: PO123456
          maxLength: 50
        notes:
          description: Notes for the customer that are displayed on the invoice.
          type: string
          maxLength: 65535
        items:
          type: array
          description: Invoice items array.
          readOnly: true
          items:
            $ref: '#/components/schemas/InvoiceItem'
        discounts:
          type: array
          description: Discounts applied.
          readOnly: true
          items:
            type: object
            readOnly: true
            properties:
              couponId:
                type: string
                description: ID of the coupon.
                maxLength: 50
                example: cpn_0YVCNKF81GD778N4YNVGDJK558
              redemptionId:
                description: ID of the redemption.
                $ref: '#/components/schemas/ResourceId'
              amount:
                description: Total amount discounted by this coupon.
                type: number
                format: double
              description:
                type: string
                description: Description of the discount.
              context:
                $ref: '#/components/schemas/DiscountContext'
        autopayScheduledTime:
          description: Date and time when an automatic payment (autopay) is scheduled.
          type:
            - string
            - 'null'
          x-sortable: true
          format: date-time
        autopayRetryNumber:
          description: Number of times that an automatic payment (autopay) has been attempted on an invoice.
          readOnly: true
          type: integer
          x-sortable: true
          minimum: 0
          default: 0
        status:
          type: string
          description: Status of the invoice.
          x-basic: true
          readOnly: true
          enum:
            - draft
            - quotation
            - unpaid
            - paid
            - partially-paid
            - past-due
            - abandoned
            - voided
            - partially-refunded
            - refunded
            - disputed
        delinquentCollectionPeriod:
          type: integer
          description: Length of time, in days, between when the invoice is due and when the invoice is paid.
          x-sortable: true
          readOnly: true
        collectionPeriod:
          type: integer
          x-sortable: true
          description: Length of time, in days, between when the invoice is issued and when the invoice is paid.
          readOnly: true
        abandonedTime:
          description: Date and time when the invoice is abandoned.
          x-sortable: true
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        voidedTime:
          description: Date and time when the invoice is voided.
          x-sortable: true
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        paidTime:
          x-label: Payment Date
          x-sortable: true
          x-basic: true
          description: Date and time when the invoice is paid.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        dueTime:
          description: Date and time when the invoice is due for payment.
          type: string
          x-sortable: true
          format: date-time
        issuedTime:
          description: Date and time when the invoice is issued.
          x-label: Date Issued
          x-sortable: true
          x-basic: true
          $ref: '#/components/schemas/ServerTimestamp'
        createdTime:
          $ref: '#/components/schemas/CreatedTime'
        updatedTime:
          $ref: '#/components/schemas/UpdatedTime'
        paymentFormUrl:
          type:
            - string
            - 'null'
          readOnly: true
          format: uri
          description: |-
            URL where the customer is redirected to pay the invoice
            using one of the methods which are available to the customer.
            This is an alternative to creating a new transaction with empty
            `methods`.
        creditMemoAllocations:
          type: array
          description: Credit memo allocations to an invoice.
          readOnly: true
          items:
            $ref: '#/components/schemas/CreditMemoInvoiceAllocation'
        isNewOrder:
          description: Specifies if the order is a new order.
          type: boolean
          readOnly: true
          example: true
        customerId:
          x-basic: true
          allOf:
            - $ref: '#/components/schemas/CustomerId'
        transactions:
          type: array
          description: |-
            Up to 10 of the most recent transactions for the invoice.
            To retrieve transactions for an invoice, use [Retrieve transactions](https://www.rebilly.com/catalog/all/transactions/gettransactioncollection) with the `invoiceIds` filter.
            Search results can lag briefly behind a write.
          maxItems: 10
          readOnly: true
          items:
            $ref: '#/components/schemas/Transaction'
        retryInstruction:
          description: |-
            Invoice payment retry instruction.
            This object specifies how to proceed if a payment related to the invoice fails.
          type:
            - object
            - 'null'
          properties:
            attempts:
              type: array
              description: Describes the retry instruction.
              minItems: 1
              items:
                type: object
                properties:
                  scheduleInstruction:
                    $ref: '#/components/schemas/InvoiceRetryScheduleInstruction'
                  amountAdjustmentInstruction:
                    $ref: '#/components/schemas/InvoiceRetryAmountAdjustmentInstruction'
                  tryBackupInstruments:
                    description: Specifies whether to use backup payment instruments on an invoice payment retry.
                    type: boolean
                    default: false
                required:
                  - scheduleInstruction
            afterAttemptPolicies:
              description: Describes the action to take when a payment attempt concludes, and payment is not collected.
              type: array
              items:
                type: string
                enum:
                  - change-subscription-renewal-time
            afterRetryEndPolicies:
              description: Describes the action to take when all scheduled payment retries, in a retry instruction, have concluded and payment is not collected.
              type: array
              items:
                type: string
                enum:
                  - abandon-invoice
                  - cancel-subscription
          required:
            - attempts
            - afterAttemptPolicies
            - afterRetryEndPolicies
        revision:
          description: |-
            Number of times the invoice data has been modified.

            Use the revision number when analyzing webhook data to
            determine if a change should take precedence over the current
            representation.
          type: integer
          readOnly: true
        type:
          description: Type of invoice.
          type: string
          enum:
            - initial
            - renewal
            - interim
            - cancellation
            - one-time
            - refund
            - charge
            - one-time-sale
          readOnly: true
        dueReminderTime:
          description: Date and time when a past due reminder event is triggered.
          type:
            - string
            - 'null'
          format: date-time
          readOnly: true
        dueReminderNumber:
          description: Number of past due reminder events that have been triggered.
          type:
            - integer
            - 'null'
          readOnly: true
        organizationId:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/OrganizationId'
        delinquencyTime:
          description: |-
            Date and time when the related order is considered delinquent, and is canceled.
            If this value is `null`, no delinquency time is configured.
            When the invoice `dueTime` is changed to a later date and time, `delinquencyTime` increases by the same amount.
            If `dueTime` is changed to an earlier date and time or `delinquencyTime` is `null`, `delinquencyTime` remains unchanged.
            Changing `dueTime` to an earlier date and time increases the gap between `dueTime` and `delinquencyTime`.
            This wider gap is preserved if `dueTime` subsequently changes to a later date and time.
            If the request also specifies `delinquencyTime`, the specified value takes precedence.
            If `delinquencyTime` is earlier than the invoice `dueTime`, it is set to the same value as `dueTime`.

            If an invoice is not related to an order, this field can only be `null`.
          type:
            - string
            - 'null'
          format: date-time
          default: null
        _links:
          type: array
          description: Related links.
          readOnly: true
          items:
            type: object
            properties:
              href:
                description: Link URL.
                type: string
              rel:
                description: Type of link.
                type: string
                enum:
                  - self
                  - website
                  - customer
                  - organization
                  - attachments
                  - leadSource
                  - transactionAllocations
                  - recalculateInvoice
                  - subscription
        _embedded:
          type: object
          description: Embedded objects that are requested by the `expand` query parameter.
          readOnly: true
          properties:
            customer:
              type: object
            website:
              type: object
            organization:
              type: object
            leadSource:
              type: object
            shippingRate:
              type: object
  requestBodies:
    InvoicePastDueReminderWebhook:
      content:
        application/json:
          schema:
            properties:
              invoiceId:
                description: ID of the invoice.
                type: string
              eventType:
                description: Type of event that triggered the webhook.
                type: string
                enum:
                  - invoice-past-due-reminder-15-days
                  - invoice-past-due-reminder-30-days
                  - invoice-past-due-reminder-60-days
                  - invoice-past-due-reminder-90-days
              _embedded:
                type: object
                description: Embedded objects related to the invoice event.
                properties:
                  invoice:
                    $ref: '#/components/schemas/Invoice'
              _links:
                type: array
                description: Links to related resources.
                items:
                  type: object
                  properties:
                    href:
                      description: URL of the link.
                      type: string
                    rel:
                      description: Relationship type of the link.
                      type: string
                      enum:
                        - invoice
      description: Payload of the invoice past due reminder webhook event.
```
