Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.424.0"
".": "0.425.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 234
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-dd0c83cac837fbe98857fa997663b0d0469344a7564bd4fe506e6c71d1d6af73.yml
openapi_spec_hash: 2352f37602105b164533038199b21804
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6157ec57275bc58dca42adf9d0b661f6dcfd725df7593dc453833dfcdcf33a8b.yml
openapi_spec_hash: 0a80ae7882f3d72a333b80efe58ff5ea
config_hash: b7ec7f54fa76c1f8bde7a548710a1d38
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.425.0 (2026-03-09)

Full Changelog: [v0.424.0...v0.425.0](https://github.com/Increase/increase-python/compare/v0.424.0...v0.425.0)

### Features

* **api:** api update ([74461d7](https://github.com/Increase/increase-python/commit/74461d79e75ba359dfa10dd9b47dfb210902c768))


### Chores

* remove custom code ([1b3b78e](https://github.com/Increase/increase-python/commit/1b3b78ee09443f08465b8c58b5840290549d82ad))

## 0.424.0 (2026-03-08)

Full Changelog: [v0.423.0...v0.424.0](https://github.com/Increase/increase-python/compare/v0.423.0...v0.424.0)
Expand Down
90 changes: 0 additions & 90 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,96 +216,6 @@ client.files.create(

The async client uses the exact same interface. If you pass a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance, the file contents will be read asynchronously automatically.

## Webhook verification

Verifying webhook signatures is _optional but encouraged_.

For more information about webhooks, see [the API docs](https://increase.com/documentation/webhooks#events-and-webhooks).

### Parsing webhook payloads

For most use cases, you will likely want to verify the webhook and parse the payload at the same time. To achieve this, we provide the method `client.webhooks.unwrap()`, which parses a webhook request and verifies that it was sent by Increase. This method will raise an error if the signature is invalid.

Note that the `body` parameter must be the raw JSON string sent from the server (do not parse it first). The `.unwrap()` method will parse this JSON for you into an event object after verifying the webhook was sent from Increase.

```python
from increase import Increase
from flask import Flask, request

app = Flask(__name__)

# You can also configure the webhook secret with any of:
# - The `INCREASE_WEBHOOK_SECRET` environment variable.
# - The `webhook_secret` argument to the Increase client.
# - The `secret` argument to `webhooks.unwrap`
client = Increase()


@app.route("/webhook", methods=["POST"])
def webhook():
request_body = request.get_data(as_text=True)

try:
event = client.webhooks.unwrap(request_body, request.headers, secret="your webhook secret")

if event.type == "account.created":
print("Account created:", event.data)
elif event.type == "account.updated":
print("Account updated:", event.data)
else:
print("Unhandled event type:", event.type)

return "ok"
except Exception as e:
print("Invalid signature:", e)
return "Invalid signature", 400


if __name__ == "__main__":
app.run(port=8000)
```

### Verifying webhook payloads directly

In some cases, you may want to verify the webhook separately from parsing the payload. If you prefer to handle these steps separately, we provide the method `client.webhooks.verify_signature()` to _only verify_ the signature of a webhook request. Like `.unwrap()`, this method will raise an error if the signature is invalid.

Note that the `body` parameter must be the raw JSON string sent from the server (do not parse it first). You will then need to parse the body after verifying the signature.

```python
import json
from increase import Increase
from flask import Flask, request

app = Flask(__name__)

# You can also configure the webhook secret with any of:
# - The `INCREASE_WEBHOOK_SECRET` environment variable.
# - The `webhook_secret` argument to the Increase client.
# - The `secret` argument to `webhooks.unwrap`
client = Increase()


@app.route("/webhook", methods=["POST"])
def webhook():
request_body = request.get_data(as_text=True)

try:
client.webhooks.verify_signature(request_body, request.headers)

# Parse the body after verification
event = json.loads(request_body)
print("Verified event:", event)

return "ok"
except Exception as e:
print("Invalid signature:", e)
return "Invalid signature", 400


if __name__ == "__main__":
app.run(port=8000)
```

## Handling errors

When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `increase.APIConnectionError` is raised.
Expand Down
26 changes: 25 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# Security Policy

Please visit https://increase.com/security for our security policy.
## Reporting Security Issues

This SDK is generated by [Stainless Software Inc](http://stainless.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.

To report a security issue, please contact the Stainless team at security@stainless.com.

## Responsible Disclosure

We appreciate the efforts of security researchers and individuals who help us maintain the security of
SDKs we generate. If you believe you have found a security vulnerability, please adhere to responsible
disclosure practices by allowing us a reasonable amount of time to investigate and address the issue
before making any information public.

## Reporting Non-SDK Related Security Issues

If you encounter security issues that are not directly related to SDKs but pertain to the services
or products provided by Increase, please follow the respective company's security reporting guidelines.

### Increase Terms and Policies

Please contact dev-feedback@increase.com for any questions or concerns regarding the security of our services.

---

Thank you for helping us keep the SDKs and systems they interact with secure.
7 changes: 0 additions & 7 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -759,13 +759,6 @@ Methods:
- <code title="get /intrafi_exclusions">client.intrafi_exclusions.<a href="./src/increase/resources/intrafi_exclusions.py">list</a>(\*\*<a href="src/increase/types/intrafi_exclusion_list_params.py">params</a>) -> <a href="./src/increase/types/intrafi_exclusion.py">SyncPage[IntrafiExclusion]</a></code>
- <code title="post /intrafi_exclusions/{intrafi_exclusion_id}/archive">client.intrafi_exclusions.<a href="./src/increase/resources/intrafi_exclusions.py">archive</a>(intrafi_exclusion_id) -> <a href="./src/increase/types/intrafi_exclusion.py">IntrafiExclusion</a></code>

# Webhooks

Methods:

- <code>client.webhooks.<a href="./src/increase/resources/webhooks.py">unwrap</a>(\*args) -> object</code>
- <code>client.webhooks.<a href="./src/increase/resources/webhooks.py">verify_signature</a>(\*args) -> None</code>

# CardTokens

Types:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "increase"
version = "0.424.0"
version = "0.425.0"
description = "The official Python library for the increase API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/increase/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ def _should_retry(self, response: httpx.Response) -> bool:
return False

def _idempotency_key(self) -> str:
return f"increase-python-retry-{uuid.uuid4()}"
return f"stainless-python-retry-{uuid.uuid4()}"


class _DefaultHttpxClient(httpx.Client):
Expand Down
Loading