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/ErrorResponse.yaml b/apify-api/openapi/components/schemas/common/ErrorResponse.yaml index 6fffb378f0..b7376dc209 100644 --- a/apify-api/openapi/components/schemas/common/ErrorResponse.yaml +++ b/apify-api/openapi/components/schemas/common/ErrorResponse.yaml @@ -28,6 +28,7 @@ properties: - token-not-valid - unknown-build-tag - unsupported-content-encoding + - x402-payment-required message: type: string description: Human-readable error message describing what went wrong. diff --git a/apify-api/openapi/components/schemas/common/ErrorType.yaml b/apify-api/openapi/components/schemas/common/ErrorType.yaml index 3095d7c0f2..495454cbea 100644 --- a/apify-api/openapi/components/schemas/common/ErrorType.yaml +++ b/apify-api/openapi/components/schemas/common/ErrorType.yaml @@ -18,3 +18,4 @@ enum: - token-not-valid - unknown-build-tag - unsupported-content-encoding + - 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 ed1b8ab7f6..1ee29f606e 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 @@ -86,6 +86,8 @@ post: application/json: schema: $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorRunFailedError" + "402": + $ref: ../../components/responses/PaymentRequired.yaml "404": description: Not found - the requested resource was not found. content: 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 cc6d0e753a..9879112d48 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml @@ -60,6 +60,8 @@ post: application/json: schema: $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorRunFailedError" + "402": + $ref: ../../components/responses/PaymentRequired.yaml "404": description: Not found - the requested resource was not found. content: