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.20.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f60b27e44147562e529048dd824f58236dee899aaf2149ae529a0672ce0f40fb |
|
MD5 | c82077c0fbf4f98bd3f024da01dd27f5 |
|
BLAKE2b-256 | 837c5d42a078bacee7f1007ac75ca9f044053653d6fd5d8094184c4dffe5a34b |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.20.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcb0fbb96014d9aeb791af2067bf390cb718dd61e5aa7cef7c87db9824721667 |
|
MD5 | a96a7a0bfbcc5df074b6ef9fc6c1535a |
|
BLAKE2b-256 | 298c538c523baca4ed9146556f994f4c7d9a15f878b31a2396ecd21d7f90bc80 |