@getivy/node-sdk 0.1.0-alpha.21 → 0.1.0-alpha.22

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.
@@ -2,7 +2,11 @@ import { APIResource } from "../resource.js";
2
2
  import * as Core from "../core.js";
3
3
  export declare class Orders extends APIResource {
4
4
  /**
5
- * Create a new order
5
+ * Create a new order. By creating a new order, you will create a new settlement
6
+ * destination which you can use to settle expected incoming payments efficiently.
7
+ * After creating the order, Ivy provides you with a destination for the expected
8
+ * incoming payment. As soon as a payment with the same details arrives, Ivy will
9
+ * update the status of the order.
6
10
  */
7
11
  create(body: OrderCreateParams, options?: Core.RequestOptions): Core.APIPromise<OrderCreateResponse>;
8
12
  /**
@@ -11,6 +15,12 @@ export declare class Orders extends APIResource {
11
15
  * Checkout Session to the `id` field.
12
16
  */
13
17
  retrieve(body: OrderRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<OrderRetrieveResponse>;
18
+ /**
19
+ * Expire an order. This will set the order to status `canceled` immediately. All
20
+ * transactions which arrive afterwards for this order will be returned
21
+ * automatically.
22
+ */
23
+ expire(body: OrderExpireParams, options?: Core.RequestOptions): Core.APIPromise<OrderExpireResponse>;
14
24
  }
15
25
  export interface OrderCreateResponse {
16
26
  /**
@@ -1348,50 +1358,721 @@ export declare namespace OrderRetrieveResponse {
1348
1358
  previousStatus?: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | null;
1349
1359
  }
1350
1360
  }
1351
- export interface OrderCreateParams {
1361
+ export interface OrderExpireResponse {
1352
1362
  /**
1353
- * The total amount of the order
1363
+ * The Ivy unique identifier for the order.
1354
1364
  */
1355
- amount: number;
1365
+ id: string;
1356
1366
  /**
1357
- * The currency code of the order
1367
+ * @deprecated The unique identifier for the merchantApp which initiated the order
1368
+ * / payment attempt.
1358
1369
  */
1359
- currency: 'EUR' | 'GBP' | 'PLN';
1370
+ appId: string;
1360
1371
  /**
1361
- * The merchant's unique reference ID for the order
1372
+ * The Ivy fee for the payment.
1373
+ */
1374
+ applicationFeeAmount: number;
1375
+ createdAt: string;
1376
+ instantPaymentScheme: boolean;
1377
+ /**
1378
+ * @deprecated Deprecated in favor of `appId`.
1379
+ */
1380
+ merchantAppId: string;
1381
+ /**
1382
+ * The unique identifier for the merchant which initiated the order / payment
1383
+ * attempt.
1384
+ */
1385
+ merchantId: string;
1386
+ /**
1387
+ * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
1388
+ * represents EUR 10.23. Any amount of decimal places can be provided on
1389
+ * initialization, but the actual transfer amount is rounded to 2 decimal places,
1390
+ * as this is the format accepted by most banks.
1391
+ */
1392
+ price: OrderExpireResponse.Price;
1393
+ /**
1394
+ * An internal reference id which will be stored with the checkout & corresponding
1395
+ * order. Needs to be unique per shop per order and can be up to 200 characters.
1362
1396
  */
1363
1397
  referenceId: string;
1364
1398
  /**
1365
- * The customer of the merchant.
1399
+ * The name of the merchant which initiated the order.
1366
1400
  */
1367
- customer?: OrderCreateParams.Email | OrderCreateParams.ID;
1401
+ shopName: string;
1368
1402
  /**
1369
- * Optional expiration timestamp in seconds
1403
+ * The order status. This status symbolises the state of the user's payment
1404
+ * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
1405
+ * information.
1370
1406
  */
1371
- expiresAt?: string;
1407
+ status: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
1408
+ updatedAt: string;
1372
1409
  /**
1373
- * The subaccount id of the merchant.
1410
+ * The unique identifier of Ivy of the chosen bank to make the payment. Not there,
1411
+ * if no payment was made.
1412
+ */
1413
+ bankId?: string;
1414
+ /**
1415
+ * @deprecated The bank statement reference of the payment for the order. This is
1416
+ * the reference that will be visible on the bank statement.
1417
+ */
1418
+ bankStatementReference?: string;
1419
+ /**
1420
+ * The billing address of the user. Required when handshake=true.
1421
+ */
1422
+ billingAddress?: OrderExpireResponse.BillingAddress;
1423
+ /**
1424
+ * The merchant category code or
1425
+ * [MCC](https://en.wikipedia.org/wiki/Merchant_category_code).
1426
+ */
1427
+ category?: string;
1428
+ /**
1429
+ * @deprecated
1430
+ */
1431
+ climateActionMode?: OrderExpireResponse.ClimateActionMode;
1432
+ /**
1433
+ * @deprecated
1434
+ */
1435
+ co2Grams?: number;
1436
+ /**
1437
+ * The unique identifier of the customer who placed the order.
1438
+ */
1439
+ customerId?: string;
1440
+ destination?: OrderExpireResponse.Destination;
1441
+ /**
1442
+ * The customer facing id. This id is displayed to the user during the checkout and
1443
+ * in the merchant dashboard.
1444
+ */
1445
+ displayId?: string;
1446
+ /**
1447
+ * False by default. If set to true, customers skip email input and jump directly
1448
+ * to their bank login. For express Checkout Sessions this is always false.
1449
+ */
1450
+ guest?: boolean;
1451
+ /**
1452
+ * Only valid for sustainable incentive mode. The social / sustainable projects
1453
+ * available to the user during Checkout.
1454
+ */
1455
+ impactOffsetProjects?: Array<string>;
1456
+ /**
1457
+ * The incentive mode of the checkout session. For any use-case apart from
1458
+ * e-commerce, please use `white_label` as the value. If set to `white_label`, the
1459
+ * checkout session will be white labeled. If set to `sustainable`, the checkout
1460
+ * session will contain sustainable incentives for users.
1461
+ */
1462
+ incentiveMode?: 'white_label' | 'sustainable';
1463
+ /**
1464
+ * The line items of the Checkout.
1465
+ */
1466
+ lineItems?: Array<OrderExpireResponse.LineItem>;
1467
+ mandate?: OrderExpireResponse.Mandate;
1468
+ /**
1469
+ * @deprecated
1470
+ */
1471
+ merchantFinancialAddress?: OrderExpireResponse.MerchantFinancialAddress;
1472
+ /**
1473
+ * Any data which will be stored and returned for this checkout session and
1474
+ * corresponding order. See [here](https://docs.getivy.de/reference/metadata) for
1475
+ * more info.
1476
+ */
1477
+ metadata?: Record<string, unknown>;
1478
+ /**
1479
+ * Only valid for sustainable incentive mode. The social / sustainability project
1480
+ * chosen by the user during Checkout.
1481
+ */
1482
+ offsetProject?: string;
1483
+ /**
1484
+ * The source bank account where the money is send from.
1485
+ */
1486
+ payerFinancialAddress?: OrderExpireResponse.PayerFinancialAddress;
1487
+ paymentMethodType?: 'sepa_debit' | 'customer_balance' | 'manual_bank_transfer';
1488
+ /**
1489
+ * The payment mode of the order. Can be either 'settlement' or 'direct'.
1490
+ */
1491
+ paymentMode?: 'settlement' | 'direct';
1492
+ /**
1493
+ * @deprecated Deprecated in favor of `status`. Do not use this field to trigger
1494
+ * actions in your system.
1495
+ */
1496
+ paymentStatus?: 'failed' | 'canceled' | 'processing' | 'requires_action' | 'succeeded' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'not_settled' | 'disputed' | 'frozen_due_to_aml';
1497
+ /**
1498
+ * The total amount in the currency of all successful refunds for this order
1499
+ */
1500
+ refundAmount?: number;
1501
+ /**
1502
+ * The list of refunds connected to this order.
1503
+ */
1504
+ refunds?: Array<OrderExpireResponse.Refund>;
1505
+ /**
1506
+ * The shipping address of the user. This is only collected in express Checkouts.
1507
+ */
1508
+ shippingAddress?: OrderExpireResponse.ShippingAddress;
1509
+ /**
1510
+ * The selected shipping method by the user. Can either be selected during an
1511
+ * express Checkout Session or passed during Checkout Session creation.
1512
+ */
1513
+ shippingMethod?: OrderExpireResponse.ShippingMethod;
1514
+ /**
1515
+ * The logo of the shop provided as a URL.
1516
+ */
1517
+ shopLogo?: string;
1518
+ /**
1519
+ * The shopper object. Contains information collected from the user during the
1520
+ * Checkout.
1521
+ */
1522
+ shopper?: OrderExpireResponse.Shopper;
1523
+ /**
1524
+ * @deprecated Deprecated in favor of `shopper.email`. The email of the user if
1525
+ * collected in the Checkout.
1526
+ */
1527
+ shopperEmail?: string;
1528
+ statusClassification?: OrderExpireResponse.StatusClassification;
1529
+ /**
1530
+ * List of status history items for the order, used for logging every update on
1531
+ * status.
1532
+ */
1533
+ statusHistoryList?: Array<OrderExpireResponse.StatusHistoryList>;
1534
+ /**
1535
+ * The subaccount id of the order.
1374
1536
  */
1375
1537
  subaccountId?: string;
1538
+ /**
1539
+ * The legal name of the subaccount
1540
+ */
1541
+ subaccountLegalName?: string;
1542
+ /**
1543
+ * @deprecated
1544
+ */
1545
+ trees?: number;
1376
1546
  }
1377
- export declare namespace OrderCreateParams {
1378
- interface Email {
1547
+ export declare namespace OrderExpireResponse {
1548
+ /**
1549
+ * The amount to be paid by the user. The amounts is in decimals, i.e. 10.23
1550
+ * represents EUR 10.23. Any amount of decimal places can be provided on
1551
+ * initialization, but the actual transfer amount is rounded to 2 decimal places,
1552
+ * as this is the format accepted by most banks.
1553
+ */
1554
+ interface Price {
1555
+ currency: 'EUR' | 'GBP' | 'PLN';
1379
1556
  /**
1380
- * The email of the customer.
1557
+ * The total amount to be paid.
1381
1558
  */
1382
- email: string;
1559
+ total: number;
1560
+ shipping?: number;
1561
+ subTotal?: number;
1562
+ totalNet?: number;
1563
+ vat?: number;
1383
1564
  }
1384
- interface ID {
1565
+ /**
1566
+ * The billing address of the user. Required when handshake=true.
1567
+ */
1568
+ interface BillingAddress {
1569
+ city: string;
1385
1570
  /**
1386
- * The Ivy id of the customer.
1571
+ * The country code in
1572
+ * [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
1387
1573
  */
1388
- id: string;
1574
+ country: 'AF' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'KH' | 'CM' | 'CA' | 'CV' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CG' | 'CD' | 'CK' | 'CR' | 'CI' | 'HR' | 'CU' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IR' | 'IQ' | 'IE' | 'IL' | 'IT' | 'JM' | 'JP' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KP' | 'KR' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MP' | 'MK' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SH' | 'KN' | 'LC' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'SC' | 'SL' | 'SG' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SZ' | 'SE' | 'CH' | 'SY' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'US' | 'UM' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW' | 'AX' | 'BQ' | 'CW' | 'GG' | 'IM' | 'JE' | 'ME' | 'BL' | 'MF' | 'RS' | 'SX' | 'SS' | 'XK';
1575
+ line1: string;
1576
+ zipCode: string;
1577
+ firstName?: string;
1578
+ lastName?: string;
1579
+ line2?: string;
1580
+ region?: string;
1389
1581
  }
1390
- }
1391
- export interface OrderRetrieveParams {
1582
+ /**
1583
+ * @deprecated
1584
+ */
1585
+ interface ClimateActionMode {
1586
+ amount: number;
1587
+ type: 'transaction' | 'amount';
1588
+ }
1589
+ interface Destination {
1590
+ /**
1591
+ * The validation logic is based on the "type" field. For example, if "type" is set
1592
+ * to "iban", the "iban" object must be filled out.
1593
+ */
1594
+ bankAccount: Destination.BankAccount;
1595
+ /**
1596
+ * The bank statement reference of the payment for the order. This is the reference
1597
+ * that will be visible on the bank statement.
1598
+ */
1599
+ bankStatementReference: string;
1600
+ }
1601
+ namespace Destination {
1602
+ /**
1603
+ * The validation logic is based on the "type" field. For example, if "type" is set
1604
+ * to "iban", the "iban" object must be filled out.
1605
+ */
1606
+ interface BankAccount {
1607
+ /**
1608
+ * The type of the financial address. The actual destination is determined by this
1609
+ * field which can be either "iban", "sortCode", "bankCode", or "bban". The
1610
+ * validation will fail if you set e.g. type="iban", but then not fill any values
1611
+ * in the "iban" object.
1612
+ *
1613
+ * - iban: The IBAN of the account
1614
+ * - sort_code: The sort code of the account
1615
+ * - bank_code: The bank code of the account
1616
+ * - bban: The BBAN of the account
1617
+ */
1618
+ type: string;
1619
+ bankCode?: BankAccount.BankCode;
1620
+ bban?: BankAccount.Bban;
1621
+ iban?: BankAccount.Iban;
1622
+ sortCode?: BankAccount.SortCode;
1623
+ }
1624
+ namespace BankAccount {
1625
+ interface BankCode {
1626
+ /**
1627
+ * The name of the account holder.
1628
+ */
1629
+ accountHolderName: string;
1630
+ accountNumber: string;
1631
+ code: string;
1632
+ }
1633
+ interface Bban {
1634
+ /**
1635
+ * The name of the account holder.
1636
+ */
1637
+ accountHolderName: string;
1638
+ bban: string;
1639
+ bic?: string;
1640
+ }
1641
+ interface Iban {
1642
+ /**
1643
+ * The name of the account holder.
1644
+ */
1645
+ accountHolderName: string;
1646
+ iban: string;
1647
+ bic?: string;
1648
+ }
1649
+ interface SortCode {
1650
+ /**
1651
+ * The name of the account holder.
1652
+ */
1653
+ accountHolderName: string;
1654
+ accountNumber: string;
1655
+ sortCode: string;
1656
+ }
1657
+ }
1658
+ }
1659
+ interface LineItem {
1660
+ /**
1661
+ * The total amount of all line items, i.e. single amount \* quantity. Given in
1662
+ * decimals, i.e. 10.23 represents EUR 10.23.
1663
+ */
1664
+ amount: number;
1665
+ /**
1666
+ * The name of the line item.
1667
+ */
1668
+ name: string;
1669
+ /**
1670
+ * The quantity of the line item.
1671
+ */
1672
+ quantity: number;
1673
+ /**
1674
+ * The net amount of a single item.
1675
+ */
1676
+ singleNet: number;
1677
+ /**
1678
+ * The VAT amount of a single item.
1679
+ */
1680
+ singleVat: number;
1681
+ /**
1682
+ * The category as [MCC](https://en.wikipedia.org/wiki/Merchant_category_code) of
1683
+ * the line item.
1684
+ */
1685
+ category?: string;
1686
+ /**
1687
+ * The
1688
+ * [EAN](https://en.wikipedia.org/wiki/International_Article_Number#:~:text=The%20International%20Article%20Number%20(also,configuration%2C%20from%20a%20specific%20manufacturer.)
1689
+ * of the line item.
1690
+ */
1691
+ EAN?: string;
1692
+ /**
1693
+ * The image of the line item as a URL.
1694
+ */
1695
+ image?: string;
1696
+ /**
1697
+ * The internal unique identifier of the line item.
1698
+ */
1699
+ referenceId?: string;
1700
+ }
1701
+ interface Mandate {
1702
+ /**
1703
+ * The name of the account holder who signs the mandate.
1704
+ */
1705
+ accountHolderName?: string;
1706
+ /**
1707
+ * Additional information to display to the user during the mandate setup. This
1708
+ * information is not used to setup any recurrence on the mandate. It is only
1709
+ * displayed to the user during checkout.
1710
+ */
1711
+ additionalDisplayInformation?: Mandate.AdditionalDisplayInformation;
1712
+ /**
1713
+ * Mandate creditor data
1714
+ */
1715
+ creditor?: Mandate.Creditor;
1716
+ /**
1717
+ * The reference of the mandate going to be setup
1718
+ */
1719
+ reference?: string;
1720
+ /**
1721
+ * The mandate referenceId. Set this to match incoming `mandate_setup_started`,
1722
+ * `mandate_setup_succeeded` or `mandate_setup_failed` webhook events to your
1723
+ * mandate setup request.
1724
+ */
1725
+ referenceId?: string;
1726
+ /**
1727
+ * If true, a ready to use mandate will be set up after the payment flow.
1728
+ */
1729
+ setup?: boolean;
1730
+ /**
1731
+ * The email of the user who signs the mandate.
1732
+ */
1733
+ userNotificationEmail?: string;
1734
+ }
1735
+ namespace Mandate {
1736
+ /**
1737
+ * Additional information to display to the user during the mandate setup. This
1738
+ * information is not used to setup any recurrence on the mandate. It is only
1739
+ * displayed to the user during checkout.
1740
+ */
1741
+ interface AdditionalDisplayInformation {
1742
+ /**
1743
+ * The intended cadence of charges used for displaying purpose only. On demand
1744
+ * would be used for unscheduled charges.
1745
+ */
1746
+ cadence?: 'BI_WEEKLY' | 'WEEKLY' | 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'ON_DEMAND';
1747
+ price?: AdditionalDisplayInformation.Price;
1748
+ }
1749
+ namespace AdditionalDisplayInformation {
1750
+ interface Price {
1751
+ /**
1752
+ * The amount displayed to the user as decimal e.g. 10.23 would be displayed as
1753
+ * 10.23 EUR.
1754
+ */
1755
+ amount?: number;
1756
+ currency?: 'EUR' | 'GBP' | 'PLN';
1757
+ }
1758
+ }
1759
+ /**
1760
+ * Mandate creditor data
1761
+ */
1762
+ interface Creditor {
1763
+ id?: string;
1764
+ name?: string;
1765
+ }
1766
+ }
1767
+ /**
1768
+ * @deprecated
1769
+ */
1770
+ interface MerchantFinancialAddress {
1771
+ bankCode?: MerchantFinancialAddress.BankCode;
1772
+ bban?: MerchantFinancialAddress.Bban;
1773
+ iban?: MerchantFinancialAddress.Iban;
1774
+ /**
1775
+ * The payment reference for the order. This is the reference that will be visible
1776
+ * on the bank statement.
1777
+ */
1778
+ paymentReference?: string;
1779
+ sortCode?: MerchantFinancialAddress.SortCode;
1780
+ /**
1781
+ * The type of the financial address. The actual destination is determined by this
1782
+ * field which can be either "iban", "sortCode", "bankCode", or "bban". The
1783
+ * validation will fail if you set e.g. type="iban", but then not fill any values
1784
+ * in the "iban" object.
1785
+ *
1786
+ * - iban: The IBAN of the account
1787
+ * - sort_code: The sort code of the account
1788
+ * - bank_code: The bank code of the account
1789
+ * - bban: The BBAN of the account
1790
+ */
1791
+ type?: string;
1792
+ }
1793
+ namespace MerchantFinancialAddress {
1794
+ interface BankCode {
1795
+ /**
1796
+ * The name of the account holder.
1797
+ */
1798
+ accountHolderName: string;
1799
+ accountNumber: string;
1800
+ code: string;
1801
+ }
1802
+ interface Bban {
1803
+ /**
1804
+ * The name of the account holder.
1805
+ */
1806
+ accountHolderName: string;
1807
+ bban: string;
1808
+ bic?: string;
1809
+ }
1810
+ interface Iban {
1811
+ /**
1812
+ * The name of the account holder.
1813
+ */
1814
+ accountHolderName: string;
1815
+ iban: string;
1816
+ bic?: string;
1817
+ }
1818
+ interface SortCode {
1819
+ /**
1820
+ * The name of the account holder.
1821
+ */
1822
+ accountHolderName: string;
1823
+ accountNumber: string;
1824
+ sortCode: string;
1825
+ }
1826
+ }
1827
+ /**
1828
+ * The source bank account where the money is send from.
1829
+ */
1830
+ interface PayerFinancialAddress {
1831
+ /**
1832
+ * The type of the financial address. The actual destination is determined by this
1833
+ * field which can be either "iban", "sortCode", "bankCode", or "bban". The
1834
+ * validation will fail if you set e.g. type="iban", but then not fill any values
1835
+ * in the "iban" object.
1836
+ *
1837
+ * - iban: The IBAN of the account
1838
+ * - sort_code: The sort code of the account
1839
+ * - bank_code: The bank code of the account
1840
+ * - bban: The BBAN of the account
1841
+ */
1842
+ type: string;
1843
+ bankCode?: PayerFinancialAddress.BankCode;
1844
+ bban?: PayerFinancialAddress.Bban;
1845
+ iban?: PayerFinancialAddress.Iban;
1846
+ sortCode?: PayerFinancialAddress.SortCode;
1847
+ }
1848
+ namespace PayerFinancialAddress {
1849
+ interface BankCode {
1850
+ accountNumber: string;
1851
+ code: string;
1852
+ /**
1853
+ * The name of the account holder.
1854
+ */
1855
+ accountHolderName?: string;
1856
+ }
1857
+ interface Bban {
1858
+ bban: string;
1859
+ /**
1860
+ * The name of the account holder.
1861
+ */
1862
+ accountHolderName?: string;
1863
+ bic?: string;
1864
+ }
1865
+ interface Iban {
1866
+ iban: string;
1867
+ /**
1868
+ * The name of the account holder.
1869
+ */
1870
+ accountHolderName?: string;
1871
+ bic?: string;
1872
+ }
1873
+ interface SortCode {
1874
+ accountNumber: string;
1875
+ sortCode: string;
1876
+ /**
1877
+ * The name of the account holder.
1878
+ */
1879
+ accountHolderName?: string;
1880
+ }
1881
+ }
1882
+ /**
1883
+ * A Refund object. This corresponds to one Refund request.
1884
+ */
1885
+ interface Refund {
1886
+ id: string;
1887
+ amount: number;
1888
+ createdAt: string;
1889
+ referenceId: string;
1890
+ /**
1891
+ * The status of the refund. Always use the status of the order as your source of
1892
+ * truth to trigger actions in your dashboard.
1893
+ */
1894
+ status: 'pending' | 'succeeded' | 'failed' | 'requires_action' | 'partially_refunded';
1895
+ updatedAt: string;
1896
+ description?: string;
1897
+ }
1898
+ /**
1899
+ * The shipping address of the user. This is only collected in express Checkouts.
1900
+ */
1901
+ interface ShippingAddress {
1902
+ city: string;
1903
+ /**
1904
+ * The country code in
1905
+ * [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
1906
+ */
1907
+ country: 'AF' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'KH' | 'CM' | 'CA' | 'CV' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CG' | 'CD' | 'CK' | 'CR' | 'CI' | 'HR' | 'CU' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IR' | 'IQ' | 'IE' | 'IL' | 'IT' | 'JM' | 'JP' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KP' | 'KR' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MP' | 'MK' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SH' | 'KN' | 'LC' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'SC' | 'SL' | 'SG' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SZ' | 'SE' | 'CH' | 'SY' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'US' | 'UM' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW' | 'AX' | 'BQ' | 'CW' | 'GG' | 'IM' | 'JE' | 'ME' | 'BL' | 'MF' | 'RS' | 'SX' | 'SS' | 'XK';
1908
+ line1: string;
1909
+ zipCode: string;
1910
+ firstName?: string;
1911
+ lastName?: string;
1912
+ line2?: string;
1913
+ region?: string;
1914
+ }
1915
+ /**
1916
+ * The selected shipping method by the user. Can either be selected during an
1917
+ * express Checkout Session or passed during Checkout Session creation.
1918
+ */
1919
+ interface ShippingMethod {
1920
+ /**
1921
+ * The customer-facing name of the shipping method.
1922
+ */
1923
+ name: string;
1924
+ /**
1925
+ * The price of the shipping method in decimals, i.e. 10.23 represents EUR 10.23.
1926
+ */
1927
+ price: number;
1928
+ /**
1929
+ * The unique identifier of the shipping method within Ivy.
1930
+ */
1931
+ id?: string;
1932
+ /**
1933
+ * The list of countries where the shipping method is available.
1934
+ */
1935
+ countries?: Array<'AF' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'KH' | 'CM' | 'CA' | 'CV' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CG' | 'CD' | 'CK' | 'CR' | 'CI' | 'HR' | 'CU' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IR' | 'IQ' | 'IE' | 'IL' | 'IT' | 'JM' | 'JP' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KP' | 'KR' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MP' | 'MK' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SH' | 'KN' | 'LC' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'SC' | 'SL' | 'SG' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SZ' | 'SE' | 'CH' | 'SY' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'US' | 'UM' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW' | 'AX' | 'BQ' | 'CW' | 'GG' | 'IM' | 'JE' | 'ME' | 'BL' | 'MF' | 'RS' | 'SX' | 'SS' | 'XK'>;
1936
+ /**
1937
+ * The delivery estimate of the shipping method.
1938
+ */
1939
+ deliveryEstimate?: ShippingMethod.DeliveryEstimate;
1940
+ /**
1941
+ * The unique identifier within your system of the shipping method.
1942
+ */
1943
+ reference?: string;
1944
+ /**
1945
+ * @deprecated Deprecated in favor of deliveryEstimate
1946
+ */
1947
+ timeFrame?: string;
1948
+ }
1949
+ namespace ShippingMethod {
1950
+ /**
1951
+ * The delivery estimate of the shipping method.
1952
+ */
1953
+ interface DeliveryEstimate {
1954
+ /**
1955
+ * The maximum delivery time.
1956
+ */
1957
+ maximum?: DeliveryEstimate.Maximum;
1958
+ /**
1959
+ * The minimum delivery time.
1960
+ */
1961
+ minimum?: DeliveryEstimate.Minimum;
1962
+ }
1963
+ namespace DeliveryEstimate {
1964
+ /**
1965
+ * The maximum delivery time.
1966
+ */
1967
+ interface Maximum {
1968
+ /**
1969
+ * The unit of the time duration.
1970
+ */
1971
+ unit: 'hour' | 'day' | 'business_day' | 'week' | 'month';
1972
+ /**
1973
+ * The value of the time duration.
1974
+ */
1975
+ value: number;
1976
+ }
1977
+ /**
1978
+ * The minimum delivery time.
1979
+ */
1980
+ interface Minimum {
1981
+ /**
1982
+ * The unit of the time duration.
1983
+ */
1984
+ unit: 'hour' | 'day' | 'business_day' | 'week' | 'month';
1985
+ /**
1986
+ * The value of the time duration.
1987
+ */
1988
+ value: number;
1989
+ }
1990
+ }
1991
+ }
1992
+ /**
1993
+ * The shopper object. Contains information collected from the user during the
1994
+ * Checkout.
1995
+ */
1996
+ interface Shopper {
1997
+ email?: string;
1998
+ phoneNumber?: string;
1999
+ }
2000
+ interface StatusClassification {
2001
+ /**
2002
+ * Populated with the primary payment initiation failure classsification if
2003
+ * available.
2004
+ */
2005
+ primary?: string;
2006
+ /**
2007
+ * Populated with the secondary payment initiation failure classsification if
2008
+ * available.
2009
+ */
2010
+ secondary?: string;
2011
+ }
2012
+ interface StatusHistoryList {
2013
+ /**
2014
+ * The order status. This status symbolises the state of the user's payment
2015
+ * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
2016
+ * information.
2017
+ */
2018
+ currentStatus: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused';
2019
+ reason: string;
2020
+ updatedAt: string;
2021
+ /**
2022
+ * The order status. This status symbolises the state of the user's payment
2023
+ * attempt. See [the guide](https://docs.getivy.de/docs/payment-status) for more
2024
+ * information.
2025
+ */
2026
+ previousStatus?: 'failed' | 'canceled' | 'processing' | 'waiting_for_payment' | 'paid' | 'in_refund' | 'refunded' | 'refund_failed' | 'partially_refunded' | 'in_dispute' | 'disputed' | 'refused' | null;
2027
+ }
2028
+ }
2029
+ export interface OrderCreateParams {
2030
+ /**
2031
+ * The total amount of the order
2032
+ */
2033
+ amount: number;
2034
+ /**
2035
+ * The currency code of the order
2036
+ */
2037
+ currency: 'EUR' | 'GBP' | 'PLN';
2038
+ /**
2039
+ * The merchant's unique reference ID for the order
2040
+ */
2041
+ referenceId: string;
2042
+ /**
2043
+ * The customer of the merchant.
2044
+ */
2045
+ customer?: OrderCreateParams.Email | OrderCreateParams.ID;
2046
+ /**
2047
+ * Optional expiration timestamp in seconds
2048
+ */
2049
+ expiresAt?: string;
2050
+ /**
2051
+ * The subaccount id of the merchant.
2052
+ */
2053
+ subaccountId?: string;
2054
+ }
2055
+ export declare namespace OrderCreateParams {
2056
+ interface Email {
2057
+ /**
2058
+ * The email of the customer.
2059
+ */
2060
+ email: string;
2061
+ }
2062
+ interface ID {
2063
+ /**
2064
+ * The Ivy id of the customer.
2065
+ */
2066
+ id: string;
2067
+ }
2068
+ }
2069
+ export interface OrderRetrieveParams {
2070
+ id: string;
2071
+ }
2072
+ export interface OrderExpireParams {
1392
2073
  id: string;
1393
2074
  }
1394
2075
  export declare namespace Orders {
1395
- export { type OrderCreateResponse as OrderCreateResponse, type OrderRetrieveResponse as OrderRetrieveResponse, type OrderCreateParams as OrderCreateParams, type OrderRetrieveParams as OrderRetrieveParams, };
2076
+ export { type OrderCreateResponse as OrderCreateResponse, type OrderRetrieveResponse as OrderRetrieveResponse, type OrderExpireResponse as OrderExpireResponse, type OrderCreateParams as OrderCreateParams, type OrderRetrieveParams as OrderRetrieveParams, type OrderExpireParams as OrderExpireParams, };
1396
2077
  }
1397
2078
  //# sourceMappingURL=orders.d.ts.map