Skip to content

SudoSOS Back-end API / stripe / StripeWebhookController

Class: StripeWebhookController ​

The BaseController class is responsible for:

  • Storing route definitions.
  • Generating router objects based on the policy.

Extends ​

Constructors ​

Constructor ​

ts
new StripeWebhookController(options): StripeWebhookController;

Create a new stripe webhook controller instance

Parameters ​

ParameterTypeDescription
optionsBaseControllerOptions-

Returns ​

StripeWebhookController

Overrides ​

BaseController.constructor

Properties ​

PropertyModifierTypeDescriptionInherited from
roleManagerprotectedRoleManagerA reference to the role manager passed in the base controller options.BaseController.roleManager
specificationpublicSwaggerSpecificationA reference to the swagger specification passed in the base controller options.BaseController.specification

Methods ​

getPolicy() ​

ts
getPolicy(): Policy;

Gets the policy defined by child classes. This policy includes all routes that the controller accepts, the authorization middleware, and the final handler function for every route.

Returns ​

Policy

The policy of this controller.

Overrides ​

BaseController.getPolicy


getRouter() ​

ts
getRouter(): Router;

Returns ​

Router

the router used by this controller.

Inherited from ​

BaseController.getRouter


getStripePublicKey() ​

ts
getStripePublicKey(req, res): Promise<void>;

GET /stripe/public

Parameters ​

ParameterType
reqRequest
resResponse

Returns ​

Promise<void>

200 - Public key

Operation Id ​

getStripePublicKey

Tags ​

stripe - Operations of the stripe controller


handleWebhookEvent() ​

ts
handleWebhookEvent(req, res): Promise<void>;

Webhook for Stripe event updates

Parameters ​

ParameterType
reqRequestWithRawBody
resResponse

Returns ​

Promise<void>

204 - Success

Route ​

POST /stripe/webhook

Operation Id ​

webhook

Tags ​

stripe - Operations of the stripe controller