@zkp2p/pay-shared 5.0.0 → 7.0.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/README.md +14 -1
- package/dist/attribution.d.ts +2 -1
- package/dist/attribution.js +1 -0
- package/dist/bitcoin.d.ts +4 -0
- package/dist/bitcoin.js +38 -6
- package/dist/cashoutCurrencies.d.ts +109 -0
- package/dist/cashoutCurrencies.js +94 -0
- package/dist/cashoutRails.d.ts +34 -0
- package/dist/cashoutRails.js +71 -0
- package/dist/crypto.d.ts +39 -0
- package/dist/crypto.js +110 -3
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/types.d.ts +700 -2
- package/dist/types.js +143 -1
- package/package.json +2 -2
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { PAYOUT_RAIL_CURRENCIES, PayoutCurrencyType, PayoutFiatValue, PayoutOracleCurrencyType } from './cashoutCurrencies.js';
|
|
1
2
|
import type { PayCryptoTokenSymbol } from './crypto.js';
|
|
2
3
|
import type { ProofMode } from './buyerTee.js';
|
|
3
4
|
import type { OnboardingStepIdValue } from './onboarding.js';
|
|
5
|
+
import type { SarSupportedFiatRail } from './rails.js';
|
|
4
6
|
export declare const PaymentPlatform: {
|
|
5
7
|
readonly VENMO: "venmo";
|
|
6
8
|
readonly CASHAPP: "cashapp";
|
|
@@ -1043,8 +1045,21 @@ export declare const WebhookEventType: {
|
|
|
1043
1045
|
readonly PAYMENT_CHARGEBACKED: "PAYMENT_CHARGEBACKED";
|
|
1044
1046
|
readonly ORDER_PARTIALLY_CHARGEBACKED: "ORDER_PARTIALLY_CHARGEBACKED";
|
|
1045
1047
|
readonly ORDER_CHARGEBACKED: "ORDER_CHARGEBACKED";
|
|
1048
|
+
readonly PAYOUT_ORDER_CREATED: "PAYOUT_ORDER_CREATED";
|
|
1049
|
+
readonly PAYOUT_ORDER_CANCELLED: "PAYOUT_ORDER_CANCELLED";
|
|
1050
|
+
readonly PAYOUT_ORDER_PARTIALLY_FUNDED: "PAYOUT_ORDER_PARTIALLY_FUNDED";
|
|
1051
|
+
readonly PAYOUT_ORDER_FUNDED: "PAYOUT_ORDER_FUNDED";
|
|
1052
|
+
readonly PAYOUT_ORDER_MATCHED: "PAYOUT_ORDER_MATCHED";
|
|
1053
|
+
readonly PAYOUT_ORDER_PARTIALLY_PAID: "PAYOUT_ORDER_PARTIALLY_PAID";
|
|
1054
|
+
readonly PAYOUT_ORDER_SETTLED: "PAYOUT_ORDER_SETTLED";
|
|
1055
|
+
readonly PAYOUT_ORDER_EXPIRED: "PAYOUT_ORDER_EXPIRED";
|
|
1046
1056
|
};
|
|
1047
1057
|
export type WebhookEventTypeValue = typeof WebhookEventType[keyof typeof WebhookEventType];
|
|
1058
|
+
/** Payout events carry a PayoutView, not the order envelope. */
|
|
1059
|
+
export declare const PAYOUT_WEBHOOK_EVENT_TYPES: readonly ["PAYOUT_ORDER_CREATED", "PAYOUT_ORDER_CANCELLED", "PAYOUT_ORDER_PARTIALLY_FUNDED", "PAYOUT_ORDER_FUNDED", "PAYOUT_ORDER_MATCHED", "PAYOUT_ORDER_PARTIALLY_PAID", "PAYOUT_ORDER_SETTLED", "PAYOUT_ORDER_EXPIRED"];
|
|
1060
|
+
export type PayoutWebhookEventTypeValue = typeof PAYOUT_WEBHOOK_EVENT_TYPES[number];
|
|
1061
|
+
export type OrderWebhookEventTypeValue = Exclude<WebhookEventTypeValue, PayoutWebhookEventTypeValue>;
|
|
1062
|
+
export declare function isPayoutWebhookEventType(type: string): type is PayoutWebhookEventTypeValue;
|
|
1048
1063
|
export declare const WebhookDeliveryStatus: {
|
|
1049
1064
|
readonly PENDING: "PENDING";
|
|
1050
1065
|
readonly DELIVERED: "DELIVERED";
|
|
@@ -1077,9 +1092,9 @@ export type WebhookDelivery = {
|
|
|
1077
1092
|
responseCode?: number | null;
|
|
1078
1093
|
createdAt: string;
|
|
1079
1094
|
};
|
|
1080
|
-
export type
|
|
1095
|
+
export type OrderWebhookPayload = {
|
|
1081
1096
|
id: string;
|
|
1082
|
-
type:
|
|
1097
|
+
type: OrderWebhookEventTypeValue;
|
|
1083
1098
|
timestamp: string;
|
|
1084
1099
|
data: {
|
|
1085
1100
|
order: CheckoutOrder | null;
|
|
@@ -1101,6 +1116,47 @@ export type WebhookPayload = {
|
|
|
1101
1116
|
amountChange?: OrderAmountChange;
|
|
1102
1117
|
};
|
|
1103
1118
|
};
|
|
1119
|
+
/** Bumped only on a breaking change to a payout payload. */
|
|
1120
|
+
export declare const PAYOUT_WEBHOOK_VERSION = 2;
|
|
1121
|
+
/** One buyer payment that left part of the payout unpaid; amounts are decimal USDC except fill.fiat. */
|
|
1122
|
+
export interface PayoutPartialPayment {
|
|
1123
|
+
/** The payout's depositAmount: what buyers can pay in total. */
|
|
1124
|
+
expectedAmount: string;
|
|
1125
|
+
/** What buyers have paid so far, this fill included. */
|
|
1126
|
+
paidAmount: string;
|
|
1127
|
+
/** expectedAmount − paidAmount. */
|
|
1128
|
+
remainingAmount: string;
|
|
1129
|
+
fill: {
|
|
1130
|
+
amount: string;
|
|
1131
|
+
txHash: string;
|
|
1132
|
+
/** Fiat paid at this fill's bound rate; null when the currency or rate is unknown. */
|
|
1133
|
+
fiat: PayoutFiatValue | null;
|
|
1134
|
+
};
|
|
1135
|
+
}
|
|
1136
|
+
export type PayoutWebhookEventData = {
|
|
1137
|
+
readonly type: Exclude<PayoutWebhookEventTypeValue, typeof WebhookEventType.PAYOUT_ORDER_PARTIALLY_PAID>;
|
|
1138
|
+
readonly data: PayoutView;
|
|
1139
|
+
} | {
|
|
1140
|
+
readonly type: typeof WebhookEventType.PAYOUT_ORDER_PARTIALLY_PAID;
|
|
1141
|
+
readonly data: PayoutView;
|
|
1142
|
+
readonly partialPayment: PayoutPartialPayment;
|
|
1143
|
+
};
|
|
1144
|
+
export type PayoutWebhookPayload = {
|
|
1145
|
+
id: string;
|
|
1146
|
+
type: Exclude<PayoutWebhookEventTypeValue, typeof WebhookEventType.PAYOUT_ORDER_PARTIALLY_PAID>;
|
|
1147
|
+
timestamp: string;
|
|
1148
|
+
version: typeof PAYOUT_WEBHOOK_VERSION;
|
|
1149
|
+
data: PayoutView;
|
|
1150
|
+
} | {
|
|
1151
|
+
id: string;
|
|
1152
|
+
type: typeof WebhookEventType.PAYOUT_ORDER_PARTIALLY_PAID;
|
|
1153
|
+
timestamp: string;
|
|
1154
|
+
version: typeof PAYOUT_WEBHOOK_VERSION;
|
|
1155
|
+
data: PayoutView;
|
|
1156
|
+
partialPayment: PayoutPartialPayment;
|
|
1157
|
+
};
|
|
1158
|
+
export type WebhookPayload = OrderWebhookPayload | PayoutWebhookPayload;
|
|
1159
|
+
export declare function isPayoutWebhook(payload: WebhookPayload): payload is PayoutWebhookPayload;
|
|
1104
1160
|
export type CreateWebhookRequest = {
|
|
1105
1161
|
url: string;
|
|
1106
1162
|
events?: WebhookEventTypeValue[];
|
|
@@ -1201,4 +1257,646 @@ export type OwnershipTransferMasterMerchantPermissionType = typeof OwnershipTran
|
|
|
1201
1257
|
export declare const OWNERSHIP_TRANSFER_MASTER_MERCHANT_PERMISSIONS: readonly OwnershipTransferMasterMerchantPermissionType[];
|
|
1202
1258
|
/** "alice@example.com" → "a•••@example.com". The input is a validated, lowercased address. */
|
|
1203
1259
|
export declare function maskOwnershipTransferEmail(email: string): string;
|
|
1260
|
+
export declare const PayoutStatus: {
|
|
1261
|
+
readonly AWAITING_FUNDING: "AWAITING_FUNDING";
|
|
1262
|
+
readonly FUNDED: "FUNDED";
|
|
1263
|
+
readonly READY: "READY";
|
|
1264
|
+
readonly LISTING: "LISTING";
|
|
1265
|
+
readonly PAYING: "PAYING";
|
|
1266
|
+
readonly SETTLED: "SETTLED";
|
|
1267
|
+
readonly CANCELLED: "CANCELLED";
|
|
1268
|
+
readonly EXPIRED: "EXPIRED";
|
|
1269
|
+
};
|
|
1270
|
+
export type PayoutStatusType = typeof PayoutStatus[keyof typeof PayoutStatus];
|
|
1271
|
+
export declare const PayoutFundingStatus: {
|
|
1272
|
+
readonly AWAITING_FUNDING: "AWAITING_FUNDING";
|
|
1273
|
+
readonly PARTIALLY_FUNDED: "PARTIALLY_FUNDED";
|
|
1274
|
+
readonly FUNDED: "FUNDED";
|
|
1275
|
+
readonly FUNDING_EXPIRED: "FUNDING_EXPIRED";
|
|
1276
|
+
};
|
|
1277
|
+
export type PayoutFundingStatusType = typeof PayoutFundingStatus[keyof typeof PayoutFundingStatus];
|
|
1278
|
+
export declare const PayoutCancelSource: {
|
|
1279
|
+
readonly MERCHANT: "MERCHANT";
|
|
1280
|
+
readonly PEER_APP: "PEER_APP";
|
|
1281
|
+
};
|
|
1282
|
+
export type PayoutCancelSourceType = typeof PayoutCancelSource[keyof typeof PayoutCancelSource];
|
|
1283
|
+
export declare const PayoutKind: {
|
|
1284
|
+
readonly ESCROW: "ESCROW";
|
|
1285
|
+
readonly CRYPTO: "CRYPTO";
|
|
1286
|
+
};
|
|
1287
|
+
export type PayoutKindType = typeof PayoutKind[keyof typeof PayoutKind];
|
|
1288
|
+
export declare const PayoutAttemptStatus: {
|
|
1289
|
+
readonly ACTIVE: "ACTIVE";
|
|
1290
|
+
readonly CLOSED: "CLOSED";
|
|
1291
|
+
readonly SETTLED: "SETTLED";
|
|
1292
|
+
readonly FAILED: "FAILED";
|
|
1293
|
+
};
|
|
1294
|
+
export type PayoutAttemptStatusType = typeof PayoutAttemptStatus[keyof typeof PayoutAttemptStatus];
|
|
1295
|
+
/** Fiat payout methods, in the order players see them: SAR rails, then buyer-proof rails. */
|
|
1296
|
+
export declare const PayoutFiatRail: {
|
|
1297
|
+
readonly VENMO: "venmo";
|
|
1298
|
+
readonly CASHAPP: "cashapp";
|
|
1299
|
+
readonly PAYPAL: "paypal";
|
|
1300
|
+
readonly ZELLE: "zelle";
|
|
1301
|
+
readonly REVOLUT: "revolut";
|
|
1302
|
+
readonly CHIME: "chime";
|
|
1303
|
+
};
|
|
1304
|
+
export type PayoutFiatRailType = typeof PayoutFiatRail[keyof typeof PayoutFiatRail];
|
|
1305
|
+
/** One rail per crypto payout network, with checkout's rail ids (any-coin spec "Cashout rails"); the player sees them as one "Crypto" option. */
|
|
1306
|
+
export declare const PayoutCryptoRail: {
|
|
1307
|
+
readonly RELAY_1: "relay_1";
|
|
1308
|
+
readonly RELAY_10: "relay_10";
|
|
1309
|
+
readonly RELAY_56: "relay_56";
|
|
1310
|
+
readonly RELAY_137: "relay_137";
|
|
1311
|
+
readonly RELAY_480: "relay_480";
|
|
1312
|
+
readonly RELAY_999: "relay_999";
|
|
1313
|
+
readonly RELAY_5042: "relay_5042";
|
|
1314
|
+
readonly RELAY_8453: "relay_8453";
|
|
1315
|
+
readonly RELAY_42161: "relay_42161";
|
|
1316
|
+
readonly RELAY_8253038: "relay_8253038";
|
|
1317
|
+
readonly RELAY_728126428: "relay_728126428";
|
|
1318
|
+
readonly RELAY_792703809: "relay_792703809";
|
|
1319
|
+
/** ZEC on Zcash through NEAR Intents (Zcash spec "Catalog, route and address"); checkout's ZCASH_RAIL. */
|
|
1320
|
+
readonly NEAR_INTENTS_133701: "near_intents_133701";
|
|
1321
|
+
};
|
|
1322
|
+
export type PayoutCryptoRailType = typeof PayoutCryptoRail[keyof typeof PayoutCryptoRail];
|
|
1323
|
+
/** Every payout rail, in rail order: fiat, then the crypto networks. */
|
|
1324
|
+
export declare const PayoutRail: {
|
|
1325
|
+
readonly RELAY_1: "relay_1";
|
|
1326
|
+
readonly RELAY_10: "relay_10";
|
|
1327
|
+
readonly RELAY_56: "relay_56";
|
|
1328
|
+
readonly RELAY_137: "relay_137";
|
|
1329
|
+
readonly RELAY_480: "relay_480";
|
|
1330
|
+
readonly RELAY_999: "relay_999";
|
|
1331
|
+
readonly RELAY_5042: "relay_5042";
|
|
1332
|
+
readonly RELAY_8453: "relay_8453";
|
|
1333
|
+
readonly RELAY_42161: "relay_42161";
|
|
1334
|
+
readonly RELAY_8253038: "relay_8253038";
|
|
1335
|
+
readonly RELAY_728126428: "relay_728126428";
|
|
1336
|
+
readonly RELAY_792703809: "relay_792703809";
|
|
1337
|
+
/** ZEC on Zcash through NEAR Intents (Zcash spec "Catalog, route and address"); checkout's ZCASH_RAIL. */
|
|
1338
|
+
readonly NEAR_INTENTS_133701: "near_intents_133701";
|
|
1339
|
+
readonly VENMO: "venmo";
|
|
1340
|
+
readonly CASHAPP: "cashapp";
|
|
1341
|
+
readonly PAYPAL: "paypal";
|
|
1342
|
+
readonly ZELLE: "zelle";
|
|
1343
|
+
readonly REVOLUT: "revolut";
|
|
1344
|
+
readonly CHIME: "chime";
|
|
1345
|
+
};
|
|
1346
|
+
export type PayoutRailType = PayoutFiatRailType | PayoutCryptoRailType;
|
|
1347
|
+
/** Fiat rails whose account the player connects so Peer can confirm buyer payments; derived from SAR_SUPPORTED_FIAT_RAILS. */
|
|
1348
|
+
export type PayoutSarRailType = Extract<PayoutFiatRailType, SarSupportedFiatRail>;
|
|
1349
|
+
/** Fiat rails with no connect step: the buyer proves the payment with the PeerAuth extension or the Peer app. */
|
|
1350
|
+
export type CashoutBuyerProofRailType = Exclude<PayoutFiatRailType, PayoutSarRailType>;
|
|
1351
|
+
export declare const PayoutProvider: {
|
|
1352
|
+
readonly RELAY: "RELAY";
|
|
1353
|
+
readonly NEAR_INTENTS: "NEAR_INTENTS";
|
|
1354
|
+
};
|
|
1355
|
+
export type PayoutProviderType = typeof PayoutProvider[keyof typeof PayoutProvider];
|
|
1356
|
+
export declare const CashoutPayoutBridgeStatus: {
|
|
1357
|
+
readonly QUOTED: "QUOTED";
|
|
1358
|
+
readonly NOT_SENT: "NOT_SENT";
|
|
1359
|
+
readonly BRIDGING: "BRIDGING";
|
|
1360
|
+
readonly DELIVERED: "DELIVERED";
|
|
1361
|
+
readonly REFUNDED: "REFUNDED";
|
|
1362
|
+
};
|
|
1363
|
+
export type CashoutPayoutBridgeStatusType = typeof CashoutPayoutBridgeStatus[keyof typeof CashoutPayoutBridgeStatus];
|
|
1364
|
+
/** A crypto payout's coin, network and the player's address there. */
|
|
1365
|
+
export interface PayoutCryptoDestination {
|
|
1366
|
+
chainId: number;
|
|
1367
|
+
/** The shared catalog's address for the token on chainId. */
|
|
1368
|
+
tokenAddress: string;
|
|
1369
|
+
symbol: PayCryptoTokenSymbol;
|
|
1370
|
+
decimals: number;
|
|
1371
|
+
/** Canonical: EVM checksummed, bech32 lower-case, base58 as entered. */
|
|
1372
|
+
address: string;
|
|
1373
|
+
}
|
|
1374
|
+
/** Body of the crypto payout-method, payout-quote and send-to-address requests. The rail names the network. */
|
|
1375
|
+
export interface CashoutPayoutDestinationRequest {
|
|
1376
|
+
rail: PayoutCryptoRailType;
|
|
1377
|
+
tokenAddress: string;
|
|
1378
|
+
address: string;
|
|
1379
|
+
}
|
|
1380
|
+
/** A crypto payout method: the network's rail and where on it the player takes the payout. */
|
|
1381
|
+
export interface PayoutCryptoMethod {
|
|
1382
|
+
rail: PayoutCryptoRailType;
|
|
1383
|
+
destination: PayoutCryptoDestination;
|
|
1384
|
+
}
|
|
1385
|
+
/** POST /api/v1/cashout-checkout/:id/payout-quote. Not a promise. */
|
|
1386
|
+
export interface CashoutPayoutQuote {
|
|
1387
|
+
destination: PayoutCryptoDestination;
|
|
1388
|
+
/** Decimal USDC that would leave the player's wallet. */
|
|
1389
|
+
usdcAmount: string;
|
|
1390
|
+
/** Decimal destination token; equals usdcAmount for USDC on Base. */
|
|
1391
|
+
estimatedAmount: string;
|
|
1392
|
+
quotedAt: string;
|
|
1393
|
+
}
|
|
1394
|
+
/** The player's bridged payout, newest attempt first; never NOT_SENT. */
|
|
1395
|
+
export interface CashoutPayoutBridgeView {
|
|
1396
|
+
provider: PayoutProviderType;
|
|
1397
|
+
status: Exclude<CashoutPayoutBridgeStatusType, typeof CashoutPayoutBridgeStatus.NOT_SENT>;
|
|
1398
|
+
destination: PayoutCryptoDestination;
|
|
1399
|
+
usdcAmount: string;
|
|
1400
|
+
/** The binding quote's output, decimal destination token. */
|
|
1401
|
+
estimatedAmount: string;
|
|
1402
|
+
deliveredAmount: string | null;
|
|
1403
|
+
destinationTxHash: string | null;
|
|
1404
|
+
/** Decimal USDC. */
|
|
1405
|
+
refundedAmount: string | null;
|
|
1406
|
+
refundTxHash: string | null;
|
|
1407
|
+
}
|
|
1408
|
+
export interface PayoutPartialFillView {
|
|
1409
|
+
/** Fiat paid at this fill's bound rate; null when the currency or rate is unknown. */
|
|
1410
|
+
fiat: PayoutFiatValue | null;
|
|
1411
|
+
/** Decimal USDC this buyer paid. */
|
|
1412
|
+
amount: string;
|
|
1413
|
+
txHash: string;
|
|
1414
|
+
paidAt: string;
|
|
1415
|
+
}
|
|
1416
|
+
/** Where a SETTLED payout's USDC ended up; decimal USDC, "0.00" for a part that did not happen. */
|
|
1417
|
+
export interface PayoutSettlementBreakdown {
|
|
1418
|
+
/** Paid by buyers through the escrow, across every listing. */
|
|
1419
|
+
buyerPaidAmount: string;
|
|
1420
|
+
/** Fiat totals in first-paid order; null if any payment has an unknown currency or bound rate, [] if no buyer paid. */
|
|
1421
|
+
buyerPaidFiat: PayoutFiatValue[] | null;
|
|
1422
|
+
/** USDC that left the player's wallet for a crypto payout (direct or bridged) or a send-to-address remainder. */
|
|
1423
|
+
sentAmount: string;
|
|
1424
|
+
/** The player's recipient: EVM lower-case, Solana, Tron and Bitcoin canonical; never a deposit address. */
|
|
1425
|
+
sentTo: string | null;
|
|
1426
|
+
/** Left in, or returned to, the player's Peer wallet. */
|
|
1427
|
+
returnedAmount: string;
|
|
1428
|
+
/** Swept by the escrow as dust when it closed the deposit. */
|
|
1429
|
+
dustAmount: string;
|
|
1430
|
+
/** Σ refundLossUnits: USDC Relay kept on refunds; "0.00" when none. */
|
|
1431
|
+
refundFeeAmount: string;
|
|
1432
|
+
}
|
|
1433
|
+
/** Merchant-facing payout. Never includes the Peer fee, the player's email, wallet or payee handle. */
|
|
1434
|
+
export interface PayoutView {
|
|
1435
|
+
/** The chosen fiat payout currency; null for crypto or no selected method. */
|
|
1436
|
+
payoutCurrency: PayoutCurrencyType | null;
|
|
1437
|
+
payoutId: string;
|
|
1438
|
+
merchantReference: string | null;
|
|
1439
|
+
status: PayoutStatusType;
|
|
1440
|
+
fundingStatus: PayoutFundingStatusType;
|
|
1441
|
+
payout: {
|
|
1442
|
+
amount: string;
|
|
1443
|
+
chainId: number;
|
|
1444
|
+
tokenAddress: string;
|
|
1445
|
+
decimals: number;
|
|
1446
|
+
};
|
|
1447
|
+
merchantFee: {
|
|
1448
|
+
bps: number;
|
|
1449
|
+
amount: string;
|
|
1450
|
+
};
|
|
1451
|
+
funding: {
|
|
1452
|
+
chainId: number;
|
|
1453
|
+
tokenAddress: string;
|
|
1454
|
+
decimals: number;
|
|
1455
|
+
/** Quoted amount to send, decimal funding token. */
|
|
1456
|
+
amount: string;
|
|
1457
|
+
/** Sent before the deadline, decimal funding token. */
|
|
1458
|
+
sentAmount: string;
|
|
1459
|
+
/** amount − sentAmount, never below zero; decimal funding token. */
|
|
1460
|
+
missingAmount: string;
|
|
1461
|
+
/** Payout plus buffer: the USDC the quote delivers, decimal USDC. */
|
|
1462
|
+
expectedAmount: string;
|
|
1463
|
+
/** Reached the player's wallet on Base, decimal USDC. */
|
|
1464
|
+
receivedAmount: string;
|
|
1465
|
+
/** Null once the payout can no longer be funded. */
|
|
1466
|
+
depositAddress: string | null;
|
|
1467
|
+
/** Funding deadline; each on-time arrival moves it to at least the funding TTL (24 hours by default) after that check. */
|
|
1468
|
+
quoteExpiresAt: string;
|
|
1469
|
+
};
|
|
1470
|
+
depositAmount: string | null;
|
|
1471
|
+
/** What buyers have paid across every listing, partial fills included. */
|
|
1472
|
+
paidAmount: string;
|
|
1473
|
+
partialFills: PayoutPartialFillView[];
|
|
1474
|
+
/** Only when status is SETTLED. */
|
|
1475
|
+
settlement: PayoutSettlementBreakdown | null;
|
|
1476
|
+
attempt: {
|
|
1477
|
+
kind: PayoutKindType;
|
|
1478
|
+
rail: string | null;
|
|
1479
|
+
status: PayoutAttemptStatusType;
|
|
1480
|
+
} | null;
|
|
1481
|
+
/** Only when settled with a sent amount, including a send-to-address remainder. */
|
|
1482
|
+
payoutTransfer: {
|
|
1483
|
+
/** Where the player received it. */
|
|
1484
|
+
chainId: number;
|
|
1485
|
+
tokenAddress: string;
|
|
1486
|
+
decimals: number;
|
|
1487
|
+
address: string;
|
|
1488
|
+
/** Delivered, decimal destination token. */
|
|
1489
|
+
amount: string;
|
|
1490
|
+
/** The delivering transaction on chainId. */
|
|
1491
|
+
txHash: string;
|
|
1492
|
+
/** The USDC transfer on Base; settlement.sentAmount is its amount. */
|
|
1493
|
+
usdcTxHash: string;
|
|
1494
|
+
/** The bridge provider (RELAY or NEAR_INTENTS) when bridged; null for USDC on Base, where txHash = usdcTxHash. */
|
|
1495
|
+
provider: PayoutProviderType | null;
|
|
1496
|
+
} | null;
|
|
1497
|
+
cancelSource: PayoutCancelSourceType | null;
|
|
1498
|
+
returnUrl: string | null;
|
|
1499
|
+
expiresAt: string;
|
|
1500
|
+
fundedAt: string | null;
|
|
1501
|
+
settledAt: string | null;
|
|
1502
|
+
cancelledAt: string | null;
|
|
1503
|
+
createdAt: string;
|
|
1504
|
+
}
|
|
1505
|
+
export interface CreatePayoutRequest {
|
|
1506
|
+
merchantReference?: string;
|
|
1507
|
+
customerEmail: string;
|
|
1508
|
+
payout: {
|
|
1509
|
+
amount: string;
|
|
1510
|
+
chainId: number;
|
|
1511
|
+
tokenAddress: string;
|
|
1512
|
+
};
|
|
1513
|
+
funding: {
|
|
1514
|
+
chainId: number;
|
|
1515
|
+
tokenAddress: string;
|
|
1516
|
+
refundAddress?: string;
|
|
1517
|
+
};
|
|
1518
|
+
returnUrl?: string;
|
|
1519
|
+
/** Limits the payout to these rails; never widens the merchant's (any-coin spec "Cashout rails"). */
|
|
1520
|
+
rails?: PayoutRailType[];
|
|
1521
|
+
}
|
|
1522
|
+
/** A replay with the same key and body returns the current checkout link, marked `idempotentReplay: true`. */
|
|
1523
|
+
export type CreatePayoutResponse = PayoutView & {
|
|
1524
|
+
checkoutUrl: string;
|
|
1525
|
+
idempotentReplay: boolean;
|
|
1526
|
+
};
|
|
1527
|
+
export interface ListPayoutsResponse {
|
|
1528
|
+
items: PayoutView[];
|
|
1529
|
+
page: number;
|
|
1530
|
+
limit: number;
|
|
1531
|
+
total: number;
|
|
1532
|
+
}
|
|
1533
|
+
/** A moment on a payout's dashboard timeline. */
|
|
1534
|
+
export declare const PayoutTimelineEventType: {
|
|
1535
|
+
readonly CREATED: "CREATED";
|
|
1536
|
+
readonly PARTIALLY_FUNDED: "PARTIALLY_FUNDED";
|
|
1537
|
+
readonly FUNDED: "FUNDED";
|
|
1538
|
+
readonly FUNDING_EXPIRED: "FUNDING_EXPIRED";
|
|
1539
|
+
readonly SIGNED_IN: "SIGNED_IN";
|
|
1540
|
+
readonly METHOD_READY: "METHOD_READY";
|
|
1541
|
+
readonly LISTED: "LISTED";
|
|
1542
|
+
readonly TRANSFER_SENT: "TRANSFER_SENT";
|
|
1543
|
+
readonly MATCHED: "MATCHED";
|
|
1544
|
+
/** A buyer paid part of the listing; the rest is listed again or left for the player. */
|
|
1545
|
+
readonly PARTIALLY_PAID: "PARTIALLY_PAID";
|
|
1546
|
+
/** Pay set the deposit's intent range to what is left, so another buyer can take it. */
|
|
1547
|
+
readonly RELISTED: "RELISTED";
|
|
1548
|
+
readonly BUYER_DROPPED: "BUYER_DROPPED";
|
|
1549
|
+
readonly RECONNECT_NEEDED: "RECONNECT_NEEDED";
|
|
1550
|
+
/** The listing came back to the player's wallet so they can pick another payout method. */
|
|
1551
|
+
readonly LISTING_WITHDRAWN: "LISTING_WITHDRAWN";
|
|
1552
|
+
readonly SETTLED: "SETTLED";
|
|
1553
|
+
readonly CANCELLED: "CANCELLED";
|
|
1554
|
+
readonly FUNDING_ISSUE: "FUNDING_ISSUE";
|
|
1555
|
+
readonly PAYOUT_REFUNDED: "PAYOUT_REFUNDED";
|
|
1556
|
+
};
|
|
1557
|
+
export type PayoutTimelineEventTypeValue = typeof PayoutTimelineEventType[keyof typeof PayoutTimelineEventType];
|
|
1558
|
+
/** Largest merchant payout step, in whole USDC. The smallest is the API's CASHOUT_MIN_USDC (10 in production). */
|
|
1559
|
+
export declare const PAYOUT_STEP_MAX_USDC = 1000;
|
|
1560
|
+
/** Whole-USDC bounds for a merchant's payout step in this environment. */
|
|
1561
|
+
export interface PayoutStepRange {
|
|
1562
|
+
min: number;
|
|
1563
|
+
max: number;
|
|
1564
|
+
}
|
|
1565
|
+
/** A merchant's payout settings; the Peer fee is not the merchant's to see. */
|
|
1566
|
+
export interface PayoutSettings {
|
|
1567
|
+
rails: PayoutRailType[];
|
|
1568
|
+
/** Merchant fee in bps of the deposit, 0–1000. */
|
|
1569
|
+
feeBps: number;
|
|
1570
|
+
/** Whole USDC, within the environment's payout step range. */
|
|
1571
|
+
payoutStepUsdc: number;
|
|
1572
|
+
/** An https URL or a mailto: link; optional. Without it the player's checkout shows no contact line. */
|
|
1573
|
+
supportUrl: string | null;
|
|
1574
|
+
}
|
|
1575
|
+
export declare const PayoutFundingIssueKind: {
|
|
1576
|
+
readonly LATE_FUNDS: "LATE_FUNDS";
|
|
1577
|
+
readonly OVERPAYMENT: "OVERPAYMENT";
|
|
1578
|
+
readonly ROUTE_REFUND: "ROUTE_REFUND";
|
|
1579
|
+
};
|
|
1580
|
+
export type PayoutFundingIssueKindType = typeof PayoutFundingIssueKind[keyof typeof PayoutFundingIssueKind];
|
|
1581
|
+
export declare const PayoutFundingIssueResolution: {
|
|
1582
|
+
readonly RETURNED: "RETURNED";
|
|
1583
|
+
readonly CLAIMED: "CLAIMED";
|
|
1584
|
+
};
|
|
1585
|
+
export type PayoutFundingIssueResolutionType = typeof PayoutFundingIssueResolution[keyof typeof PayoutFundingIssueResolution];
|
|
1586
|
+
/** A funding token as offered to a merchant: `key` is "chainId:lowercaseAddress". */
|
|
1587
|
+
export interface PayoutFundingTokenOption {
|
|
1588
|
+
key: string;
|
|
1589
|
+
chainId: number;
|
|
1590
|
+
address: string;
|
|
1591
|
+
symbol: string;
|
|
1592
|
+
}
|
|
1593
|
+
/** GET /merchants/me/payout-settings: the saved settings plus what Peer currently allows. */
|
|
1594
|
+
export interface PayoutSettingsView extends PayoutSettings {
|
|
1595
|
+
availableRails: PayoutRailType[];
|
|
1596
|
+
availableFundingTokens: PayoutFundingTokenOption[];
|
|
1597
|
+
payoutStepRange: PayoutStepRange;
|
|
1598
|
+
}
|
|
1599
|
+
/** Merchant-facing; never includes the admin's note or name. */
|
|
1600
|
+
export interface MerchantPayoutFundingIssue {
|
|
1601
|
+
kind: PayoutFundingIssueKindType;
|
|
1602
|
+
/** Decimal USDC; null for a route refund, which is paid back in the origin token. */
|
|
1603
|
+
amountUsdc: string | null;
|
|
1604
|
+
txHash: string | null;
|
|
1605
|
+
detectedAt: string;
|
|
1606
|
+
resolution: PayoutFundingIssueResolutionType | null;
|
|
1607
|
+
resolutionTxHash: string | null;
|
|
1608
|
+
resolvedAt: string | null;
|
|
1609
|
+
}
|
|
1610
|
+
export type PayoutMethodView = {
|
|
1611
|
+
rail: PayoutFiatRailType;
|
|
1612
|
+
handle: string;
|
|
1613
|
+
currency: PayoutCurrencyType;
|
|
1614
|
+
} | PayoutCryptoMethod;
|
|
1615
|
+
/** The dashboard's payout: the API view plus what only the merchant's staff may see. */
|
|
1616
|
+
export interface MerchantPayoutView extends PayoutView {
|
|
1617
|
+
/** The player's email as given at create, stored lower-cased. */
|
|
1618
|
+
customerEmail: string;
|
|
1619
|
+
payoutMethod: PayoutMethodView | null;
|
|
1620
|
+
/** Null once the payout is final. */
|
|
1621
|
+
checkoutUrl: string | null;
|
|
1622
|
+
}
|
|
1623
|
+
export interface PayoutTimelineEntry {
|
|
1624
|
+
type: PayoutTimelineEventTypeValue;
|
|
1625
|
+
text: string;
|
|
1626
|
+
txHash: string | null;
|
|
1627
|
+
/** The chain txHash is on; null when txHash isn't linked. */
|
|
1628
|
+
txChainId: number | null;
|
|
1629
|
+
occurredAt: string;
|
|
1630
|
+
}
|
|
1631
|
+
export interface PayoutWebhookDeliveryView {
|
|
1632
|
+
eventType: string;
|
|
1633
|
+
status: string;
|
|
1634
|
+
attempts: number;
|
|
1635
|
+
responseCode: number | null;
|
|
1636
|
+
lastAttemptAt: string | null;
|
|
1637
|
+
createdAt: string;
|
|
1638
|
+
}
|
|
1639
|
+
export interface MerchantPayoutDetail {
|
|
1640
|
+
payout: MerchantPayoutView;
|
|
1641
|
+
timeline: PayoutTimelineEntry[];
|
|
1642
|
+
/** Not stored: what happens next from the current status, or null when final. */
|
|
1643
|
+
nextStep: string | null;
|
|
1644
|
+
webhooks: PayoutWebhookDeliveryView[];
|
|
1645
|
+
fundingIssues: MerchantPayoutFundingIssue[];
|
|
1646
|
+
}
|
|
1647
|
+
/** The dashboard's create form result; a replay returns the same payout and its current link. */
|
|
1648
|
+
export type CreateMerchantPayoutResponse = MerchantPayoutView & {
|
|
1649
|
+
idempotentReplay: boolean;
|
|
1650
|
+
};
|
|
1651
|
+
export interface ListMerchantPayoutsResponse {
|
|
1652
|
+
items: MerchantPayoutView[];
|
|
1653
|
+
page: number;
|
|
1654
|
+
limit: number;
|
|
1655
|
+
total: number;
|
|
1656
|
+
}
|
|
1657
|
+
export interface AdminCashoutSettings {
|
|
1658
|
+
disabledRails: PayoutRailType[];
|
|
1659
|
+
disabledFundingTokens: string[];
|
|
1660
|
+
peerFeeRecipient: string;
|
|
1661
|
+
supportedFundingTokens: PayoutFundingTokenOption[];
|
|
1662
|
+
updatedAt: string;
|
|
1663
|
+
}
|
|
1664
|
+
export interface AdminCashoutMerchantConfig {
|
|
1665
|
+
merchantId: string;
|
|
1666
|
+
peerFeeBps: number;
|
|
1667
|
+
payoutStepUsdc: number;
|
|
1668
|
+
payoutStepRange: PayoutStepRange;
|
|
1669
|
+
fundingTokens: string[];
|
|
1670
|
+
/** Merchant cashout rails, edited by the merchant and Peer admins, in rail order. */
|
|
1671
|
+
rails: PayoutRailType[];
|
|
1672
|
+
/** Player support link; optional. */
|
|
1673
|
+
supportUrl: string | null;
|
|
1674
|
+
/** Merchant rails minus Peer's global disables and the fiat rails `DISABLED_RAILS` turns off, in rail order. */
|
|
1675
|
+
effectiveRails: PayoutRailType[];
|
|
1676
|
+
merchantFeeBps: number;
|
|
1677
|
+
merchantFeeRecipient: string | null;
|
|
1678
|
+
}
|
|
1679
|
+
export interface AdminCashoutFundingIssue extends MerchantPayoutFundingIssue {
|
|
1680
|
+
id: string;
|
|
1681
|
+
cashoutId: string;
|
|
1682
|
+
merchantId: string;
|
|
1683
|
+
merchantName: string;
|
|
1684
|
+
relayRequestId: string | null;
|
|
1685
|
+
resolutionNote: string | null;
|
|
1686
|
+
resolvedBy: string | null;
|
|
1687
|
+
}
|
|
1688
|
+
export interface AdminCashoutSupport {
|
|
1689
|
+
fundingIssues: AdminCashoutFundingIssue[];
|
|
1690
|
+
}
|
|
1691
|
+
export interface AdminCashoutChange {
|
|
1692
|
+
id: string;
|
|
1693
|
+
merchantId: string | null;
|
|
1694
|
+
cashoutFundingIssueId: string | null;
|
|
1695
|
+
actor: string;
|
|
1696
|
+
changes: Record<string, {
|
|
1697
|
+
before: unknown;
|
|
1698
|
+
after: unknown;
|
|
1699
|
+
}>;
|
|
1700
|
+
createdAt: string;
|
|
1701
|
+
}
|
|
1702
|
+
/** What the player can do next; drives every checkout button and every 409. */
|
|
1703
|
+
export declare const CashoutPlayerAction: {
|
|
1704
|
+
readonly SET_METHOD: "SET_METHOD";
|
|
1705
|
+
readonly CONNECT_RAIL: "CONNECT_RAIL";
|
|
1706
|
+
readonly SKIP_CONNECT: "SKIP_CONNECT";
|
|
1707
|
+
readonly CONFIRM: "CONFIRM";
|
|
1708
|
+
readonly CHANGE_METHOD: "CHANGE_METHOD";
|
|
1709
|
+
readonly SEND_TO_ADDRESS: "SEND_TO_ADDRESS";
|
|
1710
|
+
readonly RELIST: "RELIST";
|
|
1711
|
+
};
|
|
1712
|
+
export type CashoutPlayerActionType = typeof CashoutPlayerAction[keyof typeof CashoutPlayerAction];
|
|
1713
|
+
/** What Pay is sending from the player's wallet. */
|
|
1714
|
+
export declare const CashoutSending: {
|
|
1715
|
+
readonly LISTING: "LISTING";
|
|
1716
|
+
readonly TRANSFER: "TRANSFER";
|
|
1717
|
+
readonly WITHDRAW: "WITHDRAW";
|
|
1718
|
+
readonly RELISTING: "RELISTING";
|
|
1719
|
+
};
|
|
1720
|
+
export type CashoutSendingType = typeof CashoutSending[keyof typeof CashoutSending];
|
|
1721
|
+
export declare const CashoutCredentialStatus: {
|
|
1722
|
+
readonly ACTIVE: "active";
|
|
1723
|
+
readonly INACTIVE: "inactive";
|
|
1724
|
+
readonly MISSING: "missing";
|
|
1725
|
+
};
|
|
1726
|
+
export type CashoutCredentialStatusType = typeof CashoutCredentialStatus[keyof typeof CashoutCredentialStatus];
|
|
1727
|
+
export interface CashoutRailOption {
|
|
1728
|
+
rail: PayoutRailType;
|
|
1729
|
+
/** Smallest single buyer payment, USDC decimal; null for crypto rails. */
|
|
1730
|
+
minAmount: string | null;
|
|
1731
|
+
/** Largest single buyer payment, USDC decimal; null for crypto rails. */
|
|
1732
|
+
maxAmount: string | null;
|
|
1733
|
+
}
|
|
1734
|
+
/** A SAR method supports seller-side confirmation; when connecting is skipped, each buyer proves payment. */
|
|
1735
|
+
export interface CashoutSarMethod {
|
|
1736
|
+
currency: PayoutCurrencyType;
|
|
1737
|
+
rail: PayoutSarRailType;
|
|
1738
|
+
payeeHandle: string;
|
|
1739
|
+
credentialStatus: CashoutCredentialStatusType;
|
|
1740
|
+
/** The player chose to list without connecting this method. */
|
|
1741
|
+
connectSkipped: boolean;
|
|
1742
|
+
payeeHash: string;
|
|
1743
|
+
/** The email of the PayPal account; null on every other rail. Only the player's own checkout sees it. */
|
|
1744
|
+
paypalEmail: string | null;
|
|
1745
|
+
}
|
|
1746
|
+
/** A buyer-proof method has no connect step or credential; each buyer proves their payment. */
|
|
1747
|
+
export interface CashoutBuyerProofMethod {
|
|
1748
|
+
currency: PayoutCurrencyType;
|
|
1749
|
+
rail: CashoutBuyerProofRailType;
|
|
1750
|
+
payeeHandle: string;
|
|
1751
|
+
payeeHash: string;
|
|
1752
|
+
}
|
|
1753
|
+
/** GET /api/v1/cashout-checkout/:id (link token only). */
|
|
1754
|
+
export interface CashoutCheckoutSummary {
|
|
1755
|
+
cashoutId: string;
|
|
1756
|
+
merchant: {
|
|
1757
|
+
name: string;
|
|
1758
|
+
logoUrl: string | null;
|
|
1759
|
+
supportUrl: string | null;
|
|
1760
|
+
disableBranding: boolean;
|
|
1761
|
+
checkoutTheme: MerchantCheckoutTheme | null;
|
|
1762
|
+
};
|
|
1763
|
+
email: string;
|
|
1764
|
+
maskedEmail: string;
|
|
1765
|
+
payoutAmount: string;
|
|
1766
|
+
status: PayoutStatusType;
|
|
1767
|
+
rails: CashoutRailOption[];
|
|
1768
|
+
returnUrl: string | null;
|
|
1769
|
+
}
|
|
1770
|
+
/** Display only: an oracle read never gates a payout. */
|
|
1771
|
+
export interface CashoutFxRate {
|
|
1772
|
+
currency: PayoutOracleCurrencyType;
|
|
1773
|
+
rate: string;
|
|
1774
|
+
}
|
|
1775
|
+
export interface CashoutPayoutCurrencyOption {
|
|
1776
|
+
currency: PayoutCurrencyType;
|
|
1777
|
+
rails: PayoutFiatRailType[];
|
|
1778
|
+
rate: CashoutFxRate | null;
|
|
1779
|
+
estimate: PayoutFiatValue | null;
|
|
1780
|
+
}
|
|
1781
|
+
export interface CashoutFiatPricing {
|
|
1782
|
+
currency: PayoutOracleCurrencyType;
|
|
1783
|
+
rate: CashoutFxRate | null;
|
|
1784
|
+
unpaid: PayoutFiatValue | null;
|
|
1785
|
+
listed: PayoutFiatValue | null;
|
|
1786
|
+
}
|
|
1787
|
+
/** GET /api/v1/cashout-checkout/:id/state (link token + Peer app login). */
|
|
1788
|
+
export interface CashoutCheckoutState {
|
|
1789
|
+
payoutCurrencies: CashoutPayoutCurrencyOption[];
|
|
1790
|
+
fiatPricing: CashoutFiatPricing | null;
|
|
1791
|
+
/** Exact fiat while PAYING; null when there is no buyer payment or no known currency and bound rate. */
|
|
1792
|
+
buyerPayment: PayoutFiatValue | null;
|
|
1793
|
+
cashoutId: string;
|
|
1794
|
+
status: PayoutStatusType;
|
|
1795
|
+
walletAddress: string;
|
|
1796
|
+
depositAmount: string | null;
|
|
1797
|
+
/** Live from the escrow deposit; null before listing and once the listing is closed. */
|
|
1798
|
+
remainingAmount: string | null;
|
|
1799
|
+
buyerPaymentActive: boolean;
|
|
1800
|
+
method: CashoutSarMethod | CashoutBuyerProofMethod | PayoutCryptoMethod | null;
|
|
1801
|
+
/** Prefill from this player's last cashout on an available rail; never a deposit address. */
|
|
1802
|
+
lastPayoutTarget: PayoutMethodView | null;
|
|
1803
|
+
attempt: {
|
|
1804
|
+
attemptId: string;
|
|
1805
|
+
status: PayoutAttemptStatusType;
|
|
1806
|
+
depositId: string | null;
|
|
1807
|
+
} | null;
|
|
1808
|
+
signer: {
|
|
1809
|
+
signerId: string;
|
|
1810
|
+
policyId: string;
|
|
1811
|
+
attached: boolean;
|
|
1812
|
+
};
|
|
1813
|
+
/** What Pay is sending from the player's wallet right now; null when nothing is in flight. */
|
|
1814
|
+
sending: CashoutSendingType | null;
|
|
1815
|
+
/**
|
|
1816
|
+
* The newest send of the current attempt (or of the last closed attempt while the cashout is back in FUNDED/READY) failed; a failed relist counts only while the cashout is listed.
|
|
1817
|
+
* Also true when a Venmo or PayPal listing's Peer Pay group send failed and its listing was withdrawn (the cashout is back in FUNDED/READY).
|
|
1818
|
+
*/
|
|
1819
|
+
lastSendFailed: boolean;
|
|
1820
|
+
/** Set when the Peer wallet no longer covers this cashout (newest first, like the wallet job): what it needs and what is left for it after the player's older cashouts, in decimal USDC. Nothing is offered then: the wallet job closes it. */
|
|
1821
|
+
walletShortfall: {
|
|
1822
|
+
requiredAmount: string;
|
|
1823
|
+
availableAmount: string;
|
|
1824
|
+
} | null;
|
|
1825
|
+
/** PARTIALLY_FUNDED means the merchant still owes a top-up; receivedAmount is the USDC that reached the player's wallet. */
|
|
1826
|
+
funding: {
|
|
1827
|
+
status: PayoutFundingStatusType;
|
|
1828
|
+
receivedAmount: string | null;
|
|
1829
|
+
};
|
|
1830
|
+
/** Who ended it: MERCHANT before funding, PEER_APP when the player moved the money in the Peer app. */
|
|
1831
|
+
cancelSource: PayoutCancelSourceType | null;
|
|
1832
|
+
merchantReference: string | null;
|
|
1833
|
+
/** Once settled: the delivering transaction and its chain. */
|
|
1834
|
+
settleTx: {
|
|
1835
|
+
chainId: number;
|
|
1836
|
+
txHash: string;
|
|
1837
|
+
} | null;
|
|
1838
|
+
/** The newest attempt's newest bridge unless it is NOT_SENT. */
|
|
1839
|
+
payoutBridge: CashoutPayoutBridgeView | null;
|
|
1840
|
+
/** While a buyer pays, when that buyer was matched (ISO time). */
|
|
1841
|
+
buyerMatchedAt: string | null;
|
|
1842
|
+
/** Set once a buyer paid part of the cashout; decimal USDC. totalAmount is depositAmount. */
|
|
1843
|
+
partialPayment: {
|
|
1844
|
+
/** Fiat totals in first-paid order; null if any payment has an unknown currency or bound rate, [] if no buyer paid. */
|
|
1845
|
+
paidFiat: PayoutFiatValue[] | null;
|
|
1846
|
+
paidAmount: string;
|
|
1847
|
+
unpaidAmount: string;
|
|
1848
|
+
totalAmount: string;
|
|
1849
|
+
/** What the live listing's deposit holds (cashoutDepositRemainingUnits); null when nothing is listed. Relist, withdraw and send amounts. */
|
|
1850
|
+
listedAmount: string | null;
|
|
1851
|
+
/**
|
|
1852
|
+
* The listed deposit still takes new buyers (EscrowV2 `acceptingIntents`). False when nothing is listed, and when a
|
|
1853
|
+
* withdraw landed while a buyer held the deposit (a send-to-address or change-method exit, or a Peer-app withdraw): the
|
|
1854
|
+
* escrow then takes no new buyer, so the rest is never relisted and only an exit moves it.
|
|
1855
|
+
*/
|
|
1856
|
+
acceptingBuyers: boolean;
|
|
1857
|
+
} | null;
|
|
1858
|
+
/** Only when status is SETTLED. */
|
|
1859
|
+
settlement: PayoutSettlementBreakdown | null;
|
|
1860
|
+
actions: CashoutPlayerActionType[];
|
|
1861
|
+
}
|
|
1862
|
+
export type SetCashoutPayoutMethodRequest = {
|
|
1863
|
+
rail: typeof PayoutRail.VENMO | typeof PayoutRail.CASHAPP;
|
|
1864
|
+
payeeHandle: string;
|
|
1865
|
+
}
|
|
1866
|
+
/** The App Clip checks the connected PayPal account against this email. */
|
|
1867
|
+
| {
|
|
1868
|
+
rail: typeof PayoutRail.PAYPAL;
|
|
1869
|
+
payeeHandle: string;
|
|
1870
|
+
paypalEmail: string;
|
|
1871
|
+
currency: (typeof PAYOUT_RAIL_CURRENCIES)['paypal'][number];
|
|
1872
|
+
}
|
|
1873
|
+
/** The multi-currency rail carries the player's selected payout currency. */
|
|
1874
|
+
| {
|
|
1875
|
+
rail: typeof PayoutRail.REVOLUT;
|
|
1876
|
+
payeeHandle: string;
|
|
1877
|
+
currency: (typeof PAYOUT_RAIL_CURRENCIES)['revolut'][number];
|
|
1878
|
+
} | {
|
|
1879
|
+
rail: typeof PayoutRail.ZELLE | typeof PayoutRail.CHIME;
|
|
1880
|
+
payeeHandle: string;
|
|
1881
|
+
} | CashoutPayoutDestinationRequest;
|
|
1882
|
+
/** POST /api/v1/cashout-checkout/:id/send-to-address. The checkout requires the network tick box before sending. */
|
|
1883
|
+
export type SendCashoutToAddressRequest = CashoutPayoutDestinationRequest;
|
|
1884
|
+
export interface CashoutActivityItem {
|
|
1885
|
+
cashoutId: string;
|
|
1886
|
+
/** Only the player passing linkAuth and loginAuth may see this link to open their cashout. */
|
|
1887
|
+
checkoutUrl: string;
|
|
1888
|
+
payoutAmount: string;
|
|
1889
|
+
/** The chosen payout app, or null before the player picks one. */
|
|
1890
|
+
payoutRail: PayoutRailType | null;
|
|
1891
|
+
status: PayoutStatusType;
|
|
1892
|
+
createdAt: string;
|
|
1893
|
+
}
|
|
1894
|
+
export interface ListCashoutActivityResponse {
|
|
1895
|
+
/** Only the player passing linkAuth and loginAuth may see the full recipient email identifying this list. */
|
|
1896
|
+
email: string;
|
|
1897
|
+
items: CashoutActivityItem[];
|
|
1898
|
+
page: number;
|
|
1899
|
+
limit: number;
|
|
1900
|
+
total: number;
|
|
1901
|
+
}
|
|
1204
1902
|
export {};
|