@revkeen/sdk 1.20260419.901 → 1.20260420.907

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/index.d.mts CHANGED
@@ -3,7 +3,7 @@ export { OAuthTokenManager } from './auth.mjs';
3
3
  export { WEBHOOK_TOLERANCE_IN_SECONDS, WebhookHeaders, WebhookSignatureVerificationError, WebhookEvent as WebhookUtilityEvent, WebhookEventData as WebhookUtilityEventData, WebhookEventType as WebhookUtilityEventType, WebhookVerifyOptions, constructEvent, constructEventWithHeaders, extractWebhookHeaders, verifySignature, default as webhooks } from './webhooks.mjs';
4
4
 
5
5
  type ClientOptions$1 = {
6
- baseUrl: 'https://sandbox-api.revkeen.com/v2' | 'https://api.revkeen.com/v2' | 'http://localhost:3001/v2' | 'http://localhost:4010/v2' | (string & {});
6
+ baseUrl: 'https://staging-api.revkeen.com/v2' | 'https://api.revkeen.com/v2' | 'https://mock-api.revkeen.com/v2' | (string & {});
7
7
  };
8
8
  /**
9
9
  * The envelope for all webhook event deliveries. Contains the event type, timestamp, and the affected object in the data field.
@@ -9538,138 +9538,575 @@ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean
9538
9538
  * List invoices
9539
9539
  *
9540
9540
  * List invoices with pagination and filtering.
9541
+ *
9542
+ * ---
9543
+ *
9544
+ * **Related endpoints**
9545
+ *
9546
+ * - `PUT /invoices/external/batch` — Batch upsert invoices by external ID
9547
+ * - `POST /invoices` — Create invoice
9548
+ * - `GET /invoices/{id}` — Get invoice
9549
+ * - `PATCH /invoices/{id}` — Update invoice
9550
+ * - `DELETE /invoices/{id}` — Delete invoice
9551
+ * - `POST /invoices/{id}/refund` — Refund invoice
9552
+ * - `POST /invoices/{id}/reject` — Reject invoice
9553
+ * - `GET /invoices/{id}/comments` — List invoice comments
9554
+ *
9555
+ * **Pagination**
9556
+ *
9557
+ * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.
9541
9558
  */
9542
9559
  declare const invoicesList: <ThrowOnError extends boolean = false>(options?: Options<InvoicesListData, ThrowOnError>) => RequestResult<InvoicesListResponses, unknown, ThrowOnError, "fields">;
9543
9560
  /**
9544
9561
  * Create invoice
9545
9562
  *
9546
9563
  * Create a new invoice.
9564
+ *
9565
+ * ---
9566
+ *
9567
+ * **Related endpoints**
9568
+ *
9569
+ * - `PUT /invoices/external/batch` — Batch upsert invoices by external ID
9570
+ * - `GET /invoices` — List invoices
9571
+ * - `GET /invoices/{id}` — Get invoice
9572
+ * - `PATCH /invoices/{id}` — Update invoice
9573
+ * - `DELETE /invoices/{id}` — Delete invoice
9574
+ * - `POST /invoices/{id}/refund` — Refund invoice
9575
+ * - `POST /invoices/{id}/reject` — Reject invoice
9576
+ * - `GET /invoices/{id}/comments` — List invoice comments
9577
+ *
9578
+ * **Idempotency**
9579
+ *
9580
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9547
9581
  */
9548
9582
  declare const invoicesCreate: <ThrowOnError extends boolean = false>(options: Options<InvoicesCreateData, ThrowOnError>) => RequestResult<InvoicesCreateResponses, unknown, ThrowOnError, "fields">;
9549
9583
  /**
9550
9584
  * Get invoice
9551
9585
  *
9552
9586
  * Get a single invoice by ID.
9587
+ *
9588
+ * ---
9589
+ *
9590
+ * **Related endpoints**
9591
+ *
9592
+ * - `PUT /invoices/external/batch` — Batch upsert invoices by external ID
9593
+ * - `GET /invoices` — List invoices
9594
+ * - `POST /invoices` — Create invoice
9595
+ * - `PATCH /invoices/{id}` — Update invoice
9596
+ * - `DELETE /invoices/{id}` — Delete invoice
9597
+ * - `POST /invoices/{id}/refund` — Refund invoice
9598
+ * - `POST /invoices/{id}/reject` — Reject invoice
9599
+ * - `GET /invoices/{id}/comments` — List invoice comments
9553
9600
  */
9554
9601
  declare const invoicesGet: <ThrowOnError extends boolean = false>(options: Options<InvoicesGetData, ThrowOnError>) => RequestResult<InvoicesGetResponses, unknown, ThrowOnError, "fields">;
9555
9602
  /**
9556
9603
  * Update invoice
9557
9604
  *
9558
9605
  * Update an existing invoice.
9606
+ *
9607
+ * ---
9608
+ *
9609
+ * **Related endpoints**
9610
+ *
9611
+ * - `PUT /invoices/external/batch` — Batch upsert invoices by external ID
9612
+ * - `GET /invoices` — List invoices
9613
+ * - `POST /invoices` — Create invoice
9614
+ * - `GET /invoices/{id}` — Get invoice
9615
+ * - `DELETE /invoices/{id}` — Delete invoice
9616
+ * - `POST /invoices/{id}/refund` — Refund invoice
9617
+ * - `POST /invoices/{id}/reject` — Reject invoice
9618
+ * - `GET /invoices/{id}/comments` — List invoice comments
9619
+ *
9620
+ * **Idempotency**
9621
+ *
9622
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9559
9623
  */
9560
9624
  declare const invoicesUpdate: <ThrowOnError extends boolean = false>(options: Options<InvoicesUpdateData, ThrowOnError>) => RequestResult<InvoicesUpdateResponses, unknown, ThrowOnError, "fields">;
9561
9625
  /**
9562
9626
  * Finalize an invoice
9563
9627
  *
9564
9628
  * Finalizes a draft invoice, locking it for payment. Assigns invoice number and generates public token. After finalization, financial fields become immutable.
9629
+ *
9630
+ * ---
9631
+ *
9632
+ * **Related endpoints**
9633
+ *
9634
+ * - `PUT /invoices/external/batch` — Batch upsert invoices by external ID
9635
+ * - `GET /invoices` — List invoices
9636
+ * - `POST /invoices` — Create invoice
9637
+ * - `GET /invoices/{id}` — Get invoice
9638
+ * - `PATCH /invoices/{id}` — Update invoice
9639
+ * - `DELETE /invoices/{id}` — Delete invoice
9640
+ * - `POST /invoices/{id}/refund` — Refund invoice
9641
+ * - `POST /invoices/{id}/reject` — Reject invoice
9642
+ *
9643
+ * **Common errors**
9644
+ *
9645
+ * - `400 invalid_request` — malformed payload or failed validation.
9646
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9647
+ *
9648
+ * **Idempotency**
9649
+ *
9650
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9565
9651
  */
9566
9652
  declare const invoicesFinalize: <ThrowOnError extends boolean = false>(options: Options<InvoicesFinalizeData, ThrowOnError>) => RequestResult<InvoicesFinalizeResponses, InvoicesFinalizeErrors, ThrowOnError, "fields">;
9567
9653
  /**
9568
9654
  * Void an invoice
9569
9655
  *
9570
9656
  * Voids an invoice. Only invoices without recorded payments can be voided. Use refund instead for paid invoices.
9657
+ *
9658
+ * ---
9659
+ *
9660
+ * **Related endpoints**
9661
+ *
9662
+ * - `PUT /invoices/external/batch` — Batch upsert invoices by external ID
9663
+ * - `GET /invoices` — List invoices
9664
+ * - `POST /invoices` — Create invoice
9665
+ * - `GET /invoices/{id}` — Get invoice
9666
+ * - `PATCH /invoices/{id}` — Update invoice
9667
+ * - `DELETE /invoices/{id}` — Delete invoice
9668
+ * - `POST /invoices/{id}/refund` — Refund invoice
9669
+ * - `POST /invoices/{id}/reject` — Reject invoice
9670
+ *
9671
+ * **Common errors**
9672
+ *
9673
+ * - `400 invalid_request` — malformed payload or failed validation.
9674
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9675
+ *
9676
+ * **Idempotency**
9677
+ *
9678
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9571
9679
  */
9572
9680
  declare const invoicesVoid: <ThrowOnError extends boolean = false>(options: Options<InvoicesVoidData, ThrowOnError>) => RequestResult<InvoicesVoidResponses, InvoicesVoidErrors, ThrowOnError, "fields">;
9573
9681
  /**
9574
9682
  * Send an invoice
9575
9683
  *
9576
9684
  * Sends an invoice to the customer via the specified channel (email, SMS, or WhatsApp). Invoice must be approved first.
9685
+ *
9686
+ * ---
9687
+ *
9688
+ * **Related endpoints**
9689
+ *
9690
+ * - `PUT /invoices/external/batch` — Batch upsert invoices by external ID
9691
+ * - `GET /invoices` — List invoices
9692
+ * - `POST /invoices` — Create invoice
9693
+ * - `GET /invoices/{id}` — Get invoice
9694
+ * - `PATCH /invoices/{id}` — Update invoice
9695
+ * - `DELETE /invoices/{id}` — Delete invoice
9696
+ * - `POST /invoices/{id}/refund` — Refund invoice
9697
+ * - `POST /invoices/{id}/reject` — Reject invoice
9698
+ *
9699
+ * **Common errors**
9700
+ *
9701
+ * - `400 invalid_request` — malformed payload or failed validation.
9702
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9703
+ *
9704
+ * **Idempotency**
9705
+ *
9706
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9577
9707
  */
9578
9708
  declare const invoicesSend: <ThrowOnError extends boolean = false>(options: Options<InvoicesSendData, ThrowOnError>) => RequestResult<InvoicesSendResponses, InvoicesSendErrors, ThrowOnError, "fields">;
9579
9709
  /**
9580
9710
  * List products
9581
9711
  *
9582
9712
  * List products with pagination and optional search.
9713
+ *
9714
+ * ---
9715
+ *
9716
+ * **Related endpoints**
9717
+ *
9718
+ * - `POST /products` — Create product
9719
+ * - `GET /products/{id}` — Get product by ID
9720
+ * - `PATCH /products/{id}` — Update product
9721
+ * - `PUT /products/external/{source}/{externalId}` — Upsert product by external ID
9722
+ * - `PUT /products/external/batch` — Batch upsert products by external ID
9723
+ *
9724
+ * **Common errors**
9725
+ *
9726
+ * - `400 invalid_request` — malformed payload or failed validation.
9727
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
9728
+ *
9729
+ * **Pagination**
9730
+ *
9731
+ * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.
9583
9732
  */
9584
9733
  declare const productsList: <ThrowOnError extends boolean = false>(options?: Options<ProductsListData, ThrowOnError>) => RequestResult<ProductsListResponses, ProductsListErrors, ThrowOnError, "fields">;
9585
9734
  /**
9586
9735
  * Create product
9587
9736
  *
9588
9737
  * Create a new product. Requires 'products:write' scope.
9738
+ *
9739
+ * ---
9740
+ *
9741
+ * **Related endpoints**
9742
+ *
9743
+ * - `GET /products` — List products
9744
+ * - `GET /products/{id}` — Get product by ID
9745
+ * - `PATCH /products/{id}` — Update product
9746
+ * - `PUT /products/external/{source}/{externalId}` — Upsert product by external ID
9747
+ * - `PUT /products/external/batch` — Batch upsert products by external ID
9748
+ *
9749
+ * **Common errors**
9750
+ *
9751
+ * - `400 invalid_request` — malformed payload or failed validation.
9752
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
9753
+ *
9754
+ * **Idempotency**
9755
+ *
9756
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9589
9757
  */
9590
9758
  declare const productsCreate: <ThrowOnError extends boolean = false>(options: Options<ProductsCreateData, ThrowOnError>) => RequestResult<ProductsCreateResponses, ProductsCreateErrors, ThrowOnError, "fields">;
9591
9759
  /**
9592
9760
  * Get product by ID
9593
9761
  *
9594
9762
  * Get a product by its ID. Requires 'products:read' scope.
9763
+ *
9764
+ * ---
9765
+ *
9766
+ * **Related endpoints**
9767
+ *
9768
+ * - `GET /products` — List products
9769
+ * - `POST /products` — Create product
9770
+ * - `PATCH /products/{id}` — Update product
9771
+ * - `PUT /products/external/{source}/{externalId}` — Upsert product by external ID
9772
+ * - `PUT /products/external/batch` — Batch upsert products by external ID
9773
+ *
9774
+ * **Common errors**
9775
+ *
9776
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
9777
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9595
9778
  */
9596
9779
  declare const productsGet: <ThrowOnError extends boolean = false>(options: Options<ProductsGetData, ThrowOnError>) => RequestResult<ProductsGetResponses, ProductsGetErrors, ThrowOnError, "fields">;
9597
9780
  /**
9598
9781
  * Update product
9599
9782
  *
9600
9783
  * Update an existing product. Requires 'products:write' scope.
9784
+ *
9785
+ * ---
9786
+ *
9787
+ * **Related endpoints**
9788
+ *
9789
+ * - `GET /products` — List products
9790
+ * - `POST /products` — Create product
9791
+ * - `GET /products/{id}` — Get product by ID
9792
+ * - `PUT /products/external/{source}/{externalId}` — Upsert product by external ID
9793
+ * - `PUT /products/external/batch` — Batch upsert products by external ID
9794
+ *
9795
+ * **Common errors**
9796
+ *
9797
+ * - `400 invalid_request` — malformed payload or failed validation.
9798
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
9799
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9800
+ *
9801
+ * **Idempotency**
9802
+ *
9803
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9601
9804
  */
9602
9805
  declare const productsUpdate: <ThrowOnError extends boolean = false>(options: Options<ProductsUpdateData, ThrowOnError>) => RequestResult<ProductsUpdateResponses, ProductsUpdateErrors, ThrowOnError, "fields">;
9603
9806
  /**
9604
9807
  * Create a checkout session
9605
9808
  *
9606
9809
  * Create a checkout session for an invoice or product.
9810
+ *
9811
+ * ---
9812
+ *
9813
+ * **Related endpoints**
9814
+ *
9815
+ * - `GET /checkout-sessions/{id}` — Retrieve a checkout session
9816
+ * - `POST /checkout-sessions/{id}/expire` — Expire a checkout session
9817
+ *
9818
+ * **Common errors**
9819
+ *
9820
+ * - `400 invalid_request` — malformed payload or failed validation.
9821
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
9822
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9823
+ *
9824
+ * **Idempotency**
9825
+ *
9826
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9607
9827
  */
9608
9828
  declare const checkoutSessionsCreate: <ThrowOnError extends boolean = false>(options?: Options<CheckoutSessionsCreateData, ThrowOnError>) => RequestResult<CheckoutSessionsCreateResponses, CheckoutSessionsCreateErrors, ThrowOnError, "fields">;
9609
9829
  /**
9610
9830
  * Retrieve a checkout session
9611
9831
  *
9612
9832
  * Retrieve a checkout session by its ID.
9833
+ *
9834
+ * ---
9835
+ *
9836
+ * **Related endpoints**
9837
+ *
9838
+ * - `POST /checkout-sessions` — Create a checkout session
9839
+ * - `POST /checkout-sessions/{id}/expire` — Expire a checkout session
9840
+ *
9841
+ * **Common errors**
9842
+ *
9843
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
9844
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9613
9845
  */
9614
9846
  declare const checkoutSessionsGet: <ThrowOnError extends boolean = false>(options: Options<CheckoutSessionsGetData, ThrowOnError>) => RequestResult<CheckoutSessionsGetResponses, CheckoutSessionsGetErrors, ThrowOnError, "fields">;
9615
9847
  /**
9616
9848
  * Expire a checkout session
9617
9849
  *
9618
9850
  * Manually expire an open checkout session. Only sessions with status 'open' or 'pending' and no active payment attempt can be expired.
9851
+ *
9852
+ * ---
9853
+ *
9854
+ * **Related endpoints**
9855
+ *
9856
+ * - `POST /checkout-sessions` — Create a checkout session
9857
+ * - `GET /checkout-sessions/{id}` — Retrieve a checkout session
9858
+ *
9859
+ * **Common errors**
9860
+ *
9861
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
9862
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9863
+ * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.
9864
+ *
9865
+ * **Idempotency**
9866
+ *
9867
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9619
9868
  */
9620
9869
  declare const checkoutSessionsExpire: <ThrowOnError extends boolean = false>(options: Options<CheckoutSessionsExpireData, ThrowOnError>) => RequestResult<CheckoutSessionsExpireResponses, CheckoutSessionsExpireErrors, ThrowOnError, "fields">;
9621
9870
  /**
9622
9871
  * List customers
9623
9872
  *
9624
9873
  * Retrieve a paginated list of customers for the merchant
9874
+ *
9875
+ * ---
9876
+ *
9877
+ * **Related endpoints**
9878
+ *
9879
+ * - `GET /customers/{customerId}/invoices` — List customer invoices
9880
+ * - `GET /customers/{customerId}/subscriptions` — List customer subscriptions
9881
+ * - `GET /customers/{customerId}/orders` — List customer orders
9882
+ * - `GET /customers/{customerId}/payments` — List customer payments
9883
+ * - `PUT /customers/external/batch` — Batch upsert customers by external ID
9884
+ * - `POST /customers` — Create a new customer
9885
+ * - `GET /customers/{id}` — Get customer by ID
9886
+ * - `PATCH /customers/{id}` — Update customer details
9887
+ *
9888
+ * **Common errors**
9889
+ *
9890
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
9891
+ *
9892
+ * **Pagination**
9893
+ *
9894
+ * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.
9625
9895
  */
9626
9896
  declare const customersList: <ThrowOnError extends boolean = false>(options?: Options<CustomersListData, ThrowOnError>) => RequestResult<CustomersListResponses, CustomersListErrors, ThrowOnError, "fields">;
9627
9897
  /**
9628
9898
  * Create a new customer
9629
9899
  *
9630
9900
  * Create a new customer record in the merchant's account
9901
+ *
9902
+ * ---
9903
+ *
9904
+ * **Related endpoints**
9905
+ *
9906
+ * - `GET /customers/{customerId}/invoices` — List customer invoices
9907
+ * - `GET /customers/{customerId}/subscriptions` — List customer subscriptions
9908
+ * - `GET /customers/{customerId}/orders` — List customer orders
9909
+ * - `GET /customers/{customerId}/payments` — List customer payments
9910
+ * - `PUT /customers/external/batch` — Batch upsert customers by external ID
9911
+ * - `GET /customers` — List customers
9912
+ * - `GET /customers/{id}` — Get customer by ID
9913
+ * - `PATCH /customers/{id}` — Update customer details
9914
+ *
9915
+ * **Common errors**
9916
+ *
9917
+ * - `400 invalid_request` — malformed payload or failed validation.
9918
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
9919
+ *
9920
+ * **Idempotency**
9921
+ *
9922
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9631
9923
  */
9632
9924
  declare const customersCreate: <ThrowOnError extends boolean = false>(options?: Options<CustomersCreateData, ThrowOnError>) => RequestResult<CustomersCreateResponses, CustomersCreateErrors, ThrowOnError, "fields">;
9633
9925
  /**
9634
9926
  * Get customer by ID
9635
9927
  *
9636
9928
  * Retrieve detailed information about a specific customer
9929
+ *
9930
+ * ---
9931
+ *
9932
+ * **Related endpoints**
9933
+ *
9934
+ * - `GET /customers/{customerId}/invoices` — List customer invoices
9935
+ * - `GET /customers/{customerId}/subscriptions` — List customer subscriptions
9936
+ * - `GET /customers/{customerId}/orders` — List customer orders
9937
+ * - `GET /customers/{customerId}/payments` — List customer payments
9938
+ * - `PUT /customers/external/batch` — Batch upsert customers by external ID
9939
+ * - `POST /customers` — Create a new customer
9940
+ * - `GET /customers` — List customers
9941
+ * - `PATCH /customers/{id}` — Update customer details
9942
+ *
9943
+ * **Common errors**
9944
+ *
9945
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
9946
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9637
9947
  */
9638
9948
  declare const customersGet: <ThrowOnError extends boolean = false>(options: Options<CustomersGetData, ThrowOnError>) => RequestResult<CustomersGetResponses, CustomersGetErrors, ThrowOnError, "fields">;
9639
9949
  /**
9640
9950
  * Update customer details
9641
9951
  *
9642
9952
  * Update an existing customer's information
9953
+ *
9954
+ * ---
9955
+ *
9956
+ * **Related endpoints**
9957
+ *
9958
+ * - `GET /customers/{customerId}/invoices` — List customer invoices
9959
+ * - `GET /customers/{customerId}/subscriptions` — List customer subscriptions
9960
+ * - `GET /customers/{customerId}/orders` — List customer orders
9961
+ * - `GET /customers/{customerId}/payments` — List customer payments
9962
+ * - `PUT /customers/external/batch` — Batch upsert customers by external ID
9963
+ * - `POST /customers` — Create a new customer
9964
+ * - `GET /customers` — List customers
9965
+ * - `GET /customers/{id}` — Get customer by ID
9966
+ *
9967
+ * **Common errors**
9968
+ *
9969
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
9970
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9971
+ *
9972
+ * **Idempotency**
9973
+ *
9974
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9643
9975
  */
9644
9976
  declare const customersUpdate: <ThrowOnError extends boolean = false>(options: Options<CustomersUpdateData, ThrowOnError>) => RequestResult<CustomersUpdateResponses, CustomersUpdateErrors, ThrowOnError, "fields">;
9645
9977
  /**
9646
9978
  * Get customer payment methods
9647
9979
  *
9648
9980
  * Retrieve all payment methods for a customer
9981
+ *
9982
+ * ---
9983
+ *
9984
+ * **Related endpoints**
9985
+ *
9986
+ * - `GET /customers/{customerId}/invoices` — List customer invoices
9987
+ * - `GET /customers/{customerId}/subscriptions` — List customer subscriptions
9988
+ * - `GET /customers/{customerId}/orders` — List customer orders
9989
+ * - `GET /customers/{customerId}/payments` — List customer payments
9990
+ * - `PUT /customers/external/batch` — Batch upsert customers by external ID
9991
+ * - `POST /customers` — Create a new customer
9992
+ * - `GET /customers` — List customers
9993
+ * - `GET /customers/{id}` — Get customer by ID
9994
+ *
9995
+ * **Common errors**
9996
+ *
9997
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
9998
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9999
+ *
10000
+ * **Pagination**
10001
+ *
10002
+ * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.
9649
10003
  */
9650
10004
  declare const customersPaymentMethodsList: <ThrowOnError extends boolean = false>(options: Options<CustomersPaymentMethodsListData, ThrowOnError>) => RequestResult<CustomersPaymentMethodsListResponses, CustomersPaymentMethodsListErrors, ThrowOnError, "fields">;
9651
10005
  /**
9652
10006
  * List subscriptions
9653
10007
  *
9654
10008
  * Retrieve a paginated list of subscriptions with optional filters
10009
+ *
10010
+ * ---
10011
+ *
10012
+ * **Related endpoints**
10013
+ *
10014
+ * - `POST /subscriptions` — Create a new subscription
10015
+ * - `GET /subscriptions/{id}` — Get subscription by ID
10016
+ * - `PATCH /subscriptions/{id}` — Update subscription details
10017
+ * - `DELETE /subscriptions/{id}` — Delete subscription
10018
+ * - `POST /subscriptions/{id}/change-plan` — Change subscription plan
10019
+ * - `POST /subscriptions/{id}/change-quantity` — Change subscription quantity
10020
+ * - `POST /subscriptions/{id}/preview-renewal` — Preview subscription renewal
10021
+ * - `POST /subscriptions/{id}/pause` — Pause subscription
10022
+ *
10023
+ * **Common errors**
10024
+ *
10025
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10026
+ *
10027
+ * **Pagination**
10028
+ *
10029
+ * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.
9655
10030
  */
9656
10031
  declare const subscriptionsList: <ThrowOnError extends boolean = false>(options?: Options<SubscriptionsListData, ThrowOnError>) => RequestResult<SubscriptionsListResponses, SubscriptionsListErrors, ThrowOnError, "fields">;
9657
10032
  /**
9658
10033
  * Create a new subscription
9659
10034
  *
9660
10035
  * Create a new subscription for a customer
10036
+ *
10037
+ * ---
10038
+ *
10039
+ * **Related endpoints**
10040
+ *
10041
+ * - `GET /subscriptions` — List subscriptions
10042
+ * - `GET /subscriptions/{id}` — Get subscription by ID
10043
+ * - `PATCH /subscriptions/{id}` — Update subscription details
10044
+ * - `DELETE /subscriptions/{id}` — Delete subscription
10045
+ * - `POST /subscriptions/{id}/change-plan` — Change subscription plan
10046
+ * - `POST /subscriptions/{id}/change-quantity` — Change subscription quantity
10047
+ * - `POST /subscriptions/{id}/preview-renewal` — Preview subscription renewal
10048
+ * - `POST /subscriptions/{id}/pause` — Pause subscription
10049
+ *
10050
+ * **Common errors**
10051
+ *
10052
+ * - `400 invalid_request` — malformed payload or failed validation.
10053
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10054
+ *
10055
+ * **Idempotency**
10056
+ *
10057
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9661
10058
  */
9662
10059
  declare const subscriptionsCreate: <ThrowOnError extends boolean = false>(options?: Options<SubscriptionsCreateData, ThrowOnError>) => RequestResult<SubscriptionsCreateResponses, SubscriptionsCreateErrors, ThrowOnError, "fields">;
9663
10060
  /**
9664
10061
  * Get subscription by ID
9665
10062
  *
9666
10063
  * Retrieve detailed information about a specific subscription
10064
+ *
10065
+ * ---
10066
+ *
10067
+ * **Related endpoints**
10068
+ *
10069
+ * - `POST /subscriptions` — Create a new subscription
10070
+ * - `GET /subscriptions` — List subscriptions
10071
+ * - `PATCH /subscriptions/{id}` — Update subscription details
10072
+ * - `DELETE /subscriptions/{id}` — Delete subscription
10073
+ * - `POST /subscriptions/{id}/change-plan` — Change subscription plan
10074
+ * - `POST /subscriptions/{id}/change-quantity` — Change subscription quantity
10075
+ * - `POST /subscriptions/{id}/preview-renewal` — Preview subscription renewal
10076
+ * - `POST /subscriptions/{id}/pause` — Pause subscription
10077
+ *
10078
+ * **Common errors**
10079
+ *
10080
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10081
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9667
10082
  */
9668
10083
  declare const subscriptionsGet: <ThrowOnError extends boolean = false>(options: Options<SubscriptionsGetData, ThrowOnError>) => RequestResult<SubscriptionsGetResponses, SubscriptionsGetErrors, ThrowOnError, "fields">;
9669
10084
  /**
9670
10085
  * Update subscription details
9671
10086
  *
9672
10087
  * Update an existing subscription's properties
10088
+ *
10089
+ * ---
10090
+ *
10091
+ * **Related endpoints**
10092
+ *
10093
+ * - `POST /subscriptions` — Create a new subscription
10094
+ * - `GET /subscriptions` — List subscriptions
10095
+ * - `GET /subscriptions/{id}` — Get subscription by ID
10096
+ * - `DELETE /subscriptions/{id}` — Delete subscription
10097
+ * - `POST /subscriptions/{id}/change-plan` — Change subscription plan
10098
+ * - `POST /subscriptions/{id}/change-quantity` — Change subscription quantity
10099
+ * - `POST /subscriptions/{id}/preview-renewal` — Preview subscription renewal
10100
+ * - `POST /subscriptions/{id}/pause` — Pause subscription
10101
+ *
10102
+ * **Common errors**
10103
+ *
10104
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10105
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
10106
+ *
10107
+ * **Idempotency**
10108
+ *
10109
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9673
10110
  */
9674
10111
  declare const subscriptionsUpdate: <ThrowOnError extends boolean = false>(options: Options<SubscriptionsUpdateData, ThrowOnError>) => RequestResult<SubscriptionsUpdateResponses, SubscriptionsUpdateErrors, ThrowOnError, "fields">;
9675
10112
  /**
@@ -9680,90 +10117,366 @@ declare const subscriptionsUpdate: <ThrowOnError extends boolean = false>(option
9680
10117
  * **Modes:**
9681
10118
  * - `immediately`: Status set to "canceled", access revoked now
9682
10119
  * - `period_end`: cancelAtPeriodEnd flag set, access continues until period end
10120
+ *
10121
+ * ---
10122
+ *
10123
+ * **Related endpoints**
10124
+ *
10125
+ * - `POST /subscriptions` — Create a new subscription
10126
+ * - `GET /subscriptions` — List subscriptions
10127
+ * - `GET /subscriptions/{id}` — Get subscription by ID
10128
+ * - `PATCH /subscriptions/{id}` — Update subscription details
10129
+ * - `DELETE /subscriptions/{id}` — Delete subscription
10130
+ * - `POST /subscriptions/{id}/change-plan` — Change subscription plan
10131
+ * - `POST /subscriptions/{id}/change-quantity` — Change subscription quantity
10132
+ * - `POST /subscriptions/{id}/preview-renewal` — Preview subscription renewal
10133
+ *
10134
+ * **Common errors**
10135
+ *
10136
+ * - `400 invalid_request` — malformed payload or failed validation.
10137
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10138
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
10139
+ *
10140
+ * **Idempotency**
10141
+ *
10142
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9683
10143
  */
9684
10144
  declare const subscriptionsCancel: <ThrowOnError extends boolean = false>(options: Options<SubscriptionsCancelData, ThrowOnError>) => RequestResult<SubscriptionsCancelResponses, SubscriptionsCancelErrors, ThrowOnError, "fields">;
9685
10145
  /**
9686
10146
  * MRR Summary
9687
10147
  *
9688
10148
  * Get Monthly Recurring Revenue metrics and growth
10149
+ *
10150
+ * ---
10151
+ *
10152
+ * **Related endpoints**
10153
+ *
10154
+ * - `GET /analytics/revenue/time-series` — Revenue Time Series
10155
+ * - `GET /analytics/invoices/ar-aging` — A/R Aging Report
10156
+ * - `GET /analytics/collections/dso` — Days Sales Outstanding
10157
+ * - `GET /analytics/customers/ltv` — Customer LTV
10158
+ * - `GET /analytics/customers/{customerId}` — Customer Analytics
10159
+ * - `GET /analytics/payment-links/conversion` — Payment Link Conversion
10160
+ * - `GET /analytics/checkout/funnel` — Checkout Funnel Analytics
10161
+ * - `GET /analytics/checkout/abandonment/summary` — Abandonment Alert Summary
9689
10162
  */
9690
10163
  declare const analyticsRevenueMrrSummary: <ThrowOnError extends boolean = false>(options?: Options<AnalyticsRevenueMrrSummaryData, ThrowOnError>) => RequestResult<AnalyticsRevenueMrrSummaryResponses, unknown, ThrowOnError, "fields">;
9691
10164
  /**
9692
10165
  * Revenue Time Series
9693
10166
  *
9694
10167
  * Get revenue data over time with configurable granularity
10168
+ *
10169
+ * ---
10170
+ *
10171
+ * **Related endpoints**
10172
+ *
10173
+ * - `GET /analytics/revenue/mrr-summary` — MRR Summary
10174
+ * - `GET /analytics/invoices/ar-aging` — A/R Aging Report
10175
+ * - `GET /analytics/collections/dso` — Days Sales Outstanding
10176
+ * - `GET /analytics/customers/ltv` — Customer LTV
10177
+ * - `GET /analytics/customers/{customerId}` — Customer Analytics
10178
+ * - `GET /analytics/payment-links/conversion` — Payment Link Conversion
10179
+ * - `GET /analytics/checkout/funnel` — Checkout Funnel Analytics
10180
+ * - `GET /analytics/checkout/abandonment/summary` — Abandonment Alert Summary
9695
10181
  */
9696
10182
  declare const analyticsRevenueTimeSeries: <ThrowOnError extends boolean = false>(options: Options<AnalyticsRevenueTimeSeriesData, ThrowOnError>) => RequestResult<AnalyticsRevenueTimeSeriesResponses, unknown, ThrowOnError, "fields">;
9697
10183
  /**
9698
10184
  * List refunds
9699
10185
  *
9700
10186
  * Retrieve a paginated list of refunds with optional filters. Results are ordered by creation date (newest first).
10187
+ *
10188
+ * ---
10189
+ *
10190
+ * **Related endpoints**
10191
+ *
10192
+ * - `POST /refunds` — Create a refund
10193
+ * - `GET /refunds/{id}` — Get refund by ID
10194
+ *
10195
+ * **Common errors**
10196
+ *
10197
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10198
+ *
10199
+ * **Pagination**
10200
+ *
10201
+ * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.
9701
10202
  */
9702
10203
  declare const refundsList: <ThrowOnError extends boolean = false>(options?: Options<RefundsListData, ThrowOnError>) => RequestResult<RefundsListResponses, RefundsListErrors, ThrowOnError, "fields">;
9703
10204
  /**
9704
10205
  * Create a refund
9705
10206
  *
9706
10207
  * Initiate a refund for a payment. The refund will be processed through the original payment gateway.
10208
+ *
10209
+ * ---
10210
+ *
10211
+ * **Related endpoints**
10212
+ *
10213
+ * - `GET /refunds` — List refunds
10214
+ * - `GET /refunds/{id}` — Get refund by ID
10215
+ *
10216
+ * **Common errors**
10217
+ *
10218
+ * - `400 invalid_request` — malformed payload or failed validation.
10219
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10220
+ *
10221
+ * **Idempotency**
10222
+ *
10223
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9707
10224
  */
9708
10225
  declare const refundsCreate: <ThrowOnError extends boolean = false>(options?: Options<RefundsCreateData, ThrowOnError>) => RequestResult<RefundsCreateResponses, RefundsCreateErrors, ThrowOnError, "fields">;
9709
10226
  /**
9710
10227
  * Get refund by ID
9711
10228
  *
9712
10229
  * Retrieve a single refund by its public ID (ref_xxx) or internal UUID.
10230
+ *
10231
+ * ---
10232
+ *
10233
+ * **Related endpoints**
10234
+ *
10235
+ * - `GET /refunds` — List refunds
10236
+ * - `POST /refunds` — Create a refund
10237
+ *
10238
+ * **Common errors**
10239
+ *
10240
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10241
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9713
10242
  */
9714
10243
  declare const refundsGet: <ThrowOnError extends boolean = false>(options: Options<RefundsGetData, ThrowOnError>) => RequestResult<RefundsGetResponses, RefundsGetErrors, ThrowOnError, "fields">;
9715
10244
  /**
9716
10245
  * List credit notes
9717
10246
  *
9718
10247
  * Retrieve a paginated list of credit notes with optional filters. Results are ordered by creation date (newest first).
10248
+ *
10249
+ * ---
10250
+ *
10251
+ * **Related endpoints**
10252
+ *
10253
+ * - `POST /credit_notes` — Create a credit note
10254
+ * - `GET /credit_notes/{id}` — Get credit note by ID
10255
+ * - `POST /credit_notes/{id}/void` — Void a credit note
10256
+ * - `GET /credit_notes/invoice/{invoice_id}/eligibility` — Check credit note eligibility for an invoice
10257
+ * - `GET /credit_notes/transaction/{transaction_id}/reversal-eligibility` — Check reversal eligibility for a transaction
10258
+ * - `GET /credit_notes/{id}/lines` — List line items on a credit note
10259
+ * - `POST /credit_notes/preview` — Preview a credit note without creating it
10260
+ *
10261
+ * **Common errors**
10262
+ *
10263
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10264
+ *
10265
+ * **Pagination**
10266
+ *
10267
+ * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.
9719
10268
  */
