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.23.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa61d685d2c663d75acff421e8c5f895c2ad87b0c04e4732d697bac1412474f0 |
|
MD5 | 93327fc4e9bd38e02522c6bbd4cde7c0 |
|
BLAKE2b-256 | 5dd5347c7fce96a17417814dc4c851aac1a5e31d48f216b579901b8cd8c38ee2 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.23.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 133f0ed88880600914dbb8ffac2ea0349644f48cfc3dcabc004468cb3248f32a |
|
MD5 | 4d3a7b6e64f717dcb98f850742bef553 |
|
BLAKE2b-256 | 6d28e80ce798af1cc8405b039dc6073b45b94a18f27e0058cbb88a6f898f856f |