commercetools icon

commercetools

Interact with the commercetools API. Operations are auto-generated from the official Postman collection.

Actions671

Payment → Check if Payment exists by Query Predicate

AI-generated

Summary

Check if a Payment exists in commercetools by performing a query with a specified query predicate.

Inputs

  • Where — A query predicate string to filter payments, determining which payment to check for existence.

Output shape

a single JSON object indicating existence with properties: 'exists' (boolean), 'statusCode' (HTTP status number), and 'url' (the queried endpoint URL).

Uses an HTTP HEAD request to check existence. Returns { exists: true, statusCode: 200 } if found; { exists: false, statusCode: 404 } if not found. Throws errors for other HTTP statuses.

Examples

Example 1: Check if a payment with a specific attribute exists

Set the 'Where' filter to the query predicate string that filters payments based on desired criteria.

Links

Discussion