---
title: "Paypal Webhook"
method: POST
path: "/api/v1/payments/paypal/webhook"
tags: ["Payments"]
---

# Paypal Webhook

`POST /api/v1/payments/paypal/webhook`

## Request

- Base URL: `https://api.africadb.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.africadb.com/api/v1/payments/paypal/webhook`
- Auth: none declared

Signed PayPal webhook.

Handles:
  BILLING.SUBSCRIPTION.ACTIVATED  -> promote user tier
  BILLING.SUBSCRIPTION.CANCELLED  -> downgrade to free
  PAYMENT.CAPTURE.COMPLETED       -> flip dataset purchase to captured
                                     (in case the return-URL leg didn't)

Idempotent via ``payment_webhook_events`` (provider, event_id).

## Response `200`

Successful Response

- unknown

---

[API](https://skmtc.dev/africadb/apis/africa-data-bank-api.md) · [All operations](https://skmtc.dev/africadb/apis/africa-data-bank-api/llms.txt) · [OpenAPI document](https://skmtc.dev/africadb/apis/africa-data-bank-api/revisions/2a50da82945b?raw)
