hyperswitch
hyperswitch copied to clipboard
feat(payout-events): add kafka events for payout analytics
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
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
}'
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
}'