---
title: "Update a server payment"
method: POST
path: "/api/server/payment/{paymentId}"
tags: ["Payment"]
---

# Update a server payment

`POST /api/server/payment/{paymentId}`

**Updates an existing payment with new information.**

This endpoint allows you to modify payment details such as billing information, customer details, or other payment metadata after the payment has been created but before it's finalized.

## Path parameters

- `paymentId` string, required

## Request body

- UpdateServerPaymentDto
  - `card` CardInfoDto
    - `number` string, required — Card number (13-19 digits)
    - `expiration_month` number, required — Card expiration month (1-12)
    - `expiration_year` number, required — Card expiration year (4 digits)
    - `cvc` string, required — Card security code (CVC/CVV, 3-4 digits)
  - `products` ProductDto[] — The list of products to purchase. All prices are excluding tax (HT). The total amount will be calculated based on the sum of product prices times quantities, then tax will be added automatically based on the billing country. Will update the payment products list if provided, otherwise the payment products list will not be updated.
    - `name` string, required — The name of the product
    - `price` number, required — The price of the product in cents
    - `quantity` number, required — The quantity of the product
  - `currency` 'EUR' | 'USD' — Payment currency. Will update the payment currency if provided, otherwise the payment currency will not be updated.
  - `customerEmail` string, email, required — Customer email address
  - `billingCountry` string, required — Billing country code (ISO 3166-1 alpha-2)
  - `postalCode` string — Billing postal code (required for some countries like US)
  - `purchasingAsBusiness` boolean — Whether the purchase is for a business
  - `businessName` string — Business name (required if purchasingAsBusiness is true)
  - `taxId` string — Business tax ID (required if purchasingAsBusiness is true)
  - `firstName` string — First name
  - `name` string, required — Customer's name. This field accepts EITHER the full name (e.g., 'John Doe') OR just the last name (e.g., 'Doe') if you also provide the firstName field separately. Choose one approach: (1) Use only this 'name' field with the full name, OR (2) Use both 'firstName' and 'name' fields where 'name' contains only the last name.
  - `metadatas` object — Optional metadata (key-value pairs)
  - `autoConfirm` boolean — Auto-confirm the payment (default false). When enabled, the payment is processed immediately if no 3DS step is required, or right after a successful 3DS authentication.
  - `force3ds` boolean — Force 3DS authentication directly. With card information (on-session) the 3DS is forced even if it is not strictly required.
  - `pricingMode` 'TAX_EXCLUSIVE' | 'TAX_INCLUSIVE' — Pricing mode for the products. TAX_EXCLUSIVE (default): Product prices are excluding tax (HT), tax is added on top to calculate the final amount. TAX_INCLUSIVE: Product prices include tax (TTC), tax is extracted from the total while keeping the final amount fixed.
  - `threeDsSuccessUrl` string — URL to redirect to after successful 3DS authentication, only required if card information is provided
  - `threeDsFailureUrl` string — URL to redirect to after failed 3DS authentication, only required if card information is provided
  - `statementDescriptor` string — Optional statement descriptor (max 11 characters) shown on the customer's bank statement as 'INFLOWPAY* <descriptor>'. Falls back to the account-level statement descriptor if omitted.

## Response `200`

Update a server payment successful

- ApiPaymentDtoWithThreeDsSessionUrl
  - `id` string, required — The id of the payment
  - `amount` number, required — The amount of the payment in cents, this has been calculated from the products prices and quantities
  - `customerEmail` string, required — The email of the customer
  - `customerId` string, nullable — The id of the customer
  - `currency` 'EUR' | 'GBP' | 'USD', required — The currency of the payment, this currency will refer to product list prices
  - `products` ProductDto[], required — The products list
    - `name` string, required — The name of the product
    - `price` number, required — The price of the product in cents
    - `quantity` number, required — The quantity of the product
  - `metadatas` object — The metadatas of the payment
  - `status` 'INITIATION' | 'CHECKOUT_PENDING' | 'CHECKOUT_AUTHORIZED' | 'CHECKOUT_SUCCESS' | 'CHECKOUT_CANCELED' | 'CANCELED' | 'PAYMENT_RECEIVED' | 'PAYMENT_SUCCESS' | 'PAYMENT_FAILED' | 'PARTIAL_REFUNDED' | 'FULLY_REFUNDED' | 'REFUND_PENDING' | 'REFUND_FAILED' | 'DISPUTE_INQUIRY' | 'DISPUTE_INQUIRY_CLOSED' | 'DISPUTE_OPENED' | 'DISPUTE_EVIDENCE_SUBMITTED' | 'DISPUTE_UNDER_REVIEW' | 'DISPUTE_WON' | 'DISPUTE_LOST' | 'DISPUTE_ACCEPTED' | 'DISPUTE_PREVENTED' | 'FRAUD_FLAGGED', required — The status of the payment, exhaustive list of status to come
  - `captureMode` 'AUTOMATIC' | 'MANUAL', required — AUTOMATIC or MANUAL (authorize now, capture later)
  - `authorizedAt` string, date-time, nullable
  - `capturedAmountInCents` number, required — Total amount captured in cents (TTC)
  - `timeline` Timeline[], required — The timeline of the payment
    - `status` string, required — The status of the timeline
    - `date` string, date-time, required — The date of the timeline
    - `amountInCents` number — Refund amount in HT cents for refund-related timeline entries (PARTIAL_REFUNDED, FULLY_REFUNDED, REFUND_PENDING, REFUND_FAILED). Omitted for non-refund lifecycle events.
  - `depositAttempts` PaymentAttemptDto[], required — An history of payment attempts
    - `paymentId` string, required — The id of the payment
    - `status` string, required — The status of the payment attempt
    - `errorMessage` string, nullable, required — The error message of the payment attempt
    - `attemptedAt` string, date-time, required — The date when the payment attempt was made
    - `paymentMethod` 'card' | 'apple_pay' | 'google_pay' | 'open_banking' | 'ideal' | 'sepa_debit', nullable, required — The payment method used for this attempt
    - `paymentError` PaymentErrorDto
      - `code` string, nullable, required — Error code (e.g. 'card_declined')
      - `declineCode` string, nullable, required — Decline code (e.g. 'insufficient_funds')
      - `networkDeclineCode` string, nullable, required — Raw ISO 8583 network decline code (e.g. '51')
      - `message` string, nullable, required — Human-readable error message
      - `networkDeclineMessage` string, nullable, required — Human-readable error message corresponding to the network decline code, when known
  - `transactionSummary` ApiOnrampDestination
    - `currency` string, required — The currency of the payment
    - `finalAmount` string, required — The final amount of the payment
  - `createdAt` string, date-time, required — The creation date of the payment
  - `updatedAt` string, date-time, required — The last update date of the payment
  - `subscriptionId` string, nullable — The subscription id if payment is part of a subscription
  - `taxCountry` string, nullable — The tax country of the payment
  - `amountTaxesIncluded` number, nullable — The total amount including taxes in cents
  - `depositStatus` string, nullable — The status from the deposit payment service provider
  - `lastDepositAttempt` LastDepositAttemptDto
    - `status` string — The status of the last deposit attempt (e.g., 'succeeded', 'failed', 'requires_action')
    - `amount` number — The amount of the last deposit attempt in cents
    - `paymentMethod` 'CARD' | 'DIRECT_BANK_TRANSFER' | 'OPEN_BANKING' | 'NOT_KNOWN' — The payment method used for the last deposit attempt
    - `error` string, nullable — Error code from the last failed deposit attempt (e.g., 'card_declined', 'insufficient_funds')
    - `attemptedAt` string, date-time — Timestamp of the last deposit attempt
    - `paymentError` PaymentErrorDto
      - `code` string, nullable, required — Error code (e.g. 'card_declined')
      - `declineCode` string, nullable, required — Decline code (e.g. 'insufficient_funds')
      - `networkDeclineCode` string, nullable, required — Raw ISO 8583 network decline code (e.g. '51')
      - `message` string, nullable, required — Human-readable error message
      - `networkDeclineMessage` string, nullable, required — Human-readable error message corresponding to the network decline code, when known
  - `taxRateInPercentage` number, nullable — The tax rate in percentage applied to the payment
  - `pricingMode` string, nullable — The pricing mode used for the payment. TAX_EXCLUSIVE (default): Prices are excluding tax (HT), tax is added on top. TAX_INCLUSIVE: Prices include tax (TTC), tax is extracted from total.
  - `lastThreeDsAttempt` LastThreeDsAttemptDto
    - `status` string, required — The status of the last 3DS attempt
    - `cardBrand` string, required — The brand of the card
    - `createdDate` string, date-time, required — The creation date of the last 3DS attempt
  - `expiresAt` string, date-time, nullable — The expiration date of the payment
  - `invoiceUrl` string, nullable — URL to view and download the invoice (available after payment success)
  - `customerPaymentMethod` PaymentCustomerPaymentMethodDto
    - `id` string, required — The id of the saved payment method
    - `type` string, required — The type of the payment method
    - `cardBrand` string, nullable — The card brand
    - `cardLast4` string, nullable — The last 4 digits of the card
  - `threeDsSessionUrl` object, nullable — The URL to redirect to after successful 3DS authentication

## Other responses

- `400` — Invalid payment data or payment state
- `401` — Unauthorized - Invalid API key
- `404` — Payment not found

---

[API](https://skmtc.dev/inflowpay/apis/inflow-api.md) · [All operations](https://skmtc.dev/inflowpay/apis/inflow-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/inflowpay/inflow-api/revisions/3012dd3dd14a/schema)