9720
10269
  declare const creditNotesList: <ThrowOnError extends boolean = false>(options?: Options<CreditNotesListData, ThrowOnError>) => RequestResult<CreditNotesListResponses, CreditNotesListErrors, ThrowOnError, "fields">;
9721
10270
  /**
9722
10271
  * Create a credit note
9723
10272
  *
9724
10273
  * Issue a credit note for a paid or partially paid invoice. The credit can be applied via refund to payment method, customer balance, or marked as external.
10274
+ *
10275
+ * ---
10276
+ *
10277
+ * **Related endpoints**
10278
+ *
10279
+ * - `GET /credit_notes` — List credit notes
10280
+ * - `GET /credit_notes/{id}` — Get credit note by ID
10281
+ * - `POST /credit_notes/{id}/void` — Void a credit note
10282
+ * - `GET /credit_notes/invoice/{invoice_id}/eligibility` — Check credit note eligibility for an invoice
10283
+ * - `GET /credit_notes/transaction/{transaction_id}/reversal-eligibility` — Check reversal eligibility for a transaction
10284
+ * - `GET /credit_notes/{id}/lines` — List line items on a credit note
10285
+ * - `POST /credit_notes/preview` — Preview a credit note without creating it
10286
+ *
10287
+ * **Common errors**
10288
+ *
10289
+ * - `400 invalid_request` — malformed payload or failed validation.
10290
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10291
+ * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.
10292
+ *
10293
+ * **Idempotency**
10294
+ *
10295
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9725
10296
  */
9726
10297
  declare const creditNotesCreate: <ThrowOnError extends boolean = false>(options?: Options<CreditNotesCreateData, ThrowOnError>) => RequestResult<CreditNotesCreateResponses, CreditNotesCreateErrors, ThrowOnError, "fields">;
9727
10298
  /**
9728
10299
  * Get credit note by ID
9729
10300
  *
9730
10301
  * Retrieve a single credit note by its UUID.
10302
+ *
10303
+ * ---
10304
+ *
10305
+ * **Related endpoints**
10306
+ *
10307
+ * - `GET /credit_notes` — List credit notes
10308
+ * - `POST /credit_notes` — Create a credit note
10309
+ * - `POST /credit_notes/{id}/void` — Void a credit note
10310
+ * - `GET /credit_notes/invoice/{invoice_id}/eligibility` — Check credit note eligibility for an invoice
10311
+ * - `GET /credit_notes/transaction/{transaction_id}/reversal-eligibility` — Check reversal eligibility for a transaction
10312
+ * - `GET /credit_notes/{id}/lines` — List line items on a credit note
10313
+ * - `POST /credit_notes/preview` — Preview a credit note without creating it
10314
+ *
10315
+ * **Common errors**
10316
+ *
10317
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10318
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9731
10319
  */
9732
10320
  declare const creditNotesGet: <ThrowOnError extends boolean = false>(options: Options<CreditNotesGetData, ThrowOnError>) => RequestResult<CreditNotesGetResponses, CreditNotesGetErrors, ThrowOnError, "fields">;
9733
10321
  /**
9734
10322
  * Void a credit note
9735
10323
  *
9736
10324
  * Void a credit note that has been issued but not yet fully applied. This is an accounting void — it reverses the credit without creating a new financial transaction.
10325
+ *
10326
+ * ---
10327
+ *
10328
+ * **Related endpoints**
10329
+ *
10330
+ * - `GET /credit_notes` — List credit notes
10331
+ * - `POST /credit_notes` — Create a credit note
10332
+ * - `GET /credit_notes/{id}` — Get credit note by ID
10333
+ * - `GET /credit_notes/invoice/{invoice_id}/eligibility` — Check credit note eligibility for an invoice
10334
+ * - `GET /credit_notes/transaction/{transaction_id}/reversal-eligibility` — Check reversal eligibility for a transaction
10335
+ * - `GET /credit_notes/{id}/lines` — List line items on a credit note
10336
+ * - `POST /credit_notes/preview` — Preview a credit note without creating it
10337
+ *
10338
+ * **Common errors**
10339
+ *
10340
+ * - `400 invalid_request` — malformed payload or failed validation.
10341
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10342
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
10343
+ *
10344
+ * **Idempotency**
10345
+ *
10346
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9737
10347
  */
9738
10348
  declare const creditNotesVoid: <ThrowOnError extends boolean = false>(options: Options<CreditNotesVoidData, ThrowOnError>) => RequestResult<CreditNotesVoidResponses, CreditNotesVoidErrors, ThrowOnError, "fields">;
9739
10349
  /**
9740
10350
  * List line items on a credit note
9741
10351
  *
9742
10352
  * Returns the line items attached to a credit note. Each line describes a portion of the invoice that the credit applies to — either a whole invoice line or a prorated slice. Use this to reconstruct the credit's effect per invoice line (for example, when displaying the credit breakdown in your own UI).
10353
+ *
10354
+ * ---
10355
+ *
10356
+ * **Related endpoints**
10357
+ *
10358
+ * - `GET /credit_notes` — List credit notes
10359
+ * - `POST /credit_notes` — Create a credit note
10360
+ * - `GET /credit_notes/{id}` — Get credit note by ID
10361
+ * - `POST /credit_notes/{id}/void` — Void a credit note
10362
+ * - `GET /credit_notes/invoice/{invoice_id}/eligibility` — Check credit note eligibility for an invoice
10363
+ * - `GET /credit_notes/transaction/{transaction_id}/reversal-eligibility` — Check reversal eligibility for a transaction
10364
+ * - `POST /credit_notes/preview` — Preview a credit note without creating it
10365
+ *
10366
+ * **Common errors**
10367
+ *
10368
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10369
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
10370
+ *
10371
+ * **Pagination**
10372
+ *
10373
+ * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.
9743
10374
  */
9744
10375
  declare const creditNotesListLines: <ThrowOnError extends boolean = false>(options: Options<CreditNotesListLinesData, ThrowOnError>) => RequestResult<CreditNotesListLinesResponses, CreditNotesListLinesErrors, ThrowOnError, "fields">;
9745
10376
  /**
9746
10377
  * Preview a credit note without creating it
9747
10378
  *
9748
10379
  * Compute what a credit note would look like against a specific invoice without persisting anything. Use this to validate amounts and show a "here's what will happen" UI before the merchant commits. No side effects — no DB writes, no events emitted, no refunds initiated. Mirrors Stripe's `POST /v1/credit_notes/preview`.
10380
+ *
10381
+ * ---
10382
+ *
10383
+ * **Related endpoints**
10384
+ *
10385
+ * - `GET /credit_notes` — List credit notes
10386
+ * - `POST /credit_notes` — Create a credit note
10387
+ * - `GET /credit_notes/{id}` — Get credit note by ID
10388
+ * - `POST /credit_notes/{id}/void` — Void a credit note
10389
+ * - `GET /credit_notes/invoice/{invoice_id}/eligibility` — Check credit note eligibility for an invoice
10390
+ * - `GET /credit_notes/transaction/{transaction_id}/reversal-eligibility` — Check reversal eligibility for a transaction
10391
+ * - `GET /credit_notes/{id}/lines` — List line items on a credit note
10392
+ *
10393
+ * **Common errors**
10394
+ *
10395
+ * - `400 invalid_request` — malformed payload or failed validation.
10396
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10397
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
10398
+ *
10399
+ * **Idempotency**
10400
+ *
10401
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9749
10402
  */
9750
10403
  declare const creditNotesPreview: <ThrowOnError extends boolean = false>(options: Options<CreditNotesPreviewData, ThrowOnError>) => RequestResult<CreditNotesPreviewResponses, CreditNotesPreviewErrors, ThrowOnError, "fields">;
9751
10404
  /**
9752
10405
  * List payment links
9753
10406
  *
9754
10407
  * List payment links for the authenticated merchant with pagination and filters
10408
+ *
10409
+ * ---
10410
+ *
10411
+ * **Related endpoints**
10412
+ *
10413
+ * - `POST /payment-links` — Create a new payment link
10414
+ * - `GET /payment-links/{id}` — Get payment link by ID
10415
+ * - `POST /payment-links/{id}/expire` — Expire a payment link (deprecated)
10416
+ * - `PATCH /payment-links/{id}/status` — Update payment link status
10417
+ * - `POST /payment-links/{id}/deactivate` — Deactivate a payment link (deprecated)
10418
+ * - `POST /payment-links/{id}/activate` — Activate a payment link (deprecated)
10419
+ * - `POST /payment-links/{id}/archive` — Archive a payment link (deprecated)
10420
+ *
10421
+ * **Common errors**
10422
+ *
10423
+ * - `400 invalid_request` — malformed payload or failed validation.
10424
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10425
+ *
10426
+ * **Pagination**
10427
+ *
10428
+ * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.
9755
10429
  */
9756
10430
  declare const paymentLinksList: <ThrowOnError extends boolean = false>(options?: Options<PaymentLinksListData, ThrowOnError>) => RequestResult<PaymentLinksListResponses, PaymentLinksListErrors, ThrowOnError, "fields">;
9757
10431
  /**
9758
10432
  * Create a new payment link
9759
10433
  *
9760
10434
  * Create a new payment link for invoices, subscriptions, or custom amounts
10435
+ *
10436
+ * ---
10437
+ *
10438
+ * **Related endpoints**
10439
+ *
10440
+ * - `GET /payment-links` — List payment links
10441
+ * - `GET /payment-links/{id}` — Get payment link by ID
10442
+ * - `POST /payment-links/{id}/expire` — Expire a payment link (deprecated)
10443
+ * - `PATCH /payment-links/{id}/status` — Update payment link status
10444
+ * - `POST /payment-links/{id}/deactivate` — Deactivate a payment link (deprecated)
10445
+ * - `POST /payment-links/{id}/activate` — Activate a payment link (deprecated)
10446
+ * - `POST /payment-links/{id}/archive` — Archive a payment link (deprecated)
10447
+ *
10448
+ * **Common errors**
10449
+ *
10450
+ * - `400 invalid_request` — malformed payload or failed validation.
10451
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10452
+ * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.
10453
+ *
10454
+ * **Idempotency**
10455
+ *
10456
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9761
10457
  */
9762
10458
  declare const paymentLinksCreate: <ThrowOnError extends boolean = false>(options?: Options<PaymentLinksCreateData, ThrowOnError>) => RequestResult<PaymentLinksCreateResponses, PaymentLinksCreateErrors, ThrowOnError, "fields">;
9763
10459
  /**
9764
10460
  * Get payment link by ID
9765
10461
  *
9766
10462
  * Retrieve a payment link by its UUID or public_id
10463
+ *
10464
+ * ---
10465
+ *
10466
+ * **Related endpoints**
10467
+ *
10468
+ * - `POST /payment-links` — Create a new payment link
10469
+ * - `GET /payment-links` — List payment links
10470
+ * - `POST /payment-links/{id}/expire` — Expire a payment link (deprecated)
10471
+ * - `PATCH /payment-links/{id}/status` — Update payment link status
10472
+ * - `POST /payment-links/{id}/deactivate` — Deactivate a payment link (deprecated)
10473
+ * - `POST /payment-links/{id}/activate` — Activate a payment link (deprecated)
10474
+ * - `POST /payment-links/{id}/archive` — Archive a payment link (deprecated)
10475
+ *
10476
+ * **Common errors**
10477
+ *
10478
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10479
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9767
10480
  */
9768
10481
  declare const paymentLinksGet: <ThrowOnError extends boolean = false>(options: Options<PaymentLinksGetData, ThrowOnError>) => RequestResult<PaymentLinksGetResponses, PaymentLinksGetErrors, ThrowOnError, "fields">;
