# Update payment details Update details about existing payment. Endpoint: PATCH /payments/{id} Version: 2.0.0 Security: bearerAuth, basicAuth ## Path parameters: - `id` (string, required) PayId assigned by Axepta Online in the initial request. ## Header parameters: - `Idempotency-Key` (string) A unique key provided by you to ensure that a particular operation is not processed multiple times in case of retries. ## Request fields (application/json): - `transId` (string) Transaction ID provided by you which should be unique for each payment. - `amount` (object) - `amount.value` (number) - `amount.currency` (string) 3-character ISO currency code. - `refNr` (string) Your unique reference number for the specific operation. You can pass this value to reconcile different operations in a payment (authorization, capture, refund, etc) individually. - `order` (object) - `order.merchantReference` (string) A unique identifier for the order, assigned by your system. - `order.numberOfArticles` (number) The total number of articles (items) included in the order. - `order.creationDate` (string) The date and time when the order was created. - `order.invoiceId` (string) ID of the invoice generated for the order. - `order.items` (array) - `order.items.id` (string) A unique identifier for the specific item in the order. - `order.items.sku` (string) The Stock Keeping Unit (SKU) of the item, used to uniquely identify the product within the merchant's inventory. - `order.items.name` (string) The name or title of the item being purchased. - `order.items.type` (string) The type of item, such as "physical", "digital", "discount", "sales_tax", "shipping_fee", "discount", "gift_card", "store_credit", etc. - `order.items.quantity` (number) The quantity of this item being purchased in the order. - `order.items.quantityUnit` (string) The unit of measurement for the quantity, such as "pcs", "kg", or "liters". - `order.items.taxRate` (number) The tax rate applied to this item. Percentage sign must be replaced with two zeros. For example: A tax rate of 25% should be sent as 2500. - `order.items.netPrice` (number) The net price of a single unit of this item, excluding tax and discounts. - `order.items.grossPrice` (number) The gross price of a single unit of this item, including taxes but excluding discounts. - `order.items.discountAmount` (number) Discount amount applied to single unit of this item. - `order.items.taxAmount` (number) Tax amount applied to single unit of this item. - `order.items.merchantData` (string) Additional data or metadata provided by the merchant about this item. - `order.items.description` (string) Detailed description of the item. - `order.items.marketplaceSellerId` (string) An identifier for the seller in a marketplace context. - `order.items.lineNumber` (number) A sequential line number assigned to this item in the order for reference purposes. - `order.items.merchantProductType` (string) A classification or type assigned to this product by you. - `order.items.googleProductCategory` (string) Indicates the category of the item based on the Google product taxonomy. - `order.items.googleProductCategoryId` (number) Google product category ID. - `order.items.groupId` (string) An identifier used to group related items together. - `order.items.taxCategory` (string) Specifies the tax category applicable to this item. - `order.items.additionalDescription` (string) Any additional descriptive information about this item not covered elsewhere. - `order.items.productInfo` (object) - `order.items.productInfo.brand` (string) The brand name associated with this product. - `order.items.productInfo.categories` (array) The product's category path as used in the your webshop - `order.items.productInfo.globalTradeItemNumber` (string) The product's Global Trade Item Number (GTIN). Enum: "EAN", "ISBN", "UPC" - `order.items.productInfo.manufacturerPartNumber` (string) The product's Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product. Only submit MPNs assigned by a manufacturer and use the most specific MPN possible. - `order.items.productInfo.imageUrl` (string) A URL pointing to an image of this product. - `order.items.productInfo.productUrl` (string) A URL linking to a detailed product page on the merchant's website. - `billingAddress` (object) - `billingAddress.streetName` (string) Street name of billing address. - `billingAddress.streetNumber` (string) Street number of billing address. - `billingAddress.addressLine2` (string) Address line 2 of billing address. - `billingAddress.addressLine3` (string) Address line 3 of billing address. - `billingAddress.city` (string) City of billing address. - `billingAddress.state` (string) State of billing address. - `billingAddress.country` (string) 3 character ISO country code of billing address. - `billingAddress.postalCode` (string) Postal code of billing address. - `shipping` (object) - `shipping.address` (object) - `shipping.address.firstName` (string) Shipping first name. - `shipping.address.lastName` (string) Shipping last name. - `shipping.address.companyName` (string) Shipping company name. Applicable, when the entity where the goods are being delivered is a business entity. - `shipping.address.streetName` (string) Shipping street. - `shipping.address.streetNumber` (string) Shipping street number. - `shipping.address.addressLine2` (string) Address line 2 of shipping address. - `shipping.address.addressLine3` (string) Address line 3 of shipping address. - `shipping.address.city` (string) Shipping city. - `shipping.address.state` (string) State of shipping address. - `shipping.address.country` (string) 3 character ISO country code of shipping address. - `shipping.address.postalCode` (string) Shipping postal code. - `shipping.type` (string) Shipping method. - `customerInfo` (object) Information about the customer. - `customerInfo.title` (string) Any additional title or designation associated with the customer, such as "Dr", etc. - `customerInfo.firstName` (string) First name of the customer. - `customerInfo.lastName` (string) Last name (surname) of the customer. - `customerInfo.companyName` (string) Name of the company if the customer is a business entity. - `customerInfo.email` (string) Email address of the customer. - `customerInfo.phone` (object) Phone number of the customer. - `customerInfo.phone.countryCode` (string) Country Code/Area code of the phone number. - `customerInfo.phone.number` (string) Phone number of the customer. - `eventToken` (string, required) Intent of the updating the payment details.Note: Not all event tokens are applicable for all payment method types. Refer payment method specific pages in our product guide to know the relevant event tokens for a specific payment method. Enum: "UPDATE_ORDER_DETAILS", "UPDATE_ADDRESS", "UPDATE_REFERENCE", "RESEND_INVOICE" - `paymentMethods` (object) - `paymentMethods.klarna` (object) - `paymentMethods.klarna.invoiceNumber` (string) Invoice/booking number from Klarna. This number is needed for example for resending the E-Mail with payment and order information. ## Response 200 fields (application/json): - `payId` (string) A unique identifier assigned by Axepta Online to the payment. This ID remains constant throughout the lifecycle of the payment and is used to track and reference the payment across all subsequent operations, such as authorization, capture, refund, or cancellation. - `merchantId` (string) Merchant ID assigned by Axepta Online. - `transId` (string) Transaction ID provided by you in the request. - `xId` (string) A unique identifier assigned by Axepta Online for each operation in the payment. For example: xId will be different for the authorization and capture operations of a payment whereas payId will be same. - `refNr` (string) Reference number provided by you in the request. - `status` (string) Status of the transaction. - `responseDescription` (string) Response description associated with the response code. - `responseCode` (number) Response code of the transaction. - `paymentMethods` (object) - `paymentMethods.klarna` (object) - `paymentMethods.klarna.providerResponseCode` (string) Response code from Klarna. - `paymentMethods.klarna.providerResponseText` (string) Response description from Klarna. - `paymentMethods.payPal` (object) - `paymentMethods.payPal.providerResponseCode` (string) Error code from PayPal if agreed with Axepta Online Helpdesk. ## Response 400 fields (application/json): - `field` (string) Example: "transId" - `error` (string) Example: "This field is required." ## Response 500 fields (application/json): - `responseCode` (string) Example: "A specific identifier for the error cause" - `responseDescription` (string) Example: "A brief message explaining the error"