Create, update and delete stripe webhooks with your app deployment
Project description
@cloudcomponents/cdk-stripe-webhook
Create, update and delete stripe webhooks with your app deployment
Install
TypeScript/JavaScript:
npm i @cloudcomponents/cdk-stripe-webhook
Python:
pip install cloudcomponents.cdk-stripe-webhook
How to use
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from aws_cdk.core import Construct, Stack, StackProps
from aws_cdk.aws_apigateway import RestApi
from cloudcomponents.cdk_stripe_webhook import StripeWebhook
class StripeWebhookStack(Stack):
def __init__(self, scope, id, *, description=None, env=None, stackName=None, tags=None, synthesizer=None, terminationProtection=None, analyticsReporting=None):
super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting)
api = RestApi(self, "Endpoint")
api.root.add_method("POST")
secret_key = process.env.SECRET_KEY
events = ["charge.failed", "charge.succeeded"]
StripeWebhook(self, "StripeWebhook",
secret_key=secret_key,
url=api.url,
events=events,
log_level="debug"
)
API Reference
See API.md.
Example
See more complete examples.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for cloudcomponents.cdk-stripe-webhook-1.2.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f940bb2bb7304b5eb198a6f422a92bc1930fcc2ba6ceddb7d9a273d91504fd58 |
|
MD5 | a307a766f6aac3f6f3dedb170664cbf9 |
|
BLAKE2b-256 | 205f54763f87a5581f622eee692b771db620f2a3a2161aed4c678c0b8fa3a8ff |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a246953cffbe1e1b3186438b863f8705528b5938aa8c7a20483cd98fa8e8f9d |
|
MD5 | 7d85cb95b62313996973be142b023cf0 |
|
BLAKE2b-256 | c0c66b0262a16b0c06b81057a3be37b5b73356ba6ee67ec784c3fd215e703ee4 |