Class: PaymentSettingsService
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:89
Extends
BaseService
Constructors
Constructor
new PaymentSettingsService(
client):PaymentSettingsService
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:12
Parameters
client
Returns
PaymentSettingsService
Inherited from
BaseService.constructor
Properties
client
protectedclient:TanqoryClient
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:10
Inherited from
BaseService.client
Methods
acceptDispute()
acceptDispute(
storeId,disputeId):Promise<{amount:number;chargeId?:string;createdAt:string;createdDate:string;currency:string;customerEmail?:string;customerName?:string;disputeId:string;dueDate:string;id:string;networkReasonCode?:string;orderId?:string;outcome?:"LOST"|"WON";paymentIntentId?:string;reason:"DUPLICATE"|"GENERAL"|"FRAUDULENT"|"SUBSCRIPTION_CANCELED"|"PRODUCT_UNACCEPTABLE"|"PRODUCT_NOT_RECEIVED"|"UNRECOGNIZED"|"CREDIT_NOT_PROCESSED"|"INCORRECT_ACCOUNT_DETAILS"|"INSUFFICIENT_FUNDS"|"BANK_CANNOT_PROCESS"|"DEBIT_NOT_AUTHORIZED"|"CUSTOMER_INITIATED";resolvedAt?:string;status:"ACCEPTED"|"LOST"|"WON"|"NEEDS_RESPONSE"|"UNDER_REVIEW"|"CHARGE_REFUNDED";storeId:string;updatedAt:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:833
Accept a dispute
Accepts/concedes the dispute to the customer. This action cannot be undone.
Parameters
storeId
string
Store identifier
disputeId
string
Dispute identifier
Returns
Promise<{ amount: number; chargeId?: string; createdAt: string; createdDate: string; currency: string; customerEmail?: string; customerName?: string; disputeId: string; dueDate: string; id: string; networkReasonCode?: string; orderId?: string; outcome?: "LOST" | "WON"; paymentIntentId?: string; reason: "DUPLICATE" | "GENERAL" | "FRAUDULENT" | "SUBSCRIPTION_CANCELED" | "PRODUCT_UNACCEPTABLE" | "PRODUCT_NOT_RECEIVED" | "UNRECOGNIZED" | "CREDIT_NOT_PROCESSED" | "INCORRECT_ACCOUNT_DETAILS" | "INSUFFICIENT_FUNDS" | "BANK_CANNOT_PROCESS" | "DEBIT_NOT_AUTHORIZED" | "CUSTOMER_INITIATED"; resolvedAt?: string; status: "ACCEPTED" | "LOST" | "WON" | "NEEDS_RESPONSE" | "UNDER_REVIEW" | "CHARGE_REFUNDED"; storeId: string; updatedAt: string; }>
Updated dispute
Example
const dispute = await client.paymentSettings.acceptDispute('store-123', 'dispute-456')
console.log(dispute.status) // 'LOST'
buildQuery()
protectedbuildQuery(options?):Record<string,any>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:26
Build query parameters
Parameters
options?
Returns
Record<string, any>
Inherited from
BaseService.buildQuery
createBankAccount()
createBankAccount(
storeId,data):Promise<{accountHolderName:string;accountHolderType:"COMPANY"|"INDIVIDUAL";accountNumberLast4:string;accountType:"CHECKING"|"SAVINGS";bankCode?:string;bankName:string;branchCode?:string;branchName?:string;country:string;createdAt:string;currency:string;iban?:string;id:string;isDefault:boolean;isVerified:boolean;routingNumber?:string;storeId:string;swiftCode?:string;updatedAt:string;verifiedAt?:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:559
Create a new bank account
Adds a new bank account for receiving payouts. The first account added automatically becomes the default.
Parameters
storeId
string
Store identifier
data
Bank account details
accountHolderName
string
accountHolderType
"COMPANY" | "INDIVIDUAL"
accountNumber
string
accountType
"CHECKING" | "SAVINGS"
bankCode?
string
bankName
string
branchCode?
string
branchName?
string
country
string
currency
string
iban?
string
isDefault
boolean
routingNumber?
string
swiftCode?
string
Returns
Promise<{ accountHolderName: string; accountHolderType: "COMPANY" | "INDIVIDUAL"; accountNumberLast4: string; accountType: "CHECKING" | "SAVINGS"; bankCode?: string; bankName: string; branchCode?: string; branchName?: string; country: string; createdAt: string; currency: string; iban?: string; id: string; isDefault: boolean; isVerified: boolean; routingNumber?: string; storeId: string; swiftCode?: string; updatedAt: string; verifiedAt?: string; }>
Created bank account
Example
const account = await client.paymentSettings.createBankAccount('store-123', {
accountHolderName: 'My Company Ltd.',
accountHolderType: 'COMPANY',
bankName: 'Bangkok Bank',
bankCode: '002',
accountNumber: '1234567890',
accountType: 'SAVINGS',
currency: 'THB',
country: 'TH',
})
createManualMethod()
createManualMethod(
storeId,data):Promise<{accountName?:string;accountNumber?:string;additionalDetails?:string;bankName?:string;branchCode?:string;createdAt:string;id:string;isActive:boolean;name:string;paymentInstructions?:string;sortOrder:number;storeId:string;swiftCode?:string;type:"CASH_ON_DELIVERY"|"CUSTOM"|"BANK_TRANSFER"|"BANK_DEPOSIT"|"MONEY_ORDER"|"CHECK";updatedAt:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:427
Create a new manual payment method
Adds a new manual payment method like Bank Deposit, COD, or custom method.
Parameters
storeId
string
Store identifier
data
Method configuration
accountName?
string
accountNumber?
string
additionalDetails?
string
bankName?
string
branchCode?
string
name
string
paymentInstructions?
string
swiftCode?
string
type
"CASH_ON_DELIVERY" | "CUSTOM" | "BANK_TRANSFER" | "BANK_DEPOSIT" | "MONEY_ORDER" | "CHECK"
Returns
Promise<{ accountName?: string; accountNumber?: string; additionalDetails?: string; bankName?: string; branchCode?: string; createdAt: string; id: string; isActive: boolean; name: string; paymentInstructions?: string; sortOrder: number; storeId: string; swiftCode?: string; type: "CASH_ON_DELIVERY" | "CUSTOM" | "BANK_TRANSFER" | "BANK_DEPOSIT" | "MONEY_ORDER" | "CHECK"; updatedAt: string; }>
Created manual payment method
Example
const method = await client.paymentSettings.createManualMethod('store-123', {
type: 'BANK_DEPOSIT',
name: 'Bank Transfer',
instructions: 'Please transfer to account 123-456-789',
paymentInstructions: 'Include order number in transfer reference',
})
createProvider()
createProvider(
storeId,data):Promise<{configuration?:Record<string,unknown>;createdAt:string;displayName:string;id:string;isPrimary:boolean;isTestMode:boolean;lastErrorMessage?:string;lastTestedAt?:string;providerType:"MANUAL"|"STRIPE"|"PAYPAL"|"OMISE"|"XENDIT"|"TWO_C2P"|"GBPRIMEPAY"|"IPAY88";slug:string;sortOrder:number;status:"PENDING"|"ACTIVE"|"SUSPENDED"|"INACTIVE"|"ERROR";storeId:string;supportedCurrencies:string[];supportedMethods:string[];updatedAt:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:206
Create a new payment provider
Adds a new payment provider (Stripe, PayPal, Omise, etc.) to the store. The first provider added automatically becomes the primary provider.
Parameters
storeId
string
Store identifier
data
Provider configuration
configuration?
Record<string, unknown>
displayName
string
isPrimary
boolean
isTestMode
boolean
livePublicKey?
string
liveSecretKey?
string
oauthCode?
string
providerType
"MANUAL" | "STRIPE" | "PAYPAL" | "OMISE" | "XENDIT" | "TWO_C2P" | "GBPRIMEPAY" | "IPAY88"
supportedCurrencies
string[]
supportedMethods
string[]
testPublicKey?
string
testSecretKey?
string
webhookSecret?
string
Returns
Promise<{ configuration?: Record<string, unknown>; createdAt: string; displayName: string; id: string; isPrimary: boolean; isTestMode: boolean; lastErrorMessage?: string; lastTestedAt?: string; providerType: "MANUAL" | "STRIPE" | "PAYPAL" | "OMISE" | "XENDIT" | "TWO_C2P" | "GBPRIMEPAY" | "IPAY88"; slug: string; sortOrder: number; status: "PENDING" | "ACTIVE" | "SUSPENDED" | "INACTIVE" | "ERROR"; storeId: string; supportedCurrencies: string[]; supportedMethods: string[]; updatedAt: string; }>
Created payment provider
Example
const provider = await client.paymentSettings.createProvider('store-123', {
providerType: 'STRIPE',
displayName: 'Credit Card (Stripe)',
testPublicKey: 'pk_test_...',
testSecretKey: 'sk_test_...',
isTestMode: true,
})
deleteBankAccount()
deleteBankAccount(
storeId,accountId):Promise<void>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:597
Delete a bank account
Cannot delete the default account while other accounts exist.
Parameters
storeId
string
Store identifier
accountId
string
Account identifier
Returns
Promise<void>
deleteManualMethod()
deleteManualMethod(
storeId,methodId):Promise<void>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:467
Delete a manual payment method
Parameters
storeId
string
Store identifier
methodId
string
Method identifier
Returns
Promise<void>
deleteProvider()
deleteProvider(
storeId,providerId):Promise<void>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:266
Delete a payment provider
Removes a payment provider from the store. Cannot delete the primary provider while other providers exist.
Parameters
storeId
string
Store identifier
providerId
string
Provider identifier
Returns
Promise<void>
Example
await client.paymentSettings.deleteProvider('store-123', 'provider-456')
disconnectOAuth()
disconnectOAuth(
data):Promise<void>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:883
Disconnect OAuth provider
Disconnects an OAuth-connected payment provider. This revokes the OAuth access and removes the provider.
Parameters
data
Disconnect request parameters
providerId
string
revokeAccess
boolean
Returns
Promise<void>
Example
await client.paymentSettings.disconnectOAuth({
storeId: 'store-123',
providerId: 'provider-456',
})
generateIdempotencyKey()
protectedgenerateIdempotencyKey(prefix):string
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:19
Generate idempotency key
Parameters
prefix
string
Returns
string
Inherited from
BaseService.generateIdempotencyKey
getBankAccount()
getBankAccount(
storeId,accountId):Promise<{accountHolderName:string;accountHolderType:"COMPANY"|"INDIVIDUAL";accountNumberLast4:string;accountType:"CHECKING"|"SAVINGS";bankCode?:string;bankName:string;branchCode?:string;branchName?:string;country:string;createdAt:string;currency:string;iban?:string;id:string;isDefault:boolean;isVerified:boolean;routingNumber?:string;storeId:string;swiftCode?:string;updatedAt:string;verifiedAt?:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:531
Get a specific bank account
Parameters
storeId
string
Store identifier
accountId
string
Account identifier
Returns
Promise<{ accountHolderName: string; accountHolderType: "COMPANY" | "INDIVIDUAL"; accountNumberLast4: string; accountType: "CHECKING" | "SAVINGS"; bankCode?: string; bankName: string; branchCode?: string; branchName?: string; country: string; createdAt: string; currency: string; iban?: string; id: string; isDefault: boolean; isVerified: boolean; routingNumber?: string; storeId: string; swiftCode?: string; updatedAt: string; verifiedAt?: string; }>
Bank account details
getCatalog()
getCatalog(
storeId,query?):Promise<{byCategory?:Partial<Record<"OTHER"|"CRYPTO"|"CARD"|"WALLET"|"BANK_TRANSFER"|"BNPL"|"COD"|"INSTALLMENT"|"QR_CODE",object[]>>;country:string;providers:object[];total:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:335
Get payment provider catalog for a store
Returns all available payment providers filtered by the store's country. Country is auto-detected from StoreSettings.region (set in General Settings). Providers are fetched from the global Policy database.
Parameters
storeId
string
Store identifier
query?
Optional filter parameters
availability?
"AVAILABLE" | "COMING_SOON" | "PARTNER_REQUIRED" | "ENTERPRISE_ONLY" | "REGION_RESTRICTED" | "NOT_SUPPORTED" | "HIDDEN"
category?
"OTHER" | "CRYPTO" | "CARD" | "WALLET" | "BANK_TRANSFER" | "BNPL" | "COD" | "INSTALLMENT" | "QR_CODE"
configType?
"OAUTH" | "API_KEYS"
includeDevOnly?
boolean
isPopular?
boolean
paymentMethod?
string
search?
string
thaiEntityOk?
boolean
tier?
"LOCAL" | "GLOBAL" | "REGIONAL" | "VIA_PARTNER"
type?
"MANUAL" | "EXTERNAL" | "NATIVE"
Returns
Promise<{ byCategory?: Partial<Record<"OTHER" | "CRYPTO" | "CARD" | "WALLET" | "BANK_TRANSFER" | "BNPL" | "COD" | "INSTALLMENT" | "QR_CODE", object[]>>; country: string; providers: object[]; total: number; }>
Payment provider catalog with providers grouped by category
Example
// Get all providers for store's country
const catalog = await client.paymentSettings.getCatalog('store-123')
console.log(`Country: ${catalog.country}`)
console.log(`Total providers: ${catalog.total}`)
// Filter by category
const cards = await client.paymentSettings.getCatalog('store-123', {
category: 'CARD'
})
// Search providers
const stripe = await client.paymentSettings.getCatalog('store-123', {
search: 'stripe'
})
getCatalogProvider()
getCatalogProvider(
storeId,slug):Promise<{availability:"AVAILABLE"|"COMING_SOON"|"PARTNER_REQUIRED"|"ENTERPRISE_ONLY"|"REGION_RESTRICTED"|"NOT_SUPPORTED"|"HIDDEN";availabilityEta?:string;availabilityReason?:string;category:"OTHER"|"CRYPTO"|"CARD"|"WALLET"|"BANK_TRANSFER"|"BNPL"|"COD"|"INSTALLMENT"|"QR_CODE";company?:string;configType:"OAUTH"|"API_KEYS";countries:string[];createdAt:string;credentials?:Record<string,unknown>;currency?:string;description?:string;devOnly:boolean;displayOrder:number;docsUrl?:string;documentationUrl?:string;features?: {disputeHandling?:boolean;installments?: {banks?:string[];cardTypes?:string[];interestBearer?:"customer"|"merchant"|"split"|"zero";interestRate?:number;maxAmount?:number;minAmount?:number;supported:boolean;terms?:number[]; };multiCurrency?:boolean;payouts?:boolean;platformPayments?:boolean;preAuth?:boolean;recurring?: {minInterval?:"daily"|"weekly"|"monthly"|"yearly";pauseSupported?:boolean;supported:boolean;tokenization?:boolean;trialSupported?:boolean;webhookEvents?:string[]; };refund?: {instantRefund?:boolean;maxDays?:number;partial?:boolean;supported:boolean; };savedCards?:boolean;threeDS?: {required?:boolean;supported:boolean;version?:"1.0"|"2.0"|"2.1"|"2.2"; }; };fees?:string;fixedFee?:number;id:string;isActive:boolean;isPopular:boolean;logoUrl?:string;name:string;paymentMethods:string[];priority:number;regions:string[];registrationUrl?:string;requiresApiKey:boolean;requiresWebhook:boolean;sandboxSupported:boolean;slug:string;thaiEntityOk:boolean;tier:"LOCAL"|"GLOBAL"|"REGIONAL"|"VIA_PARTNER";transactionFee?:number;type:"MANUAL"|"EXTERNAL"|"NATIVE";updatedAt:string;websiteUrl?:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:361
Get a specific provider from the catalog by slug
Parameters
storeId
string
Store identifier
slug
string
Provider slug (e.g., 'stripe', 'omise', 'paypal')
Returns
Promise<{ availability: "AVAILABLE" | "COMING_SOON" | "PARTNER_REQUIRED" | "ENTERPRISE_ONLY" | "REGION_RESTRICTED" | "NOT_SUPPORTED" | "HIDDEN"; availabilityEta?: string; availabilityReason?: string; category: "OTHER" | "CRYPTO" | "CARD" | "WALLET" | "BANK_TRANSFER" | "BNPL" | "COD" | "INSTALLMENT" | "QR_CODE"; company?: string; configType: "OAUTH" | "API_KEYS"; countries: string[]; createdAt: string; credentials?: Record<string, unknown>; currency?: string; description?: string; devOnly: boolean; displayOrder: number; docsUrl?: string; documentationUrl?: string; features?: { disputeHandling?: boolean; installments?: { banks?: string[]; cardTypes?: string[]; interestBearer?: "customer" | "merchant" | "split" | "zero"; interestRate?: number; maxAmount?: number; minAmount?: number; supported: boolean; terms?: number[]; }; multiCurrency?: boolean; payouts?: boolean; platformPayments?: boolean; preAuth?: boolean; recurring?: { minInterval?: "daily" | "weekly" | "monthly" | "yearly"; pauseSupported?: boolean; supported: boolean; tokenization?: boolean; trialSupported?: boolean; webhookEvents?: string[]; }; refund?: { instantRefund?: boolean; maxDays?: number; partial?: boolean; supported: boolean; }; savedCards?: boolean; threeDS?: { required?: boolean; supported: boolean; version?: "1.0" | "2.0" | "2.1" | "2.2"; }; }; fees?: string; fixedFee?: number; id: string; isActive: boolean; isPopular: boolean; logoUrl?: string; name: string; paymentMethods: string[]; priority: number; regions: string[]; registrationUrl?: string; requiresApiKey: boolean; requiresWebhook: boolean; sandboxSupported: boolean; slug: string; thaiEntityOk: boolean; tier: "LOCAL" | "GLOBAL" | "REGIONAL" | "VIA_PARTNER"; transactionFee?: number; type: "MANUAL" | "EXTERNAL" | "NATIVE"; updatedAt: string; websiteUrl?: string; }>
Provider details from catalog
Example
const omise = await client.paymentSettings.getCatalogProvider('store-123', 'omise')
console.log(`Name: ${omise.name}`)
console.log(`Payment methods: ${omise.paymentMethods.join(', ')}`)
console.log(`Transaction fee: ${omise.transactionFee}%`)
getDispute()
getDispute(
storeId,disputeId):Promise<{amount:number;chargeId?:string;createdAt:string;createdDate:string;currency:string;customerEmail?:string;customerName?:string;disputeId:string;dueDate:string;evidence:object[];id:string;networkReasonCode?:string;orderId?:string;outcome?:"LOST"|"WON";paymentIntentId?:string;reason:"DUPLICATE"|"GENERAL"|"FRAUDULENT"|"SUBSCRIPTION_CANCELED"|"PRODUCT_UNACCEPTABLE"|"PRODUCT_NOT_RECEIVED"|"UNRECOGNIZED"|"CREDIT_NOT_PROCESSED"|"INCORRECT_ACCOUNT_DETAILS"|"INSUFFICIENT_FUNDS"|"BANK_CANNOT_PROCESS"|"DEBIT_NOT_AUTHORIZED"|"CUSTOMER_INITIATED";resolvedAt?:string;status:"ACCEPTED"|"LOST"|"WON"|"NEEDS_RESPONSE"|"UNDER_REVIEW"|"CHARGE_REFUNDED";storeId:string;updatedAt:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:771
Get a dispute with evidence
Retrieves a specific dispute with all submitted evidence.
Parameters
storeId
string
Store identifier
disputeId
string
Dispute identifier
Returns
Promise<{ amount: number; chargeId?: string; createdAt: string; createdDate: string; currency: string; customerEmail?: string; customerName?: string; disputeId: string; dueDate: string; evidence: object[]; id: string; networkReasonCode?: string; orderId?: string; outcome?: "LOST" | "WON"; paymentIntentId?: string; reason: "DUPLICATE" | "GENERAL" | "FRAUDULENT" | "SUBSCRIPTION_CANCELED" | "PRODUCT_UNACCEPTABLE" | "PRODUCT_NOT_RECEIVED" | "UNRECOGNIZED" | "CREDIT_NOT_PROCESSED" | "INCORRECT_ACCOUNT_DETAILS" | "INSUFFICIENT_FUNDS" | "BANK_CANNOT_PROCESS" | "DEBIT_NOT_AUTHORIZED" | "CUSTOMER_INITIATED"; resolvedAt?: string; status: "ACCEPTED" | "LOST" | "WON" | "NEEDS_RESPONSE" | "UNDER_REVIEW" | "CHARGE_REFUNDED"; storeId: string; updatedAt: string; }>
Dispute details with evidence
Example
const dispute = await client.paymentSettings.getDispute('store-123', 'dispute-456')
console.log(`Status: ${dispute.status}`)
console.log(`Evidence count: ${dispute.evidence.length}`)
getExportMimeType()
protectedgetExportMimeType(format):string
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/base.ts:45
Get MIME type for export format
Parameters
format
string
Returns
string
Inherited from
BaseService.getExportMimeType
getManualMethod()
getManualMethod(
storeId,methodId):Promise<{accountName?:string;accountNumber?:string;additionalDetails?:string;bankName?:string;branchCode?:string;createdAt:string;id:string;isActive:boolean;name:string;paymentInstructions?:string;sortOrder:number;storeId:string;swiftCode?:string;type:"CASH_ON_DELIVERY"|"CUSTOM"|"BANK_TRANSFER"|"BANK_DEPOSIT"|"MONEY_ORDER"|"CHECK";updatedAt:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:401
Get a specific manual payment method
Parameters
storeId
string
Store identifier
methodId
string
Method identifier
Returns
Promise<{ accountName?: string; accountNumber?: string; additionalDetails?: string; bankName?: string; branchCode?: string; createdAt: string; id: string; isActive: boolean; name: string; paymentInstructions?: string; sortOrder: number; storeId: string; swiftCode?: string; type: "CASH_ON_DELIVERY" | "CUSTOM" | "BANK_TRANSFER" | "BANK_DEPOSIT" | "MONEY_ORDER" | "CHECK"; updatedAt: string; }>
Manual payment method details
getOAuthUrl()
getOAuthUrl(
data):Promise<{authorizationUrl:string;expiresAt:string;state:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:861
Get OAuth authorization URL
Generates an OAuth authorization URL for connecting a payment provider (Stripe Connect, PayPal).
Parameters
data
OAuth request parameters
isTestMode
boolean
providerType
"STRIPE" | "PAYPAL"
redirectUri?
string
Returns
Promise<{ authorizationUrl: string; expiresAt: string; state: string; }>
Authorization URL to redirect the user to
Example
const { authorizationUrl } = await client.paymentSettings.getOAuthUrl({
storeId: 'store-123',
providerType: 'STRIPE',
isTestMode: true,
})
// Redirect user to authorizationUrl
window.location.href = authorizationUrl
getOrderTransactions()
getOrderTransactions(
storeId,orderId):Promise<object[]>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:1013
Get transactions for an order
Retrieves all transactions associated with a specific order.
Parameters
storeId
string
Store identifier
orderId
string
Order identifier
Returns
Promise<object[]>
List of transactions for the order
Example
const transactions = await client.paymentSettings.getOrderTransactions(
'store-123',
'order-789'
)
getPayout()
getPayout(
storeId,payoutId):Promise<{amount:number;arrivedAt?:string;bankAccount?: {accountHolderName:string;accountHolderType:"COMPANY"|"INDIVIDUAL";accountNumberLast4:string;accountType:"CHECKING"|"SAVINGS";bankCode?:string;bankName:string;branchCode?:string;branchName?:string;country:string;createdAt:string;currency:string;iban?:string;id:string;isDefault:boolean;isVerified:boolean;routingNumber?:string;storeId:string;swiftCode?:string;updatedAt:string;verifiedAt?:string; };bankAccountId:string;createdAt:string;currency:string;expectedArrivalDate?:string;failureCode?:string;failureMessage?:string;fee:number;id:string;netAmount:number;paypalPayoutId?:string;periodEnd:string;periodStart:string;status:"PENDING"|"FAILED"|"IN_TRANSIT"|"PAID"|"CANCELED";storeId:string;stripePayoutId?:string;updatedAt:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:693
Get a specific payout
Parameters
storeId
string
Store identifier
payoutId
string
Payout identifier
Returns
Promise<{ amount: number; arrivedAt?: string; bankAccount?: { accountHolderName: string; accountHolderType: "COMPANY" | "INDIVIDUAL"; accountNumberLast4: string; accountType: "CHECKING" | "SAVINGS"; bankCode?: string; bankName: string; branchCode?: string; branchName?: string; country: string; createdAt: string; currency: string; iban?: string; id: string; isDefault: boolean; isVerified: boolean; routingNumber?: string; storeId: string; swiftCode?: string; updatedAt: string; verifiedAt?: string; }; bankAccountId: string; createdAt: string; currency: string; expectedArrivalDate?: string; failureCode?: string; failureMessage?: string; fee: number; id: string; netAmount: number; paypalPayoutId?: string; periodEnd: string; periodStart: string; status: "PENDING" | "FAILED" | "IN_TRANSIT" | "PAID" | "CANCELED"; storeId: string; stripePayoutId?: string; updatedAt: string; }>
Payout details
getPayoutSchedule()
getPayoutSchedule(
storeId):Promise<{createdAt:string;currency:string;dayOfMonth?:number;dayOfWeek?:number;frequency:"MONTHLY"|"WEEKLY"|"DAILY";id:string;isEnabled:boolean;minimumAmount:number;payoutDelayDays:number;scheduleType:"MANUAL"|"AUTOMATIC";storeId:string;updatedAt:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:620
Get payout schedule
Retrieves the payout schedule configuration.
Parameters
storeId
string
Store identifier
Returns
Promise<{ createdAt: string; currency: string; dayOfMonth?: number; dayOfWeek?: number; frequency: "MONTHLY" | "WEEKLY" | "DAILY"; id: string; isEnabled: boolean; minimumAmount: number; payoutDelayDays: number; scheduleType: "MANUAL" | "AUTOMATIC"; storeId: string; updatedAt: string; }>
Payout schedule configuration
Example
const schedule = await client.paymentSettings.getPayoutSchedule('store-123')
console.log(`Payout frequency: ${schedule.frequency}`)
console.log(`Next payout: ${schedule.nextPayoutDate}`)
getProvider()
getProvider(
storeId,providerId):Promise<{configuration?:Record<string,unknown>;createdAt:string;displayName:string;id:string;isPrimary:boolean;isTestMode:boolean;lastErrorMessage?:string;lastTestedAt?:string;providerType:"MANUAL"|"STRIPE"|"PAYPAL"|"OMISE"|"XENDIT"|"TWO_C2P"|"GBPRIMEPAY"|"IPAY88";slug:string;sortOrder:number;status:"PENDING"|"ACTIVE"|"SUSPENDED"|"INACTIVE"|"ERROR";storeId:string;supportedCurrencies:string[];supportedMethods:string[];updatedAt:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:178
Get a specific payment provider
Parameters
storeId
string
Store identifier
providerId
string
Provider identifier
Returns
Promise<{ configuration?: Record<string, unknown>; createdAt: string; displayName: string; id: string; isPrimary: boolean; isTestMode: boolean; lastErrorMessage?: string; lastTestedAt?: string; providerType: "MANUAL" | "STRIPE" | "PAYPAL" | "OMISE" | "XENDIT" | "TWO_C2P" | "GBPRIMEPAY" | "IPAY88"; slug: string; sortOrder: number; status: "PENDING" | "ACTIVE" | "SUSPENDED" | "INACTIVE" | "ERROR"; storeId: string; supportedCurrencies: string[]; supportedMethods: string[]; updatedAt: string; }>
Payment provider details
Example
const provider = await client.paymentSettings.getProvider('store-123', 'provider-456')
console.log(provider.status) // 'ACTIVE'
getSettings()
getSettings(
storeId):Promise<{allowedPaymentMethods:string[];appleWalletConfig?:Record<string,unknown>;appleWalletEnabled:boolean;authorizationPeriodDays:number;avsEnabled:boolean;captureMethod:"MANUAL"|"AUTO_CHECKOUT"|"AUTO_FULFILLED";createdAt:string;cvvRequired:boolean;fraudHighRiskAction:"APPROVE"|"FLAG"|"DECLINE";fraudMediumRiskAction:"APPROVE"|"FLAG"|"DECLINE";fraudProtectionEnabled:boolean;giftCardEnabled:boolean;giftCardExpirationUnit?:"DAYS"|"MONTHS"|"YEARS";giftCardExpirationValue?:number;giftCardExpires:boolean;id:string;installmentMinAmount?:number;installmentsEnabled:boolean;installmentTerms:number[];paymentMethodOrder:string[];presentmentCurrency:string;recurringEnabled:boolean;settlementCurrency:string;statementDescriptor?:string;statementDescriptorKana?:string;storeId:string;threeDSecureMode:"DISABLED"|"AUTOMATIC"|"REQUIRED";updatedAt:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:110
Get payment settings for a store
Retrieves global payment configuration including capture method, fraud prevention settings, enabled payment methods, and currency settings.
Parameters
storeId
string
Store identifier
Returns
Promise<{ allowedPaymentMethods: string[]; appleWalletConfig?: Record<string, unknown>; appleWalletEnabled: boolean; authorizationPeriodDays: number; avsEnabled: boolean; captureMethod: "MANUAL" | "AUTO_CHECKOUT" | "AUTO_FULFILLED"; createdAt: string; cvvRequired: boolean; fraudHighRiskAction: "APPROVE" | "FLAG" | "DECLINE"; fraudMediumRiskAction: "APPROVE" | "FLAG" | "DECLINE"; fraudProtectionEnabled: boolean; giftCardEnabled: boolean; giftCardExpirationUnit?: "DAYS" | "MONTHS" | "YEARS"; giftCardExpirationValue?: number; giftCardExpires: boolean; id: string; installmentMinAmount?: number; installmentsEnabled: boolean; installmentTerms: number[]; paymentMethodOrder: string[]; presentmentCurrency: string; recurringEnabled: boolean; settlementCurrency: string; statementDescriptor?: string; statementDescriptorKana?: string; storeId: string; threeDSecureMode: "DISABLED" | "AUTOMATIC" | "REQUIRED"; updatedAt: string; }>
Payment settings configuration
Example
const settings = await client.paymentSettings.getSettings('store-123')
console.log(settings.captureMethod) // 'AUTO_CHECKOUT'
console.log(settings.threeDSecureMode) // 'AUTOMATIC'
getTransaction()
getTransaction(
storeId,transactionId):Promise<{[key:string]:any; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:955
Get a specific transaction
Parameters
storeId
string
Store identifier
transactionId
string
Transaction identifier
Returns
Promise<{[key: string]: any; }>
Transaction details
getTransactionSummary()
getTransactionSummary(
storeId,params?):Promise<{averageTransactionValue:number;byProvider:object[];byStatus:Partial<Record<"CANCELED"|"PENDING"|"REFUNDED"|"FAILED"|"PARTIALLY_REFUNDED"|"REQUIRES_ACTION"|"SUCCEEDED",number>>;byType:Partial<Record<"ADJUSTMENT"|"AUTHORIZATION"|"CAPTURE"|"REFUND"|"CHARGE"|"PAYOUT",number>>;periodEnd:string;periodStart:string;refundRate:number;totalFees:number;totalRefunds:number;totalTransactions:number;totalVolume:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:985
Get transaction summary
Retrieves aggregated transaction statistics.
Parameters
storeId
string
Store identifier
params?
Pick<ListProviderTransactionsParams, "providerId" | "dateFrom" | "dateTo">
Filter parameters (providerId, dateFrom, dateTo)
Returns
Promise<{ averageTransactionValue: number; byProvider: object[]; byStatus: Partial<Record<"CANCELED" | "PENDING" | "REFUNDED" | "FAILED" | "PARTIALLY_REFUNDED" | "REQUIRES_ACTION" | "SUCCEEDED", number>>; byType: Partial<Record<"ADJUSTMENT" | "AUTHORIZATION" | "CAPTURE" | "REFUND" | "CHARGE" | "PAYOUT", number>>; periodEnd: string; periodStart: string; refundRate: number; totalFees: number; totalRefunds: number; totalTransactions: number; totalVolume: number; }>
Transaction summary with totals and counts
Example
const summary = await client.paymentSettings.getTransactionSummary(
'store-123',
{
providerId: 'provider-456',
dateFrom: '2024-01-01',
dateTo: '2024-01-31',
}
)
console.log(`Total charges: ${summary.totalChargeAmount}`)
console.log(`Total refunds: ${summary.totalRefundAmount}`)
getWebhookEvent()
getWebhookEvent(
storeId,eventId):Promise<{attempts:number;createdAt:string;errorMessage?:string;eventType:string;externalEventId:string;headers?:Record<string,unknown>;id:string;lastAttemptAt?:string;payload:Record<string,unknown>;processedAt?:string;provider?: {configuration?:Record<string,unknown>;createdAt:string;displayName:string;id:string;isPrimary:boolean;isTestMode:boolean;lastErrorMessage?:string;lastTestedAt?:string;providerType:"MANUAL"|"STRIPE"|"PAYPAL"|"OMISE"|"XENDIT"|"TWO_C2P"|"GBPRIMEPAY"|"IPAY88";slug:string;sortOrder:number;status:"PENDING"|"ACTIVE"|"SUSPENDED"|"INACTIVE"|"ERROR";storeId:string;supportedCurrencies:string[];supportedMethods:string[];updatedAt:string; };providerId:string;providerType:"MANUAL"|"STRIPE"|"PAYPAL"|"OMISE"|"XENDIT"|"TWO_C2P"|"GBPRIMEPAY"|"IPAY88";receivedAt:string;relatedTransactionId?:string;status:"PENDING"|"PROCESSING"|"FAILED"|"SKIPPED"|"SUCCEEDED";storeId:string;updatedAt:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:1063
Get a specific webhook event
Parameters
storeId
string
Store identifier
eventId
string
Event identifier
Returns
Promise<{ attempts: number; createdAt: string; errorMessage?: string; eventType: string; externalEventId: string; headers?: Record<string, unknown>; id: string; lastAttemptAt?: string; payload: Record<string, unknown>; processedAt?: string; provider?: { configuration?: Record<string, unknown>; createdAt: string; displayName: string; id: string; isPrimary: boolean; isTestMode: boolean; lastErrorMessage?: string; lastTestedAt?: string; providerType: "MANUAL" | "STRIPE" | "PAYPAL" | "OMISE" | "XENDIT" | "TWO_C2P" | "GBPRIMEPAY" | "IPAY88"; slug: string; sortOrder: number; status: "PENDING" | "ACTIVE" | "SUSPENDED" | "INACTIVE" | "ERROR"; storeId: string; supportedCurrencies: string[]; supportedMethods: string[]; updatedAt: string; }; providerId: string; providerType: "MANUAL" | "STRIPE" | "PAYPAL" | "OMISE" | "XENDIT" | "TWO_C2P" | "GBPRIMEPAY" | "IPAY88"; receivedAt: string; relatedTransactionId?: string; status: "PENDING" | "PROCESSING" | "FAILED" | "SKIPPED" | "SUCCEEDED"; storeId: string; updatedAt: string; }>
Webhook event details
getWebhookEventSummary()
getWebhookEventSummary(
storeId,params?):Promise<{byEventType:Record<string,number>;byProvider:object[];failedEvents:number;pendingEvents:number;periodEnd:string;periodStart:string;successfulEvents:number;successRate:number;totalEvents:number; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:1079
Get webhook event summary
Retrieves aggregated webhook event statistics.
Parameters
storeId
string
Store identifier
params?
Pick<ListWebhookEventsParams, "providerId" | "dateFrom" | "dateTo">
Filter parameters
Returns
Promise<{ byEventType: Record<string, number>; byProvider: object[]; failedEvents: number; pendingEvents: number; periodEnd: string; periodStart: string; successfulEvents: number; successRate: number; totalEvents: number; }>
Webhook event summary
listBankAccounts()
listBankAccounts(
storeId):Promise<object[]>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:520
List all bank accounts
Returns all bank accounts configured for payouts, sorted by default status and creation date.
Parameters
storeId
string
Store identifier
Returns
Promise<object[]>
List of bank accounts
Example
const accounts = await client.paymentSettings.listBankAccounts('store-123')
const defaultAccount = accounts.find(a => a.isDefault)
listDisputes()
listDisputes(
storeId,params?):Promise<PaginatedResponse<{amount:number;chargeId?:string;createdAt:string;createdDate:string;currency:string;customerEmail?:string;customerName?:string;disputeId:string;dueDate:string;id:string;networkReasonCode?:string;orderId?:string;outcome?:"LOST"|"WON";paymentIntentId?:string;reason:"DUPLICATE"|"GENERAL"|"FRAUDULENT"|"SUBSCRIPTION_CANCELED"|"PRODUCT_UNACCEPTABLE"|"PRODUCT_NOT_RECEIVED"|"UNRECOGNIZED"|"CREDIT_NOT_PROCESSED"|"INCORRECT_ACCOUNT_DETAILS"|"INSUFFICIENT_FUNDS"|"BANK_CANNOT_PROCESS"|"DEBIT_NOT_AUTHORIZED"|"CUSTOMER_INITIATED";resolvedAt?:string;status:"ACCEPTED"|"LOST"|"WON"|"NEEDS_RESPONSE"|"UNDER_REVIEW"|"CHARGE_REFUNDED";storeId:string;updatedAt:string; }>>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:746
List disputes
Retrieves dispute/chargeback history with optional filters.
Parameters
storeId
string
Store identifier
params?
Filter parameters
limit
number
page
number
status?
"ACCEPTED" | "LOST" | "WON" | "NEEDS_RESPONSE" | "UNDER_REVIEW" | "CHARGE_REFUNDED"
Returns
Promise<PaginatedResponse<{ amount: number; chargeId?: string; createdAt: string; createdDate: string; currency: string; customerEmail?: string; customerName?: string; disputeId: string; dueDate: string; id: string; networkReasonCode?: string; orderId?: string; outcome?: "LOST" | "WON"; paymentIntentId?: string; reason: "DUPLICATE" | "GENERAL" | "FRAUDULENT" | "SUBSCRIPTION_CANCELED" | "PRODUCT_UNACCEPTABLE" | "PRODUCT_NOT_RECEIVED" | "UNRECOGNIZED" | "CREDIT_NOT_PROCESSED" | "INCORRECT_ACCOUNT_DETAILS" | "INSUFFICIENT_FUNDS" | "BANK_CANNOT_PROCESS" | "DEBIT_NOT_AUTHORIZED" | "CUSTOMER_INITIATED"; resolvedAt?: string; status: "ACCEPTED" | "LOST" | "WON" | "NEEDS_RESPONSE" | "UNDER_REVIEW" | "CHARGE_REFUNDED"; storeId: string; updatedAt: string; }>>
Paginated list of disputes
Example
const { data: disputes, total } = await client.paymentSettings.listDisputes(
'store-123',
{
status: 'OPEN',
limit: 20,
}
)
listManualMethods()
listManualMethods(
storeId):Promise<object[]>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:387
List all manual payment methods
Returns all configured manual payment methods (Bank Deposit, COD, etc.) sorted by display order.
Parameters
storeId
string
Store identifier
Returns
Promise<object[]>
List of manual payment methods
Example
const methods = await client.paymentSettings.listManualMethods('store-123')
const activeMethods = methods.filter(m => m.isActive)
listPayouts()
listPayouts(
storeId,params?):Promise<PaginatedResponse<{amount:number;arrivedAt?:string;bankAccount?: {accountHolderName:string;accountHolderType:"COMPANY"|"INDIVIDUAL";accountNumberLast4:string;accountType:"CHECKING"|"SAVINGS";bankCode?:string;bankName:string;branchCode?:string;branchName?:string;country:string;createdAt:string;currency:string;iban?:string;id:string;isDefault:boolean;isVerified:boolean;routingNumber?:string;storeId:string;swiftCode?:string;updatedAt:string;verifiedAt?:string; };bankAccountId:string;createdAt:string;currency:string;expectedArrivalDate?:string;failureCode?:string;failureMessage?:string;fee:number;id:string;netAmount:number;paypalPayoutId?:string;periodEnd:string;periodStart:string;status:"PENDING"|"FAILED"|"IN_TRANSIT"|"PAID"|"CANCELED";storeId:string;stripePayoutId?:string;updatedAt:string; }>>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:677
List payouts
Retrieves payout history with optional filters.
Parameters
storeId
string
Store identifier
params?
Filter parameters
limit
number
page
number
status?
"PENDING" | "FAILED" | "IN_TRANSIT" | "PAID" | "CANCELED"
Returns
Promise<PaginatedResponse<{ amount: number; arrivedAt?: string; bankAccount?: { accountHolderName: string; accountHolderType: "COMPANY" | "INDIVIDUAL"; accountNumberLast4: string; accountType: "CHECKING" | "SAVINGS"; bankCode?: string; bankName: string; branchCode?: string; branchName?: string; country: string; createdAt: string; currency: string; iban?: string; id: string; isDefault: boolean; isVerified: boolean; routingNumber?: string; storeId: string; swiftCode?: string; updatedAt: string; verifiedAt?: string; }; bankAccountId: string; createdAt: string; currency: string; expectedArrivalDate?: string; failureCode?: string; failureMessage?: string; fee: number; id: string; netAmount: number; paypalPayoutId?: string; periodEnd: string; periodStart: string; status: "PENDING" | "FAILED" | "IN_TRANSIT" | "PAID" | "CANCELED"; storeId: string; stripePayoutId?: string; updatedAt: string; }>>
Paginated list of payouts
Example
const { data: payouts, total } = await client.paymentSettings.listPayouts(
'store-123',
{
status: 'COMPLETED',
limit: 20,
offset: 0,
}
)
listProviders()
listProviders(
storeId):Promise<object[]>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:161
List all payment providers for a store
Returns all configured payment providers (Stripe, PayPal, Omise, etc.) sorted by primary status and creation date.
Parameters
storeId
string
Store identifier
Returns
Promise<object[]>
List of payment providers
Example
const providers = await client.paymentSettings.listProviders('store-123')
const primary = providers.find(p => p.isPrimary)
console.log(`Primary provider: ${primary?.providerType}`)
listTransactions()
listTransactions(
storeId,params?):Promise<PaginatedResponse<{[key:string]:any; }>>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:937
List provider transactions
Retrieves transaction history from payment providers with optional filters.
Parameters
storeId
string
Store identifier
params?
Filter parameters
endDate?
string
limit
number
maxAmount?
number
minAmount?
number
orderId?
string
page
number
providerId?
string
search?
string
sortBy
"createdAt" | "amount" | "processedAt"
sortOrder
"asc" | "desc"
startDate?
string
status?
"PENDING" | "FAILED" | "REFUNDED" | "PARTIALLY_REFUNDED" | "CANCELED" | "REQUIRES_ACTION" | "SUCCEEDED"
type?
"ADJUSTMENT" | "REFUND" | "AUTHORIZATION" | "CAPTURE" | "CHARGE" | "PAYOUT"
Returns
Promise<PaginatedResponse<{[key: string]: any; }>>
Paginated list of transactions
Example
const { data: transactions, total } = await client.paymentSettings.listTransactions(
'store-123',
{
providerId: 'provider-456',
type: 'CHARGE',
status: 'SUCCEEDED',
limit: 20,
}
)
listWebhookEvents()
listWebhookEvents(
storeId,params?):Promise<PaginatedResponse<{attempts:number;createdAt:string;errorMessage?:string;eventType:string;externalEventId:string;headers?:Record<string,unknown>;id:string;lastAttemptAt?:string;payload:Record<string,unknown>;processedAt?:string;provider?: {configuration?:Record<string,unknown>;createdAt:string;displayName:string;id:string;isPrimary:boolean;isTestMode:boolean;lastErrorMessage?:string;lastTestedAt?:string;providerType:"MANUAL"|"STRIPE"|"PAYPAL"|"OMISE"|"XENDIT"|"TWO_C2P"|"GBPRIMEPAY"|"IPAY88";slug:string;sortOrder:number;status:"PENDING"|"ACTIVE"|"SUSPENDED"|"INACTIVE"|"ERROR";storeId:string;supportedCurrencies:string[];supportedMethods:string[];updatedAt:string; };providerId:string;providerType:"MANUAL"|"STRIPE"|"PAYPAL"|"OMISE"|"XENDIT"|"TWO_C2P"|"GBPRIMEPAY"|"IPAY88";receivedAt:string;relatedTransactionId?:string;status:"PENDING"|"PROCESSING"|"FAILED"|"SKIPPED"|"SUCCEEDED";storeId:string;updatedAt:string; }>>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:1045
List webhook events
Retrieves webhook event history with optional filters.
Parameters
storeId
string
Store identifier
params?
Filter parameters
endDate?
string
eventType?
string
limit
number
page
number
providerId?
string
providerType?
"MANUAL" | "STRIPE" | "PAYPAL" | "OMISE" | "XENDIT" | "TWO_C2P" | "GBPRIMEPAY" | "IPAY88"
sortBy
"createdAt" | "processedAt" | "receivedAt"
sortOrder
"asc" | "desc"
startDate?
string
status?
"PENDING" | "PROCESSING" | "FAILED" | "SKIPPED" | "SUCCEEDED"
Returns
Promise<PaginatedResponse<{ attempts: number; createdAt: string; errorMessage?: string; eventType: string; externalEventId: string; headers?: Record<string, unknown>; id: string; lastAttemptAt?: string; payload: Record<string, unknown>; processedAt?: string; provider?: { configuration?: Record<string, unknown>; createdAt: string; displayName: string; id: string; isPrimary: boolean; isTestMode: boolean; lastErrorMessage?: string; lastTestedAt?: string; providerType: "MANUAL" | "STRIPE" | "PAYPAL" | "OMISE" | "XENDIT" | "TWO_C2P" | "GBPRIMEPAY" | "IPAY88"; slug: string; sortOrder: number; status: "PENDING" | "ACTIVE" | "SUSPENDED" | "INACTIVE" | "ERROR"; storeId: string; supportedCurrencies: string[]; supportedMethods: string[]; updatedAt: string; }; providerId: string; providerType: "MANUAL" | "STRIPE" | "PAYPAL" | "OMISE" | "XENDIT" | "TWO_C2P" | "GBPRIMEPAY" | "IPAY88"; receivedAt: string; relatedTransactionId?: string; status: "PENDING" | "PROCESSING" | "FAILED" | "SKIPPED" | "SUCCEEDED"; storeId: string; updatedAt: string; }>>
Paginated list of webhook events
Example
const { data: events, total } = await client.paymentSettings.listWebhookEvents(
'store-123',
{
providerId: 'provider-456',
status: 'FAILED',
limit: 50,
}
)
refreshOAuthToken()
refreshOAuthToken(
storeId,providerId):Promise<{configuration?:Record<string,unknown>;createdAt:string;displayName:string;id:string;isPrimary:boolean;isTestMode:boolean;lastErrorMessage?:string;lastTestedAt?:string;providerType:"MANUAL"|"STRIPE"|"PAYPAL"|"OMISE"|"XENDIT"|"TWO_C2P"|"GBPRIMEPAY"|"IPAY88";slug:string;sortOrder:number;status:"PENDING"|"ACTIVE"|"SUSPENDED"|"INACTIVE"|"ERROR";storeId:string;supportedCurrencies:string[];supportedMethods:string[];updatedAt:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:904
Refresh OAuth token
Refreshes the OAuth token for a provider (if supported).
Parameters
storeId
string
Store identifier
providerId
string
Provider identifier
Returns
Promise<{ configuration?: Record<string, unknown>; createdAt: string; displayName: string; id: string; isPrimary: boolean; isTestMode: boolean; lastErrorMessage?: string; lastTestedAt?: string; providerType: "MANUAL" | "STRIPE" | "PAYPAL" | "OMISE" | "XENDIT" | "TWO_C2P" | "GBPRIMEPAY" | "IPAY88"; slug: string; sortOrder: number; status: "PENDING" | "ACTIVE" | "SUSPENDED" | "INACTIVE" | "ERROR"; storeId: string; supportedCurrencies: string[]; supportedMethods: string[]; updatedAt: string; }>
Updated provider
Example
const provider = await client.paymentSettings.refreshOAuthToken(
'store-123',
'provider-456'
)
reorderManualMethods()
reorderManualMethods(
storeId,data):Promise<object[]>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:490
Reorder manual payment methods
Changes the display order of manual payment methods.
Parameters
storeId
string
Store identifier
data
New order of method IDs
orderedIds
string[]
Returns
Promise<object[]>
Updated list of manual payment methods
Example
const methods = await client.paymentSettings.reorderManualMethods('store-123', {
orderedIds: ['method-1', 'method-3', 'method-2']
})
requestManualPayout()
requestManualPayout(
storeId,data):Promise<{amount:number;arrivedAt?:string;bankAccount?: {accountHolderName:string;accountHolderType:"COMPANY"|"INDIVIDUAL";accountNumberLast4:string;accountType:"CHECKING"|"SAVINGS";bankCode?:string;bankName:string;branchCode?:string;branchName?:string;country:string;createdAt:string;currency:string;iban?:string;id:string;isDefault:boolean;isVerified:boolean;routingNumber?:string;storeId:string;swiftCode?:string;updatedAt:string;verifiedAt?:string; };bankAccountId:string;createdAt:string;currency:string;expectedArrivalDate?:string;failureCode?:string;failureMessage?:string;fee:number;id:string;netAmount:number;paypalPayoutId?:string;periodEnd:string;periodStart:string;status:"PENDING"|"FAILED"|"IN_TRANSIT"|"PAID"|"CANCELED";storeId:string;stripePayoutId?:string;updatedAt:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:715
Request manual payout
Requests an immediate payout to a bank account.
Parameters
storeId
string
Store identifier
data
Payout request details
amount?
number
bankAccountId
string
Returns
Promise<{ amount: number; arrivedAt?: string; bankAccount?: { accountHolderName: string; accountHolderType: "COMPANY" | "INDIVIDUAL"; accountNumberLast4: string; accountType: "CHECKING" | "SAVINGS"; bankCode?: string; bankName: string; branchCode?: string; branchName?: string; country: string; createdAt: string; currency: string; iban?: string; id: string; isDefault: boolean; isVerified: boolean; routingNumber?: string; storeId: string; swiftCode?: string; updatedAt: string; verifiedAt?: string; }; bankAccountId: string; createdAt: string; currency: string; expectedArrivalDate?: string; failureCode?: string; failureMessage?: string; fee: number; id: string; netAmount: number; paypalPayoutId?: string; periodEnd: string; periodStart: string; status: "PENDING" | "FAILED" | "IN_TRANSIT" | "PAID" | "CANCELED"; storeId: string; stripePayoutId?: string; updatedAt: string; }>
Created payout
Example
const payout = await client.paymentSettings.requestManualPayout('store-123', {
bankAccountId: 'account-456',
amount: 50000,
currency: 'THB',
})
retryWebhookEvent()
retryWebhookEvent(
storeId,eventId,data):Promise<{message:string;success:boolean; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:1112
Retry a failed webhook event
Manually retries processing a failed webhook event.
Parameters
storeId
string
Store identifier
eventId
string
Event identifier
data
Retry parameters (providerType)
eventId
string
Returns
Promise<{ message: string; success: boolean; }>
Retry result
Example
const result = await client.paymentSettings.retryWebhookEvent(
'store-123',
'event-456',
{ providerType: 'STRIPE' }
)
if (result.success) {
console.log('Webhook event processed successfully')
}
submitDisputeEvidence()
submitDisputeEvidence(
storeId,disputeId,data):Promise<{content?:string;createdAt:string;disputeId:string;evidenceType:"CANCELLATION_POLICY"|"CUSTOMER_COMMUNICATION"|"CUSTOMER_EMAIL_ADDRESS"|"CUSTOMER_NAME"|"CUSTOMER_PURCHASE_IP"|"CUSTOMER_SIGNATURE"|"DUPLICATE_CHARGE_DOCUMENTATION"|"DUPLICATE_CHARGE_EXPLANATION"|"PRODUCT_DESCRIPTION"|"RECEIPT"|"REFUND_POLICY"|"SERVICE_DOCUMENTATION"|"SHIPPING_ADDRESS"|"SHIPPING_CARRIER"|"SHIPPING_DATE"|"SHIPPING_DOCUMENTATION"|"SHIPPING_TRACKING_NUMBER"|"UNCATEGORIZED_FILE"|"UNCATEGORIZED_TEXT";fileName?:string;fileSize?:number;fileUrl?:string;id:string;mimeType?:string;submittedAt?:string;submittedBy?:string;updatedAt:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:802
Submit dispute evidence
Submits evidence to contest a dispute/chargeback.
Parameters
storeId
string
Store identifier
disputeId
string
Dispute identifier
data
Evidence to submit
content?
string
evidenceType
"CANCELLATION_POLICY" | "CUSTOMER_COMMUNICATION" | "CUSTOMER_EMAIL_ADDRESS" | "CUSTOMER_NAME" | "CUSTOMER_PURCHASE_IP" | "CUSTOMER_SIGNATURE" | "DUPLICATE_CHARGE_DOCUMENTATION" | "DUPLICATE_CHARGE_EXPLANATION" | "PRODUCT_DESCRIPTION" | "RECEIPT" | "REFUND_POLICY" | "SERVICE_DOCUMENTATION" | "SHIPPING_ADDRESS" | "SHIPPING_CARRIER" | "SHIPPING_DATE" | "SHIPPING_DOCUMENTATION" | "SHIPPING_TRACKING_NUMBER" | "UNCATEGORIZED_FILE" | "UNCATEGORIZED_TEXT"
fileName?
string
fileUrl?
string
Returns
Promise<{ content?: string; createdAt: string; disputeId: string; evidenceType: "CANCELLATION_POLICY" | "CUSTOMER_COMMUNICATION" | "CUSTOMER_EMAIL_ADDRESS" | "CUSTOMER_NAME" | "CUSTOMER_PURCHASE_IP" | "CUSTOMER_SIGNATURE" | "DUPLICATE_CHARGE_DOCUMENTATION" | "DUPLICATE_CHARGE_EXPLANATION" | "PRODUCT_DESCRIPTION" | "RECEIPT" | "REFUND_POLICY" | "SERVICE_DOCUMENTATION" | "SHIPPING_ADDRESS" | "SHIPPING_CARRIER" | "SHIPPING_DATE" | "SHIPPING_DOCUMENTATION" | "SHIPPING_TRACKING_NUMBER" | "UNCATEGORIZED_FILE" | "UNCATEGORIZED_TEXT"; fileName?: string; fileSize?: number; fileUrl?: string; id: string; mimeType?: string; submittedAt?: string; submittedBy?: string; updatedAt: string; }>
Submitted evidence
Example
const evidence = await client.paymentSettings.submitDisputeEvidence(
'store-123',
'dispute-456',
{
evidenceType: 'SHIPPING_DOCUMENTATION',
description: 'Tracking shows delivered',
fileUrl: 'https://cdn.example.com/tracking.pdf',
fileName: 'tracking.pdf',
}
)
testProviderConnection()
testProviderConnection(
storeId,providerId):Promise<{accountId?:string;accountName?:string;message?:string;success:boolean; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:292
Test provider connection
Tests the connection and credentials for a payment provider.
Parameters
storeId
string
Store identifier
providerId
string
Provider identifier
Returns
Promise<{ accountId?: string; accountName?: string; message?: string; success: boolean; }>
Connection test result
Example
const result = await client.paymentSettings.testProviderConnection(
'store-123',
'provider-456'
)
if (result.success) {
console.log('Connection successful!')
} else {
console.error(`Connection failed: ${result.message}`)
}
updateBankAccount()
updateBankAccount(
storeId,accountId,data):Promise<{accountHolderName:string;accountHolderType:"COMPANY"|"INDIVIDUAL";accountNumberLast4:string;accountType:"CHECKING"|"SAVINGS";bankCode?:string;bankName:string;branchCode?:string;branchName?:string;country:string;createdAt:string;currency:string;iban?:string;id:string;isDefault:boolean;isVerified:boolean;routingNumber?:string;storeId:string;swiftCode?:string;updatedAt:string;verifiedAt?:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:577
Update a bank account
Note: Updating critical fields (account number, bank code) will reset verification status.
Parameters
storeId
string
Store identifier
accountId
string
Account identifier
data
Account settings to update
accountHolderName?
string
accountHolderType?
"COMPANY" | "INDIVIDUAL"
accountType?
"CHECKING" | "SAVINGS"
bankCode?
string
bankName?
string
branchCode?
string
branchName?
string
country?
string
currency?
string
iban?
string
isDefault?
boolean
routingNumber?
string
swiftCode?
string
Returns
Promise<{ accountHolderName: string; accountHolderType: "COMPANY" | "INDIVIDUAL"; accountNumberLast4: string; accountType: "CHECKING" | "SAVINGS"; bankCode?: string; bankName: string; branchCode?: string; branchName?: string; country: string; createdAt: string; currency: string; iban?: string; id: string; isDefault: boolean; isVerified: boolean; routingNumber?: string; storeId: string; swiftCode?: string; updatedAt: string; verifiedAt?: string; }>
Updated bank account
updateManualMethod()
updateManualMethod(
storeId,methodId,data):Promise<{accountName?:string;accountNumber?:string;additionalDetails?:string;bankName?:string;branchCode?:string;createdAt:string;id:string;isActive:boolean;name:string;paymentInstructions?:string;sortOrder:number;storeId:string;swiftCode?:string;type:"CASH_ON_DELIVERY"|"CUSTOM"|"BANK_TRANSFER"|"BANK_DEPOSIT"|"MONEY_ORDER"|"CHECK";updatedAt:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:449
Update a manual payment method
Parameters
storeId
string
Store identifier
methodId
string
Method identifier
data
Method settings to update
accountName?
string
accountNumber?
string
additionalDetails?
string
bankName?
string
branchCode?
string
isActive?
boolean
name?
string
paymentInstructions?
string
swiftCode?
string
type?
"CASH_ON_DELIVERY" | "CUSTOM" | "BANK_TRANSFER" | "BANK_DEPOSIT" | "MONEY_ORDER" | "CHECK"
Returns
Promise<{ accountName?: string; accountNumber?: string; additionalDetails?: string; bankName?: string; branchCode?: string; createdAt: string; id: string; isActive: boolean; name: string; paymentInstructions?: string; sortOrder: number; storeId: string; swiftCode?: string; type: "CASH_ON_DELIVERY" | "CUSTOM" | "BANK_TRANSFER" | "BANK_DEPOSIT" | "MONEY_ORDER" | "CHECK"; updatedAt: string; }>
Updated manual payment method
updatePayoutSchedule()
updatePayoutSchedule(
storeId,data):Promise<{createdAt:string;currency:string;dayOfMonth?:number;dayOfWeek?:number;frequency:"MONTHLY"|"WEEKLY"|"DAILY";id:string;isEnabled:boolean;minimumAmount:number;payoutDelayDays:number;scheduleType:"MANUAL"|"AUTOMATIC";storeId:string;updatedAt:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:643
Update payout schedule
Updates the payout schedule configuration.
Parameters
storeId
string
Store identifier
data
Schedule settings to update
dayOfMonth?
number
dayOfWeek?
number
frequency?
"MONTHLY" | "WEEKLY" | "DAILY"
isEnabled?
boolean
minimumAmount?
number
payoutDelayDays?
number
scheduleType?
"MANUAL" | "AUTOMATIC"
Returns
Promise<{ createdAt: string; currency: string; dayOfMonth?: number; dayOfWeek?: number; frequency: "MONTHLY" | "WEEKLY" | "DAILY"; id: string; isEnabled: boolean; minimumAmount: number; payoutDelayDays: number; scheduleType: "MANUAL" | "AUTOMATIC"; storeId: string; updatedAt: string; }>
Updated payout schedule
Example
const schedule = await client.paymentSettings.updatePayoutSchedule('store-123', {
scheduleType: 'AUTOMATIC',
frequency: 'WEEKLY',
dayOfWeek: 1, // Monday
minimumAmount: 1000,
})
updateProvider()
updateProvider(
storeId,providerId,data):Promise<{configuration?:Record<string,unknown>;createdAt:string;displayName:string;id:string;isPrimary:boolean;isTestMode:boolean;lastErrorMessage?:string;lastTestedAt?:string;providerType:"MANUAL"|"STRIPE"|"PAYPAL"|"OMISE"|"XENDIT"|"TWO_C2P"|"GBPRIMEPAY"|"IPAY88";slug:string;sortOrder:number;status:"PENDING"|"ACTIVE"|"SUSPENDED"|"INACTIVE"|"ERROR";storeId:string;supportedCurrencies:string[];supportedMethods:string[];updatedAt:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:240
Update a payment provider
Updates provider settings and credentials. Supports partial updates.
Parameters
storeId
string
Store identifier
providerId
string
Provider identifier
data
Provider settings to update
configuration?
Record<string, unknown>
displayName?
string
isPrimary?
boolean
isTestMode?
boolean
livePublicKey?
string
liveSecretKey?
string
oauthCode?
string
providerType?
"MANUAL" | "STRIPE" | "PAYPAL" | "OMISE" | "XENDIT" | "TWO_C2P" | "GBPRIMEPAY" | "IPAY88"
status?
"PENDING" | "ACTIVE" | "SUSPENDED" | "INACTIVE" | "ERROR"
supportedCurrencies?
string[]
supportedMethods?
string[]
testPublicKey?
string
testSecretKey?
string
webhookSecret?
string
Returns
Promise<{ configuration?: Record<string, unknown>; createdAt: string; displayName: string; id: string; isPrimary: boolean; isTestMode: boolean; lastErrorMessage?: string; lastTestedAt?: string; providerType: "MANUAL" | "STRIPE" | "PAYPAL" | "OMISE" | "XENDIT" | "TWO_C2P" | "GBPRIMEPAY" | "IPAY88"; slug: string; sortOrder: number; status: "PENDING" | "ACTIVE" | "SUSPENDED" | "INACTIVE" | "ERROR"; storeId: string; supportedCurrencies: string[]; supportedMethods: string[]; updatedAt: string; }>
Updated payment provider
Example
const provider = await client.paymentSettings.updateProvider(
'store-123',
'provider-456',
{
isTestMode: false,
livePublicKey: 'pk_live_...',
liveSecretKey: 'sk_live_...',
status: 'ACTIVE',
}
)
updateSettings()
updateSettings(
storeId,data):Promise<{allowedPaymentMethods:string[];appleWalletConfig?:Record<string,unknown>;appleWalletEnabled:boolean;authorizationPeriodDays:number;avsEnabled:boolean;captureMethod:"MANUAL"|"AUTO_CHECKOUT"|"AUTO_FULFILLED";createdAt:string;cvvRequired:boolean;fraudHighRiskAction:"APPROVE"|"FLAG"|"DECLINE";fraudMediumRiskAction:"APPROVE"|"FLAG"|"DECLINE";fraudProtectionEnabled:boolean;giftCardEnabled:boolean;giftCardExpirationUnit?:"DAYS"|"MONTHS"|"YEARS";giftCardExpirationValue?:number;giftCardExpires:boolean;id:string;installmentMinAmount?:number;installmentsEnabled:boolean;installmentTerms:number[];paymentMethodOrder:string[];presentmentCurrency:string;recurringEnabled:boolean;settlementCurrency:string;statementDescriptor?:string;statementDescriptorKana?:string;storeId:string;threeDSecureMode:"DISABLED"|"AUTOMATIC"|"REQUIRED";updatedAt:string; }>
Defined in: tanqory-platform-packages/packages/api/sdk/src/services/payment-settings.ts:132
Update payment settings for a store
Updates global payment configuration. Supports partial updates.
Parameters
storeId
string
Store identifier
data
Settings to update
allowedPaymentMethods?
string[]
appleWalletConfig?
Record<string, unknown>
appleWalletEnabled?
boolean
authorizationPeriodDays?
number
avsEnabled?
boolean
captureMethod?
"MANUAL" | "AUTO_CHECKOUT" | "AUTO_FULFILLED"
cvvRequired?
boolean
fraudHighRiskAction?
"APPROVE" | "FLAG" | "DECLINE"
fraudMediumRiskAction?
"APPROVE" | "FLAG" | "DECLINE"
fraudProtectionEnabled?
boolean
giftCardEnabled?
boolean
giftCardExpirationUnit?
"DAYS" | "MONTHS" | "YEARS"
giftCardExpirationValue?
number
giftCardExpires?
boolean
installmentMinAmount?
number
installmentsEnabled?
boolean
installmentTerms?
number[]
paymentMethodOrder?
string[]
presentmentCurrency?
string
recurringEnabled?
boolean
settlementCurrency?
string
statementDescriptor?
string
statementDescriptorKana?
string
threeDSecureMode?
"DISABLED" | "AUTOMATIC" | "REQUIRED"
Returns
Promise<{ allowedPaymentMethods: string[]; appleWalletConfig?: Record<string, unknown>; appleWalletEnabled: boolean; authorizationPeriodDays: number; avsEnabled: boolean; captureMethod: "MANUAL" | "AUTO_CHECKOUT" | "AUTO_FULFILLED"; createdAt: string; cvvRequired: boolean; fraudHighRiskAction: "APPROVE" | "FLAG" | "DECLINE"; fraudMediumRiskAction: "APPROVE" | "FLAG" | "DECLINE"; fraudProtectionEnabled: boolean; giftCardEnabled: boolean; giftCardExpirationUnit?: "DAYS" | "MONTHS" | "YEARS"; giftCardExpirationValue?: number; giftCardExpires: boolean; id: string; installmentMinAmount?: number; installmentsEnabled: boolean; installmentTerms: number[]; paymentMethodOrder: string[]; presentmentCurrency: string; recurringEnabled: boolean; settlementCurrency: string; statementDescriptor?: string; statementDescriptorKana?: string; storeId: string; threeDSecureMode: "DISABLED" | "AUTOMATIC" | "REQUIRED"; updatedAt: string; }>
Updated payment settings
Example
const settings = await client.paymentSettings.updateSettings('store-123', {
captureMethod: 'MANUAL',
cvvRequired: true,
threeDSecureMode: 'REQUIRED',
})