9769
10482
  /**
@@ -9771,6 +10484,28 @@ declare const paymentLinksGet: <ThrowOnError extends boolean = false>(options: O
9771
10484
  *
9772
10485
  * **Deprecated — use `PATCH /v2/payment-links/{id}/status` with `status: "expired"` instead.** This convenience endpoint will be removed in a future API version. Mark a payment link as expired, preventing further use.
9773
10486
  *
10487
+ * ---
10488
+ *
10489
+ * **Related endpoints**
10490
+ *
10491
+ * - `POST /payment-links` — Create a new payment link
10492
+ * - `GET /payment-links` — List payment links
10493
+ * - `GET /payment-links/{id}` — Get payment link by ID
10494
+ * - `PATCH /payment-links/{id}/status` — Update payment link status
10495
+ * - `POST /payment-links/{id}/deactivate` — Deactivate a payment link (deprecated)
10496
+ * - `POST /payment-links/{id}/activate` — Activate a payment link (deprecated)
10497
+ * - `POST /payment-links/{id}/archive` — Archive a payment link (deprecated)
10498
+ *
10499
+ * **Common errors**
10500
+ *
10501
+ * - `400 invalid_request` — malformed payload or failed validation.
10502
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10503
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
10504
+ *
10505
+ * **Idempotency**
10506
+ *
10507
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
10508
+ *
9774
10509
  * @deprecated
9775
10510
  */
9776
10511
  declare const paymentLinksExpire: <ThrowOnError extends boolean = false>(options: Options<PaymentLinksExpireData, ThrowOnError>) => RequestResult<PaymentLinksExpireResponses, PaymentLinksExpireErrors, ThrowOnError, "fields">;
