openapi: 3.1.0 info: title: HubSpot Analytics Events Access Tokens Single Payment Operations API description: "The HubSpot Analytics Events API allows you to retrieve event completion data \nfrom your HubSpot account. Use this API to query event instances associated with \nCRM objects, filter by event types, and analyze user behavior and engagement patterns.\n\n## Key Features\n- Retrieve event instances for CRM objects\n- Filter events by type, date range, and object\n- Paginate through large result sets\n- Query available event types\n" version: 3.0.0 contact: name: HubSpot Developer Support url: https://developers.hubspot.com license: name: MIT url: https://opensource.org/licenses/MIT servers: - url: https://api.hubapi.com description: HubSpot Production API Server tags: - name: Single Payment Operations description: CRUD operations for individual commerce payment records paths: /crm/v3/objects/commerce_payments: get: tags: - Single Payment Operations summary: Hubspot List Commerce Payments description: "Retrieves a paginated list of all commerce payments. Use query parameters to control \nwhich properties are returned and to filter results.\n" operationId: listCommercePayments x-microcks-operation: delay: 100 dispatcher: SCRIPT dispatcherRules: 'def response = mockRequest.requestContent return "ListCommercePaymentsSuccessExample" ' security: - oauth2Auth: [] parameters: - $ref: '#/components/parameters/LimitQuery' example: example-value - $ref: '#/components/parameters/AfterQuery' example: example-value - $ref: '#/components/parameters/PropertiesQuery' example: example-value - $ref: '#/components/parameters/PropertiesWithHistoryQuery' example: example-value - $ref: '#/components/parameters/AssociationsQuery' example: example-value - $ref: '#/components/parameters/ArchivedQuery' example: example-value responses: '200': description: Successfully retrieved commerce payments list content: application/json: schema: $ref: '#/components/schemas/CommercePaymentCollection' examples: ListCommercePaymentsSuccessExample: $ref: '#/components/examples/ListCommercePaymentsSuccessExample' '400': description: Bad request - Invalid parameters content: application/json: schema: $ref: '#/components/schemas/Error' examples: Listcommercepayments400Example: summary: Default listCommercePayments 400 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: &id001 - message: This is an example description. code: example-value in: example-value subCategory: standard context: key: value context: &id002 key: value links: &id003 key: value '401': description: Unauthorized - Invalid or missing authentication content: application/json: schema: $ref: '#/components/schemas/Error' examples: Listcommercepayments401Example: summary: Default listCommercePayments 401 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id001 context: *id002 links: *id003 '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' examples: Listcommercepayments500Example: summary: Default listCommercePayments 500 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id001 context: *id002 links: *id003 post: tags: - Single Payment Operations summary: Hubspot Create a Commerce Payment description: "Creates a new commerce payment record with the specified properties. Optionally, \nassociations with other CRM objects can be established at creation time.\n" operationId: createCommercePayment x-microcks-operation: delay: 100 dispatcher: SCRIPT dispatcherRules: 'def response = mockRequest.requestContent return "CreateCommercePaymentSuccessExample" ' security: - oauth2Auth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CommercePaymentInput' examples: CreateCommercePaymentRequestExample: $ref: '#/components/examples/CreateCommercePaymentRequestExample' responses: '201': description: Successfully created commerce payment content: application/json: schema: $ref: '#/components/schemas/CommercePayment' examples: CreateCommercePaymentSuccessExample: $ref: '#/components/examples/CreateCommercePaymentSuccessExample' '400': description: Bad request - Invalid parameters content: application/json: schema: $ref: '#/components/schemas/Error' examples: Createcommercepayment400Example: summary: Default createCommercePayment 400 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: &id004 - message: This is an example description. code: example-value in: example-value subCategory: standard context: key: value context: &id005 key: value links: &id006 key: value '401': description: Unauthorized - Invalid or missing authentication content: application/json: schema: $ref: '#/components/schemas/Error' examples: Createcommercepayment401Example: summary: Default createCommercePayment 401 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id004 context: *id005 links: *id006 '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' examples: Createcommercepayment500Example: summary: Default createCommercePayment 500 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id004 context: *id005 links: *id006 /crm/v3/objects/commerce_payments/{commercePaymentId}: get: tags: - Single Payment Operations summary: Hubspot Retrieve a Commerce Payment description: "Retrieves a specific commerce payment by its ID. Include optional query parameters \nto control which properties are returned.\n" operationId: getCommercePaymentById x-microcks-operation: delay: 100 dispatcher: SCRIPT dispatcherRules: 'def response = mockRequest.requestContent return "GetCommercePaymentSuccessExample" ' security: - oauth2Auth: [] parameters: - $ref: '#/components/parameters/CommercePaymentIdPath' example: example-value - $ref: '#/components/parameters/PropertiesQuery' example: example-value - $ref: '#/components/parameters/PropertiesWithHistoryQuery' example: example-value - $ref: '#/components/parameters/AssociationsQuery' example: example-value - $ref: '#/components/parameters/ArchivedQuery' example: example-value - $ref: '#/components/parameters/IdPropertyQuery' example: example-value responses: '200': description: Successfully retrieved commerce payment content: application/json: schema: $ref: '#/components/schemas/CommercePayment' examples: GetCommercePaymentSuccessExample: $ref: '#/components/examples/GetCommercePaymentSuccessExample' '400': description: Bad request - Invalid parameters content: application/json: schema: $ref: '#/components/schemas/Error' examples: Getcommercepaymentbyid400Example: summary: Default getCommercePaymentById 400 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: &id007 - message: This is an example description. code: example-value in: example-value subCategory: standard context: key: value context: &id008 key: value links: &id009 key: value '401': description: Unauthorized - Invalid or missing authentication content: application/json: schema: $ref: '#/components/schemas/Error' examples: Getcommercepaymentbyid401Example: summary: Default getCommercePaymentById 401 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id007 context: *id008 links: *id009 '404': description: Commerce payment not found content: application/json: schema: $ref: '#/components/schemas/Error' examples: Getcommercepaymentbyid404Example: summary: Default getCommercePaymentById 404 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id007 context: *id008 links: *id009 '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' examples: Getcommercepaymentbyid500Example: summary: Default getCommercePaymentById 500 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id007 context: *id008 links: *id009 patch: tags: - Single Payment Operations summary: Hubspot Update a Commerce Payment description: "Performs a partial update of a commerce payment identified by its ID. Only the \nspecified properties will be updated. Read-only and non-existent properties are ignored.\n" operationId: updateCommercePaymentById x-microcks-operation: delay: 100 dispatcher: SCRIPT dispatcherRules: 'def response = mockRequest.requestContent return "UpdateCommercePaymentSuccessExample" ' security: - oauth2Auth: [] parameters: - $ref: '#/components/parameters/CommercePaymentIdPath' example: example-value - $ref: '#/components/parameters/IdPropertyQuery' example: example-value requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CommercePaymentPatch' examples: UpdateCommercePaymentRequestExample: $ref: '#/components/examples/UpdateCommercePaymentRequestExample' responses: '200': description: Successfully updated commerce payment content: application/json: schema: $ref: '#/components/schemas/CommercePayment' examples: UpdateCommercePaymentSuccessExample: $ref: '#/components/examples/UpdateCommercePaymentSuccessExample' '400': description: Bad request - Invalid parameters content: application/json: schema: $ref: '#/components/schemas/Error' examples: Updatecommercepaymentbyid400Example: summary: Default updateCommercePaymentById 400 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: &id010 - message: This is an example description. code: example-value in: example-value subCategory: standard context: key: value context: &id011 key: value links: &id012 key: value '401': description: Unauthorized - Invalid or missing authentication content: application/json: schema: $ref: '#/components/schemas/Error' examples: Updatecommercepaymentbyid401Example: summary: Default updateCommercePaymentById 401 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id010 context: *id011 links: *id012 '404': description: Commerce payment not found content: application/json: schema: $ref: '#/components/schemas/Error' examples: Updatecommercepaymentbyid404Example: summary: Default updateCommercePaymentById 404 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id010 context: *id011 links: *id012 '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' examples: Updatecommercepaymentbyid500Example: summary: Default updateCommercePaymentById 500 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id010 context: *id011 links: *id012 delete: tags: - Single Payment Operations summary: Hubspot Archive a Commerce Payment description: "Archives (soft deletes) a commerce payment by its ID. Archived payments can be \nrestored by updating their archived status.\n" operationId: archiveCommercePaymentById x-microcks-operation: delay: 100 dispatcher: SCRIPT dispatcherRules: 'def response = mockRequest.requestContent return "ArchiveCommercePaymentSuccessExample" ' security: - oauth2Auth: [] parameters: - $ref: '#/components/parameters/CommercePaymentIdPath' example: example-value responses: '204': description: Successfully archived commerce payment '401': description: Unauthorized - Invalid or missing authentication content: application/json: schema: $ref: '#/components/schemas/Error' examples: Archivecommercepaymentbyid401Example: summary: Default archiveCommercePaymentById 401 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: &id013 - message: This is an example description. code: example-value in: example-value subCategory: standard context: key: value context: &id014 key: value links: &id015 key: value '404': description: Commerce payment not found content: application/json: schema: $ref: '#/components/schemas/Error' examples: Archivecommercepaymentbyid404Example: summary: Default archiveCommercePaymentById 404 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id013 context: *id014 links: *id015 '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' examples: Archivecommercepaymentbyid500Example: summary: Default archiveCommercePaymentById 500 response x-microcks-default: true value: category: standard correlationId: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: This is an example description. subCategory: standard errors: *id013 context: *id014 links: *id015 components: schemas: PropertyHistory: type: object description: A historical property value required: - value - timestamp - sourceType properties: value: type: string description: The property value example: example-value timestamp: type: string format: date-time description: When this value was set example: '2025-03-15T14:30:00Z' sourceType: type: string description: The source that set this value example: standard sourceId: type: string description: The identifier of the source example: '500123' sourceLabel: type: string description: A human-readable label for the source example: Example Record updatedByUserId: type: integer description: The user ID that made the change example: 1718153645993 CommercePaymentCollection: type: object description: A paginated collection of commerce payments required: - results properties: results: type: array description: The list of commerce payments items: $ref: '#/components/schemas/CommercePayment' example: - id: '500123' properties: key: value createdAt: '2025-03-15T14:30:00Z' updatedAt: '2025-03-15T14:30:00Z' archived: true archivedAt: '2025-03-15T14:30:00Z' associations: key: value propertiesWithHistory: key: value paging: $ref: '#/components/schemas/Paging' ErrorDetail: type: object description: Detailed error information required: - message properties: message: type: string description: The error message example: This is an example description. code: type: string description: An error code example: example-value in: type: string description: The location of the error example: example-value subCategory: type: string description: A specific error subcategory example: standard context: type: object additionalProperties: type: array items: type: string example: key: value CommercePaymentPatch: type: object description: Input for updating a commerce payment required: - properties properties: properties: type: object description: The properties to update on the commerce payment additionalProperties: type: string example: key: value Paging: type: object description: Pagination information properties: next: type: object properties: after: type: string description: Cursor for the next page link: type: string description: Link to the next page example: after: example-value link: https://app.hubspot.com/contacts/12345 prev: type: object properties: before: type: string description: Cursor for the previous page link: type: string description: Link to the previous page example: before: example-value link: https://app.hubspot.com/contacts/12345 AssociationResult: type: object description: Association results for an object properties: results: type: array items: type: object properties: id: type: string type: type: string example: - id: '500123' type: standard paging: $ref: '#/components/schemas/Paging' AssociationInput: type: object description: Input for creating an association required: - to - types properties: to: type: object required: - id properties: id: type: string description: The ID of the object to associate with example: id: '500123' types: type: array description: The association types items: $ref: '#/components/schemas/AssociationType' example: - associationCategory: HUBSPOT_DEFINED associationTypeId: 500123 Error: type: object description: An error response required: - category - correlationId - message properties: category: type: string description: The error category example: standard correlationId: type: string format: uuid description: A unique identifier for this error instance example: a1b2c3d4-e5f6-7890-abcd-ef1234567890 message: type: string description: A human-readable error message example: This is an example description. subCategory: type: string description: A more specific error category example: standard errors: type: array description: Detailed error information items: $ref: '#/components/schemas/ErrorDetail' example: - message: This is an example description. code: example-value in: example-value subCategory: standard context: key: value context: type: object description: Additional context about the error additionalProperties: type: array items: type: string example: key: value links: type: object description: Related links additionalProperties: type: string example: key: value AssociationType: type: object description: An association type definition required: - associationCategory - associationTypeId properties: associationCategory: type: string enum: - HUBSPOT_DEFINED - USER_DEFINED - INTEGRATOR_DEFINED description: The category of the association example: HUBSPOT_DEFINED associationTypeId: type: integer description: The numeric ID of the association type example: 500123 CommercePayment: type: object description: A commerce payment object representing a payment transaction required: - id - properties - createdAt - updatedAt properties: id: type: string description: The unique identifier of the commerce payment example: '500123' properties: type: object description: The properties of the commerce payment additionalProperties: type: string example: key: value createdAt: type: string format: date-time description: When the commerce payment was created example: '2025-03-15T14:30:00Z' updatedAt: type: string format: date-time description: When the commerce payment was last updated example: '2025-03-15T14:30:00Z' archived: type: boolean description: Whether the commerce payment is archived example: true archivedAt: type: string format: date-time description: When the commerce payment was archived example: '2025-03-15T14:30:00Z' associations: type: object description: Associated objects additionalProperties: $ref: '#/components/schemas/AssociationResult' example: key: value propertiesWithHistory: type: object description: Properties with their value history additionalProperties: type: array items: $ref: '#/components/schemas/PropertyHistory' example: key: value CommercePaymentInput: type: object description: Input for creating a new commerce payment required: - properties properties: properties: type: object description: The properties to set on the commerce payment additionalProperties: type: string example: key: value associations: type: array description: Associations to create with other objects items: $ref: '#/components/schemas/AssociationInput' example: - to: id: {} types: - {} examples: GetCommercePaymentSuccessExample: summary: Successful get payment response value: id: '12345678901' properties: hs_payment_status: completed hs_amount: '150.00' hs_currency: USD hs_payment_method: credit_card createdAt: '2024-01-15T10:30:00Z' updatedAt: '2024-01-15T14:45:00Z' archived: false associations: contacts: results: - id: '501' type: commerce_payment_to_contact CreateCommercePaymentSuccessExample: summary: Successful create payment response value: id: '12345678905' properties: hs_payment_status: pending hs_amount: '350.00' hs_currency: USD hs_payment_method: credit_card hs_external_payment_id: ext-pay-12345 createdAt: '2024-01-20T12:00:00Z' updatedAt: '2024-01-20T12:00:00Z' archived: false CreateCommercePaymentRequestExample: summary: Example create payment request value: properties: hs_payment_status: pending hs_amount: '350.00' hs_currency: USD hs_payment_method: credit_card hs_external_payment_id: ext-pay-12345 associations: - to: id: '501' types: - associationCategory: HUBSPOT_DEFINED associationTypeId: 187 UpdateCommercePaymentSuccessExample: summary: Successful update payment response value: id: '12345678901' properties: hs_payment_status: completed hs_amount: '150.00' hs_currency: USD hs_notes: Payment processed successfully createdAt: '2024-01-15T10:30:00Z' updatedAt: '2024-01-20T13:00:00Z' archived: false UpdateCommercePaymentRequestExample: summary: Example update payment request value: properties: hs_payment_status: completed hs_notes: Payment processed successfully ListCommercePaymentsSuccessExample: summary: Successful list payments response value: results: - id: '12345678901' properties: hs_payment_status: completed hs_amount: '150.00' hs_currency: USD createdAt: '2024-01-15T10:30:00Z' updatedAt: '2024-01-15T14:45:00Z' archived: false - id: '12345678902' properties: hs_payment_status: pending hs_amount: '275.50' hs_currency: USD createdAt: '2024-01-16T09:00:00Z' updatedAt: '2024-01-16T09:00:00Z' archived: false paging: next: after: MTIzNDU2Nzg5MDI= parameters: PropertiesQuery: name: properties in: query description: Comma-separated list of properties to include in the response schema: type: string example: hs_payment_status,hs_amount,hs_currency AfterQuery: name: after in: query description: Pagination cursor for the next page of results schema: type: string example: MjAyNC0wMS0xNVQxMDozMDowMFo= AssociationsQuery: name: associations in: query description: Comma-separated list of object types to retrieve associated IDs for schema: type: string example: contacts,deals LimitQuery: name: limit in: query description: Maximum number of results to return per page schema: type: integer default: 10 maximum: 100 example: 10 CommercePaymentIdPath: name: commercePaymentId in: path required: true description: The unique identifier of the commerce payment schema: type: string example: '12345678901' IdPropertyQuery: name: idProperty in: query description: The name of a property with unique values to use as an identifier schema: type: string example: hs_external_payment_id ArchivedQuery: name: archived in: query description: Whether to return only archived results schema: type: boolean default: false example: false PropertiesWithHistoryQuery: name: propertiesWithHistory in: query description: Comma-separated list of properties to include with their value history schema: type: string example: hs_payment_status securitySchemes: OAuth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://app.hubspot.com/oauth/authorize tokenUrl: https://api.hubapi.com/oauth/v1/token scopes: analytics.read: Read analytics data