import { IAction as IPayAction, ILocation, IMovieTicket, IOrderAsPayPurpose, IPlaceOrderRelatedInstrument, IRecipient as IPayRecipient } from '../action/trade/pay'; import { IAgentAsSeller, ISearchConditions as IBaseSearchConditions, IStartParams as IBaseStartParams, IAttributes as IBaseAttributes } from '../assetTransaction'; import { AssetTransactionType } from '../assetTransactionType'; import { IExtendId } from '../autoGenerated'; import { IInvoice } from '../invoice'; import { IMonetaryAmount } from '../monetaryAmount'; import { IEventServiceAsOrderedItem, IOrder, IReservationFor4EventServiceOrderedItem, ITotalPaymentDue } from '../order'; import { ICreditCard3DS, IUncheckedCardRaw, IUncheckedCardTokenized } from '../paymentMethod/paymentCard/creditCard'; import { IPropertyValue } from '../propertyValue'; import { IPotentialAction as IPotentialInformAction, PaymentServiceType } from '../service/paymentService'; export type IAgent = IAgentAsSeller; export type IRecipient = IPayRecipient; /** * ペイメントカードトークン */ export type ITokenizedPaymentCard = string; export type IFromLocation = ITokenizedPaymentCard; /** * クレジットカード決済承認に必要なクレジットカードインターフェース */ type ICreditCard = (IUncheckedCardRaw | IUncheckedCardTokenized) & ICreditCard3DS; export { ICreditCard, ICreditCard3DS, IUncheckedCardRaw, IUncheckedCardTokenized }; export interface IPaymentMethodAmount extends Pick { value: number; } export interface IPaymentMethod { /** * The identifier for the account the payment will be applied to. */ accountId?: string; /** * 追加特性 */ additionalProperty?: IPropertyValue[]; /** * The amount of money. * MonetaryAmount対応(2023-08-12~) */ amount: number | IPaymentMethodAmount; /** * 説明 */ description?: string; /** * 決済方法名称 * 未指定であればデフォルト値が使用されます */ name?: string; /** * The total amount due. */ totalPaymentDue?: ITotalPaymentDue; /** * 決済方法区分 */ identifier: string; /** * 出金元ペイメントカード */ fromLocation?: IFromLocation; /** * 決済カードリスト */ movieTickets?: IMovieTicket[]; /** * 支払い方法 */ method?: string; /** * クレジットカード情報 */ creditCard?: ICreditCard; } export interface IAccountsReceivableByServiceType { serviceType: string; accountsReceivable?: number; } export type IPayActionInObject = Pick; /** * 決済承認結果としての請求書に関連する注文アイテムとしての興行 */ export type IEventServiceAsInvoiceOrderedItem = Pick & { serviceOutput: { /** * 請求書に関連するイベント * 興行オファー承認のイベントリストと完全に一致する必要がある */ reservationFor: Pick; }; }; /** * 決済承認結果としての請求書に関連する注文アイテム */ export interface IInvoiceOrderedItem { typeOf: 'OrderItem'; orderedItem: IEventServiceAsInvoiceOrderedItem; } /** * 決済承認結果としての請求書に関連する注文 */ export interface IInvoiceReferenceOrder extends Pick { /** * 決済承認プロセスにおいて注文アイテムを指定された場合のみ定義される */ orderedItem?: IInvoiceOrderedItem[]; } /** * 関連注文情報を含む請求情報 */ export type IInvoiceAsPaymentServiceOutput = Pick & { referencesOrder: IInvoiceReferenceOrder; }; /** * 取引対象物 */ export interface IPaymentServiceAsObject { accountId: string; paymentMethodId: string; typeOf: PaymentServiceType; /** * 発行決済サービスID */ id: string; paymentMethod: IPaymentMethod; pendingTransaction?: never; accountsReceivablesByServiceType?: never; /** * 既存決済カード認証アクション(2024-12-13~) * PaymentServiceType.MovieTicketのみ */ checkedAction?: { id: string; }; serviceOutput?: IInvoiceAsPaymentServiceOutput; } export type IObject = IPaymentServiceAsObject; export interface IPaymentMethodWithoutDetail extends IPaymentMethod { /** * 取引開始前の指定ではnumberに限定 */ amount: number; } export interface IObjectWithoutDetail extends Pick { paymentMethod: IPaymentMethodWithoutDetail; } export type IPotentialAction = IPotentialInformAction; export type IOrderAsPurpose = IOrderAsPayPurpose; export type IPurpose = IOrderAsPurpose; export type IStartParamsWithoutDetail = IBaseStartParams & { location?: ILocation; recipient: IRecipient; /** * required(2025-02-12~) */ purpose: IPurpose; }; export interface IStartParams extends IBaseStartParams { location?: ILocation; recipient: IRecipient; potentialAction?: IPotentialAction[]; /** * add(2025-02-18~) */ instrument?: IPlaceOrderRelatedInstrument[]; } export interface IOptimizedPayAction4order { object: { paymentMethod: { /** * 決済取引番号 */ paymentMethodId: string; }; }; /** * 決済元の注文 */ purpose: Pick & { confirmationNumber: string; orderNumber: string; }; } export interface IPotentialActions { pay: IOptimizedPayAction4order[]; } export interface IPotentialActionsParams { pay: { purpose: IOrderAsPayPurpose; }; } /** * 確定パラメータ */ export interface IConfirmParams { id?: string; object?: { paymentMethod?: { identifier?: string; }; }; transactionNumber?: string; endDate?: Date; potentialActions: IPotentialActionsParams; } export type IResult = any; export type IError = any; export interface IAttributes extends IBaseAttributes { potentialAction?: IPotentialAction[]; } export type ITransaction = IExtendId; export interface ISearchConditions extends IBaseSearchConditions { object?: { accountId?: { $eq?: string; }; /** * 決済サービスタイプ */ typeOf?: { $eq?: string; }; }; }