# Update a quote

You should update a quote using a PATCH call to add a recipient. This will update the saved quote's data based on who and where the money will be sent to.

Updating the quote with a recipient may cause the available payment options, prices and estimated delivery times to change from the original quoted amounts. This is due to the fact that sending some currencies to some destinations costs a different amount based on the payment networks we use, for example sending USD to a country outside the USA uses international rather than domestic payment networks and as such costs more, or sending CAD over the Interac network is a more expensive operation.

When updating a quote the payOut field may change to denote the payment option you should select when sending to this recipient. For example sending USD to a swift_code recipient or CAD to an interac recipient will change payOut to SWIFT or INTERAC respectively. This field defaults to BANK_TRANSFER so it can be used in all cases to help select the correct paymentOption and hence show the correct pricing to users.

If you want to provide more transparency in terms of fees charged when your customers create quote with swift recipient for global currencies, you might consider to set payOut field with SWIFT_OUR value. This will ensure that the recipient receives complete target amount.

In this case, where pricing changes after a user selects recipient, you should show a message to your customer before confirming the transfer. Please see the section on Global Currencies to learn more how and why this works and the messaging you need to display.

#### Transfer Nature for BRL
When creating or updating a quote, the transfer nature can be set. This is a requirement for transfers to or from BRL and impacts the fees we charge on the quote, specifically the IOF.

Note that IOF is determined based on the transfer nature, sender information, and recipient information. The default IOF will be included in a quote until all relevant information has been included.

{% admonition type="info" %}
Omitting transfer nature will not prevent the transfer from being created or even funded. However, when attempting to process the transfer, it will be blocked and the money will be refunded to the sender.
{% /admonition %}

Endpoint: PATCH /v3/profiles/{profileId}/quotes/{quoteId}
Security: UserToken

## Path parameters:

  - `profileId` (integer, required)
    Personal or business profile ID.
    Example: 101

  - `quoteId` (string, required)
    The quote ID (GUID format).
    Example: "11144c35-9fe8-4c32-b7fd-d05c2a7734bf"

## Header parameters:

  - `X-External-Correlation-Id` (string)
    Optional UUID for correlating requests across systems. If provided, Wise echoes it back in the response. Maximum 36 characters. Learn more.
    Example: "f47ac10b-58cc-4372-a567-0e02b2c3d479"

## Request fields (application/merge-patch+json):

  - `targetAccount` (integer)
    ID of transfer recipient, found in response from POST v1/accounts (recipient creation).
    Example: 12345

  - `payOut` (string)
    Optional. Preferred payout method. Default value is BANK_TRANSFER. Examples of other accepted values include BALANCE, SWIFT, SWIFT_OUR, ALIPAY, and INTERAC.
    Example: "SWIFT_OUR"

  - `paymentMetadata` (object)
    Optional. Used to pass additional metadata about the intended transfer.

  - `paymentMetadata.transferNature` (string)
    Optional. Used to pass transfer nature for calculating proper tax amounts (IOF) for transfers to and from BRL. Accepted values are shown dynamically in transfer requirements.
    Example: "MOVING_MONEY_BETWEEN_OWN_ACCOUNTS"

  - `pricingConfiguration` (object)
    Required when configured for your client ID. Includes a pricingConfiguration to be used for pricing calculations with the quote. If previously passed, the existing pricingConfiguration will remain and not be updated.

  - `pricingConfiguration.fee` (object)

  - `pricingConfiguration.fee.type` (string)
    Identifies the type of fee that will be configured. Options include only OVERRIDE.
    Example: "OVERRIDE"

  - `pricingConfiguration.fee.variable` (number)
    The selected variable percentage (in decimal format) that should be used in the pricingConfiguration.
    Example: 0.011

  - `pricingConfiguration.fee.fixed` (number)
    The selected fixed fee (in source currency) that should be used in the pricingConfiguration.
    Example: 15.42

