# Retrieve an order

Retrieves an order with a specified ID.

Endpoint: GET /subscriptions/{id}
Version: latest
Security: SecretApiKey, JWT, ApplicationJWT

## Path parameters:

  - `id` (string, required)
    ID of the resource.

## Query parameters:

  - `expand` (string)
    Expand a response to receive a full related object in the _embedded path.

To expand multiple objects, use a comma-separated list.
Example: expand=recentInvoice,initialInvoice.

Available arguments are:

  - customer
  - leadSource
  - website
  - shippingRate
  - initialInvoice
  - recentInvoice
  - upcomingInvoice
  - paymentInstrument

For more information, see Embedded resources.

## Response 200 fields (application/json):

  - `body` (object) — one of (discriminator: orderType):
    - subscription-order:
      - `id` (string)
        ID of the order.
        Example: "sub_01HRF27SATGE4Z6PBJE6PD8328"
      - `orderType` (string, required)
        Specifies the type of order.
An order may be a subscription or a one-time purchase.

> Note: The order type cannot be changed after creation.
        Enum: "subscription-order"
      - `customerId` (string, required)
        ID of the customer resource.
      - `renewalReminderTime` (string,null)
        Date and time when the renewal reminder event triggers.
      - `renewalReminderNumber` (integer,null)
        Number of triggered renewal reminder events.
      - `abandonReminderTime` (string,null)
        Date and time when the abandon order reminder event triggers.
      - `abandonReminderNumber` (integer,null)
        Number of abandon order reminder events that are triggered.
      - `organizationId` (string)
        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).
        Example: "org_0YVDM8RC7GDADADSBSMW124JA8"
      - `status` (string)
        Status of the subscription service.
A subscription starts in the pending status, and becomes active when the service period begins.
        Enum: "pending", "active", "abandoned", "canceled", "churned", "paused", "voided", "completed", "trial-ended"
      - `inTrial` (boolean)
        Specifies if the subscription is currently in a trial period.
      - `trial` (object)
        Details of the trial.
To use plan defaults, omit the trial key or set this value to null.
      - `trial.enabled` (boolean)
        Specifies if there is a trial for this subscription.
Plans without trial prices are free trials.
      - `trial.endTime` (string,null)
        Time and date when the trial ends.
If a trial is enabled on this subscription, a value must be provided.

If the specified trial end time is in the past, the current time is used.
      - `isTrialOnly` (boolean)
        Specifies if a subscription ends after a trial period.
If this value is true, recurring settings are ignored.
      - `trialConversionTime` (string,null)
        Date and time when the subscription had a trial conversion.
Trial conversion occurs when the first successful payment is made after a trial period.
      - `invoiceTimeShift` (object,null)
        Shifts issue time and due time of invoices for this subscription.

This setting overrides plan settings.
To use plan settings, set this value to null.

To use multiple plans in one subscription,
all plans must have the same billing period,
this property enables the customer to subscribe to different plans.
      - `invoiceTimeShift.issueTimeShift` (object)
        Calculation instruction of the billing time.

