UNPKG

@sumup/sdk

Version:

The official TypeScript SDK for the SumUp API

62 lines 2.93 kB
import type { Currency } from "./currency"; import type { MandateResponse } from "./mandate-response"; import type { TransactionBase } from "./transaction-base"; import type { TransactionCheckoutInfo } from "./transaction-checkout-info"; /** * Checkout * * 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. */ export type Checkout = { /** * Merchant-defined reference for the checkout. Use it to correlate the SumUp checkout with your own order, cart, subscription, or payment attempt in your systems. */ checkout_reference?: string; /** * Amount to be charged to the payer, expressed in major units. */ amount?: number; currency?: Currency; /** * Merchant account that receives the payment. */ merchant_code?: string; /** * Short merchant-defined description shown in SumUp tools and reporting. Use it to make the checkout easier to recognize in dashboards, support workflows, and reconciliation. */ description?: string; /** * Optional backend callback URL used by SumUp to notify your platform about processing updates for the checkout. */ return_url?: string; /** * Unique SumUp identifier of the checkout resource. */ readonly id?: string; /** * Current high-level state of the checkout. `PENDING` means the checkout exists but is not yet completed, `PAID` means a payment succeeded, `FAILED` means the latest processing attempt failed, and `EXPIRED` means the checkout can no longer be processed. */ status?: "PENDING" | "FAILED" | "PAID" | "EXPIRED"; /** * Date and time of the creation of the payment checkout. Response format expressed according to [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) code. */ date?: string; /** * 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; /** * Merchant-scoped identifier of the customer associated with the checkout. Use it when storing payment instruments or reusing saved customer context for recurring and returning-payer flows. */ customer_id?: string; mandate?: MandateResponse; /** * URL of the SumUp-hosted payment page that handles the payment flow. Returned when Hosted Checkout is enabled for the checkout. */ readonly hosted_checkout_url?: string; /** * Payment attempts and resulting transaction records linked to this checkout. Use the Transactions endpoints when you need the authoritative payment result and event history. */ transactions?: (TransactionBase & TransactionCheckoutInfo)[]; }; //# sourceMappingURL=checkout.d.cts.map