UNPKG

@sumup/sdk

Version:

The official TypeScript SDK for the SumUp API

135 lines 4.82 kB
import type { CardResponse } from "./card-response"; import type { Device } from "./device"; import type { ElvCardAccount } from "./elv-card-account"; import type { Event } from "./event"; import type { HorizontalAccuracy } from "./horizontal-accuracy"; import type { Lat } from "./lat"; import type { Link } from "./link"; import type { Lon } from "./lon"; import type { Product } from "./product"; import type { TransactionBase } from "./transaction-base"; import type { TransactionCheckoutInfo } from "./transaction-checkout-info"; import type { TransactionEvent } from "./transaction-event"; import type { TransactionMixinHistory } from "./transaction-mixin-history"; /** * Transaction Full * * Full transaction resource with checkout, payout, and event details. */ export type TransactionFull = TransactionBase & TransactionCheckoutInfo & TransactionMixinHistory & { /** * External/foreign transaction id (passed by clients). */ foreign_transaction_id?: string; /** * Client transaction id. */ client_transaction_id?: string; /** * Email address of the registered user (merchant) to whom the payment is made. */ username?: string; /** * Transaction SumUp total fee amount. */ fee_amount?: number; lat?: Lat; lon?: Lon; horizontal_accuracy?: HorizontalAccuracy; /** * SumUp merchant internal Id. */ merchant_id?: number; device_info?: Device; /** * Simple name of the payment type. */ simple_payment_type?: "CASH" | "CC_SIGNATURE" | "ELV" | "ELV_WITHOUT_SIGNATURE" | "CC_CUSTOMER_ENTERED" | "MANUAL_ENTRY" | "EMV" | "RECURRING" | "BALANCE" | "MOTO" | "BOLETO" | "APM" | "BITCOIN" | "CARD"; /** * Verification method used for the transaction. */ verification_method?: "none" | "signature" | "offline PIN" | "online PIN" | "offline PIN + signature" | "na"; card?: CardResponse; elv_account?: ElvCardAccount; /** * Local date and time of the creation of the transaction. */ local_time?: string; /** * The date of the payout. */ payout_date?: string; /** * Payout type for the transaction. */ payout_type?: "BANK_ACCOUNT" | "PREPAID_CARD"; /** * Debit/Credit. */ process_as?: "CREDIT" | "DEBIT"; /** * List of products from the merchant's catalogue for which the transaction serves as a payment. */ products?: Product[]; /** * List of VAT rates applicable to the transaction. */ vat_rates?: { /** * VAT rate. */ rate?: number; /** * NET amount of products having this VAT rate applied. */ net?: number; /** * VAT amount of this rate applied. */ vat?: number; /** * Gross amount of products having this VAT rate applied. */ gross?: number; }[]; /** * Detailed list of events related to the transaction. */ transaction_events?: TransactionEvent[]; /** * High-level status of the transaction from the merchant's perspective. * * - `PENDING`: The payment has been initiated and is still being processed. A final outcome is not available yet. * - `SUCCESSFUL`: The payment was completed successfully. * - `PAID_OUT`: The payment was completed successfully and the funds have already been included in a payout to the merchant. * - `FAILED`: The payment did not complete successfully. * - `CANCELLED`: The payment was cancelled or reversed and is no longer payable or payable to the merchant. * - `CANCEL_FAILED`: An attempt to cancel or reverse the payment was not completed successfully. * - `REFUNDED`: The payment was refunded in full or in part. * - `REFUND_FAILED`: An attempt to refund the payment was not completed successfully. * - `CHARGEBACK`: The payment was subject to a chargeback. * - `NON_COLLECTION`: The amount could not be collected from the merchant after a chargeback or related adjustment. */ simple_status?: "SUCCESSFUL" | "PAID_OUT" | "CANCEL_FAILED" | "CANCELLED" | "CHARGEBACK" | "FAILED" | "REFUND_FAILED" | "REFUNDED" | "NON_COLLECTION" | "PENDING"; /** * List of hyperlinks for accessing related resources. */ links?: Link[]; /** * Compact list of events related to the transaction. */ events?: Event[]; /** * Details of the payment location as received from the payment terminal. */ location?: { lat?: Lat; lon?: Lon; horizontal_accuracy?: HorizontalAccuracy; }; /** * Indicates whether tax deduction is enabled for the transaction. */ tax_enabled?: boolean; }; //# sourceMappingURL=transaction-full.d.ts.map