This is used in conjunction with the service period anchor to calculate
the time at which the invoice is issued. For more information, see
[Service period anchor, billing timing, and invoice time shift](https://www.rebilly.com/docs/dev-docs/concepts/#service-period-anchor-and-billing-timing-and-invoice-time-shift).
      - `invoiceTimeShift.issueTimeShift.chronology` (string, required)
        Sequential order of the billing time relative to the start of the service period.
        Enum: "before"
      - `invoiceTimeShift.issueTimeShift.duration` (integer, required)
        Amount of time by which to move the invoice issue time or date.
      - `invoiceTimeShift.issueTimeShift.unit` (any, required)
        Unit of time.
      - `invoiceTimeShift.dueTimeShift` (object)
        Calculation instruction of the invoice due time.

This is used in conjunction with the billing anchor to calculate when
an invoice is due for payment. For more information, see
[Service period anchor, billing timing, and invoice time shift](https://www.rebilly.com/docs/dev-docs/concepts/#service-period-anchor-and-billing-timing-and-invoice-time-shift).

The sequential order of due time shift is always after the due date.
      - `invoiceTimeShift.dueTimeShift.duration` (integer, required)
        Amount of time by which to move the invoice due time or date.
      - `invoiceTimeShift.dueTimeShift.unit` (any, required)
        Unit of time.
      - `recurringInterval` (object,null)
        Recurring interval to override plan settings.
To use plan settings, set this value to null.

To use multiple plans in one subscription,
all plans must have the same recurring period length.
      - `recurringInterval.periodAnchorInstruction` (object,null) — one of (discriminator: method):
        Instruction for calculating the service period anchor.

The service period anchor is used, in conjunction with the subscription
start time, to calculate when the service period starts and ends.
        - day-of-month:
          - `method` (string, required)
            Enum: "day-of-month"
          - `day` (integer, required)
            Day of the month in which the event occurs.
If the month has less days, the last day of the month is selected.
          - `time` (string)
            Extended ISO-8601 format of time.
        - day-of-week:
          - `method` (string, required)
            Enum: "day-of-week"
          - `day` (string, required)
            Day of the week when the event occurs.
            Enum: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
          - `week` (string, required)
            Enum: "next", "first-in-month", "last-in-month"
          - `time` (string)
            Extended ISO-8601 format of time.
        - day-and-month-of-year:
          - `method` (string, required)
            Enum: "day-and-month-of-year"
          - `day` (integer, required)
            Day of the month in which the event occurs.
If the month has less days, the last day of the month is selected.
          - `month` (integer, required)
            Month of the year in which the event occurs.
          - `time` (string)
            Extended ISO-8601 format of time.
      - `autopay` (boolean)
        Specifies if payment attempts are made automatically.
If autopay is enabled, the payment is retrieved from the customer on the renewal date using the payment instrument that is set at paymentInstrumentId,
or the default payment instrument on the subscription.
      - `startTime` (string,null)
        Date and time when the subscription starts.
If this value is null, the current time is used.
This value cannot be more than one service period in the past.
      - `churnTime` (string,null)
        Date and time when the subscription is deactivated.
      - `renewalTime` (string,null)
        Date and time when the subscription renews.
      - `currentPeriodStart` (string)
        Date and time of the current service period start.
      - `currentPeriodEnd` (string)
        Date and time of the current service period end.
      - `rebillNumber` (integer,null)
        Current billing period number.
      - `mrr` (number)
        Monthly recurring revenue of the order.
        Example: 49.95
      - `paymentInstrumentId` (string,null)
        ID of the payment instrument to use for autopay.
If this value is not provided, or if the payment instrument is inactive,
the customer's default payment instrument is used.
        Example: "inst_0YVB8KPKNXCBR9EDX7JHSED75N"
      - `billingStatus` (string)
        Billing status of the most recent invoice.
This value may help you to determine if you should change the service status of the service,
such as suspending the service.
        Enum: "draft", "unpaid", "past-due", "abandoned", "paid", "voided", "refunded", "disputed", "partially-refunded", "partially-paid"
      - `websiteId` (string, required)
        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).

> Note: The ID of the website cannot be changed after creation.
        Example: "web_0YV7DE4Z26DQSA1AC92FBJ7SEG"
      - `currency` (string)
        Currency of the order.
      - `initialInvoiceId` (string,null)
        ID of the initial invoice.
        Example: "in_0YVF9605RKC62BP14NE2R7V2XT"
      - `recentInvoiceId` (string,null)
        ID of the most recently issued invoice.
The invoice might not be paid yet.
        Example: "in_0YVF9605RKC62BP14NE2R7V2XT"
      - `items` (array, required)
        Details of items in the order.
      - `items.id` (string)
        ID of the order item.
      - `items.quantity` (integer)
        Number of product units in the specified plan.
      - `items.quantityFilled` (number)
        Number of filled product units.
        Example: 5.125
      - `items.plan` (any, required)
        - `id` (string, required)
          ID of the plan.
      - `items.usageLimits` (any)
        - `softLimit` (object)
          Defines thresholds for notification purposes.
For example, to notify the customer that their usage is near the hard limit of their metered billing plan.
This notification informs the customer so that they can upgrade their plan before the hard limit is reached.
When the reported usage reaches 75%, 90%, and 100% of the configured limit a specific event is triggered.
To notify the customer, a webhook and notification can be configured for this event.
This field is useful for accounting and customer success purposes.
The usage of metered billing plans can still be reported if the soft limit is reached.
        - `softLimit.quantity` (integer)
          Usage limit quantity.
        - `softLimit.amount` (number)
          Usage limit amount in the currency of the order.
        - `hardLimit` (object)
          Defines a limit where the customer can no longer use the service.
Hard limits are used in addition to soft limits.
When a soft limit is reached,
a customer may receive a notification
but the service can still be provided up to the hard limit value so that the customer can upgrade their plan.
When the reported usage reaches the configured limit,
a specific event is triggered.
To notify the customer in the merchant system,
or block a service,
a webhook and notification can be configured for this event.
When the total usage reaches the hard limit quantity,
or amount values,
metered billing plan usages can no longer be reported.
        - `hardLimit.quantity` (integer)
          Usage limit quantity.
        - `hardLimit.amount` (number)
          Usage limit amount in the currency of the order.
        - `trialLimit` (any)
          Defines a usage cap during the trial period of a subscription.
This limit is enforced only while the subscription is in its trial phase.
When the reported usage reaches the configured trial limit, an event called 'trial-usage-limit-reached' is triggered.
To notify the customer or restrict access to the service, a webhook and notification can be configured for this event.
Once the trial limit is reached, additional usage cannot be reported unless the trial ends.
          Example: 20.725
      - `items.usageStatus` (any)
        - `isSoftLimitReached` (boolean)
          Specifies if the soft limit has been reached.
        - `isHardLimitReached` (boolean)
          Specifies if the hard limit has been reached.
        - `isTrialLimitReached` (boolean)
          Specifies if the trial limit has been reached.
      - `items.revision` (integer)
        Revision number that increments with each overriding change to this specific plan item.
      - `items.isModified` (boolean)
        Specifies if the plan information is modified for this subscription.
      - `items.isGrandfathered` (boolean)
        Specifies if the current plan revision number is greater than the plan item revision number.
      - `items.excludeFromMrr` (boolean)
        Specifies if this item should be excluded from monthly recurring revenue calculations.
      - `items._embedded` (object)
        Embedded objects that are requested by the expand query parameter.
      - `items._embedded.product` (object)
      - `items.planId` (string)
        ID of the plan.
        Example: "plan_0YV7DENSVGDBW9S71XZNNYYQ0X"
      - `deliveryAddress` (any)
        Delivery address of the order.
        - `firstName` (string,null)
          Contact's first name.
          Example: "Benjamin"
        - `lastName` (string,null)
          Contact's last name.
          Example: "Franklin"
        - `organization` (string,null)
          Contact's organization.
          Example: "Rebilly"
        - `address` (string,null)
          First line of the contact's street address.
          Example: "36 Craven St"
        - `address2` (string,null)
          Second line of the contact's street address.
        - `city` (string,null)
          Contact's city of residence.
          Example: "Austin"
        - `region` (string,null)
          Contact's region of residence.
          Example: "Texas"
        - `country` (string,null)
          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/).
          Example: "GB"
        - `postalCode` (string,null)
          Contact's postal code.
          Example: "WC2N 5NF"
        - `phoneNumbers` (array)
          List of phone numbers associated with the contact.
        - `phoneNumbers.label` (string, required)
          Phone number label or name.
          Example: "main"
        - `phoneNumbers.value` (string, required)
          Phone number value.
          Example: "1-512-777-0269"
        - `phoneNumbers.primary` (boolean)
          Specifies if the phone number is the contact's primary phone number.
          Example: true
        - `emails` (array)
          List of email addresses associated with the contact.
        - `emails.label` (string, required)
          Email label or name.
          Example: "main"
        - `emails.value` (string, required)
          Email address value.
          Example: "rebilly@example.com"
        - `emails.primary` (boolean)
          Specifies if the email address is the contact's primary email address.
          Example: true
        - `dob` (string,null)
          Contact's date of birth in ISO-8601 YYYY-MM-DD format.
          Example: "1980-04-01"
        - `jobTitle` (string,null)
          Contact's job title.
          Example: "CEO"
        - `hash` (string)
          Hash value for the contact.
