Skip to content

Commit

Permalink
feat(core): payment links - add support for custom background image a…
Browse files Browse the repository at this point in the history
…nd layout in details section (#6725)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
  • Loading branch information
kashif-m and hyperswitch-bot[bot] authored Dec 12, 2024
1 parent 1564ad7 commit d11d874
Show file tree
Hide file tree
Showing 19 changed files with 775 additions and 87 deletions.
140 changes: 140 additions & 0 deletions api-reference-v2/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -5537,6 +5537,11 @@
"description": "A list of allowed domains (glob patterns) where this link can be embedded / opened from",
"uniqueItems": true,
"nullable": true
},
"branding_visibility": {
"type": "boolean",
"description": "Toggle for HyperSwitch branding visibility",
"nullable": true
}
}
}
Expand Down Expand Up @@ -7882,6 +7887,61 @@
}
}
},
"ElementPosition": {
"type": "string",
"enum": [
"left",
"top left",
"top",
"top right",
"right",
"bottom right",
"bottom",
"bottom left",
"center"
]
},
"ElementSize": {
"oneOf": [
{
"type": "object",
"required": [
"Variants"
],
"properties": {
"Variants": {
"$ref": "#/components/schemas/SizeVariants"
}
}
},
{
"type": "object",
"required": [
"Percentage"
],
"properties": {
"Percentage": {
"type": "integer",
"format": "int32",
"minimum": 0
}
}
},
{
"type": "object",
"required": [
"Pixels"
],
"properties": {
"Pixels": {
"type": "integer",
"format": "int32",
"minimum": 0
}
}
}
]
},
"EnablePaymentLinkRequest": {
"type": "string",
"description": "Whether payment link is requested to be enabled or not for this transaction",
Expand Down Expand Up @@ -12540,6 +12600,35 @@
}
}
},
"PaymentLinkBackgroundImageConfig": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"description": "URL of the image",
"example": "https://hyperswitch.io/favicon.ico"
},
"position": {
"allOf": [
{
"$ref": "#/components/schemas/ElementPosition"
}
],
"nullable": true
},
"size": {
"allOf": [
{
"$ref": "#/components/schemas/ElementSize"
}
],
"nullable": true
}
}
},
"PaymentLinkConfig": {
"type": "object",
"required": [
Expand Down Expand Up @@ -12601,6 +12690,27 @@
},
"description": "Dynamic details related to merchant to be rendered in payment link",
"nullable": true
},
"background_image": {
"allOf": [
{
"$ref": "#/components/schemas/PaymentLinkBackgroundImageConfig"
}
],
"nullable": true
},
"details_layout": {
"allOf": [
{
"$ref": "#/components/schemas/PaymentLinkDetailsLayout"
}
],
"nullable": true
},
"branding_visibility": {
"type": "boolean",
"description": "Toggle for HyperSwitch branding visibility",
"nullable": true
}
}
},
Expand Down Expand Up @@ -12670,9 +12780,32 @@
},
"description": "Dynamic details related to merchant to be rendered in payment link",
"nullable": true
},
"background_image": {
"allOf": [
{
"$ref": "#/components/schemas/PaymentLinkBackgroundImageConfig"
}
],
"nullable": true
},
"details_layout": {
"allOf": [
{
"$ref": "#/components/schemas/PaymentLinkDetailsLayout"
}
],
"nullable": true
}
}
},
"PaymentLinkDetailsLayout": {
"type": "string",
"enum": [
"layout1",
"layout2"
]
},
"PaymentLinkInitiateRequest": {
"type": "object",
"required": [
Expand Down Expand Up @@ -20016,6 +20149,13 @@
}
]
},
"SizeVariants": {
"type": "string",
"enum": [
"cover",
"contain"
]
},
"StraightThroughAlgorithm": {
"oneOf": [
{
Expand Down
140 changes: 140 additions & 0 deletions api-reference/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -7974,6 +7974,11 @@
"description": "A list of allowed domains (glob patterns) where this link can be embedded / opened from",
"uniqueItems": true,
"nullable": true
},
"branding_visibility": {
"type": "boolean",
"description": "Toggle for HyperSwitch branding visibility",
"nullable": true
}
}
}
Expand Down Expand Up @@ -10268,6 +10273,61 @@
"none"
]
},
"ElementPosition": {
"type": "string",
"enum": [
"left",
"top left",
"top",
"top right",
"right",
"bottom right",
"bottom",
"bottom left",
"center"
]
},
"ElementSize": {
"oneOf": [
{
"type": "object",
"required": [
"Variants"
],
"properties": {
"Variants": {
"$ref": "#/components/schemas/SizeVariants"
}
}
},
{
"type": "object",
"required": [
"Percentage"
],
"properties": {
"Percentage": {
"type": "integer",
"format": "int32",
"minimum": 0
}
}
},
{
"type": "object",
"required": [
"Pixels"
],
"properties": {
"Pixels": {
"type": "integer",
"format": "int32",
"minimum": 0
}
}
}
]
},
"EnabledPaymentMethod": {
"type": "object",
"description": "Object for EnabledPaymentMethod",
Expand Down Expand Up @@ -15255,6 +15315,35 @@
}
}
},
"PaymentLinkBackgroundImageConfig": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"description": "URL of the image",
"example": "https://hyperswitch.io/favicon.ico"
},
"position": {
"allOf": [
{
"$ref": "#/components/schemas/ElementPosition"
}
],
"nullable": true
},
"size": {
"allOf": [
{
"$ref": "#/components/schemas/ElementSize"
}
],
"nullable": true
}
}
},
"PaymentLinkConfig": {
"type": "object",
"required": [
Expand Down Expand Up @@ -15316,6 +15405,27 @@
},
"description": "Dynamic details related to merchant to be rendered in payment link",
"nullable": true
},
"background_image": {
"allOf": [
{
"$ref": "#/components/schemas/PaymentLinkBackgroundImageConfig"
}
],
"nullable": true
},
"details_layout": {
"allOf": [
{
"$ref": "#/components/schemas/PaymentLinkDetailsLayout"
}
],
"nullable": true
},
"branding_visibility": {
"type": "boolean",
"description": "Toggle for HyperSwitch branding visibility",
"nullable": true
}
}
},
Expand Down Expand Up @@ -15385,9 +15495,32 @@
},
"description": "Dynamic details related to merchant to be rendered in payment link",
"nullable": true
},
"background_image": {
"allOf": [
{
"$ref": "#/components/schemas/PaymentLinkBackgroundImageConfig"
}
],
"nullable": true
},
"details_layout": {
"allOf": [
{
"$ref": "#/components/schemas/PaymentLinkDetailsLayout"
}
],
"nullable": true
}
}
},
"PaymentLinkDetailsLayout": {
"type": "string",
"enum": [
"layout1",
"layout2"
]
},
"PaymentLinkInitiateRequest": {
"type": "object",
"required": [
Expand Down Expand Up @@ -23934,6 +24067,13 @@
}
]
},
"SizeVariants": {
"type": "string",
"enum": [
"cover",
"contain"
]
},
"StraightThroughAlgorithm": {
"oneOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion config/deployments/production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ card.credit = { connector_list = "cybersource" } # Update Mandate sup
card.debit = { connector_list = "cybersource" } # Update Mandate supported payment method type and connector for card

[network_transaction_id_supported_connectors]
connector_list = "stripe,adyen,cybersource"
connector_list = "adyen"

[payouts]
payout_eligibility = true # Defaults the eligibility of a payout method to true in case connector does not provide checks for payout eligibility
Expand Down
Loading

0 comments on commit d11d874

Please sign in to comment.