---
agentTools:
  projectIndex: https://docs.developer.plastiq.com/llms.txt
---

# Update a Payment Intent

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Plastiq Public API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://connect.sandbox.plastiq.com/api",
      "description": "Sandbox server"
    },
    {
      "url": "https://connect.plastiq.com/api",
      "description": "Production server"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/payment-intents/{id}": {
      "patch": {
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The ID of the Payment Intent",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/TraceId"
          },
          {
            "$ref": "#/components/parameters/EndUserAgent"
          },
          {
            "$ref": "#/components/parameters/EndUserIp"
          },
          {
            "$ref": "#/components/parameters/EndUserOS"
          },
          {
            "$ref": "#/components/parameters/EndUserDeviceId"
          },
          {
            "$ref": "#/components/parameters/EndUserDeviceManufacturer"
          },
          {
            "$ref": "#/components/parameters/EndUserDeviceModel"
          }
        ],
        "summary": "Update a Payment Intent",
        "tags": [
          "Payments"
        ],
        "requestBody": {
          "description": "Payment Intent to update",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchPaymentIntentRequestPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Payment Intent updated successfully",
            "headers": {
              "Trace-Id": {
                "$ref": "#/components/headers/Trace-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentIntent"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "token"
      }
    },
    "headers": {
      "Trace-Id": {
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "description": "The trace ID for the request"
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Bad Request",
        "headers": {
          "Trace-Id": {
            "$ref": "#/components/headers/Trace-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Unauthorized",
        "headers": {
          "Trace-Id": {
            "$ref": "#/components/headers/Trace-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Forbidden",
        "headers": {
          "Trace-Id": {
            "$ref": "#/components/headers/Trace-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Internal Server Error",
        "headers": {
          "Trace-Id": {
            "$ref": "#/components/headers/Trace-Id"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "example": "GENERIC_ERROR"
          },
          "message": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "details": {
                  "type": "string"
                },
                "field": {
                  "type": "string",
                  "description": "Request field the error applies to. Only present on validation errors that name a field, e.g. `businessAddress`.",
                  "example": "businessAddress"
                }
              }
            }
          },
          "traceId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "fee": {
        "type": "object",
        "properties": {
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/amountDetails"
              },
              {
                "type": "object",
                "properties": {
                  "value": {
                    "example": 2.9
                  }
                }
              }
            ]
          },
          "type": {
            "type": "string",
            "description": "The type of fee applied to the payment",
            "enum": [
              "PLASTIQ_SERVICE_FEE",
              "PLASTIQ_CROSS_BORDER_FEE",
              "DELIVERY_FEE",
              "EXPEDITED_PROCESSING_FEE",
              "EXPEDITED_HANDLING_FEE",
              "CARD_NETWORK_FEE"
            ]
          },
          "rate": {
            "type": "string",
            "description": "The rate of the fee assessed, presented in percentage.",
            "example": "2.90%"
          }
        }
      },
      "PaymentIntent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "example": "9998b94e-9008-4f10-9263-1476d2f7bd40"
          },
          "fees": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/fee"
            }
          },
          "sourceAmount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/amountDetails"
              },
              {
                "type": "object",
                "properties": {
                  "value": {
                    "example": 102.9
                  }
                }
              }
            ]
          },
          "targetAmount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/amountDetails"
              },
              {
                "type": "object",
                "properties": {
                  "value": {
                    "example": 100
                  }
                }
              }
            ]
          },
          "paymentMethod": {
            "$ref": "#/components/schemas/paymentMethodId"
          },
          "recipient": {
            "$ref": "#/components/schemas/recipientId"
          },
          "payer": {
            "$ref": "#/components/schemas/payerId"
          },
          "details": {
            "$ref": "#/components/schemas/PaymentDetails"
          },
          "status": {
            "type": "string",
            "enum": [
              "CAPTURABLE",
              "CAPTURED",
              "EXPIRED",
              "UNCAPTURABLE"
            ],
            "example": "CAPTURABLE"
          },
          "statusReasons": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "example": []
          },
          "warnings": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Warning"
                }
              ]
            }
          },
          "deliveryDate": {
            "type": "string",
            "format": "date",
            "example": "2020-11-20"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-11-19T01:35:53.096Z"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-11-19T01:40:53.096Z"
          },
          "deliveryOptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/deliveryOption"
            }
          }
        }
      },
      "recipientId": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "example": "a8d4e641-e130-43d1-90a0-9717561539aa"
          }
        }
      },
      "payerId": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "example": "8f51c396-6e29-49a6-ba5a-1a31d5420158"
          }
        }
      },
      "paymentMethodId": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "example": "6f0eb884-3f41-4b57-b86a-80f62dca011e"
          }
        }
      },
      "FeeAmendments": {
        "type": "object",
        "description": "Fee override of the fee rate charged on a single transaction",
        "properties": {
          "PLASTIQ_SERVICE_FEE": {
            "$ref": "#/components/schemas/FeeAmendmentDetails"
          }
        }
      },
      "FeeAmendmentDetails": {
        "type": "object",
        "description": "Fee override details indicating the rate or price and a note",
        "properties": {
          "rate": {
            "type": "string",
            "description": "The rate of the fee to apply, expressed as a percentage.",
            "example": "2.90%"
          }
        }
      },
      "PatchPaymentIntentRequestPayload": {
        "type": "object",
        "required": [
          "payer"
        ],
        "properties": {
          "targetAmount": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/amountDetails"
              }
            ]
          },
          "details": {
            "$ref": "#/components/schemas/PaymentDetails"
          },
          "feeAmendments": {
            "type": "object",
            "oneOf": [
              {
                "$ref": "#/components/schemas/FeeAmendments"
              }
            ]
          },
          "metadata": {
            "$ref": "#/components/schemas/PaymentMetadata"
          },
          "payer": {
            "$ref": "#/components/schemas/payerId"
          },
          "isExpedited": {
            "$ref": "#/components/schemas/isExpedited"
          },
          "deliveryDate": {
            "type": "string",
            "format": "date",
            "description": "The date to deliver the payment by. Note: will override `isExpedited` flag.",
            "example": "2020-11-20"
          }
        }
      },
      "amountDetails": {
        "type": "object",
        "description": "Amount that will be credited to Recipient",
        "required": [
          "currency",
          "value"
        ],
        "properties": {
          "value": {
            "type": "number",
            "example": 100,
            "description": "Value of the currency between 1 and 99999999.99"
          },
          "currency": {
            "type": "string",
            "description": "Currency value",
            "enum": [
              "USD"
            ]
          }
        }
      },
      "deliveryOption": {
        "type": "object",
        "properties": {
          "cutoffTime": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time in which the delivery date is valid for.",
            "example": "2020-11-19T01:40:53.096Z"
          },
          "deliveryDate": {
            "type": "string",
            "format": "date",
            "description": "The date the payment can be delivered by.",
            "example": "2020-11-20"
          },
          "fees": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/fee"
            }
          }
        }
      },
      "disbursementInformation": {
        "type": "object",
        "description": "The disbursement bank account or originator account for the payment.",
        "properties": {
          "accountLastFour": {
            "type": "string",
            "example": 1234,
            "description": "Last four digits of the disbursement bank account number"
          },
          "routingNumber": {
            "type": "string",
            "example": 123456789,
            "description": "Routing number for the disbursement bank account"
          },
          "bankName": {
            "type": "string",
            "example": "Silicon Valley Bank",
            "description": "Name of the bank for the disbursement account"
          }
        }
      },
      "traceInformation": {
        "type": "object",
        "description": "The trace information for locating the payment.",
        "properties": {
          "reference": {
            "type": "string",
            "example": "125109006",
            "description": "Number or ID of the trace information."
          }
        }
      },
      "PaymentDetails": {
        "type": "object",
        "properties": {
          "accountName": {
            "type": "string",
            "example": "Jen Doe",
            "description": "The name of the account. Used by the receiving entity for reconciling payments.",
            "minLength": 1,
            "maxLength": 64
          },
          "accountNumber": {
            "type": "string",
            "example": "647823643287423",
            "description": "The invoice or account number. Used by the receiving entity for reconciling payments.",
            "minLength": 1,
            "maxLength": 25
          },
          "memo": {
            "type": "string",
            "example": "Payment for Oct. coffee beans inventory",
            "description": "Short description of the payment. Used by the receiving entity for reconciling payments.",
            "minLength": 1,
            "maxLength": 25
          },
          "disbursementInformation": {
            "allOf": [
              {
                "$ref": "#/components/schemas/disbursementInformation"
              },
              {
                "type": "object"
              }
            ]
          },
          "traceInformation": {
            "allOf": [
              {
                "$ref": "#/components/schemas/traceInformation"
              },
              {
                "type": "object"
              }
            ]
          }
        }
      },
      "PaymentMetadata": {
        "type": "object",
        "description": "additional payment information to support operational requirements"
      },
      "isExpedited": {
        "example": false,
        "type": "boolean",
        "description": "Used to expedite a payment's delivery. If `true`, the delivery date will be set to the fastest available."
      },
      "Warning": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "description": "Used to provide information around any warnings that may exist",
        "properties": {
          "code": {
            "type": "string",
            "example": "WARNING_CODE"
          },
          "message": {
            "type": "string",
            "example": "Some message with information about this warning"
          }
        }
      }
    },
    "parameters": {
      "TraceId": {
        "in": "header",
        "name": "Trace-Id",
        "schema": {
          "type": "string"
        },
        "description": "A valid UUID (V4) for tracing requests. Will be returned as a header. If not present or invalid, a generated UUID will be returned."
      },
      "EndUserAgent": {
        "name": "End-User-Agent",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "description": "A string representing the User Agent of the end user. Recommended for compliance. Required only when the request is not coming from the end user's browser."
      },
      "EndUserDeviceId": {
        "name": "End-User-Device-Id",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "description": "A unique identifier for the end user's device. Recommended for compliance."
      },
      "EndUserDeviceModel": {
        "name": "End-User-Device-Model",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "description": "The device model used by the end user. Recommended for compliance."
      },
      "EndUserDeviceManufacturer": {
        "name": "End-User-Device-Manufacturer",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "description": "The manufacturer of the device used by the end user. Recommended for compliance."
      },
      "EndUserIp": {
        "name": "End-User-Ip",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "description": "The IP address of the end user. Recommended for compliance."
      },
      "EndUserOS": {
        "name": "End-User-OS",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "description": "The Operating System of the end user. Recommended for compliance."
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 106,
      "1": 186,
      "2": 221,
      "3": 177,
      "4": 47,
      "5": 247,
      "6": 88,
      "7": 60,
      "8": 163,
      "9": 25,
      "10": 117,
      "11": 185
    }
  }
}
```