openapi: 3.1.0 info: title: HubSpot Commerce Payments API description: | The HubSpot Commerce Payments API enables developers to manage commerce payment objects within the HubSpot CRM. This API provides comprehensive functionality for creating, reading, updating, archiving, and searching commerce payment records. It supports both individual and batch operations, allowing for efficient management of payment data at scale. Key features include: - CRUD operations for individual commerce payments - Batch operations for processing multiple payments simultaneously - Advanced search capabilities with filtering and sorting - Property history tracking for audit purposes - Association management with other CRM objects 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 tags: - name: Batch Operations description: Operations for processing multiple commerce payments in a single request - name: Payment Search description: Advanced search operations for finding and filtering commerce payments - name: Single Payment Operations description: CRUD operations for individual commerce payment records paths: /crm/v3/objects/commerce_payments/batch/read: post: tags: - Batch Operations summary: Hubspot Read a Batch of Commerce Payments description: | Retrieves multiple commerce payment records by their internal IDs or unique property values in a single request. This operation is optimized for bulk data retrieval and supports fetching property history. operationId: batchReadCommercePayments x-microcks-operation: delay: 100 dispatcher: SCRIPT dispatcherRules: | def response = mockRequest.requestContent return "BatchReadCommercePaymentsSuccessExample" security: - oauth2Auth: [] parameters: - $ref: '#/components/parameters/ArchivedQuery' example: example-value requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BatchReadRequest' examples: BatchReadCommercePaymentsRequestExample: $ref: '#/components/examples/BatchReadCommercePaymentsRequestExample' responses: '200': description: Successfully retrieved commerce payments content: application/json: schema: $ref: '#/components/schemas/BatchReadResponse' examples: BatchReadCommercePaymentsSuccessExample: $ref: '#/components/examples/BatchReadCommercePaymentsSuccessExample' '207': description: Multi-status response - some payments retrieved successfully, some failed content: application/json: schema: $ref: '#/components/schemas/BatchReadResponse' examples: BatchReadCommercePaymentsPartialExample: $ref: '#/components/examples/BatchReadCommercePaymentsPartialExample' '400': description: Bad request - Invalid parameters content: application/json: schema: $ref: '#/components/schemas/Error' examples: ErrorBadRequestExample: $ref: '#/components/examples/ErrorBadRequestExample' '401': description: Unauthorized - Invalid or missing authentication content: application/json: schema: $ref: '#/components/schemas/Error' examples: Batchreadcommercepayments401Example: summary: Default batchReadCommercePayments 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 - 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 '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error' examples: Batchreadcommercepayments500Example: summary: Default batchReadCommercePayments 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 /crm/v3/objects/commerce_payments/batch/archive: post: tags: - Batch Operations summary: Hubspot Archive a Batch of Commerce Payments description: | Archives multiple commerce payment records by their IDs in a single request. Archived payments can be restored later if needed. operationId: batchArchiveCommercePayments x-microcks-operation: delay: 100 dispatcher: SCRIPT dispatcherRules: | def response = mockRequest.requestContent return "BatchArchiveCommercePaymentsSuccessExample" security: - oauth2Auth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BatchArchiveRequest' examples: BatchArchiveCommercePaymentsRequestExample: $ref: '#/components/examples/BatchArchiveCommercePaymentsRequestExample' responses: '204': description: Successfully archived commerce payments '400': description: Bad request - Invalid parameters content: application/json: schema: $ref: '#/components/schemas/Error' examples: Batcharchivecommercepayments400Example: summary: Default batchArchiveCommercePayments 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 context: *id002 links: *id003 '401': description: Unauthorized - Invalid or missing authentication content: application/json: schema: $ref: '#/components/schemas/Error' examples: Batcharchivecommercepayments401Example: summary: Default batchArchiveCommercePayments 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: Batcharchivecommercepayments500Example: summary: Default batchArchiveCommercePayments 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 /crm/v3/objects/commerce_payments/batch/create: post: tags: - Batch Operations summary: Hubspot Create a Batch of Commerce Payments description: | Creates multiple commerce payment records in a single request. Each payment can include properties and associations with other CRM objects. operationId: batchCreateCommercePayments x-microcks-operation: delay: 150 dispatcher: SCRIPT dispatcherRules: | def response = mockRequest.requestContent return "BatchCreateCommercePaymentsSuccessExample" security: - oauth2Auth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BatchCreateRequest' examples: BatchCreateCommercePaymentsRequestExample: $ref: '#/components/examples/BatchCreateCommercePaymentsRequestExample' responses: '201': description: Successfully created commerce payments content: application/json: schema: $ref: '#/components/schemas/BatchCreateResponse' examples: BatchCreateCommercePaymentsSuccessExample: $ref: '#/components/examples/BatchCreateCommercePaymentsSuccessExample' '207': description: Multi-status response - some payments created successfully, some failed content: application/json: schema: $ref: '#/components/schemas/BatchCreateResponse' examples: Batchcreatecommercepayments207Example: summary: Default batchCreateCommercePayments 207 response x-microcks-default: true value: status: PENDING results: &id009 - id: '500123' properties: &id004 key: value createdAt: '2025-03-15T14:30:00Z' updatedAt: '2025-03-15T14:30:00Z' archived: true archivedAt: '2025-03-15T14:30:00Z' associations: &id005 key: value propertiesWithHistory: &id006 key: value requestedAt: '2025-03-15T14:30:00Z' startedAt: '2025-03-15T14:30:00Z' completedAt: '2025-03-15T14:30:00Z' numErrors: 100 errors: &id010 - status: active id: '500123' category: standard message: This is an example description. errors: - {} context: key: value links: key: value subCategory: standard links: &id011 key: value '400': description: Bad request - Invalid parameters content: application/json: schema: $ref: '#/components/schemas/Error' examples: Batchcreatecommercepayments400Example: summary: Default batchCreateCommercePayments 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 context: *id002 links: *id003 '401': description: Unauthorized - Invalid or missing authentication content: application/json: schema: $ref: '#/components/schemas/Error' examples: Batchcreatecommercepayments401Example: summary: Default batchCreateCommercePayments 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: Batchcreatecommercepayments500Example: summary: Default batchCreateCommercePayments 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 /crm/v3/objects/commerce_payments/batch/update: post: tags: - Batch Operations summary: Hubspot Update a Batch of Commerce Payments description: | Updates multiple commerce payment records in a single request. Only the specified properties will be updated; other properties remain unchanged. operationId: batchUpdateCommercePayments x-microcks-operation: delay: 150 dispatcher: SCRIPT dispatcherRules: | def response = mockRequest.requestContent return "BatchUpdateCommercePaymentsSuccessExample" security: - oauth2Auth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BatchUpdateRequest' examples: BatchUpdateCommercePaymentsRequestExample: $ref: '#/components/examples/BatchUpdateCommercePaymentsRequestExample' responses: '200': description: Successfully updated commerce payments content: application/json: schema: $ref: '#/components/schemas/BatchUpdateResponse' examples: BatchUpdateCommercePaymentsSuccessExample: $ref: '#/components/examples/BatchUpdateCommercePaymentsSuccessExample' '207': description: Multi-status response - some payments updated successfully, some failed content: application/json: schema: $ref: '#/components/schemas/BatchUpdateResponse' examples: Batchupdatecommercepayments207Example: summary: Default batchUpdateCommercePayments 207 response x-microcks-default: true value: status: PENDING results: &id012 - id: '500123' properties: *id004 createdAt: '2025-03-15T14:30:00Z' updatedAt: '2025-03-15T14:30:00Z' archived: true archivedAt: '2025-03-15T14:30:00Z' associations: *id005 propertiesWithHistory: *id006 requestedAt: '2025-03-15T14:30:00Z' startedAt: '2025-03-15T14:30:00Z' completedAt: '2025-03-15T14:30:00Z' numErrors: 100 errors: &id013 - status: active id: '500123' category: standard message: This is an example description. errors: - {} context: key: value links: key: value subCategory: standard links: &id014 key: value '400': description: Bad request - Invalid parameters content: application/json: schema: $ref: '#/components/schemas/Error' examples: Batchupdatecommercepayments400Example: summary: Default batchUpdateCommercePayments 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 context: *id002 links: *id003 '401': description: Unauthorized - Invalid or missing authentication content: application/json: schema: $ref: '#/components/schemas/Error' examples: Batchupdatecommercepayments401Example: summary: Default batchUpdateCommercePayments 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: Batchupdatecommercepayments500Example: summary: Default batchUpdateCommercePayments 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 /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 which properties are returned and to filter results. 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 context: *id002 links: *id003 '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, associations with other CRM objects can be established at creation time. 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: *id001 context: *id002 links: *id003 '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: *id001 context: *id002 links: *id003 '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: *id001 context: *id002 links: *id003 /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 to control which properties are returned. 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: *id001 context: *id002 links: *id003 '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: *id001 context: *id002 links: *id003 '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: *id001 context: *id002 links: *id003 '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: *id001 context: *id002 links: *id003 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 specified properties will be updated. Read-only and non-existent properties are ignored. 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: *id001 context: *id002 links: *id003 '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: *id001 context: *id002 links: *id003 '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: *id001 context: *id002 links: *id003 '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: *id001 context: *id002 links: *id003 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 restored by updating their archived status. 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: *id001 context: *id002 links: *id003 '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: *id001 context: *id002 links: *id003 '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: *id001 context: *id002 links: *id003 /crm/v3/objects/commerce_payments/search: post: tags: - Payment Search summary: Hubspot Search Commerce Payments description: | Searches for commerce payments using filters, sorting, and query parameters. Supports complex search criteria with multiple filter groups. operationId: searchCommercePayments x-microcks-operation: delay: 150 dispatcher: SCRIPT dispatcherRules: | def response = mockRequest.requestContent return "SearchCommercePaymentsSuccessExample" security: - oauth2Auth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SearchRequest' examples: SearchCommercePaymentsRequestExample: $ref: '#/components/examples/SearchCommercePaymentsRequestExample' responses: '200': description: Successfully executed search content: application/json: schema: $ref: '#/components/schemas/SearchResponse' examples: SearchCommercePaymentsSuccessExample: $ref: '#/components/examples/SearchCommercePaymentsSuccessExample' '400': description: Bad request - Invalid search parameters content: application/json: schema: $ref: '#/components/schemas/Error' examples: Searchcommercepayments400Example: summary: Default searchCommercePayments 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 context: *id002 links: *id003 '401': description: Unauthorized - Invalid or missing authentication content: application/json: schema: $ref: '#/components/schemas/Error' examples: Searchcommercepayments401Example: summary: Default searchCommercePayments 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: Searchcommercepayments500Example: summary: Default searchCommercePayments 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 components: securitySchemes: oauth2Auth: type: oauth2 flows: authorizationCode: authorizationUrl: https://app.hubspot.com/oauth/authorize tokenUrl: https://api.hubapi.com/oauth/v1/token scopes: crm.objects.commerce_payments.read: Read commerce payments crm.objects.commerce_payments.write: Write commerce payments parameters: CommercePaymentIdPath: name: commercePaymentId in: path required: true description: The unique identifier of the commerce payment schema: type: string example: "12345678901" ArchivedQuery: name: archived in: query description: Whether to return only archived results schema: type: boolean default: false example: false LimitQuery: name: limit in: query description: Maximum number of results to return per page schema: type: integer default: 10 maximum: 100 example: 10 AfterQuery: name: after in: query description: Pagination cursor for the next page of results schema: type: string example: "MjAyNC0wMS0xNVQxMDozMDowMFo=" 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" PropertiesWithHistoryQuery: name: propertiesWithHistory in: query description: Comma-separated list of properties to include with their value history schema: type: string example: "hs_payment_status" AssociationsQuery: name: associations in: query description: Comma-separated list of object types to retrieve associated IDs for schema: type: string example: "contacts,deals" 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" schemas: 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: *id004 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: *id005 propertiesWithHistory: type: object description: Properties with their value history additionalProperties: type: array items: $ref: '#/components/schemas/PropertyHistory' example: *id006 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: &id007 key: value associations: type: array description: Associations to create with other objects items: $ref: '#/components/schemas/AssociationInput' example: &id008 - to: id: {} types: - {} 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 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: *id004 createdAt: '2025-03-15T14:30:00Z' updatedAt: '2025-03-15T14:30:00Z' archived: true archivedAt: '2025-03-15T14:30:00Z' associations: *id005 propertiesWithHistory: *id006 paging: $ref: '#/components/schemas/Paging' BatchReadRequest: type: object description: Request body for batch reading commerce payments required: - inputs - properties properties: inputs: type: array description: List of payment identifiers to read items: $ref: '#/components/schemas/BatchReadInputItem' example: - id: '500123' properties: type: array description: Properties to return for each payment items: type: string example: - example-value propertiesWithHistory: type: array description: Properties to return with history items: type: string example: - example-value idProperty: type: string description: The property to use as the identifier example: '500123' BatchReadInputItem: type: object description: A single input item for batch read required: - id properties: id: type: string description: The ID of the payment to read example: '500123' BatchReadResponse: type: object description: Response from a batch read operation required: - status - results - startedAt - completedAt properties: status: type: string enum: [PENDING, PROCESSING, CANCELED, COMPLETE] description: The status of the batch operation example: PENDING results: type: array description: The retrieved commerce payments items: $ref: '#/components/schemas/CommercePayment' example: - id: '500123' properties: *id004 createdAt: '2025-03-15T14:30:00Z' updatedAt: '2025-03-15T14:30:00Z' archived: true archivedAt: '2025-03-15T14:30:00Z' associations: *id005 propertiesWithHistory: *id006 requestedAt: type: string format: date-time description: When the request was received example: '2025-03-15T14:30:00Z' startedAt: type: string format: date-time description: When processing started example: '2025-03-15T14:30:00Z' completedAt: type: string format: date-time description: When processing completed example: '2025-03-15T14:30:00Z' numErrors: type: integer description: Number of errors encountered example: 100 errors: type: array description: List of errors items: $ref: '#/components/schemas/BatchError' example: - status: active id: '500123' category: standard message: This is an example description. errors: - {} context: key: value links: key: value subCategory: standard links: type: object additionalProperties: type: string example: key: value BatchArchiveRequest: type: object description: Request body for batch archiving commerce payments required: - inputs properties: inputs: type: array description: List of payment identifiers to archive items: $ref: '#/components/schemas/BatchReadInputItem' example: - id: '500123' BatchCreateRequest: type: object description: Request body for batch creating commerce payments required: - inputs properties: inputs: type: array description: List of payments to create items: $ref: '#/components/schemas/CommercePaymentInput' example: - properties: *id007 associations: *id008 BatchCreateResponse: type: object description: Response from a batch create operation required: - status - results - startedAt - completedAt properties: status: type: string enum: [PENDING, PROCESSING, CANCELED, COMPLETE] example: PENDING results: type: array items: $ref: '#/components/schemas/CommercePayment' example: *id009 requestedAt: type: string format: date-time example: '2025-03-15T14:30:00Z' startedAt: type: string format: date-time example: '2025-03-15T14:30:00Z' completedAt: type: string format: date-time example: '2025-03-15T14:30:00Z' numErrors: type: integer example: 100 errors: type: array items: $ref: '#/components/schemas/BatchError' example: *id010 links: type: object additionalProperties: type: string example: *id011 BatchUpdateRequest: type: object description: Request body for batch updating commerce payments required: - inputs properties: inputs: type: array description: List of payments to update items: $ref: '#/components/schemas/BatchUpdateInputItem' example: - id: '500123' properties: key: value idProperty: '500123' BatchUpdateInputItem: type: object description: A single input item for batch update required: - id - properties properties: id: type: string description: The ID of the payment to update example: '500123' properties: type: object description: The properties to update additionalProperties: type: string example: key: value idProperty: type: string description: The property to use as the identifier example: '500123' BatchUpdateResponse: type: object description: Response from a batch update operation required: - status - results - startedAt - completedAt properties: status: type: string enum: [PENDING, PROCESSING, CANCELED, COMPLETE] example: PENDING results: type: array items: $ref: '#/components/schemas/CommercePayment' example: *id012 requestedAt: type: string format: date-time example: '2025-03-15T14:30:00Z' startedAt: type: string format: date-time example: '2025-03-15T14:30:00Z' completedAt: type: string format: date-time example: '2025-03-15T14:30:00Z' numErrors: type: integer example: 100 errors: type: array items: $ref: '#/components/schemas/BatchError' example: *id013 links: type: object additionalProperties: type: string example: *id014 SearchRequest: type: object description: Request body for searching commerce payments properties: query: type: string description: Search query string example: example-value limit: type: integer description: Maximum number of results default: 10 example: 10 after: type: string description: Pagination cursor example: example-value sorts: type: array description: Sort order for results items: $ref: '#/components/schemas/SortOption' example: - propertyName: Example Record direction: ASCENDING properties: type: array description: Properties to return items: type: string example: - example-value filterGroups: type: array description: Filter groups for the search items: $ref: '#/components/schemas/FilterGroup' example: - filters: - {} SearchResponse: type: object description: Response from a search operation required: - total - results properties: total: type: integer description: Total number of matching results example: 10 results: type: array description: The matching commerce payments items: $ref: '#/components/schemas/CommercePayment' example: - id: '500123' properties: *id004 createdAt: '2025-03-15T14:30:00Z' updatedAt: '2025-03-15T14:30:00Z' archived: true archivedAt: '2025-03-15T14:30:00Z' associations: *id005 propertiesWithHistory: *id006 paging: $ref: '#/components/schemas/Paging' FilterGroup: type: object description: A group of filters combined with AND logic required: - filters properties: filters: type: array items: $ref: '#/components/schemas/Filter' example: - propertyName: Example Record operator: EQ value: example-value values: - {} highValue: example-value Filter: type: object description: A single filter criterion required: - propertyName - operator properties: propertyName: type: string description: The property to filter on example: Example Record operator: type: string enum: [EQ, NEQ, LT, LTE, GT, GTE, BETWEEN, IN, NOT_IN, HAS_PROPERTY, NOT_HAS_PROPERTY, CONTAINS_TOKEN, NOT_CONTAINS_TOKEN] description: The comparison operator example: EQ value: type: string description: The value to compare against example: example-value values: type: array description: Values for IN/NOT_IN operators items: type: string example: - example-value highValue: type: string description: Upper bound for BETWEEN operator example: example-value SortOption: type: object description: A sort option for ordering results required: - propertyName - direction properties: propertyName: type: string description: The property to sort by example: Example Record direction: type: string enum: [ASCENDING, DESCENDING] description: The sort direction example: ASCENDING 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 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 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' 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 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 BatchError: type: object description: An error from a batch operation required: - category - message properties: status: type: string example: active id: type: string example: '500123' category: type: string example: standard message: type: string example: This is an example description. errors: type: array 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 additionalProperties: type: array items: type: string example: key: value links: type: object additionalProperties: type: string example: key: value subCategory: type: string example: standard 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: *id001 context: type: object description: Additional context about the error additionalProperties: type: array items: type: string example: *id002 links: type: object description: Related links additionalProperties: type: string example: *id003 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 examples: BatchReadCommercePaymentsRequestExample: summary: Example batch read request value: inputs: - id: "12345678901" - id: "12345678902" properties: - hs_payment_status - hs_amount - hs_currency propertiesWithHistory: - hs_payment_status BatchReadCommercePaymentsSuccessExample: summary: Successful batch read response value: status: COMPLETE 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 startedAt: "2024-01-20T08:00:00Z" completedAt: "2024-01-20T08:00:01Z" BatchReadCommercePaymentsPartialExample: summary: Partial success batch read response value: status: COMPLETE 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 numErrors: 1 errors: - status: "404" id: "12345678999" category: OBJECT_NOT_FOUND message: "Commerce payment with id 12345678999 not found" startedAt: "2024-01-20T08:00:00Z" completedAt: "2024-01-20T08:00:01Z" BatchArchiveCommercePaymentsRequestExample: summary: Example batch archive request value: inputs: - id: "12345678901" - id: "12345678902" BatchCreateCommercePaymentsRequestExample: summary: Example batch create request value: inputs: - properties: hs_payment_status: pending hs_amount: "150.00" hs_currency: USD hs_payment_method: credit_card associations: - to: id: "501" types: - associationCategory: HUBSPOT_DEFINED associationTypeId: 187 - properties: hs_payment_status: pending hs_amount: "275.50" hs_currency: USD hs_payment_method: bank_transfer BatchCreateCommercePaymentsSuccessExample: summary: Successful batch create response value: status: COMPLETE results: - id: "12345678903" properties: hs_payment_status: pending hs_amount: "150.00" hs_currency: USD hs_payment_method: credit_card createdAt: "2024-01-20T10:00:00Z" updatedAt: "2024-01-20T10:00:00Z" archived: false - id: "12345678904" properties: hs_payment_status: pending hs_amount: "275.50" hs_currency: USD hs_payment_method: bank_transfer createdAt: "2024-01-20T10:00:00Z" updatedAt: "2024-01-20T10:00:00Z" archived: false startedAt: "2024-01-20T10:00:00Z" completedAt: "2024-01-20T10:00:01Z" BatchUpdateCommercePaymentsRequestExample: summary: Example batch update request value: inputs: - id: "12345678901" properties: hs_payment_status: completed - id: "12345678902" properties: hs_payment_status: refunded BatchUpdateCommercePaymentsSuccessExample: summary: Successful batch update response value: status: COMPLETE results: - id: "12345678901" properties: hs_payment_status: completed hs_amount: "150.00" hs_currency: USD createdAt: "2024-01-15T10:30:00Z" updatedAt: "2024-01-20T11:00:00Z" archived: false - id: "12345678902" properties: hs_payment_status: refunded hs_amount: "275.50" hs_currency: USD createdAt: "2024-01-16T09:00:00Z" updatedAt: "2024-01-20T11:00:00Z" archived: false startedAt: "2024-01-20T11:00:00Z" completedAt: "2024-01-20T11:00:01Z" 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=" 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 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 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 UpdateCommercePaymentRequestExample: summary: Example update payment request value: properties: hs_payment_status: completed hs_notes: "Payment processed successfully" 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 SearchCommercePaymentsRequestExample: summary: Example search request value: filterGroups: - filters: - propertyName: hs_payment_status operator: EQ value: completed - propertyName: hs_amount operator: GTE value: "100" sorts: - propertyName: hs_amount direction: DESCENDING properties: - hs_payment_status - hs_amount - hs_currency limit: 20 SearchCommercePaymentsSuccessExample: summary: Successful search response value: total: 2 results: - id: "12345678901" properties: hs_payment_status: completed hs_amount: "500.00" hs_currency: USD createdAt: "2024-01-10T08:00:00Z" updatedAt: "2024-01-10T10:00:00Z" archived: false - id: "12345678903" 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 paging: next: after: "MTIzNDU2Nzg5MDM=" ErrorBadRequestExample: summary: Bad request error response value: category: VALIDATION_ERROR correlationId: "aeb5f871-7f07-4993-9211-075dc63e7cbf" message: "Invalid input JSON" subCategory: "INVALID_PARAMETER" errors: - message: "properties is required" code: "REQUIRED_FIELD" in: "body"