Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(router): add adyen split payments support #6952

Merged
merged 56 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
da61c46
undo commit
AkshayaFoiger Dec 24, 2024
e010079
chore: run formatter
hyperswitch-bot[bot] Dec 27, 2024
abdab2e
refactor(core): add adyen split request and response
AkshayaFoiger Jan 9, 2025
cedec57
chore: run formatter
hyperswitch-bot[bot] Jan 9, 2025
fda25c7
chore: undo get_split_payment_request()
AkshayaFoiger Jan 9, 2025
0e0f499
feat(router): add adyen split response and request types
AkshayaFoiger Jan 13, 2025
a03d65e
chore: run formatter
hyperswitch-bot[bot] Jan 13, 2025
5af13b0
refactor(router): refactor charge_id in transactional response
AkshayaFoiger Jan 13, 2025
ddd1d63
chore: run formatter
hyperswitch-bot[bot] Jan 13, 2025
69ada8a
refactor(router): add charges to payment attemot
AkshayaFoiger Jan 14, 2025
c72e35c
refactor(router): fix stripe
AkshayaFoiger Jan 14, 2025
d052ddd
refactor(router): fix validation
AkshayaFoiger Jan 17, 2025
cba4871
refactor(router): add refund validations
AkshayaFoiger Jan 20, 2025
2998cd5
refactor(router): add store and splits to adyen request
AkshayaFoiger Jan 20, 2025
4facdbc
refactor(router): populate split response from connector
AkshayaFoiger Jan 21, 2025
be00329
Merge branch 'main' into adyen-split-payments
AkshayaFoiger Jan 21, 2025
c25f427
chore: run formatter
hyperswitch-bot[bot] Jan 21, 2025
5d7906f
chore: fix merge conflict
AkshayaFoiger Jan 21, 2025
5f6e653
chore: generate openapi_spec
AkshayaFoiger Jan 22, 2025
ae0011a
Merge branch 'main' into adyen-split-payments
AkshayaFoiger Jan 22, 2025
4a259de
Merge branch 'main' into adyen-split-payments
AkshayaFoiger Jan 22, 2025
8103d0e
chore: fix clippy error
AkshayaFoiger Jan 22, 2025
de74046
chore: fix error
AkshayaFoiger Jan 22, 2025
a88592a
Merge branch 'main' into adyen-split-payments
AkshayaFoiger Jan 22, 2025
c2fbd8e
chore: run formatter
hyperswitch-bot[bot] Jan 22, 2025
53e6ef3
Merge branch 'main' into adyen-split-payments
AkshayaFoiger Jan 23, 2025
044a4b2
chore: fix migration and openapi_spec
AkshayaFoiger Jan 23, 2025
407962a
chore: run formatter
hyperswitch-bot[bot] Jan 23, 2025
521817b
chore: fix v2 clippy error
AkshayaFoiger Jan 23, 2025
129671c
chore: run formatter
hyperswitch-bot[bot] Jan 23, 2025
5533e9e
refactor(router): remove charge_id from paymentAttemptUpdate
AkshayaFoiger Jan 23, 2025
766b4a1
chore: fix migration consistency error
AkshayaFoiger Jan 23, 2025
49e631f
chore: fix clippy and openapi_spec error
AkshayaFoiger Jan 23, 2025
e2a844e
chore: run formatter
hyperswitch-bot[bot] Jan 23, 2025
35e8514
chore: fix clippy
AkshayaFoiger Jan 23, 2025
a784b6e
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] Jan 23, 2025
f94a6c9
chore: fix test cases
AkshayaFoiger Jan 23, 2025
3ff6595
Merge branch 'main' into adyen-split-payments
AkshayaFoiger Jan 27, 2025
115b95f
chore: genertae openapi_spec
AkshayaFoiger Jan 27, 2025
47eecae
Merge branch 'main' into adyen-split-payments
AkshayaFoiger Jan 28, 2025
ab16aaf
make ConnectorChargeResponseData snakecase
AkshayaFoiger Jan 29, 2025
8d27c1b
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] Jan 29, 2025
4800fd7
Merge branch 'main' into adyen-split-payments
AkshayaFoiger Jan 30, 2025
7f4e6db
chore: fix clippy error
AkshayaFoiger Jan 30, 2025
66a1418
Merge branch 'main' into adyen-split-payments
AkshayaFoiger Jan 31, 2025
335370d
Merge branch 'main' into adyen-split-payments
AkshayaFoiger Feb 6, 2025
dfd3a77
fix merge conflicts
AkshayaFoiger Feb 6, 2025
6a67908
fix migration and clippy error
AkshayaFoiger Feb 6, 2025
7283dab
fix migration error
AkshayaFoiger Feb 6, 2025
3abf4ac
Merge branch 'main' into adyen-split-payments
AkshayaFoiger Feb 7, 2025
1b47d3a
fix clippy error
AkshayaFoiger Feb 7, 2025
7fe865c
Merge branch 'main' into adyen-split-payments
AkshayaFoiger Feb 7, 2025
512c4a8
fix clippy error
AkshayaFoiger Feb 7, 2025
cb2b612
Merge branch 'main' into adyen-split-payments
AkshayaFoiger Feb 7, 2025
0179d22
Merge branch 'main' into adyen-split-payments
AkshayaFoiger Feb 7, 2025
36f578e
Merge branch 'main' into adyen-split-payments
AkshayaFoiger Feb 7, 2025
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
168 changes: 138 additions & 30 deletions api-reference-v2/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3076,6 +3076,79 @@
},
"additionalProperties": false
},
"AdyenSplitData": {
"type": "object",
"description": "Fee information for Split Payments to be charged on the payment being collected for Adyen",
"required": [
"split_items"
],
"properties": {
"store": {
"type": "string",
"description": "The store identifier",
"nullable": true
},
"split_items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AdyenSplitItem"
},
"description": "Data for the split items"
}
},
"additionalProperties": false
},
"AdyenSplitItem": {
"type": "object",
"description": "Data for the split items",
"required": [
"amount",
"split_type",
"reference"
],
"properties": {
"amount": {
"type": "integer",
"format": "int64",
"description": "The amount of the split item",
"example": 6540
},
"split_type": {
"$ref": "#/components/schemas/AdyenSplitType"
},
"account": {
"type": "string",
"description": "The unique identifier of the account to which the split amount is allocated.",
"nullable": true
},
"reference": {
"type": "string",
"description": "Unique Identifier for the split item"
},
"description": {
"type": "string",
"description": "Description for the part of the payment that will be allocated to the specified account.",
"nullable": true
}
},
"additionalProperties": false
},
"AdyenSplitType": {
"type": "string",
"enum": [
"BalanceAccount",
"AcquiringFees",
"PaymentFee",
"AdyenFees",
"AdyenCommission",
"AdyenMarkup",
"Interchange",
"SchemeFee",
"Commission",
"TopUp",
"Vat"
]
},
"AirwallexData": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -6766,6 +6839,33 @@
"zsl"
]
},
"ConnectorChargeResponseData": {
"oneOf": [
{
"type": "object",
"required": [
"stripe_split_payment"
],
"properties": {
"stripe_split_payment": {
"$ref": "#/components/schemas/StripeChargeResponseData"
}
}
},
{
"type": "object",
"required": [
"adyen_split_payment"
],
"properties": {
"adyen_split_payment": {
"$ref": "#/components/schemas/AdyenSplitData"
}
}
}
],
"description": "Charge Information"
},
"ConnectorFeatureMatrixResponse": {
"type": "object",
"required": [
Expand Down Expand Up @@ -19763,24 +19863,20 @@
"$ref": "#/components/schemas/StripeSplitPaymentRequest"
}
}
}
],
"description": "Fee information for Split Payments to be charged on the payment being collected"
},
"SplitPaymentsResponse": {
"oneOf": [
},
{
"type": "object",
"required": [
"stripe_split_payment"
"adyen_split_payment"
],
"properties": {
"stripe_split_payment": {
"$ref": "#/components/schemas/StripeSplitPaymentsResponse"
"adyen_split_payment": {
"$ref": "#/components/schemas/AdyenSplitData"
}
}
}
]
],
"description": "Fee information for Split Payments to be charged on the payment being collected"
},
"SplitRefund": {
"oneOf": [
Expand All @@ -19794,6 +19890,17 @@
"$ref": "#/components/schemas/StripeSplitRefundRequest"
}
}
},
{
"type": "object",
"required": [
"adyen_split_refund"
],
"properties": {
"adyen_split_refund": {
"$ref": "#/components/schemas/AdyenSplitData"
}
}
}
],
"description": "Charge specific fields for controlling the revert of funds from either platform or connected account. Check sub-fields for more details."
Expand Down Expand Up @@ -19868,66 +19975,67 @@
"propertyName": "type"
}
},
"StripeChargeType": {
"type": "string",
"enum": [
"direct",
"destination"
]
},
"StripeSplitPaymentRequest": {
"StripeChargeResponseData": {
"type": "object",
"description": "Fee information for Split Payments to be charged on the payment being collected for Stripe",
"description": "Fee information to be charged on the payment being collected via Stripe",
"required": [
"charge_type",
"application_fees",
"transfer_account_id"
],
"properties": {
"charge_id": {
"type": "string",
"description": "Identifier for charge created for the payment",
"nullable": true
},
"charge_type": {
"$ref": "#/components/schemas/PaymentChargeType"
},
"application_fees": {
"type": "integer",
"format": "int64",
"description": "Platform fees to be collected on the payment",
"description": "Platform fees collected on the payment",
"example": 6540
},
"transfer_account_id": {
"type": "string",
"description": "Identifier for the reseller's account to send the funds to"
"description": "Identifier for the reseller's account where the funds were transferred"
}
},
"additionalProperties": false
},
"StripeSplitPaymentsResponse": {
"StripeChargeType": {
"type": "string",
"enum": [
"direct",
"destination"
]
},
"StripeSplitPaymentRequest": {
"type": "object",
"description": "Fee information to be charged on the payment being collected",
"description": "Fee information for Split Payments to be charged on the payment being collected for Stripe",
"required": [
"charge_type",
"application_fees",
"transfer_account_id"
],
"properties": {
"charge_id": {
"type": "string",
"description": "Identifier for charge created for the payment",
"nullable": true
},
"charge_type": {
"$ref": "#/components/schemas/PaymentChargeType"
},
"application_fees": {
"type": "integer",
"format": "int64",
"description": "Platform fees collected on the payment",
"description": "Platform fees to be collected on the payment",
"example": 6540
},
"transfer_account_id": {
"type": "string",
"description": "Identifier for the reseller's account where the funds were transferred"
}
}
},
"additionalProperties": false
},
"StripeSplitRefundRequest": {
"type": "object",
Expand Down
Loading
Loading