@@ -9778,6 +10513,28 @@ declare const paymentLinksExpire: <ThrowOnError extends boolean = false>(options
9778
10513
  * Update payment link status
9779
10514
  *
9780
10515
  * Change the status of a payment link. Active links accept payments, inactive links are temporarily disabled, and archived links are permanently disabled and cannot be reactivated.
10516
+ *
10517
+ * ---
10518
+ *
10519
+ * **Related endpoints**
10520
+ *
10521
+ * - `POST /payment-links` — Create a new payment link
10522
+ * - `GET /payment-links` — List payment links
10523
+ * - `GET /payment-links/{id}` — Get payment link by ID
10524
+ * - `POST /payment-links/{id}/expire` — Expire a payment link (deprecated)
10525
+ * - `POST /payment-links/{id}/deactivate` — Deactivate a payment link (deprecated)
10526
+ * - `POST /payment-links/{id}/activate` — Activate a payment link (deprecated)
10527
+ * - `POST /payment-links/{id}/archive` — Archive a payment link (deprecated)
10528
+ *
10529
+ * **Common errors**
10530
+ *
10531
+ * - `400 invalid_request` — malformed payload or failed validation.
10532
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10533
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
10534
+ *
10535
+ * **Idempotency**
10536
+ *
10537
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9781
10538
  */
9782
10539
  declare const paymentLinksUpdate: <ThrowOnError extends boolean = false>(options: Options<PaymentLinksUpdateData, ThrowOnError>) => RequestResult<PaymentLinksUpdateResponses, PaymentLinksUpdateErrors, ThrowOnError, "fields">;
9783
10540
  /**
@@ -9785,6 +10542,28 @@ declare const paymentLinksUpdate: <ThrowOnError extends boolean = false>(options
9785
10542
  *
9786
10543
  * **Deprecated — use `PATCH /v2/payment-links/{id}/status` with `status: "inactive"` instead.** This convenience endpoint will be removed in a future API version. Temporarily disable a payment link. It can be reactivated later.
9787
10544
  *
10545
+ * ---
10546
+ *
10547
+ * **Related endpoints**
10548
+ *
10549
+ * - `POST /payment-links` — Create a new payment link
10550
+ * - `GET /payment-links` — List payment links
10551
+ * - `GET /payment-links/{id}` — Get payment link by ID
10552
+ * - `POST /payment-links/{id}/expire` — Expire a payment link (deprecated)
10553
+ * - `PATCH /payment-links/{id}/status` — Update payment link status
10554
+ * - `POST /payment-links/{id}/activate` — Activate a payment link (deprecated)
10555
+ * - `POST /payment-links/{id}/archive` — Archive a payment link (deprecated)
10556
+ *
10557
+ * **Common errors**
10558
+ *
10559
+ * - `400 invalid_request` — malformed payload or failed validation.
10560
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10561
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
10562
+ *
10563
+ * **Idempotency**
10564
+ *
10565
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
10566
+ *
9788
10567
  * @deprecated
9789
10568
  */
9790
10569
  declare const paymentLinksDeactivate: <ThrowOnError extends boolean = false>(options: Options<PaymentLinksDeactivateData, ThrowOnError>) => RequestResult<PaymentLinksDeactivateResponses, PaymentLinksDeactivateErrors, ThrowOnError, "fields">;
@@ -9793,6 +10572,28 @@ declare const paymentLinksDeactivate: <ThrowOnError extends boolean = false>(opt
9793
10572
  *
9794
10573
  * **Deprecated — use `PATCH /v2/payment-links/{id}/status` with `status: "active"` instead.** This convenience endpoint will be removed in a future API version. Enable a payment link to accept payments. Cannot be used on archived links.
9795
10574
  *
10575
+ * ---
10576
+ *
10577
+ * **Related endpoints**
10578
+ *
10579
+ * - `POST /payment-links` — Create a new payment link
10580
+ * - `GET /payment-links` — List payment links
10581
+ * - `GET /payment-links/{id}` — Get payment link by ID
10582
+ * - `POST /payment-links/{id}/expire` — Expire a payment link (deprecated)
10583
+ * - `PATCH /payment-links/{id}/status` — Update payment link status
10584
+ * - `POST /payment-links/{id}/deactivate` — Deactivate a payment link (deprecated)
10585
+ * - `POST /payment-links/{id}/archive` — Archive a payment link (deprecated)
10586
+ *
10587
+ * **Common errors**
10588
+ *
10589
+ * - `400 invalid_request` — malformed payload or failed validation.
10590
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10591
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
10592
+ *
10593
+ * **Idempotency**
10594
+ *
10595
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
10596
+ *
9796
10597
  * @deprecated
9797
10598
  */
9798
10599
  declare const paymentLinksActivate: <ThrowOnError extends boolean = false>(options: Options<PaymentLinksActivateData, ThrowOnError>) => RequestResult<PaymentLinksActivateResponses, PaymentLinksActivateErrors, ThrowOnError, "fields">;
@@ -9801,6 +10602,27 @@ declare const paymentLinksActivate: <ThrowOnError extends boolean = false>(optio
9801
10602
  *
9802
10603
  * **Deprecated — use `PATCH /v2/payment-links/{id}/status` with `status: "archived"` instead.** This convenience endpoint will be removed in a future API version. Permanently disable a payment link. This action cannot be undone.
9803
10604
  *
10605
+ * ---
10606
+ *
10607
+ * **Related endpoints**
10608
+ *
10609
+ * - `POST /payment-links` — Create a new payment link
10610
+ * - `GET /payment-links` — List payment links
10611
+ * - `GET /payment-links/{id}` — Get payment link by ID
10612
+ * - `POST /payment-links/{id}/expire` — Expire a payment link (deprecated)
10613
+ * - `PATCH /payment-links/{id}/status` — Update payment link status
10614
+ * - `POST /payment-links/{id}/deactivate` — Deactivate a payment link (deprecated)
10615
+ * - `POST /payment-links/{id}/activate` — Activate a payment link (deprecated)
10616
+ *
10617
+ * **Common errors**
10618
+ *
10619
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10620
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
10621
+ *
10622
+ * **Idempotency**
10623
+ *
10624
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
10625
+ *
9804
10626
  * @deprecated
9805
10627
  */
9806
10628
  declare const paymentLinksArchive: <ThrowOnError extends boolean = false>(options: Options<PaymentLinksArchiveData, ThrowOnError>) => RequestResult<PaymentLinksArchiveResponses, PaymentLinksArchiveErrors, ThrowOnError, "fields">;
@@ -9808,96 +10630,437 @@ declare const paymentLinksArchive: <ThrowOnError extends boolean = false>(option
9808
10630
  * List prices
9809
10631
  *
9810
10632
  * List all prices for the authenticated merchant. Supports filtering and cursor-based pagination.
10633
+ *
10634
+ * ---
10635
+ *
10636
+ * **Related endpoints**
10637
+ *
10638
+ * - `POST /prices` — Create a price
10639
+ * - `GET /prices/{id}` — Retrieve a price
10640
+ * - `PATCH /prices/{id}` — Update a price
10641
+ * - `DELETE /prices/{id}` — Archive a price
10642
+ *
10643
+ * **Common errors**
10644
+ *
10645
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10646
+ *
10647
+ * **Pagination**
10648
+ *
10649
+ * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.
9811
10650
  */
9812
10651
  declare const pricesList: <ThrowOnError extends boolean = false>(options?: Options<PricesListData, ThrowOnError>) => RequestResult<PricesListResponses, PricesListErrors, ThrowOnError, "fields">;
9813
10652
  /**
9814
10653
  * Create a price
9815
10654
  *
9816
10655
  * Creates a new price for a product. Supports fixed, pay-what-you-want, and free pricing models.
10656
+ *
10657
+ * ---
10658
+ *
10659
+ * **Related endpoints**
10660
+ *
10661
+ * - `GET /prices` — List prices
10662
+ * - `GET /prices/{id}` — Retrieve a price
10663
+ * - `PATCH /prices/{id}` — Update a price
10664
+ * - `DELETE /prices/{id}` — Archive a price
10665
+ *
10666
+ * **Common errors**
10667
+ *
10668
+ * - `400 invalid_request` — malformed payload or failed validation.
10669
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10670
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
10671
+ *
10672
+ * **Idempotency**
10673
+ *
10674
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9817
10675
  */
9818
10676
  declare const pricesCreate: <ThrowOnError extends boolean = false>(options: Options<PricesCreateData, ThrowOnError>) => RequestResult<PricesCreateResponses, PricesCreateErrors, ThrowOnError, "fields">;
9819
10677
  /**
9820
10678
  * Archive a price
9821
10679
  *
9822
10680
  * Archives a price by setting active to false. The price remains in the system but cannot be used for new purchases.
10681
+ *
10682
+ * ---
10683
+ *
10684
+ * **Related endpoints**
10685
+ *
10686
+ * - `GET /prices` — List prices
10687
+ * - `POST /prices` — Create a price
10688
+ * - `GET /prices/{id}` — Retrieve a price
10689
+ * - `PATCH /prices/{id}` — Update a price
10690
+ *
10691
+ * **Common errors**
10692
+ *
10693
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10694
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
10695
+ *
10696
+ * **Idempotency**
10697
+ *
10698
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9823
10699
  */
9824
10700
  declare const pricesArchive: <ThrowOnError extends boolean = false>(options: Options<PricesArchiveData, ThrowOnError>) => RequestResult<PricesArchiveResponses, PricesArchiveErrors, ThrowOnError, "fields">;
9825
10701
  /**
9826
10702
  * Retrieve a price
9827
10703
  *
9828
10704
  * Retrieves a price by its ID.
10705
+ *
10706
+ * ---
10707
+ *
10708
+ * **Related endpoints**
10709
+ *
10710
+ * - `GET /prices` — List prices
10711
+ * - `POST /prices` — Create a price
10712
+ * - `PATCH /prices/{id}` — Update a price
10713
+ * - `DELETE /prices/{id}` — Archive a price
10714
+ *
10715
+ * **Common errors**
10716
+ *
10717
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10718
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9829
10719
  */
9830
10720
  declare const pricesGet: <ThrowOnError extends boolean = false>(options: Options<PricesGetData, ThrowOnError>) => RequestResult<PricesGetResponses, PricesGetErrors, ThrowOnError, "fields">;
9831
10721
  /**
9832
10722
  * Update a price
9833
10723
  *
9834
10724
  * Updates a price. Only certain fields can be updated (active, nickname, lookup_key, metadata). Core pricing fields are immutable.
10725
+ *
10726
+ * ---
10727
+ *
10728
+ * **Related endpoints**
10729
+ *
10730
+ * - `GET /prices` — List prices
10731
+ * - `POST /prices` — Create a price
10732
+ * - `GET /prices/{id}` — Retrieve a price
10733
+ * - `DELETE /prices/{id}` — Archive a price
10734
+ *
10735
+ * **Common errors**
10736
+ *
10737
+ * - `400 invalid_request` — malformed payload or failed validation.
10738
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10739
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
10740
+ *
10741
+ * **Idempotency**
10742
+ *
10743
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9835
10744
  */
9836
10745
  declare const pricesUpdate: <ThrowOnError extends boolean = false>(options: Options<PricesUpdateData, ThrowOnError>) => RequestResult<PricesUpdateResponses, PricesUpdateErrors, ThrowOnError, "fields">;
10746
+ /**
10747
+ * ---
10748
+ *
10749
+ * **Related endpoints**
10750
+ *
10751
+ * - `POST /webhook-endpoints` — webhook endpoints create
10752
+ * - `GET /webhook-endpoints/{id}` — webhook endpoints get
10753
+ * - `PATCH /webhook-endpoints/{id}` — webhook endpoints update
10754
+ * - `DELETE /webhook-endpoints/{id}` — webhook endpoints delete
10755
+ * - `POST /webhook-endpoints/{id}/rotate-secret` — webhook endpoints rotate secret
10756
+ *
10757
+ * **Pagination**
10758
+ *
10759
+ * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.
10760
+ */
9837
10761
  declare const webhookEndpointsList: <ThrowOnError extends boolean = false>(options?: Options<WebhookEndpointsListData, ThrowOnError>) => RequestResult<WebhookEndpointsListResponses, unknown, ThrowOnError, "fields">;
10762
+ /**
10763
+ * ---
10764
+ *
10765
+ * **Related endpoints**
10766
+ *
10767
+ * - `GET /webhook-endpoints` — webhook endpoints list
10768
+ * - `GET /webhook-endpoints/{id}` — webhook endpoints get
10769
+ * - `PATCH /webhook-endpoints/{id}` — webhook endpoints update
10770
+ * - `DELETE /webhook-endpoints/{id}` — webhook endpoints delete
10771
+ * - `POST /webhook-endpoints/{id}/rotate-secret` — webhook endpoints rotate secret
10772
+ *
10773
+ * **Idempotency**
10774
+ *
10775
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
10776
+ */
9838
10777
  declare const webhookEndpointsCreate: <ThrowOnError extends boolean = false>(options?: Options<WebhookEndpointsCreateData, ThrowOnError>) => RequestResult<WebhookEndpointsCreateResponses, unknown, ThrowOnError, "fields">;
10778
+ /**
10779
+ * ---
10780
+ *
10781
+ * **Related endpoints**
10782
+ *
10783
+ * - `GET /webhook-endpoints` — webhook endpoints list
10784
+ * - `POST /webhook-endpoints` — webhook endpoints create
10785
+ * - `GET /webhook-endpoints/{id}` — webhook endpoints get
10786
+ * - `PATCH /webhook-endpoints/{id}` — webhook endpoints update
10787
+ * - `POST /webhook-endpoints/{id}/rotate-secret` — webhook endpoints rotate secret
10788
+ *
10789
+ * **Idempotency**
10790
+ *
10791
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
10792
+ */
9839
10793
  declare const webhookEndpointsDelete: <ThrowOnError extends boolean = false>(options: Options<WebhookEndpointsDeleteData, ThrowOnError>) => RequestResult<WebhookEndpointsDeleteResponses, unknown, ThrowOnError, "fields">;
10794
+ /**
10795
+ * ---
10796
+ *
10797
+ * **Related endpoints**
10798
+ *
10799
+ * - `GET /webhook-endpoints` — webhook endpoints list
10800
+ * - `POST /webhook-endpoints` — webhook endpoints create
10801
+ * - `PATCH /webhook-endpoints/{id}` — webhook endpoints update
10802
+ * - `DELETE /webhook-endpoints/{id}` — webhook endpoints delete
10803
+ * - `POST /webhook-endpoints/{id}/rotate-secret` — webhook endpoints rotate secret
10804
+ */
9840
10805
  declare const webhookEndpointsGet: <ThrowOnError extends boolean = false>(options: Options<WebhookEndpointsGetData, ThrowOnError>) => RequestResult<WebhookEndpointsGetResponses, unknown, ThrowOnError, "fields">;
10806
+ /**
10807
+ * ---
10808
+ *
10809
+ * **Related endpoints**
10810
+ *
10811
+ * - `GET /webhook-endpoints` — webhook endpoints list
10812
+ * - `POST /webhook-endpoints` — webhook endpoints create
10813
+ * - `GET /webhook-endpoints/{id}` — webhook endpoints get
10814
+ * - `DELETE /webhook-endpoints/{id}` — webhook endpoints delete
10815
+ * - `POST /webhook-endpoints/{id}/rotate-secret` — webhook endpoints rotate secret
10816
+ *
10817
+ * **Idempotency**
10818
+ *
10819
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
10820
+ */
9841
10821
  declare const webhookEndpointsUpdate: <ThrowOnError extends boolean = false>(options: Options<WebhookEndpointsUpdateData, ThrowOnError>) => RequestResult<WebhookEndpointsUpdateResponses, unknown, ThrowOnError, "fields">;
10822
+ /**
10823
+ * ---
10824
+ *
10825
+ * **Related endpoints**
10826
+ *
10827
+ * - `GET /webhook-endpoints` — webhook endpoints list
10828
+ * - `POST /webhook-endpoints` — webhook endpoints create
10829
+ * - `GET /webhook-endpoints/{id}` — webhook endpoints get
10830
+ * - `PATCH /webhook-endpoints/{id}` — webhook endpoints update
10831
+ * - `DELETE /webhook-endpoints/{id}` — webhook endpoints delete
10832
+ *
10833
+ * **Idempotency**
10834
+ *
10835
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
10836
+ */
9842
10837
  declare const webhookEndpointsRotateSecret: <ThrowOnError extends boolean = false>(options: Options<WebhookEndpointsRotateSecretData, ThrowOnError>) => RequestResult<WebhookEndpointsRotateSecretResponses, unknown, ThrowOnError, "fields">;
9843
10838
  /**
9844
10839
  * List webhook deliveries
9845
10840
  *
9846
10841
  * List individual webhook delivery attempts across all endpoints for the authenticated merchant. Use filters to scope to a specific endpoint, a specific event, or a specific delivery status. Results are returned in reverse chronological order.
10842
+ *
10843
+ * ---
10844
+ *
10845
+ * **Related endpoints**
10846
+ *
10847
+ * - `GET /webhook-deliveries/{id}` — Retrieve a webhook delivery
10848
+ * - `POST /webhook-deliveries/{id}/retry` — Retry a webhook delivery
10849
+ *
10850
+ * **Common errors**
10851
+ *
10852
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10853
+ *
10854
+ * **Pagination**
10855
+ *
10856
+ * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.
9847
10857
  */
9848
10858
  declare const webhookDeliveriesList: <ThrowOnError extends boolean = false>(options?: Options<WebhookDeliveriesListData, ThrowOnError>) => RequestResult<WebhookDeliveriesListResponses, WebhookDeliveriesListErrors, ThrowOnError, "fields">;
9849
10859
  /**
9850
10860
  * Retrieve a webhook delivery
9851
10861
  *
9852
10862
  * Retrieve the details of a single webhook delivery including its last attempt outcome.
10863
+ *
10864
+ * ---
10865
+ *
10866
+ * **Related endpoints**
10867
+ *
10868
+ * - `GET /webhook-deliveries` — List webhook deliveries
10869
+ * - `POST /webhook-deliveries/{id}/retry` — Retry a webhook delivery
10870
+ *
10871
+ * **Common errors**
10872
+ *
10873
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9853
10874
  */
9854
10875
  declare const webhookDeliveriesGet: <ThrowOnError extends boolean = false>(options: Options<WebhookDeliveriesGetData, ThrowOnError>) => RequestResult<WebhookDeliveriesGetResponses, WebhookDeliveriesGetErrors, ThrowOnError, "fields">;
9855
10876
  /**
9856
10877
  * Retry a webhook delivery
9857
10878
  *
9858
10879
  * Queue an immediate retry of this delivery. The delivery is marked `pending` and `next_retry_at` is set to now; the dispatcher picks it up on its next tick. Calling retry on an already-pending delivery just advances its retry time. Dead-lettered deliveries can be retried once; succeeded deliveries cannot.
10880
+ *
10881
+ * ---
10882
+ *
10883
+ * **Related endpoints**
10884
+ *
10885
+ * - `GET /webhook-deliveries` — List webhook deliveries
10886
+ * - `GET /webhook-deliveries/{id}` — Retrieve a webhook delivery
10887
+ *
10888
+ * **Common errors**
10889
+ *
10890
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
10891
+ * - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict.
10892
+ *
10893
+ * **Idempotency**
10894
+ *
10895
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9859
10896
  */
9860
10897
  declare const webhookDeliveriesRetry: <ThrowOnError extends boolean = false>(options: Options<WebhookDeliveriesRetryData, ThrowOnError>) => RequestResult<WebhookDeliveriesRetryResponses, WebhookDeliveriesRetryErrors, ThrowOnError, "fields">;
9861
10898
  /**
9862
10899
  * Create a customer-portal session
9863
10900
  *
9864
10901
  * Mint a short-lived bearer token that authenticates a specific customer against /v2/customer-portal*. Returns an opaque `rkcps_...` token that expires in 60 minutes by default. Call this server-side from the merchant's backend, then hand the token to the customer's browser or embedded client. Treat the token like a password — never log it and never expose it to untrusted code.
10902
+ *
10903
+ * ---
10904
+ *
10905
+ * **Related endpoints**
10906
+ *
10907
+ * - `GET /customer-portal/customer` — Retrieve the authenticated customer
10908
+ * - `GET /customer-portal/subscriptions` — List the authenticated customer's subscriptions
10909
+ * - `GET /customer-portal/subscriptions/{id}` — Retrieve a subscription
10910
+ * - `POST /customer-portal/subscriptions/{id}/cancel` — Cancel a subscription
10911
+ * - `GET /customer-portal/invoices` — List the authenticated customer's invoices
10912
+ * - `GET /customer-portal/invoices/{id}` — Retrieve an invoice
10913
+ *
10914
+ * **Common errors**
10915
+ *
10916
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10917
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
10918
+ *
10919
+ * **Idempotency**
10920
+ *
10921
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9865
10922
  */
9866
10923
  declare const customerPortalSessionsCreate: <ThrowOnError extends boolean = false>(options: Options<CustomerPortalSessionsCreateData, ThrowOnError>) => RequestResult<CustomerPortalSessionsCreateResponses, CustomerPortalSessionsCreateErrors, ThrowOnError, "fields">;
9867
10924
  /**
9868
10925
  * Retrieve the authenticated customer
9869
10926
  *
9870
10927
  * Returns the customer represented by the bearer token. Useful as a warm-up / identity check when an embedded portal page loads.
10928
+ *
10929
+ * ---
10930
+ *
10931
+ * **Related endpoints**
10932
+ *
10933
+ * - `POST /customer-portal/sessions` — Create a customer-portal session
10934
+ * - `GET /customer-portal/subscriptions` — List the authenticated customer's subscriptions
10935
+ * - `GET /customer-portal/subscriptions/{id}` — Retrieve a subscription
10936
+ * - `POST /customer-portal/subscriptions/{id}/cancel` — Cancel a subscription
10937
+ * - `GET /customer-portal/invoices` — List the authenticated customer's invoices
10938
+ * - `GET /customer-portal/invoices/{id}` — Retrieve an invoice
10939
+ *
10940
+ * **Common errors**
10941
+ *
10942
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10943
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9871
10944
  */
9872
10945
  declare const customerPortalCustomerGet: <ThrowOnError extends boolean = false>(options?: Options<CustomerPortalCustomerGetData, ThrowOnError>) => RequestResult<CustomerPortalCustomerGetResponses, CustomerPortalCustomerGetErrors, ThrowOnError, "fields">;
9873
10946
  /**
9874
10947
  * List the authenticated customer's subscriptions
9875
10948
  *
9876
10949
  * Returns subscriptions where the customer is the subscriber. Results are reverse-chronological by creation time and paginate via `starting_after` / `ending_before` cursors.
10950
+ *
10951
+ * ---
10952
+ *
10953
+ * **Related endpoints**
10954
+ *
10955
+ * - `POST /customer-portal/sessions` — Create a customer-portal session
10956
+ * - `GET /customer-portal/customer` — Retrieve the authenticated customer
10957
+ * - `GET /customer-portal/subscriptions/{id}` — Retrieve a subscription
10958
+ * - `POST /customer-portal/subscriptions/{id}/cancel` — Cancel a subscription
10959
+ * - `GET /customer-portal/invoices` — List the authenticated customer's invoices
10960
+ * - `GET /customer-portal/invoices/{id}` — Retrieve an invoice
10961
+ *
10962
+ * **Common errors**
10963
+ *
10964
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10965
+ *
10966
+ * **Pagination**
10967
+ *
10968
+ * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.
9877
10969
  */
9878
10970
  declare const customerPortalSubscriptionsList: <ThrowOnError extends boolean = false>(options?: Options<CustomerPortalSubscriptionsListData, ThrowOnError>) => RequestResult<CustomerPortalSubscriptionsListResponses, CustomerPortalSubscriptionsListErrors, ThrowOnError, "fields">;
9879
10971
  /**
9880
10972
  * Retrieve a subscription
9881
10973
  *
9882
10974
  * Returns a subscription owned by the authenticated customer. 404s on cross-customer access even if the subscription exists.
10975
+ *
10976
+ * ---
10977
+ *
10978
+ * **Related endpoints**
10979
+ *
10980
+ * - `POST /customer-portal/sessions` — Create a customer-portal session
10981
+ * - `GET /customer-portal/customer` — Retrieve the authenticated customer
10982
+ * - `GET /customer-portal/subscriptions` — List the authenticated customer's subscriptions
10983
+ * - `POST /customer-portal/subscriptions/{id}/cancel` — Cancel a subscription
10984
+ * - `GET /customer-portal/invoices` — List the authenticated customer's invoices
10985
+ * - `GET /customer-portal/invoices/{id}` — Retrieve an invoice
10986
+ *
10987
+ * **Common errors**
10988
+ *
10989
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
10990
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9883
10991
  */
9884
10992
  declare const customerPortalSubscriptionsGet: <ThrowOnError extends boolean = false>(options: Options<CustomerPortalSubscriptionsGetData, ThrowOnError>) => RequestResult<CustomerPortalSubscriptionsGetResponses, CustomerPortalSubscriptionsGetErrors, ThrowOnError, "fields">;
9885
10993
  /**
9886
10994
  * Cancel a subscription
9887
10995
  *
9888
10996
  * Cancel a subscription owned by the authenticated customer. By default the subscription is scheduled to cancel at the end of the current billing period — set `cancel_at_period_end=false` to cancel immediately. Idempotent — cancelling an already-canceled subscription is a no-op that returns the current state.
10997
+ *
10998
+ * ---
10999
+ *
11000
+ * **Related endpoints**
11001
+ *
11002
+ * - `POST /customer-portal/sessions` — Create a customer-portal session
11003
+ * - `GET /customer-portal/customer` — Retrieve the authenticated customer
11004
+ * - `GET /customer-portal/subscriptions` — List the authenticated customer's subscriptions
11005
+ * - `GET /customer-portal/subscriptions/{id}` — Retrieve a subscription
11006
+ * - `GET /customer-portal/invoices` — List the authenticated customer's invoices
11007
+ * - `GET /customer-portal/invoices/{id}` — Retrieve an invoice
11008
+ *
11009
+ * **Common errors**
11010
+ *
11011
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
11012
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
11013
+ *
11014
+ * **Idempotency**
11015
+ *
11016
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9889
11017
  */
9890
11018
  declare const customerPortalSubscriptionsCancel: <ThrowOnError extends boolean = false>(options: Options<CustomerPortalSubscriptionsCancelData, ThrowOnError>) => RequestResult<CustomerPortalSubscriptionsCancelResponses, CustomerPortalSubscriptionsCancelErrors, ThrowOnError, "fields">;
9891
11019
  /**
9892
11020
  * List the authenticated customer's invoices
9893
11021
  *
9894
11022
  * Returns invoices owned by the authenticated customer, reverse-chronological by `invoice_date`. Use the same `starting_after`/`ending_before` cursor pattern as subscriptions.
11023
+ *
11024
+ * ---
11025
+ *
11026
+ * **Related endpoints**
11027
+ *
11028
+ * - `POST /customer-portal/sessions` — Create a customer-portal session
11029
+ * - `GET /customer-portal/customer` — Retrieve the authenticated customer
11030
+ * - `GET /customer-portal/subscriptions` — List the authenticated customer's subscriptions
11031
+ * - `GET /customer-portal/subscriptions/{id}` — Retrieve a subscription
11032
+ * - `POST /customer-portal/subscriptions/{id}/cancel` — Cancel a subscription
11033
+ * - `GET /customer-portal/invoices/{id}` — Retrieve an invoice
11034
+ *
11035
+ * **Common errors**
11036
+ *
11037
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
11038
+ *
11039
+ * **Pagination**
11040
+ *
11041
+ * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.
9895
11042
  */
9896
11043
  declare const customerPortalInvoicesList: <ThrowOnError extends boolean = false>(options?: Options<CustomerPortalInvoicesListData, ThrowOnError>) => RequestResult<CustomerPortalInvoicesListResponses, CustomerPortalInvoicesListErrors, ThrowOnError, "fields">;
9897
11044
  /**
9898
11045
  * Retrieve an invoice
9899
11046
  *
9900
11047
  * Returns an invoice owned by the authenticated customer.
11048
+ *
11049
+ * ---
11050
+ *
11051
+ * **Related endpoints**
11052
+ *
11053
+ * - `POST /customer-portal/sessions` — Create a customer-portal session
11054
+ * - `GET /customer-portal/customer` — Retrieve the authenticated customer
11055
+ * - `GET /customer-portal/subscriptions` — List the authenticated customer's subscriptions
11056
+ * - `GET /customer-portal/subscriptions/{id}` — Retrieve a subscription
11057
+ * - `POST /customer-portal/subscriptions/{id}/cancel` — Cancel a subscription
11058
+ * - `GET /customer-portal/invoices` — List the authenticated customer's invoices
11059
+ *
11060
+ * **Common errors**
11061
+ *
11062
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
11063
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9901
11064
  */
9902
11065
  declare const customerPortalInvoicesGet: <ThrowOnError extends boolean = false>(options: Options<CustomerPortalInvoicesGetData, ThrowOnError>) => RequestResult<CustomerPortalInvoicesGetResponses, CustomerPortalInvoicesGetErrors, ThrowOnError, "fields">;
9903
11066
  /**
@@ -9906,90 +11069,338 @@ declare const customerPortalInvoicesGet: <ThrowOnError extends boolean = false>(
9906
11069
  * Returns per-meter aggregates for a single customer. Requires a `customer_id` query parameter. For each meter the merchant has defined, the response includes the aggregate quantity (applying the meter's native aggregation function), the event count, and the most recent event timestamp.
9907
11070
  *
9908
11071
  * Use this to render a customer's current consumption snapshot in your own UI — for example, a usage dashboard showing "4,820 / 10,000 requests this period".
11072
+ *
11073
+ * ---
11074
+ *
11075
+ * **Related endpoints**
11076
+ *
11077
+ * - `GET /customer-meters/{customer_id}/{meter_id}` — Retrieve a customer-meter aggregate
11078
+ *
11079
+ * **Common errors**
11080
+ *
11081
+ * - `400 invalid_request` — malformed payload or failed validation.
11082
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
11083
+ *
11084
+ * **Pagination**
11085
+ *
11086
+ * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.
9909
11087
  */
9910
11088
  declare const customerMetersList: <ThrowOnError extends boolean = false>(options: Options<CustomerMetersListData, ThrowOnError>) => RequestResult<CustomerMetersListResponses, CustomerMetersListErrors, ThrowOnError, "fields">;
9911
11089
  /**
9912
11090
  * Retrieve a customer-meter aggregate
9913
11091
  *
9914
11092
  * Returns a single customer-meter aggregate for the specified customer + meter pair. Returns 404 only if the meter itself does not exist on the merchant — if the meter exists but the customer has zero events, the response returns an aggregate with `total_quantity: 0`, `event_count: 0`, `last_event_at: null`.
11093
+ *
11094
+ * ---
11095
+ *
11096
+ * **Related endpoints**
11097
+ *
11098
+ * - `GET /customer-meters` — List a customer's meter usage
11099
+ *
11100
+ * **Common errors**
11101
+ *
11102
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
11103
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9915
11104
  */
9916
11105
  declare const customerMetersGet: <ThrowOnError extends boolean = false>(options: Options<CustomerMetersGetData, ThrowOnError>) => RequestResult<CustomerMetersGetResponses, CustomerMetersGetErrors, ThrowOnError, "fields">;
9917
11106
  /**
9918
11107
  * List payment intents
9919
11108
  *
9920
11109
  * Returns a list of payment intents with optional filtering.
11110
+ *
11111
+ * ---
11112
+ *
11113
+ * **Related endpoints**
11114
+ *
11115
+ * - `POST /payment-intents` — Create a payment intent
11116
+ * - `GET /payment-intents/{id}` — Retrieve a payment intent
11117
+ * - `POST /payment-intents/{id}` — Update a payment intent
11118
+ * - `POST /payment-intents/{id}/confirm` — Confirm a payment intent
11119
+ * - `POST /payment-intents/{id}/capture` — Capture a payment intent
11120
+ * - `POST /payment-intents/{id}/cancel` — Cancel a payment intent
11121
+ *
11122
+ * **Common errors**
11123
+ *
11124
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
11125
+ *
11126
+ * **Pagination**
11127
+ *
11128
+ * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.
9921
11129
  */
9922
11130
  declare const paymentIntentsList: <ThrowOnError extends boolean = false>(options?: Options<PaymentIntentsListData, ThrowOnError>) => RequestResult<PaymentIntentsListResponses, PaymentIntentsListErrors, ThrowOnError, "fields">;
9923
11131
  /**
9924
11132
  * Create a payment intent
9925
11133
  *
9926
11134
  * Creates a payment intent to orchestrate payment collection with support for 3DS/SCA authentication.
11135
+ *
11136
+ * ---
11137
+ *
11138
+ * **Related endpoints**
11139
+ *
11140
+ * - `GET /payment-intents` — List payment intents
11141
+ * - `GET /payment-intents/{id}` — Retrieve a payment intent
11142
+ * - `POST /payment-intents/{id}` — Update a payment intent
11143
+ * - `POST /payment-intents/{id}/confirm` — Confirm a payment intent
11144
+ * - `POST /payment-intents/{id}/capture` — Capture a payment intent
11145
+ * - `POST /payment-intents/{id}/cancel` — Cancel a payment intent
11146
+ *
11147
+ * **Common errors**
11148
+ *
11149
+ * - `400 invalid_request` — malformed payload or failed validation.
11150
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
11151
+ *
11152
+ * **Idempotency**
11153
+ *
11154
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9927
11155
  */
9928
11156
  declare const paymentIntentsCreate: <ThrowOnError extends boolean = false>(options?: Options<PaymentIntentsCreateData, ThrowOnError>) => RequestResult<PaymentIntentsCreateResponses, PaymentIntentsCreateErrors, ThrowOnError, "fields">;
9929
11157
  /**
9930
11158
  * Retrieve a payment intent
9931
11159
  *
9932
11160
  * Retrieves a payment intent by its ID (pi_xxx).
11161
+ *
11162
+ * ---
11163
+ *
11164
+ * **Related endpoints**
11165
+ *
11166
+ * - `POST /payment-intents` — Create a payment intent
11167
+ * - `GET /payment-intents` — List payment intents
11168
+ * - `POST /payment-intents/{id}` — Update a payment intent
11169
+ * - `POST /payment-intents/{id}/confirm` — Confirm a payment intent
11170
+ * - `POST /payment-intents/{id}/capture` — Capture a payment intent
11171
+ * - `POST /payment-intents/{id}/cancel` — Cancel a payment intent
11172
+ *
11173
+ * **Common errors**
11174
+ *
11175
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9933
11176
  */
9934
11177
  declare const paymentIntentsGet: <ThrowOnError extends boolean = false>(options: Options<PaymentIntentsGetData, ThrowOnError>) => RequestResult<PaymentIntentsGetResponses, PaymentIntentsGetErrors, ThrowOnError, "fields">;
9935
11178
  /**
9936
11179
  * Confirm a payment intent
9937
11180
  *
9938
11181
  * Confirms the payment intent. May return requires_action if 3DS authentication is needed.
11182
+ *
11183
+ * ---
11184
+ *
11185
+ * **Related endpoints**
11186
+ *
11187
+ * - `POST /payment-intents` — Create a payment intent
11188
+ * - `GET /payment-intents` — List payment intents
11189
+ * - `GET /payment-intents/{id}` — Retrieve a payment intent
11190
+ * - `POST /payment-intents/{id}` — Update a payment intent
11191
+ * - `POST /payment-intents/{id}/capture` — Capture a payment intent
11192
+ * - `POST /payment-intents/{id}/cancel` — Cancel a payment intent
11193
+ *
11194
+ * **Common errors**
11195
+ *
11196
+ * - `400 invalid_request` — malformed payload or failed validation.
11197
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
11198
+ *
11199
+ * **Idempotency**
11200
+ *
11201
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9939
11202
  */
9940
11203
  declare const paymentIntentsConfirm: <ThrowOnError extends boolean = false>(options: Options<PaymentIntentsConfirmData, ThrowOnError>) => RequestResult<PaymentIntentsConfirmResponses, PaymentIntentsConfirmErrors, ThrowOnError, "fields">;
9941
11204
  /**
9942
11205
  * Capture a payment intent
9943
11206
  *
9944
11207
  * Captures a payment intent that was created with capture_method=manual.
11208
+ *
11209
+ * ---
11210
+ *
11211
+ * **Related endpoints**
11212
+ *
11213
+ * - `POST /payment-intents` — Create a payment intent
11214
+ * - `GET /payment-intents` — List payment intents
11215
+ * - `GET /payment-intents/{id}` — Retrieve a payment intent
11216
+ * - `POST /payment-intents/{id}` — Update a payment intent
11217
+ * - `POST /payment-intents/{id}/confirm` — Confirm a payment intent
11218
+ * - `POST /payment-intents/{id}/cancel` — Cancel a payment intent
11219
+ *
11220
+ * **Common errors**
11221
+ *
11222
+ * - `400 invalid_request` — malformed payload or failed validation.
11223
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
11224
+ *
11225
+ * **Idempotency**
11226
+ *
11227
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9945
11228
  */
9946
11229
  declare const paymentIntentsCapture: <ThrowOnError extends boolean = false>(options: Options<PaymentIntentsCaptureData, ThrowOnError>) => RequestResult<PaymentIntentsCaptureResponses, PaymentIntentsCaptureErrors, ThrowOnError, "fields">;
9947
11230
  /**
9948
11231
  * Cancel a payment intent
9949
11232
  *
9950
11233
  * Cancels a payment intent. Cannot cancel if already succeeded or canceled.
11234
+ *
11235
+ * ---
11236
+ *
11237
+ * **Related endpoints**
11238
+ *
11239
+ * - `POST /payment-intents` — Create a payment intent
11240
+ * - `GET /payment-intents` — List payment intents
11241
+ * - `GET /payment-intents/{id}` — Retrieve a payment intent
11242
+ * - `POST /payment-intents/{id}` — Update a payment intent
11243
+ * - `POST /payment-intents/{id}/confirm` — Confirm a payment intent
11244
+ * - `POST /payment-intents/{id}/capture` — Capture a payment intent
11245
+ *
11246
+ * **Common errors**
11247
+ *
11248
+ * - `400 invalid_request` — malformed payload or failed validation.
11249
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
11250
+ *
11251
+ * **Idempotency**
11252
+ *
11253
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9951
11254
  */
9952
11255
  declare const paymentIntentsCancel: <ThrowOnError extends boolean = false>(options: Options<PaymentIntentsCancelData, ThrowOnError>) => RequestResult<PaymentIntentsCancelResponses, PaymentIntentsCancelErrors, ThrowOnError, "fields">;
9953
11256
  /**
9954
11257
  * List events
9955
11258
  *
9956
11259
  * Returns a list of events with optional filters. Events are returned in reverse chronological order.
11260
+ *
11261
+ * ---
11262
+ *
11263
+ * **Related endpoints**
11264
+ *
11265
+ * - `GET /events/{id}` — Retrieve an event
11266
+ * - `POST /events/{id}/resend` — Resend webhook for an event
11267
+ * - `POST /events/test` — Create a test event
11268
+ *
11269
+ * **Common errors**
11270
+ *
11271
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
11272
+ *
11273
+ * **Pagination**
11274
+ *
11275
+ * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.
9957
11276
  */
9958
11277
  declare const eventsList: <ThrowOnError extends boolean = false>(options?: Options<EventsListData, ThrowOnError>) => RequestResult<EventsListResponses, EventsListErrors, ThrowOnError, "fields">;
9959
11278
  /**
9960
11279
  * Retrieve an event
9961
11280
  *
9962
11281
  * Retrieves the details of an event by its ID.
11282
+ *
11283
+ * ---
11284
+ *
11285
+ * **Related endpoints**
11286
+ *
11287
+ * - `GET /events` — List events
11288
+ * - `POST /events/{id}/resend` — Resend webhook for an event
11289
+ * - `POST /events/test` — Create a test event
11290
+ *
11291
+ * **Common errors**
11292
+ *
11293
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
11294
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9963
11295
  */
9964
11296
  declare const eventsGet: <ThrowOnError extends boolean = false>(options: Options<EventsGetData, ThrowOnError>) => RequestResult<EventsGetResponses, EventsGetErrors, ThrowOnError, "fields">;
9965
11297
  /**
9966
11298
  * Resend webhook for an event
9967
11299
  *
9968
11300
  * Queues the event to be resent to all configured webhook endpoints.
11301
+ *
11302
+ * ---
11303
+ *
11304
+ * **Related endpoints**
11305
+ *
11306
+ * - `GET /events` — List events
11307
+ * - `GET /events/{id}` — Retrieve an event
11308
+ * - `POST /events/test` — Create a test event
11309
+ *
11310
+ * **Common errors**
11311
+ *
11312
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
11313
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
11314
+ *
11315
+ * **Idempotency**
11316
+ *
11317
+ * Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
9969
11318
  */
9970
11319
  declare const eventsResend: <ThrowOnError extends boolean = false>(options: Options<EventsResendData, ThrowOnError>) => RequestResult<EventsResendResponses, EventsResendErrors, ThrowOnError, "fields">;
9971
11320
  /**
9972
11321
  * List entitlements
9973
11322
  *
9974
11323
  * Retrieve all entitlements for a customer. Pass `customer_id` as a query parameter. Includes computed access status based on subscription state.
11324
+ *
11325
+ * ---
11326
+ *
11327
+ * **Related endpoints**
11328
+ *
11329
+ * - `GET /customers/{customerId}/entitlements` — List customer entitlements
11330
+ * - `POST /customers/{customerId}/entitlements` — Grant entitlement to customer
11331
+ * - `DELETE /customers/{customerId}/entitlements` — Revoke entitlement by benefit key
11332
+ * - `GET /customers/{customerId}/entitlements/check` — Check customer entitlement
11333
+ * - `DELETE /customers/{customerId}/entitlements/{entitlementId}` — Revoke entitlement by ID
11334
+ * - `GET /entitlements/check` — Check entitlement access
11335
+ *
11336
+ * **Common errors**
11337
+ *
11338
+ * - `400 invalid_request` — malformed payload or failed validation.
11339
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
11340
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
11341
+ *
11342
+ * **Pagination**
11343
+ *
11344
+ * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.
9975
11345
  */
9976
11346
  declare const entitlementsList: <ThrowOnError extends boolean = false>(options: Options<EntitlementsListData, ThrowOnError>) => RequestResult<EntitlementsListResponses, EntitlementsListErrors, ThrowOnError, "fields">;
9977
11347
  /**
9978
11348
  * Check entitlement access
9979
11349
  *
9980
11350
  * Check if a customer has access to a specific benefit by key. This is the primary endpoint for feature gating and licensing checks.
11351
+ *
11352
+ * ---
11353
+ *
11354
+ * **Related endpoints**
11355
+ *
11356
+ * - `GET /customers/{customerId}/entitlements` — List customer entitlements
11357
+ * - `POST /customers/{customerId}/entitlements` — Grant entitlement to customer
11358
+ * - `DELETE /customers/{customerId}/entitlements` — Revoke entitlement by benefit key
11359
+ * - `GET /customers/{customerId}/entitlements/check` — Check customer entitlement
11360
+ * - `DELETE /customers/{customerId}/entitlements/{entitlementId}` — Revoke entitlement by ID
11361
+ * - `GET /entitlements` — List entitlements
11362
+ *
11363
+ * **Common errors**
11364
+ *
11365
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
11366
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9981
11367
  */
9982
11368
  declare const entitlementsCheck: <ThrowOnError extends boolean = false>(options: Options<EntitlementsCheckData, ThrowOnError>) => RequestResult<EntitlementsCheckResponses, EntitlementsCheckErrors, ThrowOnError, "fields">;
9983
11369
  /**
9984
11370
  * List transactions
9985
11371
  *
9986
11372
  * List all transactions for the authenticated merchant. Transactions represent the unified financial truth — every sale, refund, void, capture, dispute, and adjustment.
11373
+ *
11374
+ * ---
11375
+ *
11376
+ * **Related endpoints**
11377
+ *
11378
+ * - `GET /transactions/{id}` — Get transaction by ID
11379
+ *
11380
+ * **Common errors**
11381
+ *
11382
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
11383
+ *
11384
+ * **Pagination**
11385
+ *
11386
+ * Offset-based with `limit` (default 25, max 100) and `offset`. The response `pagination` block includes `total` and `hasMore`. See [the pagination guide](/docs/fundamentals/pagination) for SDK auto-paging helpers.
9987
11387
  */
9988
11388
  declare const transactionsList: <ThrowOnError extends boolean = false>(options?: Options<TransactionsListData, ThrowOnError>) => RequestResult<TransactionsListResponses, TransactionsListErrors, ThrowOnError, "fields">;
9989
11389
  /**
9990
11390
  * Get transaction by ID
9991
11391
  *
9992
11392
  * Retrieve a single transaction by its ID.
11393
+ *
11394
+ * ---
11395
+ *
11396
+ * **Related endpoints**
11397
+ *
11398
+ * - `GET /transactions` — List transactions
11399
+ *
11400
+ * **Common errors**
11401
+ *
11402
+ * - `401 unauthenticated` — missing, malformed, or revoked API key.
11403
+ * - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.
9993
11404
  */
9994
11405
  declare const transactionsGet: <ThrowOnError extends boolean = false>(options: Options<TransactionsGetData, ThrowOnError>) => RequestResult<TransactionsGetResponses, TransactionsGetErrors, ThrowOnError, "fields">;
9995
11406