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.13.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c980f18dad6c4cc69d4cd0a4705535e5ca71eacc2d7e9cbdc726bd389e15f36 |
|
MD5 | ae7472a3cb22eb1e26fa37ddf18fa75a |
|
BLAKE2b-256 | 9ae96b782e74f57a80ca3b8dbafb4f18145516c17adb9894f7a439e20c426e9b |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.13.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0c1a06849cd9f932097bc0346558aadcf8c36378cf55282091eeb0b80f4fd1a |
|
MD5 | 8afa12fc8de1d90962041a821b4277b5 |
|
BLAKE2b-256 | e36d42287501be9589a4162e865daf671ef05f971dafded8a0fde355be7e7c74 |