Skip to content

Commit

Permalink
feat(payment_methods): add support to pass apple pay recurring detail…
Browse files Browse the repository at this point in the history
…s to obtain apple pay merchant token (#6770)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
  • Loading branch information
ShankarSinghC and hyperswitch-bot[bot] authored Dec 19, 2024
1 parent 46aad50 commit 6074249
Show file tree
Hide file tree
Showing 14 changed files with 748 additions and 3 deletions.
175 changes: 175 additions & 0 deletions api-reference-v2/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3288,12 +3288,169 @@
}
],
"nullable": true
},
"recurring_payment_request": {
"allOf": [
{
"$ref": "#/components/schemas/ApplePayRecurringPaymentRequest"
}
],
"nullable": true
}
}
},
"ApplePayPaymentTiming": {
"type": "string",
"enum": [
"immediate",
"recurring"
]
},
"ApplePayRecurringDetails": {
"type": "object",
"required": [
"payment_description",
"regular_billing",
"management_url"
],
"properties": {
"payment_description": {
"type": "string",
"description": "A description of the recurring payment that Apple Pay displays to the user in the payment sheet"
},
"regular_billing": {
"$ref": "#/components/schemas/ApplePayRegularBillingDetails"
},
"billing_agreement": {
"type": "string",
"description": "A localized billing agreement that the payment sheet displays to the user before the user authorizes the payment",
"nullable": true
},
"management_url": {
"type": "string",
"description": "A URL to a web page where the user can update or delete the payment method for the recurring payment",
"example": "https://hyperswitch.io"
}
}
},
"ApplePayRecurringPaymentRequest": {
"type": "object",
"required": [
"payment_description",
"regular_billing",
"management_url"
],
"properties": {
"payment_description": {
"type": "string",
"description": "A description of the recurring payment that Apple Pay displays to the user in the payment sheet"
},
"regular_billing": {
"$ref": "#/components/schemas/ApplePayRegularBillingRequest"
},
"billing_agreement": {
"type": "string",
"description": "A localized billing agreement that the payment sheet displays to the user before the user authorizes the payment",
"nullable": true
},
"management_url": {
"type": "string",
"description": "A URL to a web page where the user can update or delete the payment method for the recurring payment",
"example": "https://hyperswitch.io"
}
}
},
"ApplePayRedirectData": {
"type": "object"
},
"ApplePayRegularBillingDetails": {
"type": "object",
"required": [
"label"
],
"properties": {
"label": {
"type": "string",
"description": "The label that Apple Pay displays to the user in the payment sheet with the recurring details"
},
"recurring_payment_start_date": {
"type": "string",
"format": "date-time",
"description": "The date of the first payment",
"example": "2023-09-10T23:59:59Z",
"nullable": true
},
"recurring_payment_end_date": {
"type": "string",
"format": "date-time",
"description": "The date of the final payment",
"example": "2023-09-10T23:59:59Z",
"nullable": true
},
"recurring_payment_interval_unit": {
"allOf": [
{
"$ref": "#/components/schemas/RecurringPaymentIntervalUnit"
}
],
"nullable": true
},
"recurring_payment_interval_count": {
"type": "integer",
"format": "int32",
"description": "The number of interval units that make up the total payment interval",
"nullable": true
}
}
},
"ApplePayRegularBillingRequest": {
"type": "object",
"required": [
"amount",
"label",
"payment_timing"
],
"properties": {
"amount": {
"type": "string",
"description": "The amount of the recurring payment",
"example": "38.02"
},
"label": {
"type": "string",
"description": "The label that Apple Pay displays to the user in the payment sheet with the recurring details"
},
"payment_timing": {
"$ref": "#/components/schemas/ApplePayPaymentTiming"
},
"recurring_payment_start_date": {
"type": "string",
"format": "date-time",
"description": "The date of the first payment",
"nullable": true
},
"recurring_payment_end_date": {
"type": "string",
"format": "date-time",
"description": "The date of the final payment",
"nullable": true
},
"recurring_payment_interval_unit": {
"allOf": [
{
"$ref": "#/components/schemas/RecurringPaymentIntervalUnit"
}
],
"nullable": true
},
"recurring_payment_interval_count": {
"type": "integer",
"format": "int32",
"description": "The number of interval units that make up the total payment interval",
"nullable": true
}
}
},
"ApplePaySessionResponse": {
"oneOf": [
{
Expand Down Expand Up @@ -8500,6 +8657,14 @@
},
"description": "Additional tags to be used for global search",
"nullable": true
},
"apple_pay_recurring_details": {
"allOf": [
{
"$ref": "#/components/schemas/ApplePayRecurringDetails"
}
],
"nullable": true
}
}
},
Expand Down Expand Up @@ -18405,6 +18570,16 @@
"propertyName": "type"
}
},
"RecurringPaymentIntervalUnit": {
"type": "string",
"enum": [
"year",
"month",
"day",
"hour",
"minute"
]
},
"RedirectResponse": {
"type": "object",
"properties": {
Expand Down
Loading

0 comments on commit 6074249

Please sign in to comment.