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 (#6831)
  • Loading branch information
kashif-m authored Dec 12, 2024
1 parent 546472d commit 4c2c05a
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 @@ -7857,6 +7862,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 @@ -12515,6 +12575,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 @@ -12576,6 +12665,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 @@ -12645,9 +12755,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 @@ -19981,6 +20114,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 @@ -10243,6 +10248,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 @@ -15230,6 +15290,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 @@ -15291,6 +15380,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 @@ -15360,9 +15470,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 @@ -23867,6 +24000,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 4c2c05a

Please sign in to comment.