orders_endpoints

Update order customer payment

Updates the customer payment and financial breakdown for the order identified by orderId. This is a merge, not a full replace: each field is overwritten only when the request supplies a non-null value for it. Fields sent as null (or omitted) keep their existing value. Provide the financial breakdown via orderTotal (V1) or orderTotalsV2 (V2); when V2 is sent it is validated for consistency with the V1 aggregates. The update is processed asynchronously and returns 202 Accepted. Rate limit: 8 requests per minute.

put/v1/orders/{orderId}/payments

Request

Path parameters

orderIdstring required

The external order identifier supplied by your app in externalIdentifiers.id when the order was created.

Example:295f76b4-5725-4bf5-a8ab-97943dbdc3b4

Headers

X-Store-Idstring required

The unique identifier of the store in your app. This ID, along with the Application ID, will be used to match the correct store when performing operations. It cannot be longer than 255 characters and must only contain printable ASCII characters. During on-boarding, this ID will be similar to onboarding:905bb725-b141-4a9b-832a-1f254f772c94 (where the UUID is the Internal Store ID). During off-boarding, this field will be filled with the last known Store ID, or with an empty string, in case none is found. In that case, please fall back to the provided internalStoreId (a.k.a. Sku-Sku ID).

Example:partner-store-unique-identifier

Request body

currencyCodestring required

The 3-letter currency code (ISO 4217) to use for all monetary values in this order.

Example request

{
  "currencyCode": "EUR",
  "customerPayment": [
    {
      "value": 2,
      "paymentRecords": [
        {
          "otterPaymentRecordId": "otter_123456789",
          "recordProviderType": "STRIPE",
          "recordPaymentType": "CARD",
          "paymentRecordId": "pm_123456789",
          "payerId": "payer_123456789",
          "balanceTransactionId": "ext_bt_123456789",
          "paymentDetails": {
            "brandType": "VISA",
            "expiration": {
              "year": 2025,
              "month": 12
            },
            "fundingType": "CREDIT",
            "walletType": "APPLE_PAY",
            "lastFour": "1234",
            "walletLastFour": "5678",
            "authorizationCode": "auth_code_123",
            "applicationPreferredName": "MyApp",
            "fingerprint": "fingerprint_abc123",
            "readMethod": "chip"
          }
        }
      ],
      "loyaltyInfo": {
        "hasMembershipPass": true
      }
    }
  ],
  "orderTotal": {
    "subtotal": 11.97,
    "claimedSubtotal": 11.97,
    "discount": -1.1,
    "tax": 1.1,
    "tip": 2,
    "deliveryFee": 5,
    "total": 19.07,
    "couponCode": "VWXYZ98765"
  },
  "orderTotalsV2": {
    "customerTotal": {
      "foodSales": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "feeForRestaurantProvidedDelivery": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "restaurantFundedDiscount": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "voucherDiscount": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "promotionDiscount": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "operatorDiscount": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "loyaltyDiscount": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "tipForRestaurant": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "adjustments": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "packingFee": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "bagFee": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "serviceProviderDiscount": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "tipForServiceProviderCourier": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "feeForServiceProviderDelivery": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "smallOrderFee": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "serviceFee": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "otherFee": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "netPayout": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "couponCodes": [
        "TACOWED5OFF"
      ]
    },
    "customerPayment": {
      "customerPaymentDue": 1,
      "customerPrepayment": 1,
      "customerAmountToReturn": 1,
      "paymentDueToRestaurant": 1
    },
    "payout": {
      "payoutFromServiceProvider": 1,
      "payoutFrom3rdParty": 1,
      "cashPayout": 1
    },
    "serviceProviderCharge": {
      "commission": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "processingFee": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "salesTaxWithheld": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "deliveryFeeForRestaurant": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "advertisingFee": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "chargesAdjustments": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      },
      "otherFees": {
        "breakdown": [
          {
            "name": "sales tax.",
            "value": 3.4
          }
        ]
      }
    }
  }
}

Response

The order payment update was successfully accepted.

Changes

No recorded changes to this operation across all 1 revision of this API.