Use this value to compare contacts for identical attribute values.
          Example: "056ae6d97c788b9e98b049ebafd7b229bf852221"
      - `billingAddress` (any)
        Billing address of the order.
        - `firstName` (string,null)
          Contact's first name.
          Example: "Benjamin"
        - `lastName` (string,null)
          Contact's last name.
          Example: "Franklin"
        - `organization` (string,null)
          Contact's organization.
          Example: "Rebilly"
        - `address` (string,null)
          First line of the contact's street address.
          Example: "36 Craven St"
        - `address2` (string,null)
          Second line of the contact's street address.
        - `city` (string,null)
          Contact's city of residence.
          Example: "Austin"
        - `region` (string,null)
          Contact's region of residence.
          Example: "Texas"
        - `country` (string,null)
          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/).
          Example: "GB"
        - `postalCode` (string,null)
          Contact's postal code.
          Example: "WC2N 5NF"
        - `phoneNumbers` (array)
          List of phone numbers associated with the contact.
        - `phoneNumbers.label` (string, required)
          Phone number label or name.
          Example: "main"
        - `phoneNumbers.value` (string, required)
          Phone number value.
          Example: "1-512-777-0269"
        - `phoneNumbers.primary` (boolean)
          Specifies if the phone number is the contact's primary phone number.
          Example: true
        - `emails` (array)
          List of email addresses associated with the contact.
        - `emails.label` (string, required)
          Email label or name.
          Example: "main"
        - `emails.value` (string, required)
          Email address value.
          Example: "rebilly@example.com"
        - `emails.primary` (boolean)
          Specifies if the email address is the contact's primary email address.
          Example: true
        - `dob` (string,null)
          Contact's date of birth in ISO-8601 YYYY-MM-DD format.
          Example: "1980-04-01"
        - `jobTitle` (string,null)
          Contact's job title.
          Example: "CEO"
        - `hash` (string)
          Hash value for the contact.
Use this value to compare contacts for identical attribute values.
          Example: "056ae6d97c788b9e98b049ebafd7b229bf852221"
      - `activationTime` (string,null)
        Date and time when the order is activated.
      - `voidTime` (string,null)
        Date and time when the order is voided.
      - `abandonTime` (string,null)
        Date and time when the pending order is automatically abandoned.
