UNPKG

@sumup/sdk

Version:

The official TypeScript SDK for the SumUp API

48 lines 2.38 kB
import type { Currency } from "./currency"; import type { HostedCheckout } from "./hosted-checkout"; /** * Checkout Create Request * * Request body for creating a checkout before processing payment. Define the payment amount, currency, merchant, and optional customer or redirect behavior here. */ export type CheckoutCreateRequest = { /** * Merchant-defined reference for the new checkout. It should be unique enough for you to identify the payment attempt in your own systems. */ checkout_reference: string; /** * Amount to be charged to the payer, expressed in major units. */ amount: number; currency: Currency; /** * Merchant account that should receive the payment. */ merchant_code: string; /** * Short merchant-defined description shown in SumUp tools and reporting for easier identification of the checkout. */ description?: string; /** * Optional backend callback URL used by SumUp to notify your platform about processing updates for the checkout. */ return_url?: string; /** * Merchant-scoped customer identifier. Required when setting up recurring payments and useful when the checkout should be linked to a returning payer. */ customer_id?: string; /** * Business purpose of the checkout. Use `CHECKOUT` for a standard payment and `SETUP_RECURRING_PAYMENT` when collecting consent and payment details for future recurring charges. */ purpose?: "CHECKOUT" | "SETUP_RECURRING_PAYMENT"; /** * Optional expiration timestamp. The checkout must be processed before this moment, otherwise it becomes unusable. If omitted, the checkout does not have an explicit expiry time. */ valid_until?: string | null; /** * 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. */ redirect_url?: string; hosted_checkout?: HostedCheckout; }; //# sourceMappingURL=checkout-create-request.d.ts.map