---
title: "UpdatePaymentStatus"
method: POST
path: "/v2/UpdatePaymentStatus"
tags: ["Payments (V2)"]
---

# UpdatePaymentStatus

`POST /v2/UpdatePaymentStatus`

Updates the payment status by either capturing fully/partially the invoice amount or releasing the amount back into the customer's account. This endpoint is used for authorization and capture operations. Note: You can make only one Capture/Release operation on each invoice.

## Request body

- object
  - `Operation` 'Capture' | 'Release', required — Capture: Refers to capturing fully or partially the invoice value. Release: Refers to releasing fully the invoice value to the customer's account.
  - `Amount` number — The amount to be captured/released. For Capture: The amount has to be less than or equal to the invoice value (Mandatory). For Release: The amount has to be equal to the invoice value (Optional).
  - `Key` string, required — Refers to the Invoice ID, payment ID, or Customer Reference based on the key type.
  - `KeyType` 'InvoiceId' | 'PaymentId' | 'CustomerReference', required — InvoiceId: Refers to the invoice number that MyFatoorah generates. PaymentId: The value returned upon having any update on the invoice payment (recommended). CustomerReference: The reference used to link your orders in the store.

## Response `200`

Payment status updated successfully

- object
  - `IsSuccess` boolean — Indicates if the request was successful.
  - `Message` string — Response message associated with the request.
  - `ValidationErrors` object[] — List of validation errors, if any.
    - `Name` string
    - `Error` string
  - `Data` object
    - `InvoiceId` integer — The invoice ID that was used in the operation.
    - `InvoiceStatus` string — Pending: The customer made the payment but no operations on it OR a release is made on the amount. Paid: A capture is made on the amount.
    - `InvoiceReference` string — Invoice reference generated by MyFatoorah.
    - `CustomerReference` string — The customer reference data associated with the invoice.
    - `CreatedDate` string, date-time — The creation date of the invoice.
    - `ExpiryDate` string, date-time — The expiry date for the invoice.
    - `InvoiceValue` number — The value of Capture/Release.
    - `Comments` string — Comments associated with the invoice.
    - `CustomerName` string — The customer name saved along with the invoice.
    - `CustomerMobile` string — Customer mobile number.
    - `CustomerEmail` string — Customer email address.
    - `UserDefinedField` string — The user-defined field stored during invoice creation.
    - `InvoiceDisplayValue` string — Invoice value displayed in case of different currency from the base one.
    - `DueDeposit` number — The amount that will be deposited to the vendor.
    - `DepositStatus` string — The deposit status of the invoice (Deposited or Not Deposited).
    - `InvoiceItems` object[] — Array of invoice items.
      - `ItemName` string — Invoice item name stored with the invoice.
      - `Quantity` integer — Item quantity.
      - `UnitPrice` number — Item unit price.
      - `Weight` number — Weight in kg (100 >= Weight > 0).
      - `Width` number — Width in cm (200 >= Width > 0).
      - `Height` number — Height in cm (160 >= Height > 0).
      - `Depth` number — Depth in cm (200 >= Depth > 0).
    - `InvoiceTransactions` object[] — Array of invoice transactions.
      - `TransactionDate` string, date-time — The date of the transaction related to the invoice.
      - `PaymentGateway` string — The gateway the transaction was processed through.
      - `ReferenceId` string — The reference generated by the payment gateway.
      - `TrackId` string — The track number used to track the transaction with the gateway.
      - `TransactionId` string — The transaction ID.
      - `PaymentId` string — The payment ID assigned to this transaction.
      - `AuthorizationId` string — The authorization ID assigned to this transaction.
      - `TransactionStatus` string — The status of the transaction: InProgress (payment attempt not completed), Succss (capture successful), Failed (transaction failed), Authorize (client makes payment), Canceled (amount released).
      - `TransationValue` string — The value of the transaction.
      - `CustomerServiceCharge` string — The service charges considered on the customer during the transaction.
      - `TotalServiceCharge` string — Total service charge deducted from MyFatoorah side.
      - `DueValue` string — The amount value of this transaction.
      - `PaidCurrency` string — The currency used to pay the transaction.
      - `PaidCurrencyValue` string — The currency value used to pay the transaction.
      - `VatAmount` string — The value of the VAT amount for the transaction.
      - `Currency` string — Transaction currency.
      - `Error` string — The error message associated with the transaction from the acquirer bank/platform.
      - `ErrorCode` string — The MyFatoorah error code. Refer to Error Codes table.
      - `ECI` string — The ECI record of the transaction.
      - `Card` object — Contains details about the card used for payment.
        - `NameOnCard` string — The name of the cardholder entered by the payer.
        - `Number` string — The masked card number.
        - `PanHash` string — A unique identifier for the PAN.
        - `ExpiryMonth` string — Expiry month entered by the customer.
        - `ExpiryYear` string — Expiry year entered by the customer.
        - `Brand` string — Visa/Mastercard/Mada.
        - `Issuer` string — Name of the issuer bank.
        - `IssuerCountry` string — The issuer country of the card.
        - `FundingMethod` string — The funding method of the card (e.g., debit, credit, prepaid).

---

[API](https://skmtc.net/myfatoorah/apis/myfatoorah-api-v3.md) · [All operations](https://skmtc.net/myfatoorah/apis/myfatoorah-api-v3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/myfatoorah/myfatoorah-api-v3/revisions/994a74287a16/schema)
