diff --git a/apify-api/openapi/components/responses/PaymentRequired.yaml b/apify-api/openapi/components/responses/PaymentRequired.yaml index 845dd7f4d2..32bd44ebdd 100644 --- a/apify-api/openapi/components/responses/PaymentRequired.yaml +++ b/apify-api/openapi/components/responses/PaymentRequired.yaml @@ -1,9 +1,9 @@ -description: Payment required - the user has exceeded their usage limit or does not have enough credits. +description: Payment required - the user has exceeded their usage limit, does not have enough credits, or the request lacks authentication and payment credentials. content: application/json: schema: $ref: ../schemas/common/ErrorResponse.yaml example: error: - type: actor-memory-limit-exceeded - message: You have exceeded your usage limit. Please consider upgrading your plan. + type: x402-payment-required + message: Please provide X402-PAYMENT-SIGNATURE header with the payment. See https://x402.org. diff --git a/apify-api/openapi/components/schemas/common/ErrorType.yaml b/apify-api/openapi/components/schemas/common/ErrorType.yaml index 904253c175..44c593e8fd 100644 --- a/apify-api/openapi/components/schemas/common/ErrorType.yaml +++ b/apify-api/openapi/components/schemas/common/ErrorType.yaml @@ -22,3 +22,4 @@ enum: - unknown-build-tag - unsupported-content-encoding - user-not-found + - x402-payment-required diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync-get-dataset-items.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync-get-dataset-items.yaml index 7f4577a128..e0207736b7 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync-get-dataset-items.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync-get-dataset-items.yaml @@ -89,6 +89,8 @@ post: application/json: schema: $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorRunFailedError" + "402": + $ref: ../../components/responses/PaymentRequired.yaml "404": $ref: ../../components/responses/NotFound.yaml "408": diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml index e80a51d9e4..f102528829 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml @@ -62,6 +62,8 @@ post: application/json: schema: $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorRunFailedError" + "402": + $ref: ../../components/responses/PaymentRequired.yaml "404": $ref: ../../components/responses/NotFound.yaml "408":