hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

feat(payout-events): add kafka events for payout analytics

Open ivor11 opened this issue 1 year ago • 2 comments

Type of Change

  • [ ] Bugfix
  • [ ] New feature
  • [x] Enhancement
  • [ ] Refactoring
  • [ ] Dependency updates
  • [ ] Documentation
  • [ ] CI/CD

Description

add kafka events and clickhouse schema for payout analytics

Additional Changes

  • [ ] This PR modifies the API contract
  • [ ] This PR modifies the database schema
  • [ ] This PR modifies application configuration/environment variables

Motivation and Context

add kafka events and clickhouse schema for payout analytics closes #4210

How did you test it?

Checklist

  • [x] I formatted the code cargo +nightly fmt --all
  • [x] I addressed lints thrown by cargo clippy
  • [x] I reviewed the submitted code
  • [ ] I added unit tests for my changes where possible
  • [ ] I added a CHANGELOG entry if applicable

ivor11 avatar Mar 26 '24 14:03 ivor11

curl --location 'http://localhost:8080/payouts/create' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_0IdfEWhKXjiL8FI0KTXx36yryyqL0BnPCSP9a7KQNM1KeJSupzoE2oKdoPWev30B' \
--data-raw '{
    "amount": 1,
    "currency": "EUR",
    "customer_id": "cus_69Qz5OIKkVfjxgdlRX8L",
    "email": "[email protected]",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Its my first payout request",
    "payout_type": "bank",
    "payout_method_data": {
        "bank": {
            "bic": "ABNANL2A",
            "iban": "NL46TEST0136169112",
            "bank_name": "Deutsche Bank",
            "bank_country_code": "NL",
            "bank_city": "Amsterdam"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "NY",
            "zip": "94122",
            "country": "US",
            "first_name": "John",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "entity_type": "Individual",
    "recurring": false,
    "metadata": {
        "ref": "123"
    },
    "routing": {
        "type": "single",
        "data": "adyen"
    },
    "confirm": true,
    "auto_fulfill": true
}'
Screenshot 2024-03-27 at 1 00 53 PM

Screenshot 2024-03-27 at 1 01 18 PM

ivor11 avatar Mar 27 '24 07:03 ivor11

curl --location --request PUT 'http://localhost:8080/payouts/1268a1c8-7ac7-4582-b6d8-a39406180db6' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_0IdfEWhKXjiL8FI0KTXx36yryyqL0BnPCSP9a7KQNM1KeJSupzoE2oKdoPWev30B' \
--data '{
    "confirm": true,
    "auto_fulfill": false
}'
Screenshot 2024-03-27 at 1 04 52 PM

ivor11 avatar Mar 27 '24 07:03 ivor11