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.7.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fae148f0151dc7cd4e61ef36bdf820cc05ae6e8d3f39b8cdcebd709ce6708c5 |
|
MD5 | bb585cea28a4d47b019904a20948bcb0 |
|
BLAKE2b-256 | 03a67645f6b23fb08da5d4858810e63d67984ae1b8fb6f5adb313f29ac7e614a |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.7.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37f02a7e38268396e128540ce2bfe879504cc7ff8681715f331436b0d13ce736 |
|
MD5 | 636cedc1810e93e0345ff9c1ecc73292 |
|
BLAKE2b-256 | 9b4e98bf3b1ebbc4446dc166ebafde5b7705fcae41888a2e5cfa8310a6d6481f |