From 7423d5e26bc945d11074486133865448211bde20 Mon Sep 17 00:00:00 2001 From: appscisumup Date: Fri, 24 Apr 2026 15:18:11 +0000 Subject: [PATCH 1/2] chore: synced local 'openapi.json' with remote 'specs/openapi.json' --- openapi.json | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 96 insertions(+), 1 deletion(-) diff --git a/openapi.json b/openapi.json index d046cfa..b838c21 100755 --- a/openapi.json +++ b/openapi.json @@ -152,7 +152,7 @@ "post": { "operationId": "CreateCheckout", "summary": "Create a checkout", - "description": "Creates a new payment checkout resource. The unique `checkout_reference` created by this request, is used for further manipulation of the checkout.\n\nFor 3DS checkouts, add the `redirect_url` parameter to your request body schema.\n\nFollow by processing a checkout to charge the provided payment instrument.", + "description": "Creates a new payment checkout resource. The unique `checkout_reference` created by this request, is used for further manipulation of the checkout.\n\nFor 3DS checkouts, add the `redirect_url` parameter to your request body schema.\nTo use the [Hosted Checkout](https://developer.sumup.com/online-payments/checkouts/hosted-checkout/) page, set the `hosted_checkout.enabled` to `true`.\n\nFollow by processing a checkout to charge the provided payment instrument.", "requestBody": { "description": "Details for creating a checkout resource.", "required": true, @@ -196,6 +196,20 @@ "merchant_code": "MH4H92C7", "redirect_url": "https://mysite.com/completed_purchase" } + }, + "HostedCheckout": { + "description": "Create a checkout with a SumUp-hosted payment page", + "x-beta": true, + "value": { + "checkout_reference": "b50pr914-6k0e-3091-a592-890010285b3d", + "amount": 12, + "currency": "EUR", + "merchant_code": "MCXXXXXX", + "description": "A sample checkout", + "hosted_checkout": { + "enabled": true + } + } } } } @@ -316,6 +330,27 @@ } ] } + }, + "HostedCheckout": { + "description": "Response body for a checkout with a SumUp-hosted payment page", + "value": { + "checkout_reference": "b50pr914-6k0e-3091-a592-890010285b3d", + "amount": 12, + "currency": "EUR", + "merchant_code": "MCXXXXXX", + "merchant_country": "DE", + "merchant_name": "Sample Shop", + "description": "A sample checkout", + "id": "64553e20-3f0e-49e4-8af3-fd0eca86ce91", + "status": "PENDING", + "date": "2000-01-01T12:49:24.899+00:00", + "purpose": "CHECKOUT", + "hosted_checkout": { + "enabled": true + }, + "hosted_checkout_url": "https://checkout.sumup.com/pay/8f9316a3-cda9-42a9-9771-54d534315676", + "transactions": [] + } } } } @@ -6610,6 +6645,21 @@ }, "title": "ELV Card Account" }, + "HostedCheckout": { + "description": "Hosted Checkout configuration. Enable it to receive a SumUp-hosted payment page URL in the checkout response.", + "type": "object", + "properties": { + "enabled": { + "description": "Whether the checkout should include a SumUp-hosted payment page.", + "type": "boolean", + "example": true + } + }, + "required": [ + "enabled" + ], + "title": "Hosted Checkout" + }, "Checkout": { "description": "Core checkout resource returned by the Checkouts API. A checkout is created before payment processing and then updated as payment attempts, redirects, and resulting transactions are attached to it.", "type": "object", @@ -6683,6 +6733,13 @@ "mandate": { "$ref": "#/components/schemas/MandateResponse" }, + "hosted_checkout_url": { + "description": "URL of the SumUp-hosted payment page that handles the payment flow. Returned when Hosted Checkout is enabled for the checkout.", + "type": "string", + "format": "uri", + "example": "https://checkout.sumup.com/pay/8f9316a3-cda9-42a9-9771-54d534315676", + "readOnly": true + }, "transactions": { "description": "Payment attempts and resulting transaction records linked to this checkout. Use the Transactions endpoints when you need the authoritative payment result and event history.", "type": "array", @@ -6778,6 +6835,9 @@ "description": "URL where the payer should be sent after a redirect-based payment or SCA flow completes. This is required for [APMs](https://developer.sumup.com/online-payments/apm/introduction) and recommended for card checkouts that may require [3DS](https://developer.sumup.com/online-payments/features/3ds). If it is omitted, the [Payment Widget](https://developer.sumup.com/online-payments/checkouts) can render the challenge in an iframe instead of using a full-page redirect.", "type": "string", "example": "https://mysite.com/completed_purchase" + }, + "hosted_checkout": { + "$ref": "#/components/schemas/HostedCheckout" } }, "required": [ @@ -10449,6 +10509,20 @@ "merchant_code": "MH4H92C7", "redirect_url": "https://mysite.com/completed_purchase" } + }, + "HostedCheckout": { + "description": "Create a checkout with a SumUp-hosted payment page", + "x-beta": true, + "value": { + "checkout_reference": "b50pr914-6k0e-3091-a592-890010285b3d", + "amount": 12, + "currency": "EUR", + "merchant_code": "MCXXXXXX", + "description": "A sample checkout", + "hosted_checkout": { + "enabled": true + } + } } } } @@ -10709,6 +10783,27 @@ } ] } + }, + "HostedCheckout": { + "description": "Response body for a checkout with a SumUp-hosted payment page", + "value": { + "checkout_reference": "b50pr914-6k0e-3091-a592-890010285b3d", + "amount": 12, + "currency": "EUR", + "merchant_code": "MCXXXXXX", + "merchant_country": "DE", + "merchant_name": "Sample Shop", + "description": "A sample checkout", + "id": "64553e20-3f0e-49e4-8af3-fd0eca86ce91", + "status": "PENDING", + "date": "2000-01-01T12:49:24.899+00:00", + "purpose": "CHECKOUT", + "hosted_checkout": { + "enabled": true + }, + "hosted_checkout_url": "https://checkout.sumup.com/pay/8f9316a3-cda9-42a9-9771-54d534315676", + "transactions": [] + } } } } From e6f2603dcd2f8801651715c18e7c55c8acb6cba2 Mon Sep 17 00:00:00 2001 From: "sumup-bot[bot]" <241716704+sumup-bot[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 15:19:34 +0000 Subject: [PATCH 2/2] chore: generate code --- src/Types/Checkout.php | 7 +++++++ src/Types/CheckoutCreateRequest.php | 12 +++++++++++- src/Types/CheckoutSuccess.php | 7 +++++++ src/Types/HostedCheckout.php | 19 +++++++++++++++++++ 4 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 src/Types/HostedCheckout.php diff --git a/src/Types/Checkout.php b/src/Types/Checkout.php index faeeb7a..d75c5ff 100644 --- a/src/Types/Checkout.php +++ b/src/Types/Checkout.php @@ -93,6 +93,13 @@ class Checkout */ public ?MandateResponse $mandate = null; + /** + * URL of the SumUp-hosted payment page that handles the payment flow. Returned when Hosted Checkout is enabled for the checkout. + * + * @var string|null + */ + public ?string $hostedCheckoutUrl = null; + /** * Payment attempts and resulting transaction records linked to this checkout. Use the Transactions endpoints when you need the authoritative payment result and event history. * diff --git a/src/Types/CheckoutCreateRequest.php b/src/Types/CheckoutCreateRequest.php index fb7abab..dce1d6d 100644 --- a/src/Types/CheckoutCreateRequest.php +++ b/src/Types/CheckoutCreateRequest.php @@ -79,6 +79,13 @@ class CheckoutCreateRequest */ public ?string $redirectUrl = null; + /** + * Hosted Checkout configuration. Enable it to receive a SumUp-hosted payment page URL in the checkout response. + * + * @var HostedCheckout|null + */ + public ?HostedCheckout $hostedCheckout = null; + /** * Create request DTO. * @@ -92,6 +99,7 @@ class CheckoutCreateRequest * @param CheckoutCreateRequestPurpose|string|null $purpose * @param string|null $validUntil * @param string|null $redirectUrl + * @param HostedCheckout|null $hostedCheckout */ public function __construct( string $checkoutReference, @@ -103,7 +111,8 @@ public function __construct( ?string $customerId = null, CheckoutCreateRequestPurpose|string|null $purpose = null, ?string $validUntil = null, - ?string $redirectUrl = null + ?string $redirectUrl = null, + ?HostedCheckout $hostedCheckout = null ) { \SumUp\Hydrator::hydrate([ 'checkout_reference' => $checkoutReference, @@ -116,6 +125,7 @@ public function __construct( 'purpose' => $purpose, 'valid_until' => $validUntil, 'redirect_url' => $redirectUrl, + 'hosted_checkout' => $hostedCheckout, ], self::class, $this); } diff --git a/src/Types/CheckoutSuccess.php b/src/Types/CheckoutSuccess.php index d193cb3..b010083 100644 --- a/src/Types/CheckoutSuccess.php +++ b/src/Types/CheckoutSuccess.php @@ -93,6 +93,13 @@ class CheckoutSuccess */ public ?MandateResponse $mandate = null; + /** + * URL of the SumUp-hosted payment page that handles the payment flow. Returned when Hosted Checkout is enabled for the checkout. + * + * @var string|null + */ + public ?string $hostedCheckoutUrl = null; + /** * Payment attempts and resulting transaction records linked to this checkout. Use the Transactions endpoints when you need the authoritative payment result and event history. * diff --git a/src/Types/HostedCheckout.php b/src/Types/HostedCheckout.php new file mode 100644 index 0000000..d94b6e1 --- /dev/null +++ b/src/Types/HostedCheckout.php @@ -0,0 +1,19 @@ +