# Update order details (/limited-release/commerce-platform/accept-payments/standard/customize/update-order-details)



For increased flexibility when obtaining payments from buyers, you can update an existing order. Updating orders allows you to:

* Determine additional amounts, including shipping and tax.
* Capture a different total amount without the payer re-approving the order.
* Update fields, such as shipping address, after collecting them from the payer.

## Know before you code [#know-before-you-code]

> **Info:** ### Get Started [#get-started]
>
> Complete the steps in **Get started** to get the following sandbox account information from the Developer Dashboard:
>
> * Your personal and business sandbox accounts.
> * Your access token.
>
> [Get started](/limited-release/commerce-platform/get-started/)

> **Info:** ### PayPal Checkout or Expanded Checkout [#paypal-checkout-or-expanded-checkout]
>
> This feature modifies an existing **PayPal Checkout** or **Expanded Checkout** integration and uses the following:
>
> * [JavaScript SDK:](/sdk/js/) Adds PayPal-supported payment methods.
> * [Orders REST API](/api/orders/v2): [Create order](/api/orders/v2/orders-create) and [Update order](/api/orders/v2/orders-patch)
>
> [Expanded Checkout](/limited-release/commerce-platform/accept-payments/advanced/)
>
> [PayPal Checkout](/limited-release/commerce-platform/accept-payments/standard/)

> **Info:** ### Explore PayPal APIs with Postman [#explore-paypal-apis-with-postman]
>
> You can use Postman to explore and test PayPal APIs. Learn more in our [Postman guide](/api/rest/postman).

## 1. Show a continue button [#1-show-a-continue-button]

If you update the final amount of the order after the payer approves the payment, or update other amount fields, such as shipping or tax, show a **Continue** button during checkout instead of a **Pay Now** button. A **Continue** button indicates to the payer that the amount or other details might change before they complete the order.

To show a **Continue** button, add `commit=false` in the script tag as shown in the following example:

```javascript lineNumbers
<script src="https://www.paypal.com/sdk/js?client-id=CLIENT-ID&commit=false">
</script>
```

> **Info:** **Tip:** Using `commit=false` reduces the number of payment methods that are shown to your payer because not all funding sources can be used when modifying the order. When possible, determine the final amount before the payer approves the transaction, and avoid using `PATCH`.

## 2. Update order details [#2-update-order-details]

Before you capture the money from the order, call the Orders API on your server with the `ORDER-ID`.

* Change `ACCESS-TOKEN` to your [access token](/api/rest/authentication/).
* Replace `BN-CODE` with your [PayPal attribution ID](/api/rest/requests/#paypal-partner-attribution-id) to receive revenue attribution. To find your BN code, see [Code and Credential Reference](/platforms/create-account/#link-bncode).
* Replace `AUTH-ASSERTION-JWT` with your [PayPal auth assertion](/api/rest/requests/#paypal-auth-assertion) token.

You can pass in a different `amount`, `invoice_id`, and `custom_id`. See the following code sample:

```javascript lineNumbers
curl -v -X PATCH https://api-m.sandbox.paypal.com/v2/checkout/orders/{ORDER-ID} \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer ACCESS-TOKEN' \
  -H 'PayPal-Partner-Attribution-Id: BN-CODE' \
  -H 'PayPal-Auth-Assertion: AUTH-ASSERTION-JWT' \
  -d '{
    "op": "add",
    "path": "/purchase_units/@reference_id=='PUHF'/invoice_id",
    "value": {
  		"integration_artifact": "INV-HighFashions"
	}
}'
```