If this value is not passed during order creation,
a [pending order TTL](https://www.rebilly.com/catalog/all/organizations/patchorganization#organizations/patchorganization/t=request&path=settings/billing/pendingorderttl) setting is used to calculate the value.
      - `delinquencyPeriod` (string,null)
        Length of time, in ISO-8601 durations format,
which is added to the due time of the order when setting the delinquency time for all related invoices.
When the delinquency time of an invoice is reached, the order is automatically canceled.

{% admonition type="warning" %}
- If the delinquencyPeriod value is null, the order does not change state and remains active.
You must explicitly configure the delinquency period to enable automatic cancellation of unpaid orders.
- If you add a delinquency period to an active order, it is applied to all new invoices created for the order. It is not applied to the unpaid and past-due invoices. To apply a delinquency period to unpaid and past-due invoices, set the delinquencyTime parameter using the [upsert an invoice API operation](https://www.rebilly.com/catalog/all/invoices/putinvoice#invoices/putinvoice/t=request&path=delinquencytime).
{% /admonition %}

If this value is not passed during order creation,
an [order delinquency period](https://www.rebilly.com/catalog/all/organizations/patchorganization#organizations/patchorganization/t=request&path=settings/billing/orderdelinquencyperiod) setting is used to calculate the value.
        Example: "P7D"
      - `poNumber` (string,null)
        Purchase order number displayed on the issued invoices.
        Example: "PO123456"
      - `shipping` (object) — one of (discriminator: calculator):
        Shipping settings.
        - manual:
          - `amount` (number, required)
            Shipping amount.
          - `calculator` (string, required)
            Shipping calculator.
            Enum: "manual"
        - rebilly:
          - `calculator` (string, required)
            Shipping calculator.
            Enum: "rebilly"
          - `rateId` (string,null)
            ID of the shipping rate.
If this value is not set,
the cheapest applicable shipping rate is used.
            Example: "shipping-123-456"
          - `amount` (number)
            Shipping amount which is calculated from [Shipping rates](https://www.rebilly.com/catalog/all/shipping-rates).
      - `notes` (string)
        Notes for the customer displayed on the order invoice.
      - `canceledTime` (string,null)
        Date and time when a subscription is canceled.
      - `canceledBy` (string,null)
        Specifies who initiated the cancellation.
        Enum: "merchant", "customer", "rebilly", null
      - `cancelCategory` (string,null)
        Category of the cancellation.
        Enum: "billing-failure", "delinquency", "did-not-use", "did-not-want", "missing-features", "bugs-or-problems", "do-not-remember", "risk-warning", "contract-expired", "too-expensive", "never-started", "switched-plan", "organization-deactivated", "other", null
      - `cancelDescription` (string,null)
        Description of the cancellation reason in free form.
      - `revision` (integer)
        Number of times the order data has been modified.

The revision is useful when analyzing webhook data to determine if the
change takes precedence over the current representation.
      - `riskMetadata` (any)
        Risk metadata.
If this value is null, this field uses risk metadata that is captured when creating the payment token.
        - `ipAddress` (string,null)
          Customer's IP address.
          Example: "93.92.91.90"
        - `fingerprint` (string,null)
          Customer's device fingerprint.
A device fingerprint is a unique token that is used to identify the customer.
The device fingerprint is generated based on device attributes, such as: hardware,
software, IP address, language, browser, and more.
          Example: "pIUt3xbgX3l9g3YDiLbx"
        - `httpHeaders` (any)
        - `browserData` (object,null)
          Browser data used for 3D Secure and risk scoring.
        - `browserData.colorDepth` (integer, required)
          Browser color depth in bits per pixel.
This value is obtained using the screen.colorDepth property.
          Example: 24
        - `browserData.isJavaEnabled` (boolean, required)
          Specifies if Java is enabled in a browser.
This value is obtained from the navigator.javaEnabled property.
        - `browserData.language` (string, required)
          Browser language settings.
This value is obtained from the navigator.language property.
          Example: "en-US"
        - `browserData.screenWidth` (integer, required)
          Width of the browser screen.
This value is obtained from the screen.width property.
          Example: 1920
        - `browserData.screenHeight` (integer, required)
          Height of the browser screen.
This value is obtained from the screen.height property.
          Example: 1080
        - `browserData.timeZoneOffset` (integer, required)
          Browser time zone offset in minutes from UTC.
A positive offset indicates that the local time is behind UTC.
A negative offset indicates that the local time is ahead of UTC.
You can find this value using the (new Date()).getTimezoneOffset() property.
          Example: 300
        - `browserData.isAdBlockEnabled` (boolean)
          Specifies if the usage of ad block has been detected in the browser.
        - `extraData` (object,null)
          Third-party data used for risk scoring.
        - `extraData.kountFraudSessionId` (string)
          Alpha-numeric fraudSessionId as provided by the Kount SDK.
          Example: "abcdefg12345abababab123456789012"
        - `extraData.payPalMerchantSessionId` (string)
          PayPal MerchantSessionID as generated by the PayPal Fraudnet SDK.
          Example: "dd65ratxc5qv15iph3vyoq7l6davuowa"
        - `extraData.threatMetrixSessionId` (string)
          Temporary identifier that is unique to the visitor session and passed to ThreatMetrix.
          Example: "dd65ratxc5qv15iph3vyoq7l6davuowadd65ratxc5qv15iph3vyoq7l6davuowa"
        - `isProxy` (boolean)
          Specifies if the customer's IP address is related to a proxy.
        - `isVpn` (boolean)
          Specifies if the customer's IP address is related to a VPN.
        - `isTor` (boolean)
          Specifies if the customer's IP address is related to TOR.
        - `isHosting` (boolean)
          Specifies if the customer's IP address is related to hosting.
        - `hostingName` (string,null)
          Name of the data center or hosting provider, if available.
        - `isp` (string,null)
          Internet Service Provider (ISP) name, if available.
        - `country` (string,null)
          Country ISO Alpha-2 code of the specified IP address.
          Example: "US"
        - `region` (string,null)
          Region of the specified IP address.
          Example: "NY"
        - `city` (string,null)
          City of the specified IP address.
          Example: "New York"
        - `latitude` (number)
          Latitude of the specified IP address.
        - `longitude` (number,null)
          Longitude of the specified IP address.
        - `postalCode` (string,null)
          Postal code of the specified IP address.
        - `timeZone` (string,null)
          Time zone of the specified IP address.
          Example: "America/New_York"
        - `accuracyRadius` (integer,null)
          Accuracy radius of the specified IP address, in kilometers.
        - `distance` (integer,null)
          Distance between the customer's IP address and the billing address geolocation, in kilometers.
        - `hasMismatchedBillingAddressCountry` (boolean)
          Specifies if the customer's billing address country and geo-IP address are not the same.
        - `hasMismatchedBankCountry` (boolean)
          Specifies if the customer's bank country and geo-IP address are not the same.
        - `hasMismatchedTimeZone` (boolean)
          Specifies if the customer's browser time zone and the IP address associated time zone are not the same.
        - `hasMismatchedHolderName` (boolean)
          Specifies if the customer's billing address name and primary address name are not the same.
        - `hasFakeName` (boolean)
          Specifies if the holder name seems fake.
        - `isHighRiskCountry` (boolean)
          Specifies if the geo-IP country, or the customer's billing country, is considered a high risk country.
        - `paymentInstrumentVelocity` (integer)
          Number of transactions for this payment instrument, based on fingerprint, in the last 24 hours.
        - `declinedPaymentInstrumentVelocity` (integer)
          Number of declined transactions for this payment instrument fingerprint in the last 24 hours.
        - `deviceVelocity` (integer)
          Number of transactions for this device, based on fingerprint, in the last 24 hours.
        - `ipVelocity` (integer)
          Number of transactions for this IP address in the last 24 hours.
        - `emailVelocity` (integer)
          Number of transactions for this email address in the last 24 hours.
        - `billingAddressVelocity` (integer)
          Number of transactions for this billing address in the last 24 hours.
        - `paymentInstrumentApprovedTransactionCount` (integer)
          Number of approved transactions for this payment instrument.
        - `score` (integer)
          Computed risk score based on IP risk data,
such as: isVpn, isTor, and isProxy.
      - `billingPortalToken` (string,null)
        Customer JWT to access a billing portal.
This field is presented only if a billing portal exists.
This is an experimental field and can be changed or removed in the future.
      - `customFields` (object)
        Use custom fields to extend a resource scheme to include custom data that is not provided as a common field.
For more information, see [Custom fields](https://www.rebilly.com/catalog/all/custom-fields).
      - `createdTime` (string)
        Date and time when the resource is created.
This value is set automatically when the resource is created.
      - `updatedTime` (string)
        Date and time when the resource is updated.
This value is set automatically when the resource is updated.
      - `_links` (array)
        Related links.
      - `_links.href` (string)
        Link URL.
      - `_links.rel` (string)
        Type of link.
        Enum: "self", "website", "customer", "initialInvoice", "recentInvoice", "approvalUrl", "attachments"
      - `_embedded` (object)
        Embedded objects that are requested by the expand query parameter.
      - `_embedded.recentInvoice` (object)
      - `_embedded.initialInvoice` (object)
      - `_embedded.customer` (object)
      - `_embedded.website` (object)
      - `_embedded.leadSource` (object)
      - `_embedded.shippingRate` (object)
      - `_embedded.paymentInstrument` (object)
      - `_embedded.upcomingInvoice` (object)
      - `lineItems` (array)
        Subscription line items which queue until the next renewal, or interim, invoice is issued for the subscription.
      - `lineItems.type` (string)
        Type of invoice line item.
        Enum: "debit", "credit"
      - `lineItems.description` (string)
        Description of the line item.
      - `lineItems.unitPriceAmount` (number)
        Unit price of the line item.
        Example: 49.95
      - `lineItems.unitPriceCurrency` (string)
        Currency code in ISO 4217 format.
      - `lineItems.quantity` (integer)
        Quantity of the line item.
        Example: 1
      - `lineItems.periodStartTime` (string)
        Date and time when the service period begins for this item.
      - `lineItems.periodEndTime` (string)
        Date and time when the service period ends for this item.
      - `lineItems.createdTime` (string)
        Date and time when the resource is created.
This value is set automatically when the resource is created.
      - `lineItems.updatedTime` (string)
        Date and time when the resource is updated.
This value is set automatically when the resource is updated.
      - `lineItemSubtotal` (object)
        Subtotal of line items in this subscription (signed value).
If credits exceed debits, this value is a negative number.
      - `lineItemSubtotal.currency` (string)
        Currency code in ISO 4217 format.
      - `lineItemSubtotal.amount` (number)
        Amount of the subtotal.
        Example: 49.95
    - one-time-order:
      - `id` (string)
        ID of the one-time sale.
        Example: "ots_01HRF27SATGE4Z6PBJE6PD8328"
      - `orderType` (string, required)
        Specifies the type of order.
An order may be a subscription or a one-time purchase.
        Enum: "one-time-order"
      - `customerId` (string, required)
        ID of the customer resource.
      - `status` (string)
        Status of the one-time order.
        Enum: "pending", "abandoned", "completed", "canceled"
      - `billingStatus` (string)
        Billing status of the most recent invoice.
This value may help you to determine if you should change the service status of the service,
such as suspending the service.
        Enum: same as `billingStatus` in "subscription-order" (10 values)
      - `websiteId` (string, required)
        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).
        Example: "web_0YV7DE4Z26DQSA1AC92FBJ7SEG"
      - `currency` (string)
        Currency of the order.
      - `initialInvoiceId` (string,null)
        ID of the initial invoice (null for one-time orders).
        Example: "in_0YVF9605RKC62BP14NE2R7V2XT"
      - `recentInvoiceId` (string,null)
        ID of the most recently issued invoice.
The invoice might not be paid yet.
        Example: "in_0YVF9605RKC62BP14NE2R7V2XT"
      - `items` (array, required)
        Details of items in the order.
      - `items.id` (string)
        ID of the order item.
      - `items.quantity` (integer)
        Number of product units in the specified plan.
      - `items.quantityFilled` (number)
        Number of filled product units.
        Example: 5.125
      - `items.plan` (any, required)
        - `id` (string, required)
          ID of the plan.
      - `items.usageLimits` (any)
        - `softLimit` (object)
          Defines thresholds for notification purposes.
For example, to notify the customer that their usage is near the hard limit of their metered billing plan.
This notification informs the customer so that they can upgrade their plan before the hard limit is reached.
When the reported usage reaches 75%, 90%, and 100% of the configured limit a specific event is triggered.
To notify the customer, a webhook and notification can be configured for this event.
This field is useful for accounting and customer success purposes.
The usage of metered billing plans can still be reported if the soft limit is reached.
        - `softLimit.quantity` (integer)
          Usage limit quantity.
        - `softLimit.amount` (number)
          Usage limit amount in the currency of the order.
        - `hardLimit` (object)
          Defines a limit where the customer can no longer use the service.
Hard limits are used in addition to soft limits.
When a soft limit is reached,
a customer may receive a notification
but the service can still be provided up to the hard limit value so that the customer can upgrade their plan.
When the reported usage reaches the configured limit,
a specific event is triggered.
To notify the customer in the merchant system,
or block a service,
a webhook and notification can be configured for this event.
When the total usage reaches the hard limit quantity,
or amount values,
metered billing plan usages can no longer be reported.
        - `hardLimit.quantity` (integer)
          Usage limit quantity.
        - `hardLimit.amount` (number)
          Usage limit amount in the currency of the order.
        - `trialLimit` (any)
          Defines a usage cap during the trial period of a subscription.
This limit is enforced only while the subscription is in its trial phase.
When the reported usage reaches the configured trial limit, an event called 'trial-usage-limit-reached' is triggered.
To notify the customer or restrict access to the service, a webhook and notification can be configured for this event.
Once the trial limit is reached, additional usage cannot be reported unless the trial ends.
          Example: 20.725
      - `items.usageStatus` (any)
        - `isSoftLimitReached` (boolean)
          Specifies if the soft limit has been reached.
        - `isHardLimitReached` (boolean)
          Specifies if the hard limit has been reached.
        - `isTrialLimitReached` (boolean)
          Specifies if the trial limit has been reached.
      - `items.revision` (integer)
        Revision number that increments with each overriding change to this specific plan item.
      - `items.isModified` (boolean)
        Specifies if the plan information is modified for this subscription.
      - `items.isGrandfathered` (boolean)
        Specifies if the current plan revision number is greater than the plan item revision number.
      - `items.excludeFromMrr` (boolean)
        Specifies if this item should be excluded from monthly recurring revenue calculations.
      - `items._embedded` (object)
        Embedded objects that are requested by the expand query parameter.
      - `items._embedded.product` (object)
      - `items.planId` (string)
        ID of the plan.
        Example: "plan_0YV7DENSVGDBW9S71XZNNYYQ0X"
      - `deliveryAddress` (any)
        Delivery address of the order.
        - `firstName` (string,null)
          Contact's first name.
          Example: "Benjamin"
        - `lastName` (string,null)
          Contact's last name.
          Example: "Franklin"
        - `organization` (string,null)
          Contact's organization.
          Example: "Rebilly"
        - `address` (string,null)
          First line of the contact's street address.
          Example: "36 Craven St"
        - `address2` (string,null)
          Second line of the contact's street address.
        - `city` (string,null)
          Contact's city of residence.
          Example: "Austin"
        - `region` (string,null)
          Contact's region of residence.
          Example: "Texas"
        - `country` (string,null)
          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/).
          Example: "GB"
        - `postalCode` (string,null)
          Contact's postal code.
          Example: "WC2N 5NF"
        - `phoneNumbers` (array)
          List of phone numbers associated with the contact.
        - `phoneNumbers.label` (string, required)
          Phone number label or name.
          Example: "main"
        - `phoneNumbers.value` (string, required)
          Phone number value.
          Example: "1-512-777-0269"
        - `phoneNumbers.primary` (boolean)
          Specifies if the phone number is the contact's primary phone number.
          Example: true
        - `emails` (array)
          List of email addresses associated with the contact.
        - `emails.label` (string, required)
          Email label or name.
          Example: "main"
        - `emails.value` (string, required)
          Email address value.
          Example: "rebilly@example.com"
        - `emails.primary` (boolean)
          Specifies if the email address is the contact's primary email address.
          Example: true
        - `dob` (string,null)
          Contact's date of birth in ISO-8601 YYYY-MM-DD format.
          Example: "1980-04-01"
        - `jobTitle` (string,null)
          Contact's job title.
          Example: "CEO"
        - `hash` (string)
          Hash value for the contact.
Use this value to compare contacts for identical attribute values.
          Example: "056ae6d97c788b9e98b049ebafd7b229bf852221"
      - `billingAddress` (any)
        Billing address of the order.
        - `firstName` (string,null)
          Contact's first name.
          Example: "Benjamin"
        - `lastName` (string,null)
          Contact's last name.
          Example: "Franklin"
        - `organization` (string,null)
          Contact's organization.
          Example: "Rebilly"
        - `address` (string,null)
          First line of the contact's street address.
          Example: "36 Craven St"
        - `address2` (string,null)
          Second line of the contact's street address.
        - `city` (string,null)
          Contact's city of residence.
          Example: "Austin"
        - `region` (string,null)
          Contact's region of residence.
          Example: "Texas"
        - `country` (string,null)
          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/).
          Example: "GB"
        - `postalCode` (string,null)
          Contact's postal code.
          Example: "WC2N 5NF"
        - `phoneNumbers` (array)
          List of phone numbers associated with the contact.
        - `phoneNumbers.label` (string, required)
          Phone number label or name.
          Example: "main"
        - `phoneNumbers.value` (string, required)
          Phone number value.
          Example: "1-512-777-0269"
        - `phoneNumbers.primary` (boolean)
          Specifies if the phone number is the contact's primary phone number.
          Example: true
        - `emails` (array)
          List of email addresses associated with the contact.
        - `emails.label` (string, required)
          Email label or name.
          Example: "main"
        - `emails.value` (string, required)
          Email address value.
          Example: "rebilly@example.com"
        - `emails.primary` (boolean)
          Specifies if the email address is the contact's primary email address.
          Example: true
        - `dob` (string,null)
          Contact's date of birth in ISO-8601 YYYY-MM-DD format.
          Example: "1980-04-01"
        - `jobTitle` (string,null)
          Contact's job title.
          Example: "CEO"
        - `hash` (string)
          Hash value for the contact.
Use this value to compare contacts for identical attribute values.
          Example: "056ae6d97c788b9e98b049ebafd7b229bf852221"
      - `activationTime` (string,null)
        Date and time when the order is activated.
      - `voidTime` (string,null)
        Date and time when the order is voided.
      - `abandonTime` (string,null)
        Date and time when the pending order is automatically abandoned.
If this value is not passed during order creation,
a [pending order TTL](https://www.rebilly.com/catalog/all/organizations/patchorganization#organizations/patchorganization/t=request&path=settings/billing/pendingorderttl) setting is used to calculate the value.
      - `poNumber` (string,null)
        Purchase order number displayed on the issued invoices.
        Example: "PO123456"
      - `shipping` (object) — one of (discriminator: calculator):
        Shipping settings.
        - manual:
          - `amount` (number, required)
            Shipping amount.
          - `calculator` (string, required)
            Shipping calculator.
            Enum: same as `calculator` in "manual" (1 values)
        - rebilly:
          - `calculator` (string, required)
            Shipping calculator.
            Enum: same as `calculator` in "rebilly" (1 values)
          - `rateId` (string,null)
            ID of the shipping rate.
If this value is not set,
the cheapest applicable shipping rate is used.
            Example: "shipping-123-456"
          - `amount` (number)
            Shipping amount which is calculated from [Shipping rates](https://www.rebilly.com/catalog/all/shipping-rates).
      - `notes` (string)
        Notes for the customer displayed on the order invoice.
      - `revision` (integer)
        Number of times the order data has been modified.

The revision is useful when analyzing webhook data to determine if the
change takes precedence over the current representation.
      - `riskMetadata` (any)
        Risk metadata.
If this value is null, this field uses risk metadata that is captured when creating the payment token.
        - `ipAddress` (string,null)
          Customer's IP address.
          Example: "93.92.91.90"
        - `fingerprint` (string,null)
          Customer's device fingerprint.
A device fingerprint is a unique token that is used to identify the customer.
The device fingerprint is generated based on device attributes, such as: hardware,
software, IP address, language, browser, and more.
          Example: "pIUt3xbgX3l9g3YDiLbx"
        - `httpHeaders` (any)
        - `browserData` (object,null)
          Browser data used for 3D Secure and risk scoring.
        - `browserData.colorDepth` (integer, required)
          Browser color depth in bits per pixel.
This value is obtained using the screen.colorDepth property.
          Example: 24
        - `browserData.isJavaEnabled` (boolean, required)
          Specifies if Java is enabled in a browser.
This value is obtained from the navigator.javaEnabled property.
        - `browserData.language` (string, required)
          Browser language settings.
This value is obtained from the navigator.language property.
          Example: "en-US"
        - `browserData.screenWidth` (integer, required)
          Width of the browser screen.
This value is obtained from the screen.width property.
          Example: 1920
        - `browserData.screenHeight` (integer, required)
          Height of the browser screen.
This value is obtained from the screen.height property.
          Example: 1080
        - `browserData.timeZoneOffset` (integer, required)
          Browser time zone offset in minutes from UTC.
A positive offset indicates that the local time is behind UTC.
A negative offset indicates that the local time is ahead of UTC.
You can find this value using the (new Date()).getTimezoneOffset() property.
          Example: 300
        - `browserData.isAdBlockEnabled` (boolean)
          Specifies if the usage of ad block has been detected in the browser.
        - `extraData` (object,null)
          Third-party data used for risk scoring.
        - `extraData.kountFraudSessionId` (string)
          Alpha-numeric fraudSessionId as provided by the Kount SDK.
          Example: "abcdefg12345abababab123456789012"
        - `extraData.payPalMerchantSessionId` (string)
          PayPal MerchantSessionID as generated by the PayPal Fraudnet SDK.
          Example: "dd65ratxc5qv15iph3vyoq7l6davuowa"
        - `extraData.threatMetrixSessionId` (string)
          Temporary identifier that is unique to the visitor session and passed to ThreatMetrix.
          Example: "dd65ratxc5qv15iph3vyoq7l6davuowadd65ratxc5qv15iph3vyoq7l6davuowa"
        - `isProxy` (boolean)
          Specifies if the customer's IP address is related to a proxy.
        - `isVpn` (boolean)
          Specifies if the customer's IP address is related to a VPN.
        - `isTor` (boolean)
          Specifies if the customer's IP address is related to TOR.
        - `isHosting` (boolean)
          Specifies if the customer's IP address is related to hosting.
        - `hostingName` (string,null)
          Name of the data center or hosting provider, if available.
        - `isp` (string,null)
          Internet Service Provider (ISP) name, if available.
        - `country` (string,null)
          Country ISO Alpha-2 code of the specified IP address.
          Example: "US"
        - `region` (string,null)
          Region of the specified IP address.
          Example: "NY"
        - `city` (string,null)
          City of the specified IP address.
          Example: "New York"
        - `latitude` (number)
          Latitude of the specified IP address.
        - `longitude` (number,null)
          Longitude of the specified IP address.
        - `postalCode` (string,null)
          Postal code of the specified IP address.
        - `timeZone` (string,null)
          Time zone of the specified IP address.
          Example: "America/New_York"
        - `accuracyRadius` (integer,null)
          Accuracy radius of the specified IP address, in kilometers.
        - `distance` (integer,null)
          Distance between the customer's IP address and the billing address geolocation, in kilometers.
        - `hasMismatchedBillingAddressCountry` (boolean)
          Specifies if the customer's billing address country and geo-IP address are not the same.
        - `hasMismatchedBankCountry` (boolean)
          Specifies if the customer's bank country and geo-IP address are not the same.
        - `hasMismatchedTimeZone` (boolean)
          Specifies if the customer's browser time zone and the IP address associated time zone are not the same.
        - `hasMismatchedHolderName` (boolean)
          Specifies if the customer's billing address name and primary address name are not the same.
        - `hasFakeName` (boolean)
          Specifies if the holder name seems fake.
        - `isHighRiskCountry` (boolean)
          Specifies if the geo-IP country, or the customer's billing country, is considered a high risk country.
        - `paymentInstrumentVelocity` (integer)
          Number of transactions for this payment instrument, based on fingerprint, in the last 24 hours.
        - `declinedPaymentInstrumentVelocity` (integer)
          Number of declined transactions for this payment instrument fingerprint in the last 24 hours.
        - `deviceVelocity` (integer)
          Number of transactions for this device, based on fingerprint, in the last 24 hours.
        - `ipVelocity` (integer)
          Number of transactions for this IP address in the last 24 hours.
        - `emailVelocity` (integer)
          Number of transactions for this email address in the last 24 hours.
        - `billingAddressVelocity` (integer)
          Number of transactions for this billing address in the last 24 hours.
        - `paymentInstrumentApprovedTransactionCount` (integer)
          Number of approved transactions for this payment instrument.
        - `score` (integer)
          Computed risk score based on IP risk data,
such as: isVpn, isTor, and isProxy.
      - `customFields` (object)
        Use custom fields to extend a resource scheme to include custom data that is not provided as a common field.
For more information, see [Custom fields](https://www.rebilly.com/catalog/all/custom-fields).
      - `createdTime` (string)
        Date and time when the resource is created.
This value is set automatically when the resource is created.
      - `updatedTime` (string)
        Date and time when the resource is updated.
This value is set automatically when the resource is updated.
      - `_links` (array)
        Related links.
      - `_links.href` (string)
        Link URL.
      - `_links.rel` (string)
        Type of link.
        Enum: same as `_links.rel` in "subscription-order" (7 values)
      - `_embedded` (object)
        Embedded objects that are requested by the expand query parameter.
      - `_embedded.recentInvoice` (object)
      - `_embedded.customer` (object)
      - `_embedded.website` (object)
      - `_embedded.leadSource` (object)
      - `_embedded.shippingRate` (object)
      - `_embedded.paymentInstrument` (object)
      - `organizationId` (string)
        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).
        Example: "org_0YVDM8RC7GDADADSBSMW124JA8"

## Response 401 fields (application/json):

  - `status` (integer)
    HTTP status code.

  - `type` (string)
    Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference.
It should provide human-readable documentation for the problem type.
When this member is not present, its value is assumed to be "about:blank".

  - `title` (string)
    Short, human-readable summary of the problem type.
Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.

  - `detail` (string)
    Human-readable explanation that is specific to this occurrence of the problem.

  - `instance` (string)
    URI reference that identifies the specific occurrence of the problem.
It may or may not yield further information if dereferenced.

## Response 403 fields (application/json):

  - `status` (integer)
    HTTP status code.

  - `type` (string)
    Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference.
It should provide human-readable documentation for the problem type.
When this member is not present, its value is assumed to be "about:blank".

  - `title` (string)
    Short, human-readable summary of the problem type.
Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.

  - `detail` (string)
    Human-readable explanation that is specific to this occurrence of the problem.

  - `instance` (string)
    URI reference that identifies the specific occurrence of the problem.
It may or may not yield further information if dereferenced.

## Response 404 fields (application/json):

  - `status` (integer)
    HTTP status code.

  - `type` (string)
    Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference.
It should provide human-readable documentation for the problem type.
When this member is not present, its value is assumed to be "about:blank".

  - `title` (string)
    Short, human-readable summary of the problem type.
Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.

  - `detail` (string)
    Human-readable explanation that is specific to this occurrence of the problem.

  - `instance` (string)
    URI reference that identifies the specific occurrence of the problem.
It may or may not yield further information if dereferenced.


