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.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7eccb41e1c9baa326fa6c8716a2e70cdf8a066dae397424b7793ebc1d12b0626 |
|
MD5 | 9f8eadc6b30f645ebf0428f42240e61d |
|
BLAKE2b-256 | db18dcb805f5aabb25cff6da47b72ed0c5f83fffd58bbd7716d0d3eb3a571a07 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f7489ccd973116ffe3e610235452ce8ef851288dc21234b88f3ecbcdd4f7501 |
|
MD5 | 88cb2b05e931c9330252d698b0109646 |
|
BLAKE2b-256 | 6cbea9053780767d2e9053ae6405539c7ffce0c915503c61e30f889416168c5a |