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

# Retrieve a Payment Method

# 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-methods/{id}": {
      "get": {
        "parameters": [
          {
            "name": "payerId",
            "in": "query",
            "required": true,
            "description": "The Payer ID associated to the Payment Method",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The ID of the Payment Method",
            "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": "Retrieve a Payment Method",
        "tags": [
          "Payment Methods"
        ],
        "responses": {
          "200": {
            "description": "A Payment Method object",
            "headers": {
              "Trace-Id": {
                "$ref": "#/components/headers/Trace-Id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentMethod"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "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"
            }
          }
        }
      },
      "NotFound": {
        "description": "Not found",
        "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"
          }
        }
      },
      "BankAccountResponse": {
        "type": "object",
        "properties": {
          "accountType": {
            "type": "string",
            "description": "The type of the bank account",
            "enum": [
              "CHECKING",
              "SAVINGS"
            ],
            "example": "CHECKING"
          },
          "accountHolderName": {
            "type": "string",
            "description": "The legal name of the account holder",
            "example": "Jane Payer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-11-19T01:35:53.096Z"
          },
          "accountLastFour": {
            "type": "string",
            "description": "Last 4 digits of the account number",
            "example": "4242"
          },
          "routingNumber": {
            "type": "string",
            "description": "The routing number of the bank account",
            "example": "211371120"
          },
          "billingAddress": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Address"
              }
            ]
          }
        }
      },
      "CardResponse": {
        "type": "object",
        "properties": {
          "last4": {
            "type": "string",
            "description": "Last 4 digits of card number",
            "example": "4242"
          },
          "brand": {
            "type": "string",
            "example": "Visa"
          },
          "expirationMonth": {
            "type": "string",
            "example": "01"
          },
          "expirationYear": {
            "type": "string",
            "example": "2021"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2020-11-19T01:35:53.096Z"
          },
          "billingAddress": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Address"
              }
            ]
          },
          "subType": {
            "type": "string",
            "enum": [
              "CREDIT",
              "DEBIT"
            ],
            "example": "CREDIT"
          }
        }
      },
      "PaymentMethod": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "example": "6f0eb884-3f41-4b57-b86a-80f62dca011e"
          },
          "externalId": {
            "type": "string",
            "description": "Consumer defined ID that will be attached to this resource",
            "pattern": "^[-a-zA-Z0-9_~.]*$"
          },
          "type": {
            "type": "string",
            "enum": [
              "CARD",
              "BANK_ACCOUNT"
            ]
          },
          "data": {
            "type": "object",
            "oneOf": [
              {
                "$ref": "#/components/schemas/CardResponse"
              },
              {
                "$ref": "#/components/schemas/BankAccountResponse"
              }
            ]
          },
          "status": {
            "type": "string",
            "allOf": [
              {
                "$ref": "#/components/schemas/PaymentMethodStatus"
              }
            ],
            "example": "ACTIVE"
          },
          "statusReasons": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/StatusReason"
                }
              ]
            }
          }
        }
      },
      "Address": {
        "type": "object",
        "required": [
          "line1",
          "country",
          "city",
          "state",
          "postalCode"
        ],
        "properties": {
          "line1": {
            "type": "string",
            "description": "Address line 1 (e.g., street, PO Box, or company name).",
            "example": "360 9th St."
          },
          "line2": {
            "type": "string",
            "description": "Address line 2 (e.g., apartment, suite, unit, or building).",
            "example": null
          },
          "city": {
            "type": "string",
            "description": "City, district, suburb, town, or village.",
            "example": "San Francisco"
          },
          "state": {
            "type": "string",
            "description": "State, county, province, or region.",
            "example": "CA"
          },
          "postalCode": {
            "type": "string",
            "description": "ZIP or postal code.",
            "example": "94103"
          },
          "country": {
            "type": "string",
            "description": "Two-letter country code (ISO 3166-1 alpha-2).",
            "example": "US"
          }
        }
      },
      "PaymentMethodStatus": {
        "example": "INACTIVE",
        "type": "string",
        "description": "In some cases Payment Method will remain Inactive until additional information provided",
        "enum": [
          "ACTIVE",
          "INACTIVE"
        ]
      },
      "StatusReason": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "description": "Used to provide more context in reference to the status response",
        "properties": {
          "code": {
            "type": "string",
            "example": "STATUS_REASON_CODE"
          },
          "message": {
            "type": "string",
            "example": "Some message to help resolve status issue."
          }
        }
      }
    },
    "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
    }
  }
}
```