## Response 200 fields (application/json):

  - `id` (string)
    ID of this quote (GUID format).
    Example: "11144c35-9fe8-4c32-b7fd-d05c2a7734bf"

  - `sourceCurrency` (string)
    Source (sending) currency code.
    Example: "GBP"

  - `targetCurrency` (string)
    Target (receive) currency code.
    Example: "USD"

  - `sourceAmount` (number)
    Amount in source currency to send.
    Example: 100

  - `targetAmount` (number)
    Amount in target currency to be received by the recipient.
    Example: 129.24

  - `payOut` (string)
    Mechanism we use to deliver the transfer. Not usually of interest to the user.
    Example: "BANK_TRANSFER"

  - `preferredPayIn` (string)
    Preferred pay-in method.
    Example: "BANK_TRANSFER"

  - `rate` (number)
    Exchange rate value used for the conversion.
    Example: 1.30445

  - `createdTime` (string)
    Quote created timestamp.
    Example: "2019-04-05T13:18:58Z"

  - `user` (integer)
    User ID who created the quote.
    Example: 55

  - `profile` (integer)
    Personal or business profile ID.
    Example: 101

  - `rateType` (string)
    Whether the rate is fixed or floating.
    Enum: "FIXED", "FLOATING"

  - `rateExpirationTime` (string)
    Time the locked rate will expire.
    Example: "2019-04-08T13:18:57Z"

  - `guaranteedTargetAmountAllowed` (boolean)
    Whether guaranteed target amount is allowed.
    Example: true

  - `targetAmountAllowed` (boolean)
    Whether target amount is allowed.
    Example: true

  - `guaranteedTargetAmount` (boolean)
    Whether the target amount is guaranteed.

  - `providedAmountType` (string)
    Whether the quote was created as source or target.
    Enum: "SOURCE", "TARGET"

  - `pricingConfiguration` (object)
    Allows for pricing configurations to be overridden by partners on a transfer level.

  - `pricingConfiguration.fee` (object)

  - `pricingConfiguration.fee.type` (string)
    Identifies the type of fee that will be configured. Options include only OVERRIDE.
    Example: "OVERRIDE"

  - `pricingConfiguration.fee.variable` (number)
    The selected variable percentage (in decimal format) that should be used in the pricingConfiguration.
    Example: 0.011

  - `pricingConfiguration.fee.fixed` (number)
    The selected fixed fee (in source currency) that should be used in the pricingConfiguration.
    Example: 15.42

  - `paymentOptions` (array)
    List of the methods a user can pay for the transfer.

  - `paymentOptions.disabled` (boolean)
    Whether this option is enabled or not for this quote.

  - `paymentOptions.estimatedDelivery` (string)
    The estimated delivery time for this combination of payIn and payOut methods, assuming payIn is performed now.
    Example: "2019-04-08T12:30:00Z"

  - `paymentOptions.formattedEstimatedDelivery` (string)
    A string to display to users for the estimated delivery date.
    Example: "by Apr 8"

  - `paymentOptions.estimatedDeliveryDelays` (array)
    Array of objects for delivery delays to display to users.

  - `paymentOptions.estimatedDeliveryDelays.reason` (string)
    Reason of the delivery delay.
    Example: "sample reason"

  - `paymentOptions.fee` (object)
    Object containing fee information.

  - `paymentOptions.fee.transferwise` (number)
    The fee to be paid by the sender based on the current state of the quote.
    Example: 3.04

  - `paymentOptions.fee.payIn` (number)
    The fee for this payment option, based on the product type of the payment option.

  - `paymentOptions.fee.discount` (number)
    Any discounts that have been applied to this quote for the user.
    Example: 2.27

  - `paymentOptions.fee.partner` (number)
    If you have agreed a custom price, it will be displayed here.

  - `paymentOptions.fee.total` (number)
    The total fees to be paid - use this figure when displaying fees on your app.
    Example: 0.77

  - `paymentOptions.price` (object)
    Object containing the price information.

  - `paymentOptions.price.priceSetId` (integer)
    ID of the price structure.
    Example: 238

  - `paymentOptions.price.total` (object)
    The total fees to be paid - use this figure when displaying fees on your app.

  - `paymentOptions.price.total.type` (string)
    Type of the pricing element.
    Example: "TOTAL"

  - `paymentOptions.price.total.label` (string)
    Short text describing the price structure.
    Example: "Total fees"

  - `paymentOptions.price.total.value` (object)
    Object containing value elements.

  - `paymentOptions.price.total.value.amount` (number)
    Amount to be paid.
    Example: 0.77

  - `paymentOptions.price.total.value.currency` (string)
    Currency of the amount to be paid.
    Example: "GBP"

  - `paymentOptions.price.total.value.label` (string)
    Text version of the price.
    Example: "0.77 GBP"

  - `paymentOptions.price.total.explanation` (object)
    Object element giving more details about the price.

  - `paymentOptions.price.items` (array)
    Object containing the details of the different elements of the total price.

  - `paymentOptions.price.items.id` (string)
    ID of this item.

  - `paymentOptions.price.items.type` (string)
    Type of the pricing item. It could be DISCOUNT for example.
    Example: "FEE"

  - `paymentOptions.price.items.label` (string)
    Short text describing the pricing element.
    Example: "fee"

  - `paymentOptions.price.items.value` (object)
    Object containing value elements.

  - `paymentOptions.price.items.value.amount` (number)
    Amount associated to this pricing element. Can be negative for discounts.

  - `paymentOptions.price.items.value.currency` (string)
    Currency of the pricing element.
    Example: "GBP"

  - `paymentOptions.price.items.value.label` (string)
    Text field containing the price and its currency.
    Example: "0 GBP"

  - `paymentOptions.price.items.explanation` (object)
    Additional information on a price breakdown item.

  - `paymentOptions.price.items.explanation.plainText` (string)
    Text element giving more details about the item.

  - `paymentOptions.price.items.explanation.markdown` (string)
    Formatted textual information.

  - `paymentOptions.price.deferredFee` (object)
    Deferred fee information from a pricingConfiguration override.

  - `paymentOptions.price.deferredFee.amount` (number)
    The amount of fees that has been deferred by a pricingConfiguration override.
    Example: 14.79

  - `paymentOptions.price.deferredFee.currency` (string)
    The currency of the deferred fee amount.
    Example: "BRL"

  - `paymentOptions.price.calculatedOn` (object)

  - `paymentOptions.price.calculatedOn.unroundedAmountToConvert` (object)
    The amount, unrounded, that fees were calculated on and built up from.

  - `paymentOptions.price.calculatedOn.unroundedAmountToConvert.amount` (number)
    Example: 179.97342

  - `paymentOptions.price.calculatedOn.unroundedAmountToConvert.currency` (string)
    Example: "BRL"

  - `paymentOptions.sourceAmount` (number)
    sourceAmount when using this payment option.
    Example: 100

  - `paymentOptions.targetAmount` (number)
    targetAmount when using this payment option.
    Example: 129.24

  - `paymentOptions.sourceCurrency` (string)
    Source currency for this payment option.
    Example: "GBP"

  - `paymentOptions.targetCurrency` (string)
    Target currency for this payment option.
    Example: "USD"

  - `paymentOptions.payIn` (string)
    Type of pay in method for this payment option.
    Example: "BANK_TRANSFER"

  - `paymentOptions.payOut` (string)
    Type of pay out method for this payment option.
    Example: "BANK_TRANSFER"

  - `paymentOptions.allowedProfileTypes` (array)
    Array of the allowed types of profile to use this payment option.
    Enum: "PERSONAL", "BUSINESS"

  - `paymentOptions.payInProduct` (string)
    Pay-in product type.
    Example: "CHEAP"

  - `paymentOptions.feePercentage` (number)
    Fee percentage for this payment option.
    Example: 0.0092

  - `paymentOptions.disabledReason` (object)
    Object present if a payment option is disabled.

  - `paymentOptions.disabledReason.code` (string)
    Code to denote the reason a payment method is unavailable.

  - `paymentOptions.disabledReason.message` (string)
    User friendly message to display when a method is unavailable.

  - `status` (string)
    Current status of this quote.
    Enum: "PENDING", "ACCEPTED", "FUNDED", "EXPIRED"

  - `expirationTime` (string)
    The time the quote expires.
    Example: "2019-04-05T13:48:58Z"

  - `notices` (array)
    Array of messages to display to the user. May be empty ([]) if there are no messages.

  - `notices.text` (string)
    The message to display.
    Example: "You can have a maximum of 3 open transfers with a guaranteed rate. After that, they'll be transferred using the live rate. Complete or cancel your other transfers to regain the use of guaranteed rate."

  - `notices.link` (string,null)
    URL that provides more information to the message. May be null if there's no URL.

  - `notices.type` (string)
    Type of message. If it is BLOCKED, don't allow the quote to be used to create the transfer.
    Enum: "WARNING", "INFO", "BLOCKED"


