---
updatedAt: 2025-04-28T20:08:47.000Z
agentTools:
  projectIndex: https://developer.finvi.com/llms.txt
---

# Query paymentRequests

This is a resource for querying payment paymentRequests. The response will include a paymentRequestList of individual paymentRequest records.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Payment Requests",
    "description": "This resource provides access to process and query payment requests",
    "termsOfService": "https://swervepay.qc.ontariosystems.cloud/LICENSE-2.0.html",
    "contact": {
      "name": "Finvi",
      "url": "https://finvi.com",
      "email": "payments@finvi.com"
    },
    "license": {
      "name": "SwervePay licence",
      "url": "https://swervepay.qc.ontariosystems.cloud/"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.swervepay.com/v/2.0/",
      "description": "This is a production server for SwervePay"
    }
  ],
  "tags": [
    {
      "name": "Base Resource: Payment Requests",
      "description": "The base paymentRequests resource is used to query or create SwervePay Payment Requests. Sub-resources are available to manage individual Payment Requests"
    }
  ],
  "paths": {
    "/{accountSid}/paymentRequests": {
      "get": {
        "tags": [
          "Base Resource: Payment Requests"
        ],
        "summary": "Query paymentRequests",
        "operationId": "queryPaymentRequests",
        "description": "This is a resource for querying payment paymentRequests. The response will include a paymentRequestList of individual paymentRequest records.",
        "parameters": [
          {
            "name": "accountSid",
            "in": "path",
            "description": "Account SID in my account",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "maxLength": 256,
              "minLength": 0
            }
          },
          {
            "name": "afterId",
            "in": "query",
            "description": "Include results with paymentRequestId greater than this value",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 12,
              "minLength": 0
            }
          },
          {
            "name": "beforeId",
            "in": "query",
            "description": "Include results with paymentRequestId less than this value",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 12,
              "minLength": 0
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "The number of results to return (default 10, max 1000)",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 4,
              "minLength": 0
            }
          },
          {
            "name": "createdDate",
            "in": "query",
            "description": "Created Date",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 19,
              "minLength": 0
            }
          },
          {
            "name": "createdDateBefore",
            "in": "query",
            "description": "Return payment requests created before this date/time. Expected date/timeformat is YYYY-MM-DD HH:MM:SS. The time requested is in GMT.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 19,
              "minLength": 0
            }
          },
          {
            "name": "createdDateOnOrAfter",
            "in": "query",
            "description": "Return payment requests created on or after this date/time. Expected date/timeformat is YYYY-MM-DD HH:MM:SS. The time requested is in GMT.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 19,
              "minLength": 0
            }
          },
          {
            "name": "customerId",
            "in": "query",
            "description": "Customer Id",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 12,
              "minLength": 0
            }
          },
          {
            "name": "maxId",
            "in": "query",
            "description": "Include results with paymentRequestId less than or equal to this value",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 12,
              "minLength": 0
            }
          },
          {
            "name": "minId",
            "in": "query",
            "description": "Include results with paymentRequestId greater or equal to this value",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 12,
              "minLength": 0
            }
          },
          {
            "name": "paymentRequestId",
            "in": "query",
            "description": "Payment Request Id",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 12,
              "minLength": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Response list sort order \n\n Valid Values: \n\n paymentRequestId_asc, paymentRequestId_desc \n\n paymentRequestId_asc: Sort by paymentRequestId in ascending order \n\n paymentRequestId_desc: (Default) Sort by paymentRequestId in descendingorder",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 21,
              "minLength": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Payment Request Status \n\n Valid Values: \n\n canceled, open, expired, completed",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maxLength": 12,
              "minLength": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequestGetResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequestGetResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "502": {
            "description": "Bad Gateway"
          },
          "503": {
            "description": "Service Unvailable"
          },
          "504": {
            "description": "Gateway Timeout"
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "MetaData": {
        "properties": {
          "paymentRequestList": {
            "$ref": "#/components/schemas/PaymentRequestMetaData"
          }
        }
      },
      "PaymentRequestMetaData": {
        "type": "object",
        "properties": {
          "idField": {
            "description": "Id field in response",
            "example": "paymentRequestId"
          },
          "maxId": {
            "description": "Highest payment request ID value in response",
            "example": "123456"
          },
          "mindId": {
            "description": "Lowest payment request ID value in response",
            "example": "123456"
          },
          "more": {
            "description": "",
            "example": "1"
          },
          "recordCount": {
            "description": "Number of records in response",
            "example": "1"
          },
          "sort": {
            "description": "Sorting of reponse values",
            "example": "paymentRequestId_desc"
          }
        },
        "description": "Metadata for payment requests"
      },
      "PaymentRequestGetResponse": {
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/MetaData"
          },
          "paymentRequestList": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentRequestGet"
            }
          }
        }
      },
      "PaymentRequestGet": {
        "type": "object",
        "properties": {
          "accessCode": {
            "maxLength": 4,
            "description": "Access Code",
            "example": "12345"
          },
          "createdDate": {
            "maxLength": 19,
            "description": "Created Date",
            "example": "2021-07-18T13:04:37.000Z"
          },
          "customerEmail": {
            "maxLength": 255,
            "description": "Customer Email",
            "example": "joesmith@finvi.com"
          },
          "customerFirstName": {
            "maxLength": 255,
            "description": "Customer First Name",
            "example": "Joe"
          },
          "customerId": {
            "maxLength": 12,
            "description": "Customer Id",
            "example": "200000026177"
          },
          "customerLastName": {
            "maxLength": 255,
            "description": "Customer Last Name",
            "example": "Smith"
          },
          "customerPhoneNumber": {
            "maxLength": 14,
            "description": "Customer Mobile Number",
            "example": "(809) 555-1234"
          },
          "description": {
            "maxLength": 4000,
            "description": "Payment request description",
            "example": "Please submit payment using the following form at your earliest convenience."
          },
          "expireDate": {
            "maxLength": 19,
            "description": "Payment request expiration date",
            "example": "2021-08-19T00:00:00.000Z"
          },
          "locationKey": {
            "description": "Location key for payment request - only visibly if locations are being used",
            "example": "location1"
          },
          "paidAmount": {
            "maxLength": 12,
            "description": "Amount paid towards payment request for requests supporting partial payment",
            "example": "50"
          },
          "paymentRequestId": {
            "maxLength": 12,
            "description": "Payment Request Id",
            "example": "123456"
          },
          "status": {
            "maxLength": 16,
            "type": "string",
            "description": "Payment request status.",
            "example": "open",
            "enum": [
              "open",
              "completed",
              "expired",
              "canceled"
            ]
          },
          "testMessageTemplate": {
            "maxLength": 160,
            "description": "Text message template. Please contact your integration support representative foradditional details.",
            "example": "Default"
          },
          "testMessageYesToPayTemplate": {
            "maxLength": 160,
            "description": "Text message \"reply yes to pay\" template. Please contact your integration supportrepresentative for additional details.",
            "example": "Default"
          },
          "title": {
            "maxLength": 255,
            "description": "Payment request title",
            "example": "New Payment Request"
          },
          "transactionAmount": {
            "maxLength": 12,
            "description": "Amount",
            "example": "200"
          },
          "url": {
            "maxLength": 255,
            "description": "The unique payment request URL to be provided to the Customer",
            "example": "http://swrv.me/jadfij12"
          },
          "username": {
            "maxLength": 255,
            "description": "Username",
            "example": "testuser"
          }
        },
        "description": "Response Parameters: Payment Request Response Data"
      },
      "BadRequestResponse": {
        "type": "object",
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/BadRequestResponse_metadata"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "message": {
            "description": "Error message",
            "example": "This is a sample error"
          }
        }
      },
      "BadRequestResponse_metadata": {
        "type": "object",
        "properties": {
          "errorCount": {
            "description": "Test",
            "example": 1
          },
          "errorList": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "example": null
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```