Skip to content

Commit

Permalink
feat(router): add payment_intent_data and modify api models of create…
Browse files Browse the repository at this point in the history
… intent request and response for v2 (#6016)

Co-authored-by: hrithikesh026 <[email protected]>
Co-authored-by: Narayan Bhat <[email protected]>
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Sep 25, 2024
1 parent 4eec6ca commit 9a605af
Show file tree
Hide file tree
Showing 5 changed files with 321 additions and 137 deletions.
119 changes: 58 additions & 61 deletions api-reference-v2/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -2204,10 +2204,10 @@
],
"nullable": true
},
"tax_details": {
"order_tax_amount": {
"allOf": [
{
"$ref": "#/components/schemas/TaxDetails"
"$ref": "#/components/schemas/MinorUnit"
}
],
"nullable": true
Expand Down Expand Up @@ -6400,17 +6400,6 @@
}
}
},
"DefaultTax": {
"type": "object",
"required": [
"order_tax_amount"
],
"properties": {
"order_tax_amount": {
"$ref": "#/components/schemas/MinorUnit"
}
}
},
"DeviceChannel": {
"type": "string",
"description": "Device Channel indicating whether request is coming from App or Browser",
Expand Down Expand Up @@ -12344,21 +12333,6 @@
"open_banking_pis"
]
},
"PaymentMethodTypeTax": {
"type": "object",
"required": [
"order_tax_amount",
"pmt"
],
"properties": {
"order_tax_amount": {
"$ref": "#/components/schemas/MinorUnit"
},
"pmt": {
"$ref": "#/components/schemas/PaymentMethodType"
}
}
},
"PaymentMethodUpdate": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -12965,15 +12939,21 @@
"nullable": true
},
"capture_method": {
"$ref": "#/components/schemas/CaptureMethod"
"allOf": [
{
"$ref": "#/components/schemas/CaptureMethod"
}
],
"nullable": true
},
"authentication_type": {
"allOf": [
{
"$ref": "#/components/schemas/AuthenticationType"
}
],
"default": "no_three_ds"
"default": "no_three_ds",
"nullable": true
},
"billing": {
"allOf": [
Expand All @@ -13000,7 +12980,12 @@
"minLength": 1
},
"customer_present": {
"$ref": "#/components/schemas/PresenceOfCustomerDuringPayment"
"allOf": [
{
"$ref": "#/components/schemas/PresenceOfCustomerDuringPayment"
}
],
"nullable": true
},
"description": {
"type": "string",
Expand All @@ -13015,10 +13000,20 @@
"nullable": true
},
"setup_future_usage": {
"$ref": "#/components/schemas/FutureUsage"
"allOf": [
{
"$ref": "#/components/schemas/FutureUsage"
}
],
"nullable": true
},
"apply_mit_exemption": {
"$ref": "#/components/schemas/MitExemptionRequest"
"allOf": [
{
"$ref": "#/components/schemas/MitExemptionRequest"
}
],
"nullable": true
},
"statement_descriptor": {
"type": "string",
Expand Down Expand Up @@ -13066,7 +13061,12 @@
"nullable": true
},
"payment_link_enabled": {
"$ref": "#/components/schemas/EnablePaymentLinkRequest"
"allOf": [
{
"$ref": "#/components/schemas/EnablePaymentLinkRequest"
}
],
"nullable": true
},
"payment_link_config": {
"allOf": [
Expand All @@ -13077,7 +13077,12 @@
"nullable": true
},
"request_incremental_authorization": {
"$ref": "#/components/schemas/RequestIncrementalAuthorization"
"allOf": [
{
"$ref": "#/components/schemas/RequestIncrementalAuthorization"
}
],
"nullable": true
},
"session_expiry": {
"type": "integer",
Expand All @@ -13093,15 +13098,29 @@
"nullable": true
},
"request_external_three_ds_authentication": {
"$ref": "#/components/schemas/External3dsAuthenticationRequest"
"allOf": [
{
"$ref": "#/components/schemas/External3dsAuthenticationRequest"
}
],
"nullable": true
}
},
"additionalProperties": false
},
"PaymentsCreateIntentResponse": {
"type": "object",
"required": [
"amount_details"
"amount_details",
"client_secret",
"capture_method",
"authentication_type",
"customer_present",
"setup_future_usage",
"apply_mit_exemption",
"payment_link_enabled",
"request_incremental_authorization",
"request_external_three_ds_authentication"
],
"properties": {
"amount_details": {
Expand All @@ -13110,8 +13129,7 @@
"client_secret": {
"type": "string",
"description": "It's a token used for client side verification.",
"example": "pay_U42c409qyHwOkWo3vK60_secret_el9ksDkiB8hi6j9N78yo",
"nullable": true
"example": "pay_U42c409qyHwOkWo3vK60_secret_el9ksDkiB8hi6j9N78yo"
},
"merchant_reference_id": {
"type": "string",
Expand Down Expand Up @@ -13244,7 +13262,7 @@
"session_expiry": {
"type": "integer",
"format": "int32",
"description": "Will be used to expire client secret after certain amount of time to be supplied in seconds\n(900) for 15 mins",
"description": "Will be used to expire client secret after certain amount of time to be supplied in seconds, if not sent it will be taken from profile config\n(900) for 15 mins",
"example": 900,
"nullable": true,
"minimum": 0
Expand Down Expand Up @@ -19288,27 +19306,6 @@
"Calculate"
]
},
"TaxDetails": {
"type": "object",
"properties": {
"default": {
"allOf": [
{
"$ref": "#/components/schemas/DefaultTax"
}
],
"nullable": true
},
"payment_method_type": {
"allOf": [
{
"$ref": "#/components/schemas/PaymentMethodTypeTax"
}
],
"nullable": true
}
}
},
"ThirdPartySdkSessionResponse": {
"type": "object",
"required": [
Expand Down
Loading

0 comments on commit 9a605af

Please sign in to comment.