# Renewal invoice payment canceled

Endpoint: POST renewal-invoice-payment-canceled
Version: latest
Security: SecretApiKey, JWT

## Request fields (application/json):

  - `transactionId` (string)
    ID of the transaction.

  - `invoiceId` (string)
    ID of the invoice.
    Example: "in_0YVF9605RKC62BP14NE2R7V2XT"

  - `eventType` (string)
    Type of event that triggered the webhook.
    Enum: "renewal-invoice-payment-canceled", "renewal-invoice-payment-declined"

  - `_embedded` (object)
    Embedded objects related to the invoice and transaction event.

  - `_embedded.transaction` (object)
    Transaction information.

  - `_embedded.transaction.customerId` (string)
    ID of the customer resource.
    Example: "cus_0YV7DDSDD1C8DA64KHH2W33CPF"

  - `_embedded.transaction.parentTransactionId` (string)
    ID of the parent transaction.
    Example: "txn_0YVDTQJ8YWDGQACV2N2N5SPWQ0"

  - `_embedded.transaction.billingAddress` (object)
    Billing address.

  - `_embedded.transaction.billingAddress.firstName` (string,null)
    Contact's first name.
    Example: "Benjamin"

  - `_embedded.transaction.billingAddress.lastName` (string,null)
    Contact's last name.
    Example: "Franklin"

  - `_embedded.transaction.billingAddress.organization` (string,null)
    Contact's organization.
    Example: "Rebilly"

  - `_embedded.transaction.billingAddress.address` (string,null)
    First line of the contact's street address.
    Example: "36 Craven St"

  - `_embedded.transaction.billingAddress.address2` (string,null)
    Second line of the contact's street address.

  - `_embedded.transaction.billingAddress.city` (string,null)
    Contact's city of residence.
    Example: "Austin"

  - `_embedded.transaction.billingAddress.region` (string,null)
    Contact's region of residence.
    Example: "Texas"

  - `_embedded.transaction.billingAddress.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.transaction.billingAddress.postalCode` (string,null)
    Contact's postal code.
    Example: "WC2N 5NF"

  - `_embedded.transaction.billingAddress.phoneNumbers` (array)
    List of phone numbers associated with the contact.

  - `_embedded.transaction.billingAddress.phoneNumbers.label` (string, required)
    Phone number label or name.
    Example: "main"

  - `_embedded.transaction.billingAddress.phoneNumbers.value` (string, required)
    Phone number value.
    Example: "1-512-777-0269"

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

  - `_embedded.transaction.billingAddress.emails` (array)
    List of email addresses associated with the contact.

  - `_embedded.transaction.billingAddress.emails.label` (string, required)
    Email label or name.
    Example: "main"

  - `_embedded.transaction.billingAddress.emails.value` (string, required)
    Email address value.
    Example: "rebilly@example.com"

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

  - `_embedded.transaction.billingAddress.dob` (string,null)
    Contact's date of birth in ISO-8601 YYYY-MM-DD format.
    Example: "1980-04-01"

  - `_embedded.transaction.billingAddress.jobTitle` (string,null)
    Contact's job title.
    Example: "CEO"

  - `_embedded.transaction.redirectUrl` (string,null)
    URL where the end-user is redirected to when an offsite transaction is completed.
The default value is the website URL.

  - `_embedded.transaction.description` (string)
    Description of the payment.

  - `_embedded.transaction.requestId` (string)
    Request ID of the transaction.
This ID must be unique within a 24-hour period.
Use this field to prevent duplicate transactions.

  - `_embedded.transaction.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).

  - `_embedded.transaction.velocity` (integer)
    Number of transactions by the same customer in the past 24 hours.

  - `_embedded.transaction.paymentInstrument` (object) — one of:
    - Vaulted payment instrument:
      - `method` (string, required)
        Payment method supported vault.
For more information, see [Payment instrument](https://www.rebilly.com/catalog/all/payment-instruments).
        Enum: "payment-card", "ach", "paypal"
      - `paymentInstrumentId` (string, required)
        ID of the payment instrument.
        Example: "inst_0YVB8KPKNXCBR9EDX7JHSED75N"
    - Alternative instrument:
      - `method` (string, required)
        Payment method.
        Enum: "payment-card", "ach", "cash", "check", "paypal", "AdvCash", "Aera", "Affirm", "Afterpay", "Aircash", "Airpay", "Alfa-click", "Alipay", "AmazonPay", "Apple Pay", "AstroPay Card", "AstroPay-GO", "BankSEND", "BankReferenced", "bank-transfer", "bank-transfer-2", "bank-transfer-3", "bank-transfer-4", "bank-transfer-5", "bank-transfer-6", "bank-transfer-7", "bank-transfer-8", "bank-transfer-9", "Baloto", "Beeline", "Belfius-direct-net", "bitcoin", "Bizum", "Blik", "Boleto", "Boleto-2", "Boleto-3", "cash-deposit", "CASHlib", "CashToCode", "CCAvenue", "China UnionPay", "Clearpay", "Cleo", "CODVoucher", "Conekta-oxxo", "Conekta-spei", "cryptocurrency", "Cupon-de-pagos", "CyberSource", "Dimoco-pay-smart", "Directa24Card", "domestic-cards", "Efecty", "echeck", "ecoPayz", "ecoPayzTurkey", "ecoVoucher", "EPS", "ePay.bg", "Ethereum", "e-wallet", "ezyEFT", "eZeeWallet", "FasterPay", "Flexepin", "Giropay", "Google Pay", "Gpaysafe", "iCashOne Voucher", "iDebit", "iDEAL", "ING-homepay", "INOVAPAY-pin", "INOVAPAY-wallet", "InstaDebit", "InstantPayments", "instant-bank-transfer", "Interac-online", "Interac-eTransfer", "Interac-express-connect", "Interac", "invoice", "iWallet", "Jeton", "JetonCash", "jpay", "KakaoPay", "Khelocard", "Klarna", "KNOT", "Litecoin", "loonie", "LPG-online", "LPG-payment-card", "Matrix", "MaxiCash", "Megafon", "MercadoPago", "MiFinity-eWallet", "miscellaneous", "MobilePay", "Mollie", "Multibanco", "Bancontact", "Bancontact-mobile", "MTS", "MuchBetter", "MuchBetterVoucher", "MyFatoorah", "Neosurf", "Netbanking", "Neteller", "Nordea-Solo", "NordikCoin", "OchaPay", "online-bank-transfer", "Onlineueberweisen", "oriental-wallet", "OXXO", "P24", "Pagadito", "PagoEffectivo", "Pagsmile-lottery", "Pagsmile-deposit-express", "PayCash", "Payco", "Payeer", "PaymentAsia-crypto", "Paysafecard", "PayTabs", "Pay4Fun", "Paynote", "Paymero", "Paymero-QR", "PayU", "PayULatam", "Perfect-money", "Piastrix", "PIX", "PinPay", "phone", "PhonePe", "POLi", "PostFinance-card", "PostFinance-e-finance", "QIWI", "QPay", "QQPay", "Quickpay", "rapyd-checkout", "rebilly-hosted-payment-form", "Resurs", "reverse-withdrawal", "Ripple", "SafetyPay", "Samsung Pay", "SEPA", "Siirto", "Skrill", "Skrill Rapid Transfer", "SMSVoucher", "Sofort", "SparkPay", "SPEI", "swift-dbt", "Tele2", "Telr", "Terminaly-RF", "Tether", "ToditoCash-card", "Trustly", "Tupay", "TWINT", "UniCrypt", "UPayCard", "UPI", "USD-coin", "VCreditos", "VegaWallet", "VenusPoint", "Viva", "voucher", "voucher-2", "voucher-3", "voucher-4", "Wallet88", "Webmoney", "Webpay", "Webpay-2", "Webpay Card", "WeChat Pay", "XPay-P2P", "XPay-QR", "Yandex-money", "Zotapay", "Zimpler", "Zip"
      - `paymentInstrumentId` (string)
        ID of the payment instrument.
        Example: "inst_0YVB8KPKNXCBR9EDX7JHSED75N"
      - `reference` (string,null)
        Reference data.
This field is available only for the bank-transfer payment method.
    - Cash:
      - `method` (string, required)
        Enum: "cash"
      - `receivedBy` (string)
        Individual or entity that received the payment.
    - Check:
      - `method` (string, required)
        Enum: "check"
      - `reference` (string)
        Reference data.

  - `_embedded.transaction.riskMetadata` (any)
    - `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"

  - `_embedded.transaction.notificationUrl` (string,null)
    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.

  - `_embedded.transaction.isProcessedOutside` (boolean)
    Specifies if the transaction is processed outside of Rebilly.

  - `_embedded.transaction.isMerchantInitiated` (boolean)
    Specifies if the transaction is initiated by the merchant.

  - `_embedded.transaction.limits` (object,null)
    Transaction amount limit information.

  - `_embedded.transaction.limits.amount` (number)
    Limit amount.
    Example: 275.35

  - `_embedded.transaction.limits.currency` (string)
    Currency code in ISO 4217 format.

  - `_embedded.transaction.limits.resetTime` (string,null)
    Date and time in which the limit amount resets.
This value may be used for user interfaces.

  - `_embedded.transaction.method` (string)
    Payment method.

>Note: Use paymentInstrument.method instead.
    Enum: same as `method` in "Alternative instrument" (198 values)

  - `_embedded.transaction.orderId` (string)
    Order ID of the transaction.
This ID must be unique within a 24 hour period.

> Note: Use the requestId field instead.

  - `_embedded.invoice` (object)

  - `_embedded.invoice.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).

  - `_embedded.invoice.currency` (string, required)
    Currency code in ISO 4217 format.

  - `_embedded.invoice.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"

  - `_embedded.invoice.tax` (object) — one of (discriminator: calculator):
    Taxes.
    - manual:
      - `calculator` (string, required)
        Type of tax calculator.
        Enum: same as `calculator` in "manual" (1 values)
      - `items` (array, required)
        Taxes applied.
      - `items.amount` (number, required)
        Amount of the tax.
      - `items.description` (string, required)
        Description of the tax.
    - rebilly-taxjar:
      - `calculator` (string, required)
        Type of tax calculator.
        Enum: "rebilly-taxjar"
      - `items` (array)
        Taxes applied and calculated based on the taxCategoryId of the related product.
      - `items.amount` (number, required)
        Amount of the tax.
      - `items.description` (string, required)
        Description of the tax.
    - rebilly-avalara:
      - `calculator` (string, required)
        Type of tax calculator.
        Enum: "rebilly-avalara"
      - `items` (array)
        Taxes applied and calculated based on the taxCategoryId of the related product.
      - `items.amount` (number, required)
        Amount of the tax.
      - `items.description` (string, required)
        Description of the tax.

  - `_embedded.invoice.organizationTaxIdNumber` (object,null)
    Organization tax ID number that is displayed on the invoice.

  - `_embedded.invoice.organizationTaxIdNumber.type` (string, required)
    Type of the tax ID number.
    Enum: "eu-vat", "other"

  - `_embedded.invoice.organizationTaxIdNumber.value` (string, required)
    Value of the tax ID number.
    Example: "GB980780684"

  - `_embedded.invoice.customerTaxIdNumber` (object,null)
    Customer tax ID number that is displayed on the invoice.

  - `_embedded.invoice.customerTaxIdNumber.type` (string, required)
    Type of the tax ID number.
    Enum: same as `_embedded.invoice.organizationTaxIdNumber.type` (2 values)

  - `_embedded.invoice.customerTaxIdNumber.value` (string, required)
    Value of the tax ID number.
    Example: "GB980780684"

  - `_embedded.invoice.billingAddress` (object)
    Billing address of the invoice.
After the first payment is made for an invoice, this value cannot be changed.

  - `_embedded.invoice.deliveryAddress` (object)
    Delivery address of the invoice.

  - `_embedded.invoice.poNumber` (string,null)
    Purchase order number that is displayed on the invoice.
    Example: "PO123456"

  - `_embedded.invoice.notes` (string)
    Notes for the customer that are displayed on the invoice.

  - `_embedded.invoice.autopayScheduledTime` (string,null)
    Date and time when an automatic payment (autopay) is scheduled.

  - `_embedded.invoice.dueTime` (string)
    Date and time when the invoice is due for payment.

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

  - `_embedded.invoice.retryInstruction` (object,null)
    Invoice payment retry instruction.
This object specifies how to proceed if a payment related to the invoice fails.

  - `_embedded.invoice.retryInstruction.attempts` (array, required)
    Describes the retry instruction.

  - `_embedded.invoice.retryInstruction.attempts.scheduleInstruction` (object, required) — one of (discriminator: method):
    Specifies when the payment retry instruction is performed.
    - date-interval:
      - `method` (string, required)
        Enum: "date-interval"
      - `duration` (integer, required)
        Number of time units.
      - `unit` (any, required)
        Unit of time.
      - `anchor` (object) — one of (discriminator: method):
        Instruction for calculating the period anchor.
        - 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-of-month:
      - `method` (string, required)
        Enum: same as `method` in "day-of-month" (1 values)
      - `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: same as `method` in "day-of-week" (1 values)
      - `day` (string, required)
        Day of the week when the event occurs.
        Enum: same as `day` in "day-of-week" (7 values)
      - `week` (string, required)
        Enum: same as `week` in "day-of-week" (3 values)
      - `time` (string)
        Extended ISO-8601 format of time.
    - immediately:
      - `method` (string, required)
        Enum: "immediately"
    - intelligent:
      - `method` (string, required)
        Enum: "intelligent"
      - `duration` (integer, required)
        Latest point in time at which the event should occur.
The event occurs at a random time between the initial time and duration time.
      - `unit` (any, required)
        Unit of time.

  - `_embedded.invoice.retryInstruction.attempts.amountAdjustmentInstruction` (object) — one of (discriminator: method):
    Specifies if the payment amount must be adjusted for the retry.
    - partial:
      - `method` (string, required)
        Enum: "partial"
      - `value` (number, required)
        Amount of the payment.
      - `type` (string, required)
        Payment amount type.
        Enum: "percent", "fixed"
      - `afterApprovalPolicy` (any) — one of (discriminator: method):
        After an approved payment retry for an adjusted amount, this field specifies whether to discount the remaining invoice amount.
        - none:
          - `method` (string, required)
            No payment amount adjustment.
            Enum: "none"
        - discount-amount-remaining:
          - `method` (string, required)
            Discount the remaining amount on the invoice.
            Enum: "discount-amount-remaining"
    - none:
      - `method` (string, required)
        Enum: same as `method` in "none" (1 values)

  - `_embedded.invoice.retryInstruction.attempts.tryBackupInstruments` (boolean)
    Specifies whether to use backup payment instruments on an invoice payment retry.

  - `_embedded.invoice.retryInstruction.afterAttemptPolicies` (array, required)
    Describes the action to take when a payment attempt concludes, and payment is not collected.
    Enum: "change-subscription-renewal-time"

  - `_embedded.invoice.retryInstruction.afterRetryEndPolicies` (array, required)
    Describes the action to take when all scheduled payment retries, in a retry instruction, have concluded and payment is not collected.
    Enum: "abandon-invoice", "cancel-subscription"

  - `_embedded.invoice.delinquencyTime` (string,null)
    Date and time when the related order is considered delinquent, and is canceled.
If this value is null, no delinquency time is configured.
If the dueTime of the order becomes greater than the delinquencyTime value,
the delinquencyTime value becomes equal to dueTime.

If an invoice is not related to an order, this field can only be null.

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

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

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


## Response 2xx fields
