@delopay/sdk 0.68.0 → 0.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-2DNFEA5T.js → chunk-ASCCS4NN.js} +45 -11
- package/dist/chunk-ASCCS4NN.js.map +1 -0
- package/dist/index.cjs +44 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +140 -15
- package/dist/index.d.ts +140 -15
- package/dist/index.js +1 -1
- package/dist/internal.cjs +55 -10
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +9 -3
- package/dist/internal.d.ts +9 -3
- package/dist/internal.js +12 -1
- package/dist/internal.js.map +1 -1
- package/package.json +16 -17
- package/dist/chunk-2DNFEA5T.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -256,6 +256,17 @@ interface PaymentCancelRequest {
|
|
|
256
256
|
* `'requires_customer_action'`, use `next_action` to redirect or render
|
|
257
257
|
* additional authentication steps.
|
|
258
258
|
*/
|
|
259
|
+
/**
|
|
260
|
+
* Refund/dispute magnitudes tracked on the payment intent (minor units).
|
|
261
|
+
* A payment's `status` never changes when it is refunded or disputed — this
|
|
262
|
+
* object is where that state is visible.
|
|
263
|
+
*/
|
|
264
|
+
interface PaymentIntentStateMetadata {
|
|
265
|
+
/** Sum of succeeded refunds against this payment, in minor units. */
|
|
266
|
+
total_refunded_amount?: number | null;
|
|
267
|
+
/** Sum of open/lost disputed amounts against this payment, in minor units. */
|
|
268
|
+
total_disputed_amount?: number | null;
|
|
269
|
+
}
|
|
259
270
|
interface PaymentResponse {
|
|
260
271
|
/** Unique payment intent ID. */
|
|
261
272
|
payment_id: string;
|
|
@@ -283,6 +294,8 @@ interface PaymentResponse {
|
|
|
283
294
|
shipping_cost?: number | null;
|
|
284
295
|
/** Actual captured amount, in minor units. Present after capture. */
|
|
285
296
|
amount_received?: number | null;
|
|
297
|
+
/** Refunded/disputed totals; the payment `status` itself never reflects them. */
|
|
298
|
+
state_metadata?: PaymentIntentStateMetadata | null;
|
|
286
299
|
/** Capture method used. */
|
|
287
300
|
capture_method?: CaptureMethod | null;
|
|
288
301
|
/** Authentication type used (3DS or none). */
|
|
@@ -440,6 +453,56 @@ interface PaymentAttemptsListResponse {
|
|
|
440
453
|
/** Every attempt made on this payment, including failed retries across connectors. */
|
|
441
454
|
data: PaymentAttemptResponse[];
|
|
442
455
|
}
|
|
456
|
+
/** Which entity a status-history event belongs to. */
|
|
457
|
+
type PaymentStatusHistoryEntityType = 'payment' | 'attempt' | 'refund' | 'dispute';
|
|
458
|
+
/**
|
|
459
|
+
* One event on a payment's status timeline: the creation of, or a status
|
|
460
|
+
* transition on, the payment intent or one of its attempts / refunds /
|
|
461
|
+
* disputes.
|
|
462
|
+
*/
|
|
463
|
+
interface PaymentStatusHistoryEvent {
|
|
464
|
+
entity_type: PaymentStatusHistoryEntityType;
|
|
465
|
+
/** Id of the attempt / refund / dispute the event belongs to (absent for intent-level events). */
|
|
466
|
+
entity_id?: string | null;
|
|
467
|
+
/** The attempt this event is associated with, where known. */
|
|
468
|
+
attempt_id?: string | null;
|
|
469
|
+
/** The status before this event. Absent on creation events and derived events. */
|
|
470
|
+
previous_status?: string | null;
|
|
471
|
+
/**
|
|
472
|
+
* The status after this event. Absent only on a derived creation event,
|
|
473
|
+
* where the initial status was not recorded.
|
|
474
|
+
*/
|
|
475
|
+
status?: string | null;
|
|
476
|
+
/** Connector involved in the event, where known. */
|
|
477
|
+
connector?: string | null;
|
|
478
|
+
error_code?: string | null;
|
|
479
|
+
error_message?: string | null;
|
|
480
|
+
/** `true` when this event records the creation of the entity. */
|
|
481
|
+
is_creation: boolean;
|
|
482
|
+
/**
|
|
483
|
+
* `true` when this event was reconstructed from current records (payments
|
|
484
|
+
* predating the persisted status log) — its timestamp is approximate and
|
|
485
|
+
* intermediate transitions may be missing.
|
|
486
|
+
*/
|
|
487
|
+
derived: boolean;
|
|
488
|
+
/** ISO-8601 timestamp of the event. */
|
|
489
|
+
timestamp: string;
|
|
490
|
+
[key: string]: unknown;
|
|
491
|
+
}
|
|
492
|
+
/** Response body for `payments.listStatusHistory` — the status timeline of a payment. */
|
|
493
|
+
interface PaymentStatusHistoryResponse {
|
|
494
|
+
/** The payment this timeline belongs to. */
|
|
495
|
+
payment_id: string;
|
|
496
|
+
/**
|
|
497
|
+
* `true` when every event comes from the persisted status-transition log;
|
|
498
|
+
* `false` when any event had to be reconstructed from current records.
|
|
499
|
+
*/
|
|
500
|
+
complete: boolean;
|
|
501
|
+
/** The number of events returned. */
|
|
502
|
+
count: number;
|
|
503
|
+
/** All recorded events, oldest first. */
|
|
504
|
+
events: PaymentStatusHistoryEvent[];
|
|
505
|
+
}
|
|
443
506
|
/**
|
|
444
507
|
* Parameters for creating a refund.
|
|
445
508
|
*
|
|
@@ -463,9 +526,19 @@ interface RefundCreateRequest {
|
|
|
463
526
|
metadata?: Record<string, unknown> | null;
|
|
464
527
|
}
|
|
465
528
|
interface RefundUpdateRequest {
|
|
529
|
+
/** Omit to leave the reason unchanged; send an explicit `null` to clear it. */
|
|
466
530
|
reason?: string | null;
|
|
467
531
|
metadata?: Record<string, unknown> | null;
|
|
468
532
|
}
|
|
533
|
+
/**
|
|
534
|
+
* Response of `GET /refunds/aggregate`. NOTE: keyed by the backend's internal
|
|
535
|
+
* refund-status enum (`success`, `failure`, `transaction_failure`, `pending`,
|
|
536
|
+
* `manual_review`) — NOT the collapsed `RefundStatus` values
|
|
537
|
+
* (`succeeded`/`failed`/`pending`/`review`) that refund rows carry.
|
|
538
|
+
*/
|
|
539
|
+
interface RefundAggregateResponse {
|
|
540
|
+
status_with_count: Partial<Record<'success' | 'failure' | 'transaction_failure' | 'pending' | 'manual_review', number>>;
|
|
541
|
+
}
|
|
469
542
|
/** A Delopay refund returned by the API. */
|
|
470
543
|
interface RefundResponse {
|
|
471
544
|
/** Unique refund ID. */
|
|
@@ -724,7 +797,6 @@ interface DisputeListParams {
|
|
|
724
797
|
}
|
|
725
798
|
interface DisputeEvidenceRequest {
|
|
726
799
|
cancel_dispute?: boolean | null;
|
|
727
|
-
customer_email_body?: string | null;
|
|
728
800
|
customer_email_address?: string | null;
|
|
729
801
|
customer_name?: string | null;
|
|
730
802
|
customer_signature?: string | null;
|
|
@@ -749,10 +821,37 @@ interface DisputeEvidenceRequest {
|
|
|
749
821
|
cancellation_rebuttal?: string | null;
|
|
750
822
|
customer_communication?: string | null;
|
|
751
823
|
customer_purchase_ip?: string | null;
|
|
752
|
-
|
|
824
|
+
/**
|
|
825
|
+
* File id of the document showing the disputed charge and the alleged
|
|
826
|
+
* duplicate are distinct transactions. This is the field Stripe calls
|
|
827
|
+
* `duplicate_charge_documentation`.
|
|
828
|
+
*/
|
|
829
|
+
invoice_showing_distinct_transactions?: string | null;
|
|
830
|
+
/** File id of the recurring-transaction agreement (subscription disputes). */
|
|
831
|
+
recurring_transaction_agreement?: string | null;
|
|
832
|
+
/** Explanation of why the disputed charge is not a duplicate. */
|
|
753
833
|
duplicate_charge_explanation?: string | null;
|
|
834
|
+
/** Transaction id of the prior charge the disputed one allegedly duplicates. */
|
|
754
835
|
duplicate_charge_id?: string | null;
|
|
755
836
|
}
|
|
837
|
+
/** Backend evidence-type identifiers, serde snake_case (e.g. `receipt`,
|
|
838
|
+
* `invoice_showing_distinct_transactions`). Used for delete + retrieval. */
|
|
839
|
+
type DisputeEvidenceType = 'cancellation_policy' | 'customer_communication' | 'customer_signature' | 'receipt' | 'refund_policy' | 'service_documentation' | 'shipping_documentation' | 'invoice_showing_distinct_transactions' | 'recurring_transaction_agreement' | 'uncategorized_file';
|
|
840
|
+
/**
|
|
841
|
+
* One stored file-evidence entry, as `GET /disputes/evidence/{id}` returns
|
|
842
|
+
* it. The endpoint reports FILE evidence only — text evidence (customer
|
|
843
|
+
* name, product description, …) is not retrievable once submitted.
|
|
844
|
+
*/
|
|
845
|
+
interface DisputeEvidenceBlock {
|
|
846
|
+
evidence_type: DisputeEvidenceType;
|
|
847
|
+
file_metadata_response: {
|
|
848
|
+
file_id: string;
|
|
849
|
+
file_name?: string | null;
|
|
850
|
+
file_size?: number;
|
|
851
|
+
file_type?: string;
|
|
852
|
+
available?: boolean;
|
|
853
|
+
};
|
|
854
|
+
}
|
|
756
855
|
interface MandateResponse {
|
|
757
856
|
mandate_id: string;
|
|
758
857
|
status: MandateStatus;
|
|
@@ -3464,12 +3563,16 @@ declare class Disputes {
|
|
|
3464
3563
|
*/
|
|
3465
3564
|
attachEvidence(params: DisputeEvidenceRequest): Promise<DisputeResponse>;
|
|
3466
3565
|
/**
|
|
3467
|
-
* Retrieve previously
|
|
3566
|
+
* Retrieve previously stored evidence for a dispute.
|
|
3567
|
+
*
|
|
3568
|
+
* Returns an ARRAY of file-evidence blocks (this was previously mistyped
|
|
3569
|
+
* as the flat submit-request shape). Only file evidence is reported —
|
|
3570
|
+
* text evidence is not retrievable once submitted.
|
|
3468
3571
|
*
|
|
3469
3572
|
* @param disputeId - The dispute ID.
|
|
3470
|
-
* @returns The
|
|
3573
|
+
* @returns The stored file-evidence blocks.
|
|
3471
3574
|
*/
|
|
3472
|
-
retrieveEvidence(disputeId: string): Promise<
|
|
3575
|
+
retrieveEvidence(disputeId: string): Promise<DisputeEvidenceBlock[]>;
|
|
3473
3576
|
/**
|
|
3474
3577
|
* Delete submitted evidence for a dispute.
|
|
3475
3578
|
*
|
|
@@ -3488,15 +3591,19 @@ declare class Disputes {
|
|
|
3488
3591
|
/** Get dispute aggregates (profile-scoped). `GET /disputes/profile/aggregate` */
|
|
3489
3592
|
aggregateByProfile(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
3490
3593
|
/**
|
|
3491
|
-
* Fetch the latest dispute state from the connector (gateway).
|
|
3492
|
-
* `GET /disputes/{
|
|
3594
|
+
* Fetch the latest dispute state from the connector (gateway) and persist it.
|
|
3595
|
+
* `GET /disputes/{disputeId}?force_sync=true`
|
|
3596
|
+
*
|
|
3597
|
+
* The path parameter is the **Delopay dispute id** (`dp_…`). Force-sync asks the
|
|
3598
|
+
* backend to pull the dispute from the connector (supported where the connector
|
|
3599
|
+
* implements the dispute-sync flow, e.g. Stripe) and update the stored record
|
|
3600
|
+
* before returning it.
|
|
3493
3601
|
*
|
|
3494
|
-
* Note:
|
|
3495
|
-
*
|
|
3496
|
-
*
|
|
3497
|
-
* path were silently hitting 404s.
|
|
3602
|
+
* Note: this method previously called `GET /disputes/{id}/fetch`, which is a
|
|
3603
|
+
* different backend route — a bulk import keyed by **merchant connector account
|
|
3604
|
+
* id** with a required date range — so every call with a dispute id failed.
|
|
3498
3605
|
*/
|
|
3499
|
-
fetchFromConnector(
|
|
3606
|
+
fetchFromConnector(disputeId: string): Promise<DisputeResponse>;
|
|
3500
3607
|
}
|
|
3501
3608
|
|
|
3502
3609
|
/**
|
|
@@ -3866,6 +3973,24 @@ declare class Payments {
|
|
|
3866
3973
|
* ```
|
|
3867
3974
|
*/
|
|
3868
3975
|
listAttempts(paymentId: string, options?: RequestExtras): Promise<PaymentAttemptsListResponse>;
|
|
3976
|
+
/**
|
|
3977
|
+
* The status timeline of a payment: every recorded creation / status
|
|
3978
|
+
* transition of the intent and its attempts, refunds and disputes, oldest
|
|
3979
|
+
* first. `complete: false` marks timelines partially reconstructed from
|
|
3980
|
+
* current records (payments created before the status log existed).
|
|
3981
|
+
*
|
|
3982
|
+
* @param paymentId - The payment intent ID.
|
|
3983
|
+
* @returns The ordered status-history events.
|
|
3984
|
+
*
|
|
3985
|
+
* @example
|
|
3986
|
+
* ```typescript
|
|
3987
|
+
* const { events, complete } = await delopay.payments.listStatusHistory('pay_abc123');
|
|
3988
|
+
* for (const event of events) {
|
|
3989
|
+
* console.log(event.timestamp, event.entity_type, event.status);
|
|
3990
|
+
* }
|
|
3991
|
+
* ```
|
|
3992
|
+
*/
|
|
3993
|
+
listStatusHistory(paymentId: string, options?: RequestExtras): Promise<PaymentStatusHistoryResponse>;
|
|
3869
3994
|
/**
|
|
3870
3995
|
* Update an existing payment intent before it is confirmed.
|
|
3871
3996
|
*
|
|
@@ -4191,9 +4316,9 @@ declare class Refunds {
|
|
|
4191
4316
|
/** Get refund filter options. `GET /refunds/filter` */
|
|
4192
4317
|
getFilters(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
4193
4318
|
/** Get refund aggregates. `GET /refunds/aggregate` */
|
|
4194
|
-
aggregate(params?: Record<string, string | number | undefined>): Promise<
|
|
4319
|
+
aggregate(params?: Record<string, string | number | undefined>): Promise<RefundAggregateResponse>;
|
|
4195
4320
|
/** Get refund aggregates (profile-scoped). `GET /refunds/profile/aggregate` */
|
|
4196
|
-
aggregateByProfile(params?: Record<string, string | number | undefined>): Promise<
|
|
4321
|
+
aggregateByProfile(params?: Record<string, string | number | undefined>): Promise<RefundAggregateResponse>;
|
|
4197
4322
|
/** Manually update refund status. `PUT /refunds/{refundId}/manual-update` */
|
|
4198
4323
|
manualUpdate(refundId: string, params: Record<string, unknown>): Promise<RefundResponse>;
|
|
4199
4324
|
}
|
|
@@ -5675,4 +5800,4 @@ declare function parseImportedBranding(raw: unknown): CheckoutBranding;
|
|
|
5675
5800
|
declare function applyBrandingVariables(el: HTMLElement, b: CheckoutBranding): void;
|
|
5676
5801
|
declare function shadowFor(style: SurfaceStyle): string;
|
|
5677
5802
|
|
|
5678
|
-
export { type AddUserRequest, type AddUserResponse, type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, type AnalyticsChild, type AnalyticsConnectorDay, type AnalyticsConnectorSeries, AnalyticsDashboard, type AnalyticsDayBucket, type AnalyticsMethodSlice, type AnalyticsScopeRequest, type AnalyticsScopeResponse, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyListConstraints, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AttemptStatus, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, type AvailabilityOverrideCreateRequest, type AvailabilityOverrideResponse, AvailabilityOverrides, type AvailabilityPreviewMethod, type AvailabilityPreviewParams, type AvailabilityPreviewResponse, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlockedAttempt, type BlockedAttemptListParams, type BlockedAttemptListResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, type BrandingExport, type BrandingSource, type BuiltInRegionGroupResponse, type BusinessPaymentLinkConfig, CUSTOM_CSS_MAX_LENGTH, type CancelSubscriptionRequest, type CancelSubscriptionResponse, type CaptureMethod, type CardDetail, type CardDetailFromLocker, Cards, type ChangePasswordRequest, type CheckoutBranding, type ConditionNode, type ConfirmSubscriptionPaymentDetails, type ConfirmSubscriptionRequest, type ConfirmSubscriptionResponse, type Connector, type ConnectorCloneRequest, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorSelection, type ConnectorType, type ConnectorUpdateRequest, type ConnectorVolumeSplit, type ConnectorWebhookEntry, type ConnectorWebhookEventType, type ConnectorWebhookListResponse, type ConnectorWebhookRegisterRequest, type ConnectorWebhookRegisterResponse, type CornerRadius, type CreateAndConfirmSubscriptionRequest, type CreateSubscriptionPaymentDetails, type CreateSubscriptionRequest, type Currency, type CurrencyRevenue, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, type DeleteAccountRequest, type DeleteUserRoleRequest, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceRequest, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EncodedBranding, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EuclidComparison, type EuclidComparisonType, type EuclidIfStatement, type EuclidValue, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, FeeProgramBuilder, type FeeRuleConditions, type FeeRuleInput, type FeeRulePreviewRequest, type FeeRulePreviewResponse, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeSpecInput, type FeeType, Files, type FontFamily, type FontWeight, Forex, type ForgotPasswordRequest, type FromEmailRequest, type FutureUsage, type GatewayConnectRequest, type GatewayResponse, type GetSubscriptionItemsParams, type GetSubscriptionItemsResponse, type GlobalSearchRequest, type GroupNode, type ImpersonateEmployeeRequest, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type InvoiceStatus, type LabelStyle, type LayoutStyle, type LeafNode, type LedgerEntry, type LedgerListParams, type LedgerResponse, type LinkedRoutingConfigRetrieveResponse, type ListInvitableRolesParams, type ListUsersInLineageParams, type LoginHistoryEntry, type LoginHistoryParams, type LoginHistoryResponse, type LogoShape, type LogoSize, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type MerchantRoutingAlgorithm, type MethodSurcharge, type MinimalRoleInfo, type NonPillRadius, type OverrideAction, type OverrideScope, type ParentGroup, type ParentGroupInfo, type PauseSubscriptionRequest, type PauseSubscriptionResponse, type PaymentAttemptResponse, type PaymentAttemptsListResponse, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentErrorDetails, type PaymentExperience, type PaymentIdFormatConfig, type PaymentIdStyle, type PaymentLayout, type PaymentLinkBackgroundImageConfig, type PaymentLinkConfigRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentLinkTransactionDetails, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentRetrieveOptions, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PerMethodSurchargeItem, type PermissionScope, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PlatformFeeKind, type PlatformFeeOutput, type PlatformFeeProgram, type PlatformFeeRule, type PlatformFeeRuleInput, type PlatformFeeRuleOutput, type PlatformFeeRuleRecord, type PlatformFeeRuleRequest, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileDefaultRoutingConfig, type ProfileDeniedConnectorsResponse, type ProfileLogoUploadResponse, type ProfileResponse, type ProfileUpdateRequest, type ProgramConnectorSelection, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCountriesResponse, type RegionCreateRequest, type RegionResponse, type RegionSetCountriesRequest, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestExtras, type RequestFn, type RequestOptions, type ResetPasswordRequest, type ResumeSubscriptionRequest, type ResumeSubscriptionResponse, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, type RuleConnectorSelection, Search, type SearchGroupResponse, type SearchIndex, type SearchStatus, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopStatsResponse, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SizeScale, type SpacingScale, type StaticRoutingAlgorithm, type StatsPeriod, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionEstimateParams, type SubscriptionEstimateResponse, type SubscriptionInvoice, type SubscriptionItem, type SubscriptionItemPrice, type SubscriptionItemType, type SubscriptionLineItem, type SubscriptionListParams, type SubscriptionPaymentData, type SubscriptionPaymentDetails, type SubscriptionPeriodUnit, type SubscriptionResponse, type SubscriptionStatus, Subscriptions, type SummaryPosition, type SurchargeRuleRequest, type SurchargeRuleResponse, type SurfaceStyle, type SwitchMerchantRequest, type SwitchProfileRequest, type Terminate2faQueryParams, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TierSummary, type TokenPurpose, type TokenResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type TrustBadge, type UpdateSubscriptionRequest, type UpdateUserDetailsRequest, type UpdateUserRoleRequest, type UserInLineage, type UserResponse, type UserSessionEntry, type UserSessionListResponse, type UserSessionRevokeResponse, type VerifyTotpRequest, type WebhookDeliveryAttempt, type WebhookEvent, type WebhookRegistrationEnvironment, Webhooks, allOf, anyOf, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, decodeBadges, decodeBranding, defaultBranding, encodeBadges, encodeBranding, feeProgram, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, leaf, logoDimensions, parseImportedBranding, programToTree, radiusValue, ruleMatchToTree, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue };
|
|
5803
|
+
export { type AddUserRequest, type AddUserResponse, type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, type AnalyticsChild, type AnalyticsConnectorDay, type AnalyticsConnectorSeries, AnalyticsDashboard, type AnalyticsDayBucket, type AnalyticsMethodSlice, type AnalyticsScopeRequest, type AnalyticsScopeResponse, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyListConstraints, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AttemptStatus, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, type AvailabilityOverrideCreateRequest, type AvailabilityOverrideResponse, AvailabilityOverrides, type AvailabilityPreviewMethod, type AvailabilityPreviewParams, type AvailabilityPreviewResponse, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlockedAttempt, type BlockedAttemptListParams, type BlockedAttemptListResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, type BrandingExport, type BrandingSource, type BuiltInRegionGroupResponse, type BusinessPaymentLinkConfig, CUSTOM_CSS_MAX_LENGTH, type CancelSubscriptionRequest, type CancelSubscriptionResponse, type CaptureMethod, type CardDetail, type CardDetailFromLocker, Cards, type ChangePasswordRequest, type CheckoutBranding, type ConditionNode, type ConfirmSubscriptionPaymentDetails, type ConfirmSubscriptionRequest, type ConfirmSubscriptionResponse, type Connector, type ConnectorCloneRequest, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorSelection, type ConnectorType, type ConnectorUpdateRequest, type ConnectorVolumeSplit, type ConnectorWebhookEntry, type ConnectorWebhookEventType, type ConnectorWebhookListResponse, type ConnectorWebhookRegisterRequest, type ConnectorWebhookRegisterResponse, type CornerRadius, type CreateAndConfirmSubscriptionRequest, type CreateSubscriptionPaymentDetails, type CreateSubscriptionRequest, type Currency, type CurrencyRevenue, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, type DeleteAccountRequest, type DeleteUserRoleRequest, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceBlock, type DisputeEvidenceRequest, type DisputeEvidenceType, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EncodedBranding, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EuclidComparison, type EuclidComparisonType, type EuclidIfStatement, type EuclidValue, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, FeeProgramBuilder, type FeeRuleConditions, type FeeRuleInput, type FeeRulePreviewRequest, type FeeRulePreviewResponse, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeSpecInput, type FeeType, Files, type FontFamily, type FontWeight, Forex, type ForgotPasswordRequest, type FromEmailRequest, type FutureUsage, type GatewayConnectRequest, type GatewayResponse, type GetSubscriptionItemsParams, type GetSubscriptionItemsResponse, type GlobalSearchRequest, type GroupNode, type ImpersonateEmployeeRequest, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type InvoiceStatus, type LabelStyle, type LayoutStyle, type LeafNode, type LedgerEntry, type LedgerListParams, type LedgerResponse, type LinkedRoutingConfigRetrieveResponse, type ListInvitableRolesParams, type ListUsersInLineageParams, type LoginHistoryEntry, type LoginHistoryParams, type LoginHistoryResponse, type LogoShape, type LogoSize, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type MerchantRoutingAlgorithm, type MethodSurcharge, type MinimalRoleInfo, type NonPillRadius, type OverrideAction, type OverrideScope, type ParentGroup, type ParentGroupInfo, type PauseSubscriptionRequest, type PauseSubscriptionResponse, type PaymentAttemptResponse, type PaymentAttemptsListResponse, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentErrorDetails, type PaymentExperience, type PaymentIdFormatConfig, type PaymentIdStyle, type PaymentIntentStateMetadata, type PaymentLayout, type PaymentLinkBackgroundImageConfig, type PaymentLinkConfigRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentLinkTransactionDetails, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentRetrieveOptions, type PaymentStatusHistoryEntityType, type PaymentStatusHistoryEvent, type PaymentStatusHistoryResponse, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PerMethodSurchargeItem, type PermissionScope, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PlatformFeeKind, type PlatformFeeOutput, type PlatformFeeProgram, type PlatformFeeRule, type PlatformFeeRuleInput, type PlatformFeeRuleOutput, type PlatformFeeRuleRecord, type PlatformFeeRuleRequest, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileDefaultRoutingConfig, type ProfileDeniedConnectorsResponse, type ProfileLogoUploadResponse, type ProfileResponse, type ProfileUpdateRequest, type ProgramConnectorSelection, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundAggregateResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCountriesResponse, type RegionCreateRequest, type RegionResponse, type RegionSetCountriesRequest, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestExtras, type RequestFn, type RequestOptions, type ResetPasswordRequest, type ResumeSubscriptionRequest, type ResumeSubscriptionResponse, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, type RuleConnectorSelection, Search, type SearchGroupResponse, type SearchIndex, type SearchStatus, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopStatsResponse, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SizeScale, type SpacingScale, type StaticRoutingAlgorithm, type StatsPeriod, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionEstimateParams, type SubscriptionEstimateResponse, type SubscriptionInvoice, type SubscriptionItem, type SubscriptionItemPrice, type SubscriptionItemType, type SubscriptionLineItem, type SubscriptionListParams, type SubscriptionPaymentData, type SubscriptionPaymentDetails, type SubscriptionPeriodUnit, type SubscriptionResponse, type SubscriptionStatus, Subscriptions, type SummaryPosition, type SurchargeRuleRequest, type SurchargeRuleResponse, type SurfaceStyle, type SwitchMerchantRequest, type SwitchProfileRequest, type Terminate2faQueryParams, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TierSummary, type TokenPurpose, type TokenResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type TrustBadge, type UpdateSubscriptionRequest, type UpdateUserDetailsRequest, type UpdateUserRoleRequest, type UserInLineage, type UserResponse, type UserSessionEntry, type UserSessionListResponse, type UserSessionRevokeResponse, type VerifyTotpRequest, type WebhookDeliveryAttempt, type WebhookEvent, type WebhookRegistrationEnvironment, Webhooks, allOf, anyOf, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, decodeBadges, decodeBranding, defaultBranding, encodeBadges, encodeBranding, feeProgram, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, leaf, logoDimensions, parseImportedBranding, programToTree, radiusValue, ruleMatchToTree, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -256,6 +256,17 @@ interface PaymentCancelRequest {
|
|
|
256
256
|
* `'requires_customer_action'`, use `next_action` to redirect or render
|
|
257
257
|
* additional authentication steps.
|
|
258
258
|
*/
|
|
259
|
+
/**
|
|
260
|
+
* Refund/dispute magnitudes tracked on the payment intent (minor units).
|
|
261
|
+
* A payment's `status` never changes when it is refunded or disputed — this
|
|
262
|
+
* object is where that state is visible.
|
|
263
|
+
*/
|
|
264
|
+
interface PaymentIntentStateMetadata {
|
|
265
|
+
/** Sum of succeeded refunds against this payment, in minor units. */
|
|
266
|
+
total_refunded_amount?: number | null;
|
|
267
|
+
/** Sum of open/lost disputed amounts against this payment, in minor units. */
|
|
268
|
+
total_disputed_amount?: number | null;
|
|
269
|
+
}
|
|
259
270
|
interface PaymentResponse {
|
|
260
271
|
/** Unique payment intent ID. */
|
|
261
272
|
payment_id: string;
|
|
@@ -283,6 +294,8 @@ interface PaymentResponse {
|
|
|
283
294
|
shipping_cost?: number | null;
|
|
284
295
|
/** Actual captured amount, in minor units. Present after capture. */
|
|
285
296
|
amount_received?: number | null;
|
|
297
|
+
/** Refunded/disputed totals; the payment `status` itself never reflects them. */
|
|
298
|
+
state_metadata?: PaymentIntentStateMetadata | null;
|
|
286
299
|
/** Capture method used. */
|
|
287
300
|
capture_method?: CaptureMethod | null;
|
|
288
301
|
/** Authentication type used (3DS or none). */
|
|
@@ -440,6 +453,56 @@ interface PaymentAttemptsListResponse {
|
|
|
440
453
|
/** Every attempt made on this payment, including failed retries across connectors. */
|
|
441
454
|
data: PaymentAttemptResponse[];
|
|
442
455
|
}
|
|
456
|
+
/** Which entity a status-history event belongs to. */
|
|
457
|
+
type PaymentStatusHistoryEntityType = 'payment' | 'attempt' | 'refund' | 'dispute';
|
|
458
|
+
/**
|
|
459
|
+
* One event on a payment's status timeline: the creation of, or a status
|
|
460
|
+
* transition on, the payment intent or one of its attempts / refunds /
|
|
461
|
+
* disputes.
|
|
462
|
+
*/
|
|
463
|
+
interface PaymentStatusHistoryEvent {
|
|
464
|
+
entity_type: PaymentStatusHistoryEntityType;
|
|
465
|
+
/** Id of the attempt / refund / dispute the event belongs to (absent for intent-level events). */
|
|
466
|
+
entity_id?: string | null;
|
|
467
|
+
/** The attempt this event is associated with, where known. */
|
|
468
|
+
attempt_id?: string | null;
|
|
469
|
+
/** The status before this event. Absent on creation events and derived events. */
|
|
470
|
+
previous_status?: string | null;
|
|
471
|
+
/**
|
|
472
|
+
* The status after this event. Absent only on a derived creation event,
|
|
473
|
+
* where the initial status was not recorded.
|
|
474
|
+
*/
|
|
475
|
+
status?: string | null;
|
|
476
|
+
/** Connector involved in the event, where known. */
|
|
477
|
+
connector?: string | null;
|
|
478
|
+
error_code?: string | null;
|
|
479
|
+
error_message?: string | null;
|
|
480
|
+
/** `true` when this event records the creation of the entity. */
|
|
481
|
+
is_creation: boolean;
|
|
482
|
+
/**
|
|
483
|
+
* `true` when this event was reconstructed from current records (payments
|
|
484
|
+
* predating the persisted status log) — its timestamp is approximate and
|
|
485
|
+
* intermediate transitions may be missing.
|
|
486
|
+
*/
|
|
487
|
+
derived: boolean;
|
|
488
|
+
/** ISO-8601 timestamp of the event. */
|
|
489
|
+
timestamp: string;
|
|
490
|
+
[key: string]: unknown;
|
|
491
|
+
}
|
|
492
|
+
/** Response body for `payments.listStatusHistory` — the status timeline of a payment. */
|
|
493
|
+
interface PaymentStatusHistoryResponse {
|
|
494
|
+
/** The payment this timeline belongs to. */
|
|
495
|
+
payment_id: string;
|
|
496
|
+
/**
|
|
497
|
+
* `true` when every event comes from the persisted status-transition log;
|
|
498
|
+
* `false` when any event had to be reconstructed from current records.
|
|
499
|
+
*/
|
|
500
|
+
complete: boolean;
|
|
501
|
+
/** The number of events returned. */
|
|
502
|
+
count: number;
|
|
503
|
+
/** All recorded events, oldest first. */
|
|
504
|
+
events: PaymentStatusHistoryEvent[];
|
|
505
|
+
}
|
|
443
506
|
/**
|
|
444
507
|
* Parameters for creating a refund.
|
|
445
508
|
*
|
|
@@ -463,9 +526,19 @@ interface RefundCreateRequest {
|
|
|
463
526
|
metadata?: Record<string, unknown> | null;
|
|
464
527
|
}
|
|
465
528
|
interface RefundUpdateRequest {
|
|
529
|
+
/** Omit to leave the reason unchanged; send an explicit `null` to clear it. */
|
|
466
530
|
reason?: string | null;
|
|
467
531
|
metadata?: Record<string, unknown> | null;
|
|
468
532
|
}
|
|
533
|
+
/**
|
|
534
|
+
* Response of `GET /refunds/aggregate`. NOTE: keyed by the backend's internal
|
|
535
|
+
* refund-status enum (`success`, `failure`, `transaction_failure`, `pending`,
|
|
536
|
+
* `manual_review`) — NOT the collapsed `RefundStatus` values
|
|
537
|
+
* (`succeeded`/`failed`/`pending`/`review`) that refund rows carry.
|
|
538
|
+
*/
|
|
539
|
+
interface RefundAggregateResponse {
|
|
540
|
+
status_with_count: Partial<Record<'success' | 'failure' | 'transaction_failure' | 'pending' | 'manual_review', number>>;
|
|
541
|
+
}
|
|
469
542
|
/** A Delopay refund returned by the API. */
|
|
470
543
|
interface RefundResponse {
|
|
471
544
|
/** Unique refund ID. */
|
|
@@ -724,7 +797,6 @@ interface DisputeListParams {
|
|
|
724
797
|
}
|
|
725
798
|
interface DisputeEvidenceRequest {
|
|
726
799
|
cancel_dispute?: boolean | null;
|
|
727
|
-
customer_email_body?: string | null;
|
|
728
800
|
customer_email_address?: string | null;
|
|
729
801
|
customer_name?: string | null;
|
|
730
802
|
customer_signature?: string | null;
|
|
@@ -749,10 +821,37 @@ interface DisputeEvidenceRequest {
|
|
|
749
821
|
cancellation_rebuttal?: string | null;
|
|
750
822
|
customer_communication?: string | null;
|
|
751
823
|
customer_purchase_ip?: string | null;
|
|
752
|
-
|
|
824
|
+
/**
|
|
825
|
+
* File id of the document showing the disputed charge and the alleged
|
|
826
|
+
* duplicate are distinct transactions. This is the field Stripe calls
|
|
827
|
+
* `duplicate_charge_documentation`.
|
|
828
|
+
*/
|
|
829
|
+
invoice_showing_distinct_transactions?: string | null;
|
|
830
|
+
/** File id of the recurring-transaction agreement (subscription disputes). */
|
|
831
|
+
recurring_transaction_agreement?: string | null;
|
|
832
|
+
/** Explanation of why the disputed charge is not a duplicate. */
|
|
753
833
|
duplicate_charge_explanation?: string | null;
|
|
834
|
+
/** Transaction id of the prior charge the disputed one allegedly duplicates. */
|
|
754
835
|
duplicate_charge_id?: string | null;
|
|
755
836
|
}
|
|
837
|
+
/** Backend evidence-type identifiers, serde snake_case (e.g. `receipt`,
|
|
838
|
+
* `invoice_showing_distinct_transactions`). Used for delete + retrieval. */
|
|
839
|
+
type DisputeEvidenceType = 'cancellation_policy' | 'customer_communication' | 'customer_signature' | 'receipt' | 'refund_policy' | 'service_documentation' | 'shipping_documentation' | 'invoice_showing_distinct_transactions' | 'recurring_transaction_agreement' | 'uncategorized_file';
|
|
840
|
+
/**
|
|
841
|
+
* One stored file-evidence entry, as `GET /disputes/evidence/{id}` returns
|
|
842
|
+
* it. The endpoint reports FILE evidence only — text evidence (customer
|
|
843
|
+
* name, product description, …) is not retrievable once submitted.
|
|
844
|
+
*/
|
|
845
|
+
interface DisputeEvidenceBlock {
|
|
846
|
+
evidence_type: DisputeEvidenceType;
|
|
847
|
+
file_metadata_response: {
|
|
848
|
+
file_id: string;
|
|
849
|
+
file_name?: string | null;
|
|
850
|
+
file_size?: number;
|
|
851
|
+
file_type?: string;
|
|
852
|
+
available?: boolean;
|
|
853
|
+
};
|
|
854
|
+
}
|
|
756
855
|
interface MandateResponse {
|
|
757
856
|
mandate_id: string;
|
|
758
857
|
status: MandateStatus;
|
|
@@ -3464,12 +3563,16 @@ declare class Disputes {
|
|
|
3464
3563
|
*/
|
|
3465
3564
|
attachEvidence(params: DisputeEvidenceRequest): Promise<DisputeResponse>;
|
|
3466
3565
|
/**
|
|
3467
|
-
* Retrieve previously
|
|
3566
|
+
* Retrieve previously stored evidence for a dispute.
|
|
3567
|
+
*
|
|
3568
|
+
* Returns an ARRAY of file-evidence blocks (this was previously mistyped
|
|
3569
|
+
* as the flat submit-request shape). Only file evidence is reported —
|
|
3570
|
+
* text evidence is not retrievable once submitted.
|
|
3468
3571
|
*
|
|
3469
3572
|
* @param disputeId - The dispute ID.
|
|
3470
|
-
* @returns The
|
|
3573
|
+
* @returns The stored file-evidence blocks.
|
|
3471
3574
|
*/
|
|
3472
|
-
retrieveEvidence(disputeId: string): Promise<
|
|
3575
|
+
retrieveEvidence(disputeId: string): Promise<DisputeEvidenceBlock[]>;
|
|
3473
3576
|
/**
|
|
3474
3577
|
* Delete submitted evidence for a dispute.
|
|
3475
3578
|
*
|
|
@@ -3488,15 +3591,19 @@ declare class Disputes {
|
|
|
3488
3591
|
/** Get dispute aggregates (profile-scoped). `GET /disputes/profile/aggregate` */
|
|
3489
3592
|
aggregateByProfile(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
3490
3593
|
/**
|
|
3491
|
-
* Fetch the latest dispute state from the connector (gateway).
|
|
3492
|
-
* `GET /disputes/{
|
|
3594
|
+
* Fetch the latest dispute state from the connector (gateway) and persist it.
|
|
3595
|
+
* `GET /disputes/{disputeId}?force_sync=true`
|
|
3596
|
+
*
|
|
3597
|
+
* The path parameter is the **Delopay dispute id** (`dp_…`). Force-sync asks the
|
|
3598
|
+
* backend to pull the dispute from the connector (supported where the connector
|
|
3599
|
+
* implements the dispute-sync flow, e.g. Stripe) and update the stored record
|
|
3600
|
+
* before returning it.
|
|
3493
3601
|
*
|
|
3494
|
-
* Note:
|
|
3495
|
-
*
|
|
3496
|
-
*
|
|
3497
|
-
* path were silently hitting 404s.
|
|
3602
|
+
* Note: this method previously called `GET /disputes/{id}/fetch`, which is a
|
|
3603
|
+
* different backend route — a bulk import keyed by **merchant connector account
|
|
3604
|
+
* id** with a required date range — so every call with a dispute id failed.
|
|
3498
3605
|
*/
|
|
3499
|
-
fetchFromConnector(
|
|
3606
|
+
fetchFromConnector(disputeId: string): Promise<DisputeResponse>;
|
|
3500
3607
|
}
|
|
3501
3608
|
|
|
3502
3609
|
/**
|
|
@@ -3866,6 +3973,24 @@ declare class Payments {
|
|
|
3866
3973
|
* ```
|
|
3867
3974
|
*/
|
|
3868
3975
|
listAttempts(paymentId: string, options?: RequestExtras): Promise<PaymentAttemptsListResponse>;
|
|
3976
|
+
/**
|
|
3977
|
+
* The status timeline of a payment: every recorded creation / status
|
|
3978
|
+
* transition of the intent and its attempts, refunds and disputes, oldest
|
|
3979
|
+
* first. `complete: false` marks timelines partially reconstructed from
|
|
3980
|
+
* current records (payments created before the status log existed).
|
|
3981
|
+
*
|
|
3982
|
+
* @param paymentId - The payment intent ID.
|
|
3983
|
+
* @returns The ordered status-history events.
|
|
3984
|
+
*
|
|
3985
|
+
* @example
|
|
3986
|
+
* ```typescript
|
|
3987
|
+
* const { events, complete } = await delopay.payments.listStatusHistory('pay_abc123');
|
|
3988
|
+
* for (const event of events) {
|
|
3989
|
+
* console.log(event.timestamp, event.entity_type, event.status);
|
|
3990
|
+
* }
|
|
3991
|
+
* ```
|
|
3992
|
+
*/
|
|
3993
|
+
listStatusHistory(paymentId: string, options?: RequestExtras): Promise<PaymentStatusHistoryResponse>;
|
|
3869
3994
|
/**
|
|
3870
3995
|
* Update an existing payment intent before it is confirmed.
|
|
3871
3996
|
*
|
|
@@ -4191,9 +4316,9 @@ declare class Refunds {
|
|
|
4191
4316
|
/** Get refund filter options. `GET /refunds/filter` */
|
|
4192
4317
|
getFilters(params?: Record<string, string | number | undefined>): Promise<Record<string, unknown>>;
|
|
4193
4318
|
/** Get refund aggregates. `GET /refunds/aggregate` */
|
|
4194
|
-
aggregate(params?: Record<string, string | number | undefined>): Promise<
|
|
4319
|
+
aggregate(params?: Record<string, string | number | undefined>): Promise<RefundAggregateResponse>;
|
|
4195
4320
|
/** Get refund aggregates (profile-scoped). `GET /refunds/profile/aggregate` */
|
|
4196
|
-
aggregateByProfile(params?: Record<string, string | number | undefined>): Promise<
|
|
4321
|
+
aggregateByProfile(params?: Record<string, string | number | undefined>): Promise<RefundAggregateResponse>;
|
|
4197
4322
|
/** Manually update refund status. `PUT /refunds/{refundId}/manual-update` */
|
|
4198
4323
|
manualUpdate(refundId: string, params: Record<string, unknown>): Promise<RefundResponse>;
|
|
4199
4324
|
}
|
|
@@ -5675,4 +5800,4 @@ declare function parseImportedBranding(raw: unknown): CheckoutBranding;
|
|
|
5675
5800
|
declare function applyBrandingVariables(el: HTMLElement, b: CheckoutBranding): void;
|
|
5676
5801
|
declare function shadowFor(style: SurfaceStyle): string;
|
|
5677
5802
|
|
|
5678
|
-
export { type AddUserRequest, type AddUserResponse, type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, type AnalyticsChild, type AnalyticsConnectorDay, type AnalyticsConnectorSeries, AnalyticsDashboard, type AnalyticsDayBucket, type AnalyticsMethodSlice, type AnalyticsScopeRequest, type AnalyticsScopeResponse, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyListConstraints, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AttemptStatus, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, type AvailabilityOverrideCreateRequest, type AvailabilityOverrideResponse, AvailabilityOverrides, type AvailabilityPreviewMethod, type AvailabilityPreviewParams, type AvailabilityPreviewResponse, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlockedAttempt, type BlockedAttemptListParams, type BlockedAttemptListResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, type BrandingExport, type BrandingSource, type BuiltInRegionGroupResponse, type BusinessPaymentLinkConfig, CUSTOM_CSS_MAX_LENGTH, type CancelSubscriptionRequest, type CancelSubscriptionResponse, type CaptureMethod, type CardDetail, type CardDetailFromLocker, Cards, type ChangePasswordRequest, type CheckoutBranding, type ConditionNode, type ConfirmSubscriptionPaymentDetails, type ConfirmSubscriptionRequest, type ConfirmSubscriptionResponse, type Connector, type ConnectorCloneRequest, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorSelection, type ConnectorType, type ConnectorUpdateRequest, type ConnectorVolumeSplit, type ConnectorWebhookEntry, type ConnectorWebhookEventType, type ConnectorWebhookListResponse, type ConnectorWebhookRegisterRequest, type ConnectorWebhookRegisterResponse, type CornerRadius, type CreateAndConfirmSubscriptionRequest, type CreateSubscriptionPaymentDetails, type CreateSubscriptionRequest, type Currency, type CurrencyRevenue, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, type DeleteAccountRequest, type DeleteUserRoleRequest, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceRequest, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EncodedBranding, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EuclidComparison, type EuclidComparisonType, type EuclidIfStatement, type EuclidValue, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, FeeProgramBuilder, type FeeRuleConditions, type FeeRuleInput, type FeeRulePreviewRequest, type FeeRulePreviewResponse, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeSpecInput, type FeeType, Files, type FontFamily, type FontWeight, Forex, type ForgotPasswordRequest, type FromEmailRequest, type FutureUsage, type GatewayConnectRequest, type GatewayResponse, type GetSubscriptionItemsParams, type GetSubscriptionItemsResponse, type GlobalSearchRequest, type GroupNode, type ImpersonateEmployeeRequest, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type InvoiceStatus, type LabelStyle, type LayoutStyle, type LeafNode, type LedgerEntry, type LedgerListParams, type LedgerResponse, type LinkedRoutingConfigRetrieveResponse, type ListInvitableRolesParams, type ListUsersInLineageParams, type LoginHistoryEntry, type LoginHistoryParams, type LoginHistoryResponse, type LogoShape, type LogoSize, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type MerchantRoutingAlgorithm, type MethodSurcharge, type MinimalRoleInfo, type NonPillRadius, type OverrideAction, type OverrideScope, type ParentGroup, type ParentGroupInfo, type PauseSubscriptionRequest, type PauseSubscriptionResponse, type PaymentAttemptResponse, type PaymentAttemptsListResponse, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentErrorDetails, type PaymentExperience, type PaymentIdFormatConfig, type PaymentIdStyle, type PaymentLayout, type PaymentLinkBackgroundImageConfig, type PaymentLinkConfigRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentLinkTransactionDetails, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentRetrieveOptions, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PerMethodSurchargeItem, type PermissionScope, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PlatformFeeKind, type PlatformFeeOutput, type PlatformFeeProgram, type PlatformFeeRule, type PlatformFeeRuleInput, type PlatformFeeRuleOutput, type PlatformFeeRuleRecord, type PlatformFeeRuleRequest, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileDefaultRoutingConfig, type ProfileDeniedConnectorsResponse, type ProfileLogoUploadResponse, type ProfileResponse, type ProfileUpdateRequest, type ProgramConnectorSelection, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCountriesResponse, type RegionCreateRequest, type RegionResponse, type RegionSetCountriesRequest, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestExtras, type RequestFn, type RequestOptions, type ResetPasswordRequest, type ResumeSubscriptionRequest, type ResumeSubscriptionResponse, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, type RuleConnectorSelection, Search, type SearchGroupResponse, type SearchIndex, type SearchStatus, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopStatsResponse, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SizeScale, type SpacingScale, type StaticRoutingAlgorithm, type StatsPeriod, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionEstimateParams, type SubscriptionEstimateResponse, type SubscriptionInvoice, type SubscriptionItem, type SubscriptionItemPrice, type SubscriptionItemType, type SubscriptionLineItem, type SubscriptionListParams, type SubscriptionPaymentData, type SubscriptionPaymentDetails, type SubscriptionPeriodUnit, type SubscriptionResponse, type SubscriptionStatus, Subscriptions, type SummaryPosition, type SurchargeRuleRequest, type SurchargeRuleResponse, type SurfaceStyle, type SwitchMerchantRequest, type SwitchProfileRequest, type Terminate2faQueryParams, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TierSummary, type TokenPurpose, type TokenResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type TrustBadge, type UpdateSubscriptionRequest, type UpdateUserDetailsRequest, type UpdateUserRoleRequest, type UserInLineage, type UserResponse, type UserSessionEntry, type UserSessionListResponse, type UserSessionRevokeResponse, type VerifyTotpRequest, type WebhookDeliveryAttempt, type WebhookEvent, type WebhookRegistrationEnvironment, Webhooks, allOf, anyOf, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, decodeBadges, decodeBranding, defaultBranding, encodeBadges, encodeBranding, feeProgram, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, leaf, logoDimensions, parseImportedBranding, programToTree, radiusValue, ruleMatchToTree, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue };
|
|
5803
|
+
export { type AddUserRequest, type AddUserResponse, type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, type AnalyticsChild, type AnalyticsConnectorDay, type AnalyticsConnectorSeries, AnalyticsDashboard, type AnalyticsDayBucket, type AnalyticsMethodSlice, type AnalyticsScopeRequest, type AnalyticsScopeResponse, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyListConstraints, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AttemptStatus, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, type AvailabilityOverrideCreateRequest, type AvailabilityOverrideResponse, AvailabilityOverrides, type AvailabilityPreviewMethod, type AvailabilityPreviewParams, type AvailabilityPreviewResponse, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlockedAttempt, type BlockedAttemptListParams, type BlockedAttemptListResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, type BrandingExport, type BrandingSource, type BuiltInRegionGroupResponse, type BusinessPaymentLinkConfig, CUSTOM_CSS_MAX_LENGTH, type CancelSubscriptionRequest, type CancelSubscriptionResponse, type CaptureMethod, type CardDetail, type CardDetailFromLocker, Cards, type ChangePasswordRequest, type CheckoutBranding, type ConditionNode, type ConfirmSubscriptionPaymentDetails, type ConfirmSubscriptionRequest, type ConfirmSubscriptionResponse, type Connector, type ConnectorCloneRequest, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorSelection, type ConnectorType, type ConnectorUpdateRequest, type ConnectorVolumeSplit, type ConnectorWebhookEntry, type ConnectorWebhookEventType, type ConnectorWebhookListResponse, type ConnectorWebhookRegisterRequest, type ConnectorWebhookRegisterResponse, type CornerRadius, type CreateAndConfirmSubscriptionRequest, type CreateSubscriptionPaymentDetails, type CreateSubscriptionRequest, type Currency, type CurrencyRevenue, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, type DeleteAccountRequest, type DeleteUserRoleRequest, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceBlock, type DisputeEvidenceRequest, type DisputeEvidenceType, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EncodedBranding, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EuclidComparison, type EuclidComparisonType, type EuclidIfStatement, type EuclidValue, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, FeeProgramBuilder, type FeeRuleConditions, type FeeRuleInput, type FeeRulePreviewRequest, type FeeRulePreviewResponse, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeSpecInput, type FeeType, Files, type FontFamily, type FontWeight, Forex, type ForgotPasswordRequest, type FromEmailRequest, type FutureUsage, type GatewayConnectRequest, type GatewayResponse, type GetSubscriptionItemsParams, type GetSubscriptionItemsResponse, type GlobalSearchRequest, type GroupNode, type ImpersonateEmployeeRequest, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type InvoiceStatus, type LabelStyle, type LayoutStyle, type LeafNode, type LedgerEntry, type LedgerListParams, type LedgerResponse, type LinkedRoutingConfigRetrieveResponse, type ListInvitableRolesParams, type ListUsersInLineageParams, type LoginHistoryEntry, type LoginHistoryParams, type LoginHistoryResponse, type LogoShape, type LogoSize, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type MerchantRoutingAlgorithm, type MethodSurcharge, type MinimalRoleInfo, type NonPillRadius, type OverrideAction, type OverrideScope, type ParentGroup, type ParentGroupInfo, type PauseSubscriptionRequest, type PauseSubscriptionResponse, type PaymentAttemptResponse, type PaymentAttemptsListResponse, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentErrorDetails, type PaymentExperience, type PaymentIdFormatConfig, type PaymentIdStyle, type PaymentIntentStateMetadata, type PaymentLayout, type PaymentLinkBackgroundImageConfig, type PaymentLinkConfigRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentLinkTransactionDetails, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentRetrieveOptions, type PaymentStatusHistoryEntityType, type PaymentStatusHistoryEvent, type PaymentStatusHistoryResponse, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PerMethodSurchargeItem, type PermissionScope, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PlatformFeeKind, type PlatformFeeOutput, type PlatformFeeProgram, type PlatformFeeRule, type PlatformFeeRuleInput, type PlatformFeeRuleOutput, type PlatformFeeRuleRecord, type PlatformFeeRuleRequest, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileDefaultRoutingConfig, type ProfileDeniedConnectorsResponse, type ProfileLogoUploadResponse, type ProfileResponse, type ProfileUpdateRequest, type ProgramConnectorSelection, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundAggregateResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCountriesResponse, type RegionCreateRequest, type RegionResponse, type RegionSetCountriesRequest, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestExtras, type RequestFn, type RequestOptions, type ResetPasswordRequest, type ResumeSubscriptionRequest, type ResumeSubscriptionResponse, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, type RuleConnectorSelection, Search, type SearchGroupResponse, type SearchIndex, type SearchStatus, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopStatsResponse, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SizeScale, type SpacingScale, type StaticRoutingAlgorithm, type StatsPeriod, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionEstimateParams, type SubscriptionEstimateResponse, type SubscriptionInvoice, type SubscriptionItem, type SubscriptionItemPrice, type SubscriptionItemType, type SubscriptionLineItem, type SubscriptionListParams, type SubscriptionPaymentData, type SubscriptionPaymentDetails, type SubscriptionPeriodUnit, type SubscriptionResponse, type SubscriptionStatus, Subscriptions, type SummaryPosition, type SurchargeRuleRequest, type SurchargeRuleResponse, type SurfaceStyle, type SwitchMerchantRequest, type SwitchProfileRequest, type Terminate2faQueryParams, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TierSummary, type TokenPurpose, type TokenResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type TrustBadge, type UpdateSubscriptionRequest, type UpdateUserDetailsRequest, type UpdateUserRoleRequest, type UserInLineage, type UserResponse, type UserSessionEntry, type UserSessionListResponse, type UserSessionRevokeResponse, type VerifyTotpRequest, type WebhookDeliveryAttempt, type WebhookEvent, type WebhookRegistrationEnvironment, Webhooks, allOf, anyOf, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, decodeBadges, decodeBranding, defaultBranding, encodeBadges, encodeBranding, feeProgram, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, leaf, logoDimensions, parseImportedBranding, programToTree, radiusValue, ruleMatchToTree, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue };
|