{ "openapi" : "3.0.1", "info" : { "title" : "Payments", "description" : "", "version" : "v3", "x-hubspot-product-tier-requirements" : { "marketing" : "FREE", "sales" : "FREE", "service" : "FREE", "cms" : "FREE" }, "x-hubspot-documentation-banner" : "NONE", "x-hubspot-api-use-case" : "Fetch all refunded payments in the account.", "x-hubspot-introduction" : "Use the payments API to fetch information about an account's payments. This is a read-only API, so it cannot be used for creating new or managing existing payments. Note that the account must be set up to collect payments through either HubSpot payments or Stripe payment processing." }, "servers" : [ { "url" : "https://api.hubapi.com" } ], "tags" : [ { "name" : "Batch" }, { "name" : "Basic" }, { "name" : "Search" } ], "paths" : { "/crm/v3/objects/payments/batch/read" : { "post" : { "tags" : [ "Batch" ], "summary" : "Read a batch of payments by internal ID, or unique property values", "operationId" : "post-/crm/v3/objects/payments/batch/read", "parameters" : [ { "name" : "archived", "in" : "query", "description" : "Whether to return only results that have been archived.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchReadInputSimplePublicObjectId" } } }, "required" : true }, "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchResponseSimplePublicObject" } } } }, "207" : { "description" : "multiple statuses", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchResponseSimplePublicObjectWithErrors" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ ] } }, "/crm/v3/objects/payments/{paymentsId}" : { "get" : { "tags" : [ "Basic" ], "summary" : "Read", "description" : "Read an Object identified by `{paymentsId}`. `{paymentsId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Control what is returned via the `properties` query param.", "operationId" : "get-/crm/v3/objects/payments/{paymentsId}", "parameters" : [ { "name" : "paymentsId", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, { "name" : "properties", "in" : "query", "description" : "A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "array", "items" : { "type" : "string" } } }, { "name" : "propertiesWithHistory", "in" : "query", "description" : "A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "array", "items" : { "type" : "string" } } }, { "name" : "associations", "in" : "query", "description" : "A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "array", "items" : { "type" : "string" } } }, { "name" : "archived", "in" : "query", "description" : "Whether to return only results that have been archived.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false } }, { "name" : "idProperty", "in" : "query", "description" : "The name of a property whose values are unique for this object type", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string" } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/SimplePublicObjectWithAssociations" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ ] } }, "/crm/v3/objects/payments" : { "get" : { "tags" : [ "Basic" ], "summary" : "List", "description" : "Read a page of payments. Control what is returned via the `properties` query param.", "operationId" : "get-/crm/v3/objects/payments", "parameters" : [ { "name" : "limit", "in" : "query", "description" : "The maximum number of results to display per page.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32", "default" : 10 } }, { "name" : "after", "in" : "query", "description" : "The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string" } }, { "name" : "properties", "in" : "query", "description" : "A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "array", "items" : { "type" : "string" } } }, { "name" : "propertiesWithHistory", "in" : "query", "description" : "A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "array", "items" : { "type" : "string" } } }, { "name" : "associations", "in" : "query", "description" : "A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "array", "items" : { "type" : "string" } } }, { "name" : "archived", "in" : "query", "description" : "Whether to return only results that have been archived.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean", "default" : false } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ ] } }, "/crm/v3/objects/payments/search" : { "post" : { "tags" : [ "Search" ], "operationId" : "post-/crm/v3/objects/payments/search", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/PublicObjectSearchRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CollectionResponseWithTotalSimplePublicObjectForwardPaging" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ ], "x-hubspot-rate-limit-exemptions" : [ "ten-secondly" ] } } }, "components" : { "schemas" : { "StandardError" : { "required" : [ "category", "context", "errors", "links", "message", "status" ], "type" : "object", "properties" : { "subCategory" : { "type" : "object", "properties" : { } }, "context" : { "type" : "object", "additionalProperties" : { "type" : "array", "items" : { "type" : "string" } } }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string" } }, "id" : { "type" : "string" }, "category" : { "type" : "string" }, "message" : { "type" : "string" }, "errors" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/ErrorDetail" } }, "status" : { "type" : "string" } } }, "CollectionResponseAssociatedId" : { "required" : [ "results" ], "type" : "object", "properties" : { "paging" : { "$ref" : "#/components/schemas/Paging" }, "results" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/AssociatedId" } } } }, "Paging" : { "type" : "object", "properties" : { "next" : { "$ref" : "#/components/schemas/NextPage" }, "prev" : { "$ref" : "#/components/schemas/PreviousPage" } } }, "PublicObjectSearchRequest" : { "required" : [ "after", "filterGroups", "limit", "properties", "sorts" ], "type" : "object", "properties" : { "query" : { "type" : "string" }, "limit" : { "type" : "integer", "format" : "int32" }, "after" : { "type" : "string" }, "sorts" : { "type" : "array", "items" : { "type" : "string" } }, "properties" : { "type" : "array", "items" : { "type" : "string" } }, "filterGroups" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/FilterGroup" } } } }, "Error" : { "required" : [ "category", "correlationId", "message" ], "type" : "object", "properties" : { "subCategory" : { "type" : "string", "description" : "A specific category that contains more specific detail about the error" }, "context" : { "type" : "object", "additionalProperties" : { "type" : "array", "items" : { "type" : "string" } }, "description" : "Context about the error condition", "example" : { "missingScopes" : [ "scope1", "scope2" ], "invalidPropertyName" : [ "propertyValue" ] } }, "correlationId" : { "type" : "string", "description" : "A unique identifier for the request. Include this value with any error reports or support tickets", "format" : "uuid", "example" : "aeb5f871-7f07-4993-9211-075dc63e7cbf" }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string" }, "description" : "A map of link names to associated URIs containing documentation about the error or recommended remediation steps", "example" : { "knowledge-base" : "https://www.hubspot.com/products/service/knowledge-base" } }, "message" : { "type" : "string", "description" : "A human readable message describing the error along with remediation steps where appropriate", "example" : "Invalid input (details will vary based on the error)" }, "category" : { "type" : "string", "description" : "The error category", "example" : "VALIDATION_ERROR" }, "errors" : { "type" : "array", "description" : "further information about the error", "items" : { "$ref" : "#/components/schemas/ErrorDetail" } } }, "example" : { "message" : "Invalid input (details will vary based on the error)", "correlationId" : "aeb5f871-7f07-4993-9211-075dc63e7cbf", "category" : "VALIDATION_ERROR", "links" : { "knowledge-base" : "https://www.hubspot.com/products/service/knowledge-base" } } }, "BatchResponseSimplePublicObject" : { "required" : [ "completedAt", "results", "startedAt", "status" ], "type" : "object", "properties" : { "completedAt" : { "type" : "string", "format" : "date-time" }, "requestedAt" : { "type" : "string", "format" : "date-time" }, "startedAt" : { "type" : "string", "format" : "date-time" }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string" } }, "results" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/SimplePublicObject" } }, "status" : { "type" : "string", "enum" : [ "PENDING", "PROCESSING", "CANCELED", "COMPLETE" ] } } }, "BatchResponseSimplePublicObjectWithErrors" : { "required" : [ "completedAt", "results", "startedAt", "status" ], "type" : "object", "properties" : { "completedAt" : { "type" : "string", "format" : "date-time" }, "numErrors" : { "type" : "integer", "format" : "int32" }, "requestedAt" : { "type" : "string", "format" : "date-time" }, "startedAt" : { "type" : "string", "format" : "date-time" }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string" } }, "results" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/SimplePublicObject" } }, "errors" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/StandardError" } }, "status" : { "type" : "string", "enum" : [ "PENDING", "PROCESSING", "CANCELED", "COMPLETE" ] } } }, "FilterGroup" : { "required" : [ "filters" ], "type" : "object", "properties" : { "filters" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/Filter" } } } }, "ErrorDetail" : { "required" : [ "message" ], "type" : "object", "properties" : { "subCategory" : { "type" : "string", "description" : "A specific category that contains more specific detail about the error" }, "code" : { "type" : "string", "description" : "The status code associated with the error detail" }, "in" : { "type" : "string", "description" : "The name of the field or parameter in which the error was found." }, "context" : { "type" : "object", "additionalProperties" : { "type" : "array", "items" : { "type" : "string" } }, "description" : "Context about the error condition", "example" : { "missingScopes" : [ "scope1", "scope2" ] } }, "message" : { "type" : "string", "description" : "A human readable message describing the error along with remediation steps where appropriate" } } }, "CollectionResponseSimplePublicObjectWithAssociationsForwardPaging" : { "required" : [ "results" ], "type" : "object", "properties" : { "paging" : { "$ref" : "#/components/schemas/ForwardPaging" }, "results" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/SimplePublicObjectWithAssociations" } } } }, "ForwardPaging" : { "type" : "object", "properties" : { "next" : { "$ref" : "#/components/schemas/NextPage" } } }, "SimplePublicObjectId" : { "required" : [ "id" ], "type" : "object", "properties" : { "id" : { "type" : "string" } } }, "SimplePublicObjectWithAssociations" : { "required" : [ "createdAt", "id", "properties", "updatedAt" ], "type" : "object", "properties" : { "associations" : { "type" : "object", "additionalProperties" : { "$ref" : "#/components/schemas/CollectionResponseAssociatedId" } }, "createdAt" : { "type" : "string", "format" : "date-time" }, "archived" : { "type" : "boolean" }, "archivedAt" : { "type" : "string", "format" : "date-time" }, "propertiesWithHistory" : { "type" : "object", "additionalProperties" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/ValueWithTimestamp" } } }, "id" : { "type" : "string" }, "properties" : { "type" : "object", "additionalProperties" : { "type" : "string", "nullable" : true } }, "updatedAt" : { "type" : "string", "format" : "date-time" } }, "example" : { "properties" : { "createdate" : "2019-10-30T03:30:17.883Z", "hs_initial_amount" : "50.00", "hs_lastmodifieddate" : "2019-12-07T16:50:06.678Z", "hs_latest_status" : "succeeded" } } }, "BatchReadInputSimplePublicObjectId" : { "required" : [ "inputs", "properties", "propertiesWithHistory" ], "type" : "object", "properties" : { "propertiesWithHistory" : { "type" : "array", "items" : { "type" : "string" } }, "idProperty" : { "type" : "string" }, "inputs" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/SimplePublicObjectId" } }, "properties" : { "type" : "array", "items" : { "type" : "string" } } } }, "Filter" : { "required" : [ "operator", "propertyName" ], "type" : "object", "properties" : { "highValue" : { "type" : "string" }, "propertyName" : { "type" : "string" }, "values" : { "type" : "array", "items" : { "type" : "string" } }, "value" : { "type" : "string" }, "operator" : { "type" : "string", "description" : "null", "enum" : [ "EQ", "NEQ", "LT", "LTE", "GT", "GTE", "BETWEEN", "IN", "NOT_IN", "HAS_PROPERTY", "NOT_HAS_PROPERTY", "CONTAINS_TOKEN", "NOT_CONTAINS_TOKEN" ] } } }, "PreviousPage" : { "required" : [ "before" ], "type" : "object", "properties" : { "before" : { "type" : "string" }, "link" : { "type" : "string" } } }, "ValueWithTimestamp" : { "required" : [ "sourceType", "timestamp", "value" ], "type" : "object", "properties" : { "sourceId" : { "type" : "string" }, "sourceType" : { "type" : "string" }, "sourceLabel" : { "type" : "string" }, "updatedByUserId" : { "type" : "integer", "format" : "int32" }, "value" : { "type" : "string" }, "timestamp" : { "type" : "string", "format" : "date-time" } } }, "AssociatedId" : { "required" : [ "id", "type" ], "type" : "object", "properties" : { "id" : { "type" : "string" }, "type" : { "type" : "string" } } }, "CollectionResponseWithTotalSimplePublicObjectForwardPaging" : { "required" : [ "results", "total" ], "type" : "object", "properties" : { "total" : { "type" : "integer", "format" : "int32" }, "paging" : { "$ref" : "#/components/schemas/ForwardPaging" }, "results" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/SimplePublicObject" } } } }, "NextPage" : { "required" : [ "after" ], "type" : "object", "properties" : { "link" : { "type" : "string", "example" : "?after=NTI1Cg%3D%3D" }, "after" : { "type" : "string", "example" : "NTI1Cg%3D%3D" } }, "example" : { "after" : "NTI1Cg%3D%3D", "link" : "?after=NTI1Cg%3D%3D" } }, "SimplePublicObject" : { "required" : [ "createdAt", "id", "properties", "updatedAt" ], "type" : "object", "properties" : { "createdAt" : { "type" : "string", "format" : "date-time" }, "archived" : { "type" : "boolean", "example" : false }, "archivedAt" : { "type" : "string", "format" : "date-time" }, "propertiesWithHistory" : { "type" : "object", "additionalProperties" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/ValueWithTimestamp" } } }, "id" : { "type" : "string", "example" : "512" }, "properties" : { "type" : "object", "additionalProperties" : { "type" : "string", "nullable" : true }, "example" : { "property_date" : "1572480000000", "property_radio" : "option_1", "property_number" : "17", "property_string" : "value", "property_checkbox" : "false", "property_dropdown" : "choice_b", "property_multiple_checkboxes" : "chocolate;strawberry" } }, "updatedAt" : { "type" : "string", "format" : "date-time" } }, "example" : { "id" : "512", "properties" : { "createdate" : "2019-10-30T03:30:17.883Z", "hs_initial_amount" : "50.00", "hs_lastmodifieddate" : "2019-12-07T16:50:06.678Z", "hs_latest_status" : "succeeded" }, "createdAt" : "2019-10-30T03:30:17.883Z", "updatedAt" : "2019-12-07T16:50:06.678Z", "archived" : false } } }, "responses" : { "Error" : { "description" : "An error occurred.", "content" : { "*/*" : { "schema" : { "$ref" : "#/components/schemas/Error" } } } } }, "securitySchemes" : { "oauth2_legacy" : { "type" : "oauth2", "flows" : { "authorizationCode" : { "authorizationUrl" : "https://app.hubspot.com/oauth/authorize", "tokenUrl" : "https://api.hubapi.com/oauth/v1/token", "scopes" : { "crm.objects.custom.write" : "Change custom object records", "crm.objects.custom.read" : "View custom object records", "crm.objects.subscriptions.read" : "Read Commerce Subscriptions", "tickets" : "Read and write tickets", "e-commerce" : "e-commerce", "crm.objects.commercepayments.read" : "Read the COMMERCE_PAYMENT object.", "media_bridge.read" : "Read media and media events", "crm.objects.goals.read" : "Read goals" } } } }, "oauth2" : { "type" : "oauth2", "flows" : { "authorizationCode" : { "authorizationUrl" : "https://app.hubspot.com/oauth/authorize", "tokenUrl" : "https://api.hubapi.com/oauth/v1/token", "scopes" : { "crm.objects.deals.write" : " ", "crm.objects.contacts.read" : " ", "crm.objects.line_items.write" : "Line Items", "crm.objects.quotes.read" : "Quotes", "crm.objects.contacts.write" : " ", "crm.objects.line_items.read" : "Line Items", "crm.objects.quotes.write" : "Quotes", "crm.objects.companies.write" : " ", "crm.objects.companies.read" : " ", "crm.objects.invoices.read" : "Read invoices objects", "crm.objects.deals.read" : " " } } } }, "private_apps_legacy" : { "type" : "apiKey", "name" : "private-app-legacy", "in" : "header" }, "private_apps" : { "type" : "apiKey", "name" : "private-app", "in" : "header" } } } }