# Quote rejected

Endpoint: POST quote-rejected
Version: latest
Security: SecretApiKey, JWT

## Request fields (application/json):

  - `quoteId` (string)
    ID of the quote.
    Example: qt_01HXBZMEGPETPHJZH6V4RHBMA8

  - `eventType` (string)
    Type of event that triggered the webhook.
    Enum: "quote-accepted", "quote-canceled", "quote-created", "quote-expired", "quote-issued", "quote-recalled", "quote-rejected", "quote-updated"

  - `_embedded` (object)
    Embedded objects related to the quote event.

  - `_embedded.quote` (any)

  - `_embedded.quote.type` (string, required)
    Type of the quote.
When a quote is accepted, a new order is created.
    Enum: "creation"

  - `_embedded.quote.acceptanceConditions` (array)
    Conditions that must be met for the quote to be automatically accepted.
    Example: ["payment"]

  - `_embedded.quote.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

  - `_embedded.quote.customerId` (string, required)
    ID of the customer resource.
    Example: cus_0YV7DDSDD1C8DA64KHH2W33CPF

  - `_embedded.quote.order` (object, required)
    Properties of the related order.

  - `_embedded.quote.order.items` (array, required)
    Items included in the quote.

  - `_embedded.quote.order.items.type` (string, required)
    Specifies the type of order item.
    Enum: "subscription"

  - `_embedded.quote.order.items.quantity` (integer)
    Number of product units in the specified plan.
Quantity for metered billing is always 0.

  - `_embedded.quote.order.items.quantityFilled` (number | null)
    Number of filled product units.
This field is not used for metered billing plans.
    Example: 5.125

  - `_embedded.quote.order.items.plan` (any, required)
    Plan details.

  - `_embedded.quote.order.items.plan.id` (string, required)
    Unique resource ID.
    Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21

  - `_embedded.quote.order.items.plan.id` (string, required)
    ID of the plan.
    Example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X

  - `_embedded.quote.order.items.plan.name` (string, required)
    Name of the plan.
This name is displayed on invoices and receipts.

  - `_embedded.quote.order.items.plan.description` (string)
    Plain-text description of the plan.
This field accepts plain-text only.

  - `_embedded.quote.order.items.plan.richDescription` (string)
    Rich-text description of the plan.
This field accepts rich text formatting, such as: bold, underline, italic, and hyperlinks.

  - `_embedded.quote.order.items.plan.productId` (string, required)
    ID of the related product.
    Example: prod_0YV7DES3WPC5J8JD8QTVNZBZNZ

  - `_embedded.quote.order.items.plan.currency` (string, required)
    Currency code in ISO 4217 format.
    Example: USD

  - `_embedded.quote.order.items.plan.pricing` (object, required)
    Pricing details.

  - `_embedded.quote.order.items.plan.setup` (object | null)
    Setup fee information for the plan.

  - `_embedded.quote.order.items.plan.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).
    Example: {"foo":"bar"}

  - `_embedded.quote.order.items.plan.isActive` (boolean)
    Specifies if the plan is active.

  - `_embedded.quote.order.items.plan.recurringInterval` (object, required)
    Service interval settings.

  - `_embedded.quote.order.items.plan.trial` (object | null)

  - `_embedded.quote.order.items.plan.meteredBilling` (object | null)
    Use metered billing when an exact quantity is unknown.
Report usage during a service period and charge customers afterwards.
Metered billing plans must be postpaid.

  - `_embedded.quote.order.items.plan.invoiceTimeShift` (object | null)
    Use invoice time shift to control the billing time.
Invoice time shift adjusts the invoice issue and due date when billing must occur before the service period changes.
Use invoice time shift in conjunction with `billingTiming` to:
- Bill immediately when the service period starts.
- Bill immediately after the service period ends.
- Bill at an interval of time before the service period starts.
- Bill at an interval of time after the service period starts.
- Bill at an interval of time before the service period ends.
- Bill at an interval of time after the service period ends.

  - `_embedded.quote.order.items.description` (string)
    Description of the quote item.
    Example: Charge per approved transaction with DCC

  - `_embedded.quote.order.items.priceDescription` (string)
    Price description of the quote item.
This value is only used for metered billing items.
    Example: 50% of the markup for approved transactions

  - `_embedded.quote.order.items.usageLimits` (any)

  - `_embedded.quote.order.items.usageLimits.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.

  - `_embedded.quote.order.items.usageLimits.softLimit.quantity` (integer)
    Usage limit quantity.

  - `_embedded.quote.order.items.usageLimits.softLimit.amount` (number)
    Usage limit amount in the currency of the order.

  - `_embedded.quote.order.items.usageLimits.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.

  - `_embedded.quote.order.items.usageLimits.hardLimit.quantity` (integer)
    Usage limit quantity.

  - `_embedded.quote.order.items.usageLimits.hardLimit.amount` (number)
    Usage limit amount in the currency of the order.

  - `_embedded.quote.order.items.usageLimits.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

  - `_embedded.quote.order.items.quantity` (integer)
    Number of product units in the specified plan.

  - `_embedded.quote.order.autopay` (boolean)
    Specifies if payment attempts for the related order 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 order.

  - `_embedded.quote.order.shipping` (object)
    Shipping settings.

  - `_embedded.quote.order.shipping.amount` (number, required)
    Shipping amount.

  - `_embedded.quote.order.shipping.calculator` (string, required)
    Shipping calculator.
    Enum: "manual"

  - `_embedded.quote.order.shipping.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

  - `_embedded.quote.order.deliveryAddress` (any)
    Delivery address of the order.

  - `_embedded.quote.order.deliveryAddress.firstName` (string | null)
    Contact's first name.
    Example: Benjamin

  - `_embedded.quote.order.deliveryAddress.lastName` (string | null)
    Contact's last name.
    Example: Franklin

  - `_embedded.quote.order.deliveryAddress.organization` (string | null)
    Contact's organization.
    Example: Rebilly

  - `_embedded.quote.order.deliveryAddress.address` (string | null)
    First line of the contact's street address.
    Example: 36 Craven St

  - `_embedded.quote.order.deliveryAddress.address2` (string | null)
    Second line of the contact's street address.

  - `_embedded.quote.order.deliveryAddress.city` (string | null)
    Contact's city of residence.
    Example: Austin

  - `_embedded.quote.order.deliveryAddress.region` (string | null)
    Contact's region of residence.
    Example: Texas

  - `_embedded.quote.order.deliveryAddress.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

  - `_embedded.quote.order.deliveryAddress.postalCode` (string | null)
    Contact's postal code.
    Example: WC2N 5NF

  - `_embedded.quote.order.deliveryAddress.phoneNumbers` (array)
    List of phone numbers associated with the contact.

  - `_embedded.quote.order.deliveryAddress.phoneNumbers.label` (string, required)
    Phone number label or name.
    Example: main

  - `_embedded.quote.order.deliveryAddress.phoneNumbers.value` (string, required)
    Phone number value.
    Example: 1-512-777-0269

  - `_embedded.quote.order.deliveryAddress.phoneNumbers.primary` (boolean)
    Specifies if the phone number is the contact's primary phone number.
    Example: true

  - `_embedded.quote.order.deliveryAddress.emails` (array)
    List of email addresses associated with the contact.

  - `_embedded.quote.order.deliveryAddress.emails.label` (string, required)
    Email label or name.
    Example: main

  - `_embedded.quote.order.deliveryAddress.emails.value` (string, required)
    Email address value.
    Example: rebilly@example.com

  - `_embedded.quote.order.deliveryAddress.emails.primary` (boolean)
    Specifies if the email address is the contact's primary email address.
    Example: true

  - `_embedded.quote.order.deliveryAddress.dob` (string | null)
    Contact's date of birth in ISO-8601 `YYYY-MM-DD` format.
    Example: 1980-04-01

  - `_embedded.quote.order.deliveryAddress.jobTitle` (string | null)
    Contact's job title.
    Example: CEO

  - `_embedded.quote.order.billingAddress` (any)
    Billing address of the order.

  - `_embedded.quote.order.startTime` (string | null)
    Date and time when the created order starts.
If this value is `null`, the quote acceptance time is used.

  - `_embedded.quote.order.isLegacy` (boolean)
    Specifies if the order is a legacy order.
    Example: true

  - `_embedded.quote.paymentTerms` (string)
    Payment terms for the customer which are displayed on the quote.

  - `_embedded.quote.expirationTime` (string | null)
    Date and time when the quote expires.
The default expiration time is one month from the time the quote is issued.
In a `draft` state, this field may be `null`.

  - `_embedded.quote.redirectUrl` (string)
    URL to redirect the customer to when a quote is rejected.
The default value is the website URL.

  - `_embedded.quote.signature` (object)
    Written signature and printed organization name.

  - `_embedded.quote.signature.showWrittenSignatureLines` (boolean)
    Specifies whether to show written signature lines.

  - `_embedded.quote.signature.organizationPrintedName` (string | null)
    Printed name of the organization.

  - `_embedded.quote.tax` (object)
    Taxes.

  - `_embedded.quote.tax.calculator` (string, required)
    Type of tax calculator.
    Enum: "manual"

  - `_embedded.quote.tax.items` (array, required)
    Taxes applied.

  - `_embedded.quote.tax.items.amount` (number, required)
    Amount of the tax.

  - `_embedded.quote.tax.items.description` (string, required)
    Description of the tax.

  - `_embedded.quote.tax.items` (array)
    Taxes applied and calculated based on the `taxCategoryId` of the related product.

  - `_embedded.quote.couponIds` (array | null)
    List of coupons to redeem on the customer and apply to the related invoice.
For more information, see [Coupons](https://www.rebilly.com/docs/settings/coupons-and-discounts/).

  - `_embedded.quote.type` (string, required)
    Type of the quote.
When a quote is accepted, quote items and settings are applied to the related order.
Change quotes can only be created for orders with `active` or `trial-ended` status.
For `trial-ended` orders, use this quote type to convert a trial-only order to a regular recurring order.
    Enum: "change"

  - `_embedded.quote.type` (string, required)
    Type of the quote.
When a quote is accepted, quote items and settings are applied to the order and the order is reactivated.
    Enum: "reactivation"

  - `_links` (array)
    Links to related resources.

  - `_links.href` (string)
    URL of the link.

  - `_links.rel` (string)
    Relationship type of the link.
    Enum: "quote"

