diff --git a/website/openapi_v2.en.yaml b/website/openapi_v2.en.yaml index 3c272b13..456499ba 100644 --- a/website/openapi_v2.en.yaml +++ b/website/openapi_v2.en.yaml @@ -5744,7 +5744,9 @@ paths: - webhooks summary: Validate Webhook Signature description: | - Validate the signature of a webhook event. This endpoint is used to verify the authenticity of the webhook event. + Validate the signature of an event object received through a Webhook. + Use this operation to verify the authenticity and integrity of the event + received, comparing the received signature with the one generated by Facturapi. x-codeSamples: - lang: Bash label: cURL @@ -5755,7 +5757,7 @@ paths: -d '{ "secret": "wh_sec...", "payload": "Object Response", - "facturapi-signature": "Signature_FROM_HEADER" + "signature": "Signature_FROM_HEADER" }' - lang: JavaScript label: Node.js @@ -5765,7 +5767,7 @@ paths: const customer = await facturapi.webhooks.validateSignature({ secret: "wh_sec...", payload: "Object Response", - 'facturapi-signature': "Signature_FROM_HEADER" + signature: "Signature_FROM_HEADER" }); - lang: csharp label: C# @@ -5775,7 +5777,7 @@ paths: { ["secret"] = "wh_sec...", ["payload"] = new Dictionary["Object Response"], - ["facturapi-signature"] = "Signature_FROM_HEADER" + ["signature"] = "Signature_FROM_HEADER" }); - lang: PHP source: | @@ -5783,7 +5785,7 @@ paths: $customer = $facturapi->Webhooks->validateSignature([ "secret" => "wh_sec...", "payload" => "Object Response", - "facturapi-signature" => "Signature_FROM_HEADER" + "signature" => "Signature_FROM_HEADER" ]); requestBody: content: @@ -5793,15 +5795,15 @@ paths: properties: secret: type: string - description: Secret key of the webhook + description: Secret key of the webhook, found in the webhook settings or upon creation. required: true payload: type: object - description: Object response of webhook + description: Event object received through a webhook. required: true - facturapi-signature: + signature: type: string - description: Signature from header + description: Signature from the header "Facturapi-Signature". required: true security: - "SecretLiveKey": [] diff --git a/website/openapi_v2.yaml b/website/openapi_v2.yaml index bf2a37df..661ff6a9 100644 --- a/website/openapi_v2.yaml +++ b/website/openapi_v2.yaml @@ -5693,9 +5693,11 @@ paths: operationId: validateWebhookSignature tags: - webhooks - summary: Validar response de webhook + summary: Validar evento de webhook description: | - Valida la firma de un webhook recibido. Utiliza esta operaciĆ³n para verificar la autenticidad de un webhook recibido. + Valida la firma de un evento recibido mediante un Webhook. + Utiliza esta operaciĆ³n para verificar la autenticidad e integridad de + un evento recibido, comparando la firma recibida con la generada por Facturapi. x-codeSamples: - lang: Bash label: cURL @@ -5706,7 +5708,7 @@ paths: -d '{ "secret": "wh_sec...", "payload": "Object Response", - "facturapi-signature": "Signature_FROM_HEADER" + "signature": "Signature_FROM_HEADER" }' - lang: JavaScript label: Node.js @@ -5716,7 +5718,7 @@ paths: const customer = await facturapi.webhooks.validateSignature({ secret: "wh_sec...", payload: "Object Response", - 'facturapi-signature': "Signature_FROM_HEADER" + signature: "Signature_FROM_HEADER" }); - lang: csharp label: C# @@ -5726,7 +5728,7 @@ paths: { ["secret"] = "wh_sec...", ["payload"] = new Dictionary["Object Response"], - ["facturapi-signature"] = "Signature_FROM_HEADER" + ["signature"] = "Signature_FROM_HEADER" }); - lang: PHP source: | @@ -5734,7 +5736,7 @@ paths: $customer = $facturapi->Webhooks->validateSignature([ "secret" => "wh_sec...", "payload" => "Object Response", - "facturapi-signature" => "Signature_FROM_HEADER" + "signature" => "Signature_FROM_HEADER" ]); requestBody: content: @@ -5744,15 +5746,15 @@ paths: properties: secret: type: string - description: Llave secreta del webhook + description: Llave secreta del webhook. Se obtiene al crear un webhook o desde el dashboard de Facturapi. required: true payload: type: object - description: Objeto de respuesta del webhook + description: Objeto ApiEvent recibido mediante el webhook required: true - facturapi-signature: + signature: type: string - description: Firma del webhook + description: Firma del webhook recibida en el header `Facturapi-Signature` required: true security: - "SecretLiveKey": []