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(payment_methods_v2): add payment methods list endpoint #6938

Open
wants to merge 68 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 48 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
70cb8a1
chore: add comments with improvements to be made in merchant payment …
SanchithHegde Dec 6, 2024
947795f
Merge branch 'main' into initial-merchant-payment-method-list-v2
Narayanbhat166 Dec 9, 2024
3e7833f
refactor: change payment_methods_enabled column to type for v2
Narayanbhat166 Dec 10, 2024
560d3f6
feat(payments_v2): implement payment methods list for v2
Narayanbhat166 Dec 10, 2024
09acb50
feat(payments_v2): add customers_payment_methods in pm list
Narayanbhat166 Dec 11, 2024
940e2c1
feat(payments_v2): add list_payment_methods to openapi
Narayanbhat166 Dec 11, 2024
19ae04f
feat(payments_v2): add list_payment_methods to openapi
Narayanbhat166 Dec 11, 2024
f895608
chore: run formatter
hyperswitch-bot[bot] Dec 11, 2024
1096cbe
chore: add doc comments
Narayanbhat166 Dec 11, 2024
db9652e
Merge branch 'main' into initial-merchant-payment-method-list-v2
Narayanbhat166 Dec 11, 2024
b6ab7d2
refactor: address PR comments
Narayanbhat166 Dec 12, 2024
6a2c2c1
Revert "chore: add comments with improvements to be made in merchant …
Narayanbhat166 Dec 12, 2024
fac8521
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] Dec 12, 2024
65f8113
chore: cargo clippy
Narayanbhat166 Dec 12, 2024
2b5216e
Merge branch 'main' into initial-merchant-payment-method-list-v2
Narayanbhat166 Dec 12, 2024
593df4d
chore: rename fields
Narayanbhat166 Dec 16, 2024
fbcf8aa
Merge branch 'main' into initial-merchant-payment-method-list-v2
Narayanbhat166 Dec 16, 2024
6938d61
chore: rename fields
Narayanbhat166 Dec 16, 2024
5d51092
chore: cargo clippy
Narayanbhat166 Dec 17, 2024
c92ced0
chore: fix openapi
Narayanbhat166 Dec 17, 2024
28bf4ba
Merge branch 'main' into initial-merchant-payment-method-list-v2
Narayanbhat166 Dec 17, 2024
a6f1da5
chore: add .vscode/settings to gitignore
Narayanbhat166 Dec 18, 2024
c3dd71d
refactor: move payment methods type to common_types
Narayanbhat166 Dec 18, 2024
32122ad
chore: run formatter
hyperswitch-bot[bot] Dec 18, 2024
31360f9
Merge branch 'main' into initial-merchant-payment-method-list-v2
Narayanbhat166 Dec 18, 2024
fc2453c
chore: cargo clippy_v2
Narayanbhat166 Dec 19, 2024
60a82e2
chore: fix openapi
Narayanbhat166 Dec 19, 2024
7618c9d
chore: cargo clippy_v2
Narayanbhat166 Dec 19, 2024
a801fed
chore: add extra information enum and make customer_payment_methods a…
Narayanbhat166 Dec 20, 2024
79c2a5b
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] Dec 20, 2024
4acd9e0
chore: add serde flatten
Narayanbhat166 Dec 20, 2024
a4c5b93
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] Dec 20, 2024
d58841d
chore: change route to use kebab-case
Narayanbhat166 Dec 20, 2024
5025e64
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] Dec 20, 2024
51ad828
refactor: fix openapi
Narayanbhat166 Dec 20, 2024
40146e5
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] Dec 20, 2024
ac8074d
fix: openapi_v2
Narayanbhat166 Dec 20, 2024
d186904
Merge branch 'main' into initial-merchant-payment-method-list-v2
Narayanbhat166 Dec 20, 2024
7ae9fb4
chore: cargo clippy_v2
Narayanbhat166 Dec 20, 2024
5bc9c59
chore: merge fixes
Narayanbhat166 Dec 21, 2024
eaff74e
chore: remove specific imports
Narayanbhat166 Dec 23, 2024
b10edf9
Merge branch 'main' into payment_methods_list_for_payment_methods
Narayanbhat166 Dec 23, 2024
ea72deb
chore: remove redundant code because of merge conflicts
Narayanbhat166 Dec 23, 2024
c4b9b72
refactor: add locker config
Narayanbhat166 Dec 24, 2024
c90cc04
Merge branch 'main' into payment_methods_list_for_payment_methods
Narayanbhat166 Dec 24, 2024
4f31d6a
feat(payment_methods): add payment methods list
Narayanbhat166 Dec 25, 2024
22ae53e
Merge branch 'main' into payment_methods_list_for_payment_methods
Narayanbhat166 Dec 25, 2024
89f90c6
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] Dec 25, 2024
289b0e5
feat: add openapi endpoints for payment methods list
Narayanbhat166 Dec 25, 2024
3105443
chore: address PR comments
Narayanbhat166 Jan 2, 2025
96b4d95
fix: openapi
Narayanbhat166 Jan 2, 2025
4684a97
feat: add required fields support for payment methods
Narayanbhat166 Jan 3, 2025
7362fb3
chore: run formatter
hyperswitch-bot[bot] Jan 3, 2025
d5b6942
chore: cargo clippy
Narayanbhat166 Jan 3, 2025
d538cc1
refactor: add the required fields config only for v2
Narayanbhat166 Jan 3, 2025
1f20a95
fix: openapi v2
Narayanbhat166 Jan 3, 2025
64808eb
fix: openapi v2
Narayanbhat166 Jan 3, 2025
1ce18db
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] Jan 3, 2025
bdfdeeb
chore: cargo clippy
Narayanbhat166 Jan 3, 2025
68c93c4
chore: revert config changes
Narayanbhat166 Jan 4, 2025
2c3828d
chore: cargo clippy
Narayanbhat166 Jan 6, 2025
b02524c
refactor: remove customer payment methods from payment methods
Narayanbhat166 Jan 6, 2025
0bac917
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] Jan 6, 2025
4b05c97
refactor: remove hardcoding required fields config
Narayanbhat166 Jan 6, 2025
34c0712
Merge branch 'main' into payment_methods_list_for_payment_methods
Narayanbhat166 Jan 7, 2025
3379758
chore: merge fixes
Narayanbhat166 Jan 7, 2025
af28c44
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] Jan 7, 2025
de3ee96
chore: address PR comments
Narayanbhat166 Jan 8, 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
128 changes: 23 additions & 105 deletions api-reference-v2/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -7461,39 +7461,6 @@
},
"additionalProperties": false
},
"CustomerDefaultPaymentMethodResponse": {
"type": "object",
"required": [
"customer_id",
"payment_method"
],
"properties": {
"default_payment_method_id": {
"type": "string",
"description": "The unique identifier of the Payment method",
"example": "card_rGK4Vi5iSW70MY7J2mIg",
"nullable": true
},
"customer_id": {
"type": "string",
"description": "The unique identifier of the customer.",
"example": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"maxLength": 64,
"minLength": 1
},
"payment_method": {
"$ref": "#/components/schemas/PaymentMethod"
},
"payment_method_type": {
"allOf": [
{
"$ref": "#/components/schemas/PaymentMethodType"
}
],
"nullable": true
}
}
},
"CustomerDeleteResponse": {
"type": "object",
"required": [
Expand Down Expand Up @@ -8003,12 +7970,15 @@
"properties": {
"customer_id": {
"type": "string",
"example": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"example": "12345_cus_y3oqhf46pyzuxjbcn2giaqnb44",
"maxLength": 64,
"minLength": 1
},
"payment_method_id": {
"type": "string"
"type": "string",
"example": "12345_pm_y3oqhf46pyzuxjbcn2giaqnb44",
"maxLength": 64,
"minLength": 1
}
}
},
Expand Down Expand Up @@ -13896,10 +13866,10 @@
"PaymentMethodDeleteResponse": {
"type": "object",
"required": [
"payment_method_id"
"id"
],
"properties": {
"payment_method_id": {
"id": {
"type": "string",
"description": "The unique identifier of the Payment method",
"example": "card_rGK4Vi5iSW70MY7J2mIg"
Expand Down Expand Up @@ -14079,67 +14049,23 @@
"PaymentMethodListResponse": {
"type": "object",
"required": [
"currency",
"payment_methods",
"mandate_payment",
"show_surcharge_breakup_screen",
"request_external_three_ds_authentication",
"is_tax_calculation_enabled"
"payment_methods_enabled"
],
"properties": {
"redirect_url": {
"type": "string",
"description": "Redirect URL of the merchant",
"example": "https://www.google.com",
"nullable": true
},
"currency": {
"$ref": "#/components/schemas/Currency"
},
"payment_methods": {
"payment_methods_enabled": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ResponsePaymentMethodsEnabled"
"$ref": "#/components/schemas/ResponsePaymentMethodTypes"
},
"description": "Information about the payment method"
},
"mandate_payment": {
"$ref": "#/components/schemas/MandateType"
},
"merchant_name": {
"type": "string",
"nullable": true
},
"show_surcharge_breakup_screen": {
"type": "boolean",
"description": "flag to indicate if surcharge and tax breakup screen should be shown or not"
},
"payment_type": {
"allOf": [
{
"$ref": "#/components/schemas/PaymentType"
}
],
"nullable": true
},
"request_external_three_ds_authentication": {
"type": "boolean",
"description": "flag to indicate whether to perform external 3ds authentication",
"example": true
},
"collect_shipping_details_from_wallets": {
"type": "boolean",
"description": "flag that indicates whether to collect shipping details from wallets or from the customer",
"nullable": true
"description": "The list of payment methods that are enabled for the business profile"
},
"collect_billing_details_from_wallets": {
"type": "boolean",
"description": "flag that indicates whether to collect billing details from wallets or from the customer",
"customer_payment_methods": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CustomerPaymentMethod"
},
"description": "The list of payment methods that are saved by the given customer\nThis field is only returned if the customer_id is provided in the request",
"nullable": true
},
"is_tax_calculation_enabled": {
"type": "boolean",
"description": "flag that indicates whether to calculate tax on the order amount"
}
}
},
Expand Down Expand Up @@ -14169,13 +14095,18 @@
"PaymentMethodResponse": {
"type": "object",
"required": [
"id",
"merchant_id",
"customer_id",
"payment_method_id",
"payment_method_type",
"recurring_enabled"
],
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the Payment method",
"example": "card_rGK4Vi5iSW70MY7J2mIg"
},
"merchant_id": {
"type": "string",
"description": "Unique identifier for a merchant",
Expand All @@ -14188,11 +14119,6 @@
"maxLength": 64,
"minLength": 32
},
"payment_method_id": {
"type": "string",
"description": "The unique identifier of the Payment method",
"example": "card_rGK4Vi5iSW70MY7J2mIg"
},
"payment_method_type": {
"$ref": "#/components/schemas/PaymentMethod"
},
Expand Down Expand Up @@ -19210,14 +19136,6 @@
"$ref": "#/components/schemas/RequiredFieldInfo"
},
"nullable": true
},
"surcharge_details": {
"allOf": [
{
"$ref": "#/components/schemas/SurchargeDetailsResponse"
}
],
"nullable": true
}
}
}
Expand Down
Loading
Loading