@tapsilat/tapsilat-js 2026.1.14 → 2026.6.17

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.ts CHANGED
@@ -94,11 +94,11 @@ interface Customer {
94
94
  * @interface Address
95
95
  */
96
96
  interface Address {
97
- address: string;
98
- city: string;
99
- contact_name: string;
100
- country: string;
101
- zip_code: string;
97
+ address?: string;
98
+ city?: string;
99
+ contact_name?: string;
100
+ country?: string;
101
+ zip_code?: string;
102
102
  district?: string;
103
103
  contact_phone?: string;
104
104
  }
@@ -109,7 +109,12 @@ interface Address {
109
109
  * @interface BillingAddress
110
110
  */
111
111
  interface BillingAddress extends Address {
112
- billing_type: "PERSONAL" | "CORPORATE";
112
+ billing_type: "PERSONAL" | "BUSINESS" | "CORPORATE";
113
+ citizenship?: string;
114
+ neighbourhood?: string;
115
+ street1?: string;
116
+ street2?: string;
117
+ street3?: string;
113
118
  vat_number?: string;
114
119
  tax_office?: string;
115
120
  title?: string;
@@ -121,16 +126,24 @@ interface BillingAddress extends Address {
121
126
  * @interface BasketItem
122
127
  */
123
128
  interface BasketItem {
124
- id: string;
125
- name: string;
126
- category1: string;
129
+ id?: string;
130
+ name?: string;
131
+ category1?: string;
127
132
  category2?: string;
128
- item_type: string;
129
- price: number;
130
- quantity: number;
133
+ commission_amount?: number;
134
+ coupon?: string;
135
+ mcc?: string;
136
+ item_type?: string;
137
+ paid_amount?: number;
138
+ payer?: BasketItemPayerDTO;
139
+ price?: number;
140
+ quantity?: number;
141
+ quantity_float?: number;
131
142
  coupon_discount?: number;
132
143
  data?: string;
133
144
  quantity_unit?: string;
145
+ sub_merchant_key?: string;
146
+ sub_merchant_price?: string;
134
147
  }
135
148
  /**
136
149
  * @category Payment Processing
@@ -138,7 +151,7 @@ interface BasketItem {
138
151
  * @description Different payment methods that can be enabled for an order
139
152
  * @typedef {string} PaymentOption
140
153
  */
141
- type PaymentOption = "PAY_WITH_WALLET" | "PAY_WITH_CARD" | "PAY_WITH_LOAN" | "PAY_WITH_CASH" | "PAY_WITH_BANK";
154
+ type PaymentOption = "credit_card" | "bank_transfer" | "cash" | "debit_card" | "PAY_WITH_WALLET" | "PAY_WITH_CARD" | "PAY_WITH_LOAN" | "PAY_WITH_CASH" | "PAY_WITH_BANK";
142
155
  /**
143
156
  * @category Refunds
144
157
  * @summary Information needed to process a refund
@@ -248,12 +261,14 @@ interface Buyer {
248
261
  id?: string;
249
262
  name: string;
250
263
  surname: string;
264
+ birth_date?: string;
251
265
  email: string;
252
266
  gsm_number?: string;
253
267
  identity_number?: string;
254
268
  registration_address?: string;
255
269
  city?: string;
256
270
  country?: string;
271
+ title?: string;
257
272
  zip_code?: string;
258
273
  ip?: string;
259
274
  registration_date?: string;
@@ -275,18 +290,30 @@ interface OrderCreateRequest {
275
290
  locale: Locale;
276
291
  three_d_force?: boolean;
277
292
  currency: Currency;
278
- shipping_address?: Address;
279
- basket_items: BasketItem[];
280
- billing_address: BillingAddress;
293
+ checkout_design?: CheckoutDesignDTO;
294
+ shipping_address?: ShippingAddressDTO;
295
+ basket_items?: BasketItem[];
296
+ billing_address?: BillingAddress;
281
297
  buyer: Buyer;
298
+ consents?: OrderConsent[];
282
299
  conversation_id?: string;
300
+ external_reference_id?: string;
301
+ order_cards?: OrderCardDTO[];
302
+ paid_amount?: number;
283
303
  partial_payment?: boolean;
304
+ payment_mode?: string;
284
305
  payment_methods?: boolean;
285
306
  payment_options?: PaymentOption[];
286
307
  payment_success_url?: string;
287
308
  payment_failure_url?: string;
309
+ payment_terms?: PaymentTermDTO[];
310
+ pf_sub_merchant?: OrderPFSubMerchantDTO;
311
+ redirect_failure_url?: string;
312
+ redirect_success_url?: string;
288
313
  enabled_installments?: number[];
289
314
  metadata?: OrderMetadata[];
315
+ sub_organization?: SubOrganizationDTO;
316
+ submerchants?: SubmerchantDTO[];
290
317
  }
291
318
  /**
292
319
  * @category Order Management
@@ -295,7 +322,11 @@ interface OrderCreateRequest {
295
322
  * @interface OrderCreateResponse
296
323
  */
297
324
  interface OrderCreateResponse {
298
- order_id: string;
325
+ code?: number;
326
+ id?: string;
327
+ message?: string;
328
+ organization_id?: string;
329
+ order_id?: string;
299
330
  reference_id: string;
300
331
  checkout_url?: string;
301
332
  conversation_id?: string;
@@ -324,6 +355,111 @@ interface Order extends OrderCreateResponse {
324
355
  organization?: string;
325
356
  unpaid_amount?: number;
326
357
  }
358
+ /**
359
+ * @category Order Management
360
+ * @summary Response payload for order detail retrieval
361
+ * @description Swagger-aligned response schema for GET /order/{id}
362
+ * @interface GetOrderResponse
363
+ */
364
+ interface GetOrderResponse {
365
+ amount?: string;
366
+ basket_items?: BasketItemDTO[];
367
+ billing_address?: BillingAddressDTO;
368
+ buyer?: BuyerDTO;
369
+ checkout_design?: CheckoutDesignDTO;
370
+ checkout_url?: string;
371
+ conversation_id?: string;
372
+ created_at?: string;
373
+ currency?: string;
374
+ external_reference_id?: string;
375
+ locale?: string;
376
+ metadata?: MetadataDTO[];
377
+ paid_amount?: string;
378
+ payment_failure_url?: string;
379
+ payment_options?: string[];
380
+ payment_success_url?: string;
381
+ payment_terms?: PaymentTermDTO[];
382
+ redirect_failure_url?: string;
383
+ redirect_success_url?: string;
384
+ reference_id?: string;
385
+ refunded_amount?: string;
386
+ shipping_address?: ShippingAddressDTO;
387
+ status?: number;
388
+ status_enum?: string;
389
+ total?: string;
390
+ }
391
+ /**
392
+ * @category Order Management
393
+ * @summary Query parameters for order listing
394
+ * @description Swagger-aligned query options for GET /order/list
395
+ * @interface GetOrdersRequest
396
+ */
397
+ interface GetOrdersRequest {
398
+ page?: number;
399
+ per_page?: number;
400
+ start_date?: string;
401
+ end_date?: string;
402
+ organization_id?: string;
403
+ related_reference_id?: string;
404
+ buyer_id?: string;
405
+ status?: number;
406
+ }
407
+ /**
408
+ * @category Order Management
409
+ * @summary Single list item returned by order listing
410
+ * @description Swagger-aligned row schema for GET /order/list
411
+ * @interface GetOrdersListItem
412
+ */
413
+ interface GetOrdersListItem {
414
+ checkout_url?: string;
415
+ email?: string;
416
+ id?: string;
417
+ metadata?: MetadataDTO[];
418
+ name?: string;
419
+ organization?: string;
420
+ organization_id?: string;
421
+ paid_amount?: number;
422
+ paid_term_count?: number;
423
+ reference_id?: string;
424
+ refund_date?: string;
425
+ status?: number;
426
+ total?: string;
427
+ total_term_count?: number;
428
+ unpaid_amount?: number;
429
+ }
430
+ /**
431
+ * @category Order Management
432
+ * @summary Response payload for order listing
433
+ * @description Swagger-aligned response schema for GET /order/list
434
+ * @interface GetOrdersResponse
435
+ */
436
+ interface GetOrdersResponse {
437
+ page?: number;
438
+ per_page?: number;
439
+ rows?: GetOrdersListItem[];
440
+ total?: number;
441
+ total_pages?: number;
442
+ }
443
+ /**
444
+ * @category Order Management
445
+ * @summary Request payload for order cancellation
446
+ * @description Swagger-aligned request schema for POST /order/cancel
447
+ * @interface CancelOrderRequest
448
+ */
449
+ interface CancelOrderRequest {
450
+ reference_id: string;
451
+ }
452
+ /**
453
+ * @category Order Management
454
+ * @summary Response payload for order cancellation
455
+ * @description Swagger-aligned response schema for POST /order/cancel
456
+ * @interface CancelOrderResponse
457
+ */
458
+ interface CancelOrderResponse {
459
+ is_success?: boolean;
460
+ message?: string;
461
+ status?: string;
462
+ }
327
463
  /**
328
464
  * @category Refunds
329
465
  * @summary Refund request information for an order
@@ -333,6 +469,8 @@ interface Order extends OrderCreateResponse {
333
469
  interface OrderRefundRequest {
334
470
  reference_id: string;
335
471
  amount: number;
472
+ order_item_id?: string;
473
+ order_item_payment_id?: string;
336
474
  }
337
475
  /**
338
476
  * @category Refunds
@@ -341,23 +479,43 @@ interface OrderRefundRequest {
341
479
  * @interface OrderRefundResponse
342
480
  */
343
481
  interface OrderRefundResponse {
344
- refundId: string;
345
- referenceId: string;
346
- status: string;
347
- amount: number;
348
- currency: Currency;
349
- createdAt: string;
482
+ is_success?: boolean;
483
+ message?: string;
484
+ refundId?: string;
485
+ referenceId?: string;
486
+ status?: string;
487
+ amount?: number;
488
+ currency?: Currency;
489
+ createdAt?: string;
350
490
  }
351
491
  /**
352
492
  * @category Order Management
353
493
  * @summary Order status information
354
- * @description Provides the current status of an order and when it was last updated
494
+ * @description Swagger-aligned response payload for GET /order/{id}/status
355
495
  * @interface OrderStatusResponse
356
496
  */
357
497
  interface OrderStatusResponse {
358
- referenceId: string;
359
- status: string;
360
- lastUpdatedAt: string;
498
+ error_code?: string;
499
+ status?: string;
500
+ }
501
+ /**
502
+ * @category System
503
+ * @summary System order status item
504
+ * @description Represents a single status entry returned by the system order statuses endpoint
505
+ * @interface SystemOrderStatus
506
+ */
507
+ interface SystemOrderStatus {
508
+ code?: number;
509
+ message?: string;
510
+ }
511
+ /**
512
+ * @category System
513
+ * @summary Response for system order statuses
514
+ * @description API response payload for listing available system order statuses
515
+ * @interface GetSystemOrderStatusesResponse
516
+ */
517
+ interface GetSystemOrderStatusesResponse {
518
+ rows?: SystemOrderStatus[];
361
519
  }
362
520
  /**
363
521
  * @category Payment Processing
@@ -378,6 +536,58 @@ interface OrderPaymentDetail {
378
536
  cardAssociation: string;
379
537
  };
380
538
  }
539
+ interface OrderPaymentDetailInfoResponse {
540
+ id?: string;
541
+ paid_date?: string;
542
+ paid_date_timestamp?: number;
543
+ reference_id?: string;
544
+ refunded_amount?: number;
545
+ status?: string;
546
+ }
547
+ interface OrderPaymentDetailOrderPaymentStatusResponse {
548
+ acquirere_response?: string;
549
+ code?: string;
550
+ expiry_month?: string;
551
+ expiry_year?: string;
552
+ is_error?: boolean;
553
+ masked_pan?: string;
554
+ message?: string;
555
+ }
556
+ interface OrderPaymentDetailsResponse {
557
+ auth_code?: string;
558
+ batch_no?: string;
559
+ card_holder_name?: string;
560
+ card_number?: string;
561
+ is_three_ds?: boolean;
562
+ mdstatus?: string;
563
+ order_id?: string;
564
+ payment_id?: string;
565
+ payment_transaction_id?: string;
566
+ reference_id?: string;
567
+ rrn?: string;
568
+ }
569
+ interface OrderPaymentDetailRuleResponse {
570
+ id?: string;
571
+ name?: string;
572
+ }
573
+ interface OrderPaymentDetailVposResponse {
574
+ acquirer?: string;
575
+ bank_code?: string;
576
+ commission_rate?: string;
577
+ id?: string;
578
+ name?: string;
579
+ }
580
+ interface GetOrderPaymentDetailsResponse {
581
+ conversation_id?: string;
582
+ id?: string;
583
+ order?: OrderPaymentDetailInfoResponse;
584
+ order_payment_status?: OrderPaymentDetailOrderPaymentStatusResponse;
585
+ organization_id?: string;
586
+ paymentDetails?: OrderPaymentDetailsResponse;
587
+ rule?: OrderPaymentDetailRuleResponse;
588
+ vpos?: OrderPaymentDetailVposResponse;
589
+ vposResponse?: string;
590
+ }
381
591
  /**
382
592
  * @category API DTOs
383
593
  * @summary API representation of buyer information
@@ -415,6 +625,25 @@ interface BasketItemPayerDTO {
415
625
  type?: string;
416
626
  vat?: string;
417
627
  }
628
+ /**
629
+ * @category API DTOs
630
+ * @summary Payment record for a basket item
631
+ * @description Payment details attached to a specific basket item
632
+ * @interface BasketItemPaymentDTO
633
+ */
634
+ interface BasketItemPaymentDTO {
635
+ amount?: number;
636
+ card_brand?: string;
637
+ id?: string;
638
+ masked_bin?: string;
639
+ paid_date?: string;
640
+ refundable_amount?: number;
641
+ refunded?: boolean;
642
+ refunded_amount?: number;
643
+ refunded_date?: string;
644
+ status?: number;
645
+ type?: string;
646
+ }
418
647
  /**
419
648
  * @category API DTOs
420
649
  * @summary Individual item in an order basket
@@ -429,14 +658,20 @@ interface BasketItemDTO {
429
658
  coupon_discount?: number;
430
659
  data?: string;
431
660
  id?: string;
661
+ item_payments?: BasketItemPaymentDTO[];
432
662
  item_type?: string;
663
+ mcc?: string;
433
664
  name?: string;
434
665
  paid_amount?: number;
666
+ paidable_amount?: number;
435
667
  payer?: BasketItemPayerDTO;
436
668
  price?: number;
437
669
  quantity?: number;
438
670
  quantity_float?: number;
439
671
  quantity_unit?: string;
672
+ refundable_amount?: number;
673
+ refunded_amount?: number;
674
+ status?: number;
440
675
  sub_merchant_key?: string;
441
676
  sub_merchant_price?: string;
442
677
  }
@@ -455,6 +690,10 @@ interface BillingAddressDTO {
455
690
  contact_phone?: string;
456
691
  country?: string;
457
692
  district?: string;
693
+ neighbourhood?: string;
694
+ street1?: string;
695
+ street2?: string;
696
+ street3?: string;
458
697
  tax_office?: string;
459
698
  title?: string;
460
699
  vat_number?: string;
@@ -528,10 +767,12 @@ interface OrderPFSubMerchantDTO {
528
767
  id?: string;
529
768
  mcc?: string;
530
769
  name?: string;
770
+ national_id?: string;
531
771
  org_id?: string;
532
772
  postal_code?: string;
533
773
  submerchant_nin?: string;
534
774
  submerchant_url?: string;
775
+ switch_id?: string;
535
776
  terminal_no?: string;
536
777
  }
537
778
  /**
@@ -584,6 +825,16 @@ interface SubmerchantDTO {
584
825
  merchant_reference_id?: string;
585
826
  order_basket_item_id?: string;
586
827
  }
828
+ /**
829
+ * @category Order Management
830
+ * @summary Order consent information
831
+ * @description Title and URL for legal consents required during order creation
832
+ * @interface OrderConsent
833
+ */
834
+ interface OrderConsent {
835
+ title?: string;
836
+ url?: string;
837
+ }
587
838
  /**
588
839
  * @category API DTOs
589
840
  * @summary Comprehensive order creation request
@@ -592,25 +843,29 @@ interface SubmerchantDTO {
592
843
  */
593
844
  interface OrderCreateDTO {
594
845
  amount: number;
595
- currency: string;
596
- locale: string;
846
+ currency: Currency;
847
+ locale: Locale;
597
848
  buyer: BuyerDTO;
598
849
  basket_items?: BasketItemDTO[];
599
850
  billing_address?: BillingAddressDTO;
600
851
  checkout_design?: CheckoutDesignDTO;
852
+ consents?: OrderConsent[];
601
853
  conversation_id?: string;
602
854
  enabled_installments?: number[];
603
855
  external_reference_id?: string;
604
856
  metadata?: MetadataDTO[];
605
- order_cards?: OrderCardDTO;
857
+ order_cards?: OrderCardDTO[];
606
858
  paid_amount?: number;
607
859
  partial_payment?: boolean;
608
860
  payment_failure_url?: string;
861
+ payment_mode?: string;
609
862
  payment_methods?: boolean;
610
863
  payment_options?: string[];
611
864
  payment_success_url?: string;
612
865
  payment_terms?: PaymentTermDTO[];
613
866
  pf_sub_merchant?: OrderPFSubMerchantDTO;
867
+ redirect_failure_url?: string;
868
+ redirect_success_url?: string;
614
869
  shipping_address?: ShippingAddressDTO;
615
870
  sub_organization?: SubOrganizationDTO;
616
871
  submerchants?: SubmerchantDTO[];
@@ -629,6 +884,25 @@ interface RefundOrderDTO {
629
884
  order_item_id?: string;
630
885
  order_item_payment_id?: string;
631
886
  }
887
+ /**
888
+ * @category Refunds
889
+ * @summary Data structure for requesting a full refund
890
+ * @description Contains the order reference required to fully refund an order
891
+ * @interface RefundAllOrderDTO
892
+ */
893
+ interface RefundAllOrderDTO {
894
+ reference_id: string;
895
+ }
896
+ /**
897
+ * @category Payment Processing
898
+ * @summary Data structure for order payment detail query
899
+ * @description Request payload for POST /order/payment-details
900
+ * @interface OrderPaymentDetailDTO
901
+ */
902
+ interface OrderPaymentDetailDTO {
903
+ conversation_id?: string;
904
+ reference_id?: string;
905
+ }
632
906
  /**
633
907
  * @category Payment Terms
634
908
  * @summary Data for creating a payment term
@@ -703,6 +977,34 @@ interface PaymentTermResponse {
703
977
  paid_date?: string;
704
978
  data?: string;
705
979
  }
980
+ /**
981
+ * @category Payment Terms
982
+ * @summary Protobuf timestamp payload
983
+ * @description Timestamp structure used by term APIs (`seconds` + `nanos`)
984
+ * @interface TimestampDTO
985
+ */
986
+ interface TimestampDTO {
987
+ nanos?: number;
988
+ seconds?: number;
989
+ }
990
+ /**
991
+ * @category Payment Terms
992
+ * @summary Response payload for order term retrieval
993
+ * @description Swagger-aligned response schema for GET /order/term
994
+ * @interface GetOrderTermResponse
995
+ */
996
+ interface GetOrderTermResponse {
997
+ amount?: number;
998
+ due_date?: TimestampDTO;
999
+ paid_date?: TimestampDTO;
1000
+ required?: boolean;
1001
+ status?: string;
1002
+ term_sequence?: number;
1003
+ }
1004
+ interface OrderPaymentTermActionResponse {
1005
+ code?: number;
1006
+ message?: string;
1007
+ }
706
1008
  /**
707
1009
  * @category Payment Terms
708
1010
  * @summary Request data for deleting a payment term
@@ -710,6 +1012,7 @@ interface PaymentTermResponse {
710
1012
  * @interface PaymentTermDeleteRequest
711
1013
  */
712
1014
  interface PaymentTermDeleteRequest {
1015
+ order_id?: string;
713
1016
  term_reference_id: string;
714
1017
  }
715
1018
  /**
@@ -719,11 +1022,14 @@ interface PaymentTermDeleteRequest {
719
1022
  * @interface PaymentTermRefundResponse
720
1023
  */
721
1024
  interface PaymentTermRefundResponse {
722
- refund_id: string;
723
- term_reference_id: string;
724
- amount: number;
725
- status: string;
726
- created_at: string;
1025
+ code?: number;
1026
+ is_success?: boolean;
1027
+ message?: string;
1028
+ refund_id?: string;
1029
+ term_reference_id?: string;
1030
+ amount?: number;
1031
+ status?: string;
1032
+ created_at?: string;
727
1033
  refund_reference_id?: string;
728
1034
  }
729
1035
  /**
@@ -753,9 +1059,11 @@ interface OrderTerminateRequest {
753
1059
  * @interface OrderTerminateResponse
754
1060
  */
755
1061
  interface OrderTerminateResponse {
756
- reference_id: string;
757
- status: string;
758
- terminated_at: string;
1062
+ code?: number;
1063
+ message?: string;
1064
+ reference_id?: string;
1065
+ status?: string;
1066
+ terminated_at?: string;
759
1067
  reason?: string;
760
1068
  }
761
1069
  /**
@@ -790,6 +1098,10 @@ interface SubscriptionCancelRequest {
790
1098
  external_reference_id?: string;
791
1099
  reference_id?: string;
792
1100
  }
1101
+ interface CancelSubscriptionResponse {
1102
+ code?: number;
1103
+ message?: string;
1104
+ }
793
1105
  interface SubscriptionBilling {
794
1106
  address?: string;
795
1107
  city?: string;
@@ -823,6 +1135,11 @@ interface SubscriptionCreateRequest {
823
1135
  success_url?: string;
824
1136
  title?: string;
825
1137
  user?: SubscriptionUser;
1138
+ price_option?: SubscriptionPriceOption;
1139
+ }
1140
+ interface SubscriptionPriceOption {
1141
+ count: number;
1142
+ price: number;
826
1143
  }
827
1144
  interface SubscriptionRedirectRequest {
828
1145
  subscription_id?: string;
@@ -847,6 +1164,29 @@ interface SubscriptionDetail {
847
1164
  period?: number;
848
1165
  title?: string;
849
1166
  }
1167
+ interface SubscriptionListItem {
1168
+ amount?: string;
1169
+ currency?: string;
1170
+ external_reference_id?: string;
1171
+ is_active?: boolean;
1172
+ payment_date?: number;
1173
+ payment_status?: string;
1174
+ period?: number;
1175
+ reference_id?: string;
1176
+ title?: string;
1177
+ }
1178
+ interface ListSubscriptionsRequest {
1179
+ page?: number;
1180
+ per_page?: number;
1181
+ [key: string]: unknown;
1182
+ }
1183
+ interface ListSubscriptionsResponse {
1184
+ page?: number;
1185
+ per_page?: number;
1186
+ rows?: SubscriptionListItem[];
1187
+ total?: number;
1188
+ total_pages?: number;
1189
+ }
850
1190
  interface SubscriptionCreateResponse {
851
1191
  code?: number;
852
1192
  message?: string;
@@ -867,18 +1207,43 @@ interface OrganizationSettings {
867
1207
  subscription_domain?: string;
868
1208
  }
869
1209
  interface OrderTransaction {
870
- id: string;
871
- date: string;
872
- amount: number;
873
- type: string;
874
- status: string;
1210
+ amount?: string;
1211
+ amount_float?: number;
1212
+ currency?: string;
1213
+ date?: string;
1214
+ id?: string;
1215
+ receiver?: string;
1216
+ reference_id?: string;
1217
+ sender?: string;
1218
+ status?: string;
875
1219
  [key: string]: unknown;
876
1220
  }
1221
+ interface GetOrderTransactionsResponse {
1222
+ orderTX?: OrderTransaction[];
1223
+ }
877
1224
  interface OrderSubmerchant {
878
- id: string;
879
- name: string;
1225
+ acquirer?: string;
1226
+ email?: string;
1227
+ id?: string;
1228
+ labels?: string;
1229
+ name?: string;
1230
+ status?: string;
1231
+ submerchant_key?: string;
1232
+ submerchant_type?: string;
1233
+ [key: string]: unknown;
1234
+ }
1235
+ interface GetOrderSubmerchantsRequest {
1236
+ page?: number;
1237
+ per_page?: number;
880
1238
  [key: string]: unknown;
881
1239
  }
1240
+ interface GetOrderSubmerchantsResponse {
1241
+ page?: number;
1242
+ per_page?: number;
1243
+ row?: OrderSubmerchant[];
1244
+ total?: number;
1245
+ total_pages?: number;
1246
+ }
882
1247
  /**
883
1248
  * @category Order Management
884
1249
  * @summary Request for order accounting
@@ -888,6 +1253,276 @@ interface OrderSubmerchant {
888
1253
  interface OrderAccountingRequest {
889
1254
  order_reference_id: string;
890
1255
  }
1256
+ /**
1257
+ * @category Order Management
1258
+ * @summary Response for order accounting
1259
+ * @description API response payload returned after order accounting operation
1260
+ * @interface OrderAccountingResponse
1261
+ */
1262
+ interface OrderAccountingResponse {
1263
+ code?: number;
1264
+ message?: string;
1265
+ }
1266
+ /**
1267
+ * @category Order Management
1268
+ * @summary Request to add an item to the basket
1269
+ * @description Data required to add a new item to an existing order basket
1270
+ * @interface AddBasketItemRequest
1271
+ */
1272
+ interface AddBasketItemRequest {
1273
+ order_reference_id: string;
1274
+ basket_item: BasketItemDTO;
1275
+ }
1276
+ /**
1277
+ * @category Order Management
1278
+ * @summary Request to remove an item from the basket
1279
+ * @description Data required to remove an item from an existing order basket
1280
+ * @interface RemoveBasketItemRequest
1281
+ */
1282
+ interface RemoveBasketItemRequest {
1283
+ order_reference_id: string;
1284
+ basket_item_id: string;
1285
+ }
1286
+ /**
1287
+ * @category Order Management
1288
+ * @summary Request to update a basket item
1289
+ * @description Data required to update an existing item in an order basket
1290
+ * @interface UpdateBasketItemRequest
1291
+ */
1292
+ interface UpdateBasketItemRequest {
1293
+ order_reference_id: string;
1294
+ basket_item: BasketItemDTO;
1295
+ }
1296
+ interface AddBasketItemResponse {
1297
+ code?: number;
1298
+ message?: string;
1299
+ }
1300
+ interface RemoveBasketItemResponse {
1301
+ code?: number;
1302
+ message?: string;
1303
+ }
1304
+ interface UpdateBasketItemResponse {
1305
+ code?: number;
1306
+ message?: string;
1307
+ }
1308
+ interface OrderManualCallbackRequest {
1309
+ conversation_id?: string;
1310
+ reference_id: string;
1311
+ }
1312
+ interface OrderManualCallbackResponse {
1313
+ code?: number;
1314
+ message?: string;
1315
+ }
1316
+ interface OrderRelatedUpdateRequest {
1317
+ reference_id: string;
1318
+ related_reference_id: string;
1319
+ }
1320
+ interface OrderRelatedUpdateResponse {
1321
+ code?: number;
1322
+ is_success?: boolean;
1323
+ message?: string;
1324
+ }
1325
+ /**
1326
+ * @category Organization
1327
+ * @summary Webhook callback URL configuration
1328
+ * @description Configuration for various webhook callback endpoints
1329
+ * @interface CallbackURLDTO
1330
+ */
1331
+ interface CallbackURLDTO {
1332
+ callback_url?: string;
1333
+ cancel_callback_url?: string;
1334
+ fail_callback_url?: string;
1335
+ refund_callback_url?: string;
1336
+ }
1337
+ /**
1338
+ * @category Organization
1339
+ * @summary Organization business types
1340
+ * @enum {number}
1341
+ */
1342
+ declare enum BusinessType {
1343
+ INDIVIDUAL = 0,
1344
+ CORPORATE = 1,
1345
+ NON_PROFIT = 2,
1346
+ GOVERNMENT = 3,
1347
+ UNKNOWN = 4
1348
+ }
1349
+ /**
1350
+ * @category Organization
1351
+ * @summary Request to create a business entity
1352
+ * @description Comprehensive data for creating a new business entity in an organization
1353
+ * @interface OrgCreateBusinessRequest
1354
+ */
1355
+ interface OrgCreateBusinessRequest {
1356
+ address: string;
1357
+ business_name: string;
1358
+ business_type: BusinessType;
1359
+ email: string;
1360
+ first_name: string;
1361
+ identity_number: string;
1362
+ last_name: string;
1363
+ phone: string;
1364
+ tax_number: string;
1365
+ tax_office: string;
1366
+ zip_code: string;
1367
+ }
1368
+ interface OrgCreateBusinessResponse {
1369
+ code?: number;
1370
+ message?: string;
1371
+ }
1372
+ interface OrganizationResponse {
1373
+ message?: string;
1374
+ }
1375
+ interface OrganizationCurrency {
1376
+ code?: string;
1377
+ currency_unit?: string;
1378
+ id?: string;
1379
+ name?: string;
1380
+ symbol?: string;
1381
+ }
1382
+ interface GetOrganizationCurrenciesResponse {
1383
+ currencies?: OrganizationCurrency[];
1384
+ }
1385
+ interface UserLimit {
1386
+ currency?: string;
1387
+ id?: string;
1388
+ max_daily_transaction_amount?: number;
1389
+ max_daily_transaction_count?: number;
1390
+ max_expense_amount?: number;
1391
+ max_income_amount?: number;
1392
+ max_monthly_transaction_amount?: number;
1393
+ max_monthly_transaction_count?: number;
1394
+ max_topup_amount?: number;
1395
+ max_wallet_balance?: number;
1396
+ max_withdrawal_amount?: number;
1397
+ }
1398
+ interface GetUserLimitResponse {
1399
+ user_limits?: UserLimit[];
1400
+ }
1401
+ /**
1402
+ * @category Organization
1403
+ * @summary Request for user limit information
1404
+ * @description Data required to fetch limits for a specific user
1405
+ * @interface GetUserLimitRequest
1406
+ */
1407
+ interface GetUserLimitRequest {
1408
+ user_id: string;
1409
+ [key: string]: unknown;
1410
+ }
1411
+ /**
1412
+ * @category Organization
1413
+ * @summary Request to set user limits
1414
+ * @description Data required to set a specific limit for a user
1415
+ * @interface SetLimitUserRequest
1416
+ */
1417
+ interface SetLimitUserRequest {
1418
+ limit_id: string;
1419
+ user_id: string;
1420
+ }
1421
+ interface SetLimitUserResponse {
1422
+ code?: number;
1423
+ message?: string;
1424
+ }
1425
+ interface OrganizationLimit extends UserLimit {
1426
+ name?: string;
1427
+ }
1428
+ interface GetOrganizationLimitsResponse {
1429
+ limits?: OrganizationLimit[];
1430
+ }
1431
+ interface GetMetaResponse {
1432
+ data?: string;
1433
+ }
1434
+ interface OrganizationScope {
1435
+ create?: boolean;
1436
+ delete?: boolean;
1437
+ entity?: string;
1438
+ read?: boolean;
1439
+ update?: boolean;
1440
+ }
1441
+ interface GetOrganizationScopesResponse {
1442
+ scopes?: OrganizationScope[];
1443
+ }
1444
+ interface GetSuborganizationsRequest {
1445
+ page?: number;
1446
+ per_page?: number;
1447
+ }
1448
+ interface OrganizationSuborganization {
1449
+ id?: string;
1450
+ name?: string;
1451
+ }
1452
+ interface GetSubOrganizationListResponse {
1453
+ page?: number;
1454
+ per_page?: number;
1455
+ rows?: OrganizationSuborganization[];
1456
+ total?: number;
1457
+ total_pages?: number;
1458
+ }
1459
+ /**
1460
+ * @category Organization
1461
+ * @summary Request for VPOS list
1462
+ * @description Parameters for filtering and retrieving virtual POS terminals
1463
+ * @interface GetVposRequest
1464
+ */
1465
+ interface GetVposRequest {
1466
+ currency_id: string;
1467
+ [key: string]: unknown;
1468
+ }
1469
+ interface OrganizationVpos {
1470
+ id?: string;
1471
+ name?: string;
1472
+ }
1473
+ interface GetVposResponse {
1474
+ organization_vpos?: OrganizationVpos[];
1475
+ }
1476
+ /**
1477
+ * @category Organization
1478
+ * @summary Request to create an organization user
1479
+ * @description Comprehensive data for creating a new user within an organization
1480
+ * @interface OrgCreateUserRequest
1481
+ */
1482
+ interface OrgCreateUserRequest {
1483
+ conversation_id: string;
1484
+ email: string;
1485
+ first_name: string;
1486
+ identity_number: string;
1487
+ is_mail_verified: boolean;
1488
+ last_name: string;
1489
+ phone: string;
1490
+ reference_id: string;
1491
+ }
1492
+ interface OrgCreateUserResponse {
1493
+ code?: number;
1494
+ message?: string;
1495
+ user_id?: string;
1496
+ }
1497
+ type OrgCreateUserReq = OrgCreateUserRequest;
1498
+ /**
1499
+ * @category Organization
1500
+ * @summary Request to verify a user
1501
+ * @description Data required to verify a user's account
1502
+ * @interface OrgUserVerifyRequest
1503
+ */
1504
+ interface OrgUserVerifyRequest {
1505
+ user_id: string;
1506
+ }
1507
+ interface OrgUserVerifyResponse {
1508
+ code?: number;
1509
+ message?: string;
1510
+ }
1511
+ type OrgUserVerifyReq = OrgUserVerifyRequest;
1512
+ /**
1513
+ * @category Organization
1514
+ * @summary Request to verify user's mobile number
1515
+ * @description Data required to initiate or complete mobile number verification
1516
+ * @interface OrgUserMobileVerifyRequest
1517
+ */
1518
+ interface OrgUserMobileVerifyRequest {
1519
+ user_id: string;
1520
+ }
1521
+ interface OrgUserMobileVerifyResponse {
1522
+ code?: number;
1523
+ message?: string;
1524
+ }
1525
+ type OrgUserMobileVerifyReq = OrgUserMobileVerifyRequest;
891
1526
  /**
892
1527
  * @category Order Management
893
1528
  * @summary Request for order post-authorization
@@ -898,6 +1533,103 @@ interface OrderPostAuthRequest {
898
1533
  amount: number;
899
1534
  reference_id: string;
900
1535
  }
1536
+ /**
1537
+ * @category Order Management
1538
+ * @summary Response for order post-authorization
1539
+ * @description API response payload returned after post-authorization operation
1540
+ * @interface OrderPostAuthResponse
1541
+ */
1542
+ interface OrderPostAuthResponse {
1543
+ code?: number;
1544
+ is_success?: boolean;
1545
+ message?: string;
1546
+ }
1547
+ interface OrderPaymentOptionsUpdateDTO {
1548
+ payment_options: string[];
1549
+ reference_id: string;
1550
+ }
1551
+ interface SplitOrderItemPaymentDTO {
1552
+ amount: number;
1553
+ order_id: string;
1554
+ order_item_payment_id: string;
1555
+ }
1556
+ interface OrderCallbackResponse {
1557
+ [key: string]: unknown;
1558
+ }
1559
+ interface OrderVposQueryResponse {
1560
+ [key: string]: unknown;
1561
+ }
1562
+ interface OrganizationCurrencyPreset {
1563
+ id?: string;
1564
+ name?: string;
1565
+ code?: string;
1566
+ [key: string]: unknown;
1567
+ }
1568
+ interface GetOrganizationCurrencyPresetsResponse {
1569
+ presets?: OrganizationCurrencyPreset[];
1570
+ }
1571
+ interface GetSuborganizationDetailsResponse {
1572
+ [key: string]: unknown;
1573
+ }
1574
+ interface GetSuborganizationSubmerchantsResponse {
1575
+ [key: string]: unknown;
1576
+ }
1577
+ interface SystemBasketItemType {
1578
+ code?: string | number;
1579
+ message?: string;
1580
+ }
1581
+ interface GetSystemBasketItemTypesResponse {
1582
+ rows?: SystemBasketItemType[];
1583
+ }
1584
+ interface SystemErrorCode {
1585
+ code?: string | number;
1586
+ message?: string;
1587
+ }
1588
+ interface GetSystemErrorCodesResponse {
1589
+ rows?: SystemErrorCode[];
1590
+ }
1591
+ interface SystemPaymentTermStatus {
1592
+ code?: string | number;
1593
+ message?: string;
1594
+ }
1595
+ interface GetSystemPaymentTermStatusesResponse {
1596
+ rows?: SystemPaymentTermStatus[];
1597
+ }
1598
+ interface SystemProductType {
1599
+ code?: string | number;
1600
+ message?: string;
1601
+ }
1602
+ interface GetSystemProductTypesResponse {
1603
+ rows?: SystemProductType[];
1604
+ }
1605
+ interface SystemShortcutType {
1606
+ code?: string | number;
1607
+ message?: string;
1608
+ }
1609
+ interface GetSystemShortcutTypesResponse {
1610
+ rows?: SystemShortcutType[];
1611
+ }
1612
+ interface SystemTransactionPaymentType {
1613
+ code?: string | number;
1614
+ message?: string;
1615
+ }
1616
+ interface GetSystemTransactionPaymentTypesResponse {
1617
+ rows?: SystemTransactionPaymentType[];
1618
+ }
1619
+ interface SystemTransactionPurpose {
1620
+ code?: string | number;
1621
+ message?: string;
1622
+ }
1623
+ interface GetSystemTransactionPurposesResponse {
1624
+ rows?: SystemTransactionPurpose[];
1625
+ }
1626
+ interface SystemTransactionStatus {
1627
+ code?: string | number;
1628
+ message?: string;
1629
+ }
1630
+ interface GetSystemTransactionStatusesResponse {
1631
+ rows?: SystemTransactionStatus[];
1632
+ }
901
1633
 
902
1634
  /**
903
1635
  * @category Configuration
@@ -1021,6 +1753,26 @@ declare class TapsilatSDK {
1021
1753
  * @throws {TypeError} When config parameter is not an object or missing required fields
1022
1754
  */
1023
1755
  constructor(config: TapsilatConfig);
1756
+ /**
1757
+ * Access to order operations
1758
+ */
1759
+ get orders(): any;
1760
+ /**
1761
+ * Access to subscription operations
1762
+ */
1763
+ get subscriptions(): any;
1764
+ /**
1765
+ * Access to organization operations
1766
+ */
1767
+ get organization(): any;
1768
+ /**
1769
+ * Access to system operations
1770
+ */
1771
+ get system(): any;
1772
+ /**
1773
+ * Access to webhook operations
1774
+ */
1775
+ get webhooks(): any;
1024
1776
  /**
1025
1777
  * Creates a new order and returns a checkout URL
1026
1778
  *
@@ -1052,10 +1804,10 @@ declare class TapsilatSDK {
1052
1804
  * @param {string} [orderRequest.payment_success_url] - URL to redirect after successful payment
1053
1805
  * @param {string} [orderRequest.payment_failure_url] - URL to redirect after failed payment
1054
1806
  * @param {number[]} [orderRequest.enabled_installments] - Allowed installment counts
1055
- * @param {Record<string, unknown>} [orderRequest.metadata] - Additional custom data
1807
+ * @param {OrderMetadata[]} [orderRequest.metadata] - Additional custom key/value data
1056
1808
  *
1057
1809
  * @returns {Promise<OrderCreateResponse>} Promise resolving to order creation response
1058
- * @returns {string} OrderCreateResponse.order_id - Internal order identifier
1810
+ * @returns {string} [OrderCreateResponse.id] - Internal order identifier
1059
1811
  * @returns {string} OrderCreateResponse.reference_id - Unique order reference for tracking
1060
1812
  * @returns {string} [OrderCreateResponse.checkout_url] - Payment page URL for customer
1061
1813
  * @returns {string} [OrderCreateResponse.conversation_id] - Echo of provided conversation ID
@@ -1080,11 +1832,11 @@ declare class TapsilatSDK {
1080
1832
  * @description Handles accounting operations for a specific order using its reference ID.
1081
1833
  *
1082
1834
  * @param {OrderAccountingRequest} request - Accounting request details
1083
- * @returns {Promise<APIResponse<unknown>>} Promise resolving to the accounting response
1835
+ * @returns {Promise<OrderAccountingResponse>} Promise resolving to the accounting response
1084
1836
  * @throws {TapsilatValidationError} When input validation fails
1085
1837
  * @throws {TapsilatError} When API returns an error response
1086
1838
  */
1087
- orderAccounting(request: OrderAccountingRequest): Promise<APIResponse<unknown>>;
1839
+ orderAccounting(request: OrderAccountingRequest): Promise<OrderAccountingResponse>;
1088
1840
  /**
1089
1841
  * Process post-authorization for an order
1090
1842
  *
@@ -1092,21 +1844,61 @@ declare class TapsilatSDK {
1092
1844
  * @description Handles post-authorization operations for a specific order.
1093
1845
  *
1094
1846
  * @param {OrderPostAuthRequest} request - Post-authorization request details
1095
- * @returns {Promise<APIResponse<unknown>>} Promise resolving to the post-auth response
1847
+ * @returns {Promise<OrderPostAuthResponse>} Promise resolving to the post-auth response
1096
1848
  * @throws {TapsilatValidationError} When input validation fails
1097
1849
  * @throws {TapsilatError} When API returns an error response
1098
1850
  */
1099
- orderPostAuth(request: OrderPostAuthRequest): Promise<APIResponse<unknown>>;
1851
+ orderPostAuth(request: OrderPostAuthRequest): Promise<OrderPostAuthResponse>;
1100
1852
  /**
1101
1853
  * Retrieve system order statuses
1102
1854
  *
1103
1855
  * @summary Retrieve system order statuses
1104
1856
  * @description Gets a list of all possible order statuses in the system.
1105
1857
  *
1106
- * @returns {Promise<APIResponse<unknown>>} Promise resolving to system order statuses
1858
+ * @returns {Promise<GetSystemOrderStatusesResponse>} Promise resolving to system order statuses
1107
1859
  * @throws {TapsilatError} When API returns an error response
1108
1860
  */
1109
- getSystemOrderStatuses(): Promise<APIResponse<unknown>>;
1861
+ getSystemOrderStatuses(): Promise<GetSystemOrderStatusesResponse>;
1862
+ /**
1863
+ * Retrieves system basket item types.
1864
+ * Based on `get_system_basket_item_types` from Python SDK.
1865
+ */
1866
+ getSystemBasketItemTypes(): Promise<GetSystemBasketItemTypesResponse>;
1867
+ /**
1868
+ * Retrieves system error codes.
1869
+ * Based on `get_system_error_codes` from Python SDK.
1870
+ */
1871
+ getSystemErrorCodes(): Promise<GetSystemErrorCodesResponse>;
1872
+ /**
1873
+ * Retrieves system payment term statuses.
1874
+ * Based on `get_system_payment_term_statuses` from Python SDK.
1875
+ */
1876
+ getSystemPaymentTermStatuses(): Promise<GetSystemPaymentTermStatusesResponse>;
1877
+ /**
1878
+ * Retrieves system product types.
1879
+ * Based on `get_system_product_types` from Python SDK.
1880
+ */
1881
+ getSystemProductTypes(): Promise<GetSystemProductTypesResponse>;
1882
+ /**
1883
+ * Retrieves system shortcut types.
1884
+ * Based on `get_system_shortcut_types` from Python SDK.
1885
+ */
1886
+ getSystemShortcutTypes(): Promise<GetSystemShortcutTypesResponse>;
1887
+ /**
1888
+ * Retrieves system transaction payment types.
1889
+ * Based on `get_system_transaction_payment_types` from Python SDK.
1890
+ */
1891
+ getSystemTransactionPaymentTypes(): Promise<GetSystemTransactionPaymentTypesResponse>;
1892
+ /**
1893
+ * Retrieves system transaction purposes.
1894
+ * Based on `get_system_transaction_purposes` from Python SDK.
1895
+ */
1896
+ getSystemTransactionPurposes(): Promise<GetSystemTransactionPurposesResponse>;
1897
+ /**
1898
+ * Retrieves system transaction statuses.
1899
+ * Based on `get_system_transaction_statuses` from Python SDK.
1900
+ */
1901
+ getSystemTransactionStatuses(): Promise<GetSystemTransactionStatusesResponse>;
1110
1902
  /**
1111
1903
  * Gets an order by reference ID.
1112
1904
  *
@@ -1119,7 +1911,7 @@ declare class TapsilatSDK {
1119
1911
  * @throws {TapsilatNetworkError} When API request fails due to network issues
1120
1912
  * @throws {TapsilatError} When API returns an error response
1121
1913
  */
1122
- getOrder(referenceId: string): Promise<Order>;
1914
+ getOrder(referenceId: string): Promise<GetOrderResponse>;
1123
1915
  /**
1124
1916
  * Lists orders with pagination support.
1125
1917
  *
@@ -1131,15 +1923,7 @@ declare class TapsilatSDK {
1131
1923
  * @throws {TapsilatNetworkError} When API request fails due to network issues
1132
1924
  * @throws {TapsilatError} When API returns an error response
1133
1925
  */
1134
- getOrders(params?: {
1135
- page?: number;
1136
- per_page?: number;
1137
- start_date?: string;
1138
- end_date?: string;
1139
- status?: string;
1140
- organization_id?: string;
1141
- related_reference_id?: string;
1142
- }): Promise<PaginatedResponse<Order>>;
1926
+ getOrders(params?: GetOrdersRequest): Promise<GetOrdersResponse>;
1143
1927
  /**
1144
1928
  * Cancels an order by reference_id.
1145
1929
  *
@@ -1151,19 +1935,19 @@ declare class TapsilatSDK {
1151
1935
  * @throws {TapsilatValidationError} When referenceId is invalid
1152
1936
  * @throws {TapsilatError} When API returns an error response or order cannot be canceled
1153
1937
  */
1154
- cancelOrder(referenceId: string): Promise<Order>;
1938
+ cancelOrder(referenceId: string): Promise<CancelOrderResponse>;
1155
1939
  /**
1156
1940
  * Gets the current status of an order by reference ID
1157
1941
  *
1158
1942
  * @summary Retrieves real-time payment status and tracking information for a specific order
1159
1943
  * @description
1160
1944
  * Queries the Tapsilat payment platform to retrieve the current status of an order using its
1161
- * unique reference ID. This method provides real-time information about payment progress,
1162
- * completion status, and last update timestamp. It's essential for tracking payment flow
1945
+ * unique reference ID. This method provides real-time information about payment processing
1946
+ * status and error code (if returned by the API). It's essential for tracking payment flow
1163
1947
  * and implementing proper order state management in your application.
1164
1948
  *
1165
- * The status information includes payment state (CREATED, PENDING_PAYMENT, COMPLETED, CANCELLED),
1166
- * last update timestamp, and any relevant status metadata. This method should be used to:
1949
+ * The status information includes payment state and API-level error code metadata.
1950
+ * This method should be used to:
1167
1951
  * - Check if a payment has been completed after redirecting from checkout
1168
1952
  * - Monitor payment status for pending transactions
1169
1953
  * - Verify order state before fulfilling goods/services
@@ -1172,13 +1956,11 @@ declare class TapsilatSDK {
1172
1956
  * @param {string} referenceId - Unique order reference identifier from order creation
1173
1957
  *
1174
1958
  * @returns {Promise<OrderStatusResponse>} Promise resolving to current order status information
1175
- * @returns {string} OrderStatusResponse.referenceId - Echo of the provided reference ID
1176
- * @returns {string} OrderStatusResponse.status - Current payment status (CREATED, PENDING_PAYMENT, COMPLETED, CANCELLED, FAILED)
1177
- * @returns {string} OrderStatusResponse.lastUpdatedAt - ISO 8601 timestamp of last status change
1959
+ * @returns {string} [OrderStatusResponse.error_code] - API-level error code when present
1960
+ * @returns {string} [OrderStatusResponse.status] - Current payment processing status
1178
1961
  *
1179
1962
  * @throws {TapsilatValidationError} When input validation fails:
1180
1963
  * - Reference ID is null, undefined, or empty string
1181
- * - Reference ID format is invalid (should match order ID pattern)
1182
1964
  * @throws {TapsilatNetworkError} When network request fails:
1183
1965
  * - Connection timeout during status check
1184
1966
  * - DNS resolution failure
@@ -1214,19 +1996,35 @@ declare class TapsilatSDK {
1214
1996
  */
1215
1997
  refundAllOrder(referenceId: string): Promise<OrderRefundResponse>;
1216
1998
  /**
1217
- * Retrieves the payment details for an order.
1999
+ * Retrieves the payment details for an order via POST request.
1218
2000
  * Based on `get_order_payment_details` from the Python SDK.
1219
- *
1220
- * @summary Retrieve detailed payment transaction information for an order
1221
- * @description Gets payment method, amount, status, and card info for order transactions.
1222
- *
1223
- * @param referenceId - The unique identifier of the order.
1224
- * @param conversationId - Optional conversation ID for more specific querying.
1225
- * @returns Promise resolving to a list of payment details.
1226
- * @throws {TapsilatValidationError} When referenceId is invalid
1227
- * @throws {TapsilatError} When API returns an error response or payment details are missing
1228
2001
  */
1229
- getOrderPaymentDetails(referenceId: string, conversationId?: string): Promise<OrderPaymentDetail[]>;
2002
+ getOrderPaymentDetails(request: OrderPaymentDetailDTO): Promise<GetOrderPaymentDetailsResponse>;
2003
+ /**
2004
+ * Retrieves the payment details for an order by ID.
2005
+ * Based on `get_order_payment_details_by_id` from the Python SDK.
2006
+ */
2007
+ getOrderPaymentDetailsById(referenceId: string): Promise<GetOrderPaymentDetailsResponse>;
2008
+ /**
2009
+ * Retrieves the order callback via GET request.
2010
+ * Based on `order_callback` from the Python SDK.
2011
+ */
2012
+ orderCallback(id: string): Promise<OrderCallbackResponse>;
2013
+ /**
2014
+ * Updates payment options for an order.
2015
+ * Based on `update_payment_options` from the Python SDK.
2016
+ */
2017
+ updatePaymentOptions(request: OrderPaymentOptionsUpdateDTO): Promise<OrderRelatedUpdateResponse>;
2018
+ /**
2019
+ * Splits order item payment.
2020
+ * Based on `split_order_item_payment` from the Python SDK.
2021
+ */
2022
+ splitOrderItemPayment(request: SplitOrderItemPaymentDTO): Promise<OrderRelatedUpdateResponse>;
2023
+ /**
2024
+ * Queries vpos for an order.
2025
+ * Based on `order_vpos_query` from the Python SDK.
2026
+ */
2027
+ orderVposQuery(id: string): Promise<OrderVposQueryResponse>;
1230
2028
  /**
1231
2029
  * Gets an order by conversation_id.
1232
2030
  * Based on `get_order_by_conversation_id` from the Python SDK.
@@ -1239,7 +2037,7 @@ declare class TapsilatSDK {
1239
2037
  * @throws {TapsilatValidationError} When conversationId is invalid
1240
2038
  * @throws {TapsilatError} When API returns an error response
1241
2039
  */
1242
- getOrderByConversationId(conversationId: string): Promise<Order>;
2040
+ getOrderByConversationId(conversationId: string): Promise<GetOrderResponse>;
1243
2041
  /**
1244
2042
  * Gets order transactions by reference_id.
1245
2043
  * Based on `get_order_transactions` from the Python SDK.
@@ -1252,7 +2050,7 @@ declare class TapsilatSDK {
1252
2050
  * @throws {TapsilatValidationError} When referenceId is invalid
1253
2051
  * @throws {TapsilatError} When API returns an error response
1254
2052
  */
1255
- getOrderTransactions(referenceId: string): Promise<OrderTransaction[]>;
2053
+ getOrderTransactions(referenceId: string): Promise<GetOrderTransactionsResponse>;
1256
2054
  /**
1257
2055
  * Gets order submerchants with pagination.
1258
2056
  * Based on `get_order_submerchants` from the Python SDK.
@@ -1264,10 +2062,7 @@ declare class TapsilatSDK {
1264
2062
  * @returns Promise resolving to paginated list of submerchants
1265
2063
  * @throws {TapsilatError} When API returns an error response
1266
2064
  */
1267
- getOrderSubmerchants(params?: {
1268
- page?: number;
1269
- per_page?: number;
1270
- }): Promise<PaginatedResponse<OrderSubmerchant>>;
2065
+ getOrderSubmerchants(params?: GetOrderSubmerchantsRequest): Promise<GetOrderSubmerchantsResponse>;
1271
2066
  /**
1272
2067
  * Gets checkout URL for an order.
1273
2068
  * Based on `get_checkout_url` from the Python SDK.
@@ -1353,7 +2148,7 @@ declare class TapsilatSDK {
1353
2148
  * @throws {TapsilatValidationError} When input validation fails
1354
2149
  * @throws {TapsilatError} When API returns an error response
1355
2150
  */
1356
- createOrderTerm(termData: OrderPaymentTermCreateDTO): Promise<PaymentTermResponse>;
2151
+ createOrderTerm(termData: OrderPaymentTermCreateDTO): Promise<OrderPaymentTermActionResponse>;
1357
2152
  /**
1358
2153
  * Updates an existing payment term
1359
2154
  *
@@ -1376,7 +2171,7 @@ declare class TapsilatSDK {
1376
2171
  * @throws {TapsilatValidationError} When input validation fails
1377
2172
  * @throws {TapsilatError} When API returns an error response
1378
2173
  */
1379
- updateOrderTerm(updateData: OrderPaymentTermUpdateDTO): Promise<PaymentTermResponse>;
2174
+ updateOrderTerm(updateData: OrderPaymentTermUpdateDTO): Promise<OrderPaymentTermActionResponse>;
1380
2175
  /**
1381
2176
  * Deletes a payment term
1382
2177
  *
@@ -1392,7 +2187,7 @@ declare class TapsilatSDK {
1392
2187
  * @throws {TapsilatValidationError} When input validation fails
1393
2188
  * @throws {TapsilatError} When API returns an error response
1394
2189
  */
1395
- deleteOrderTerm(deleteData: PaymentTermDeleteRequest): Promise<PaymentTermResponse>;
2190
+ deleteOrderTerm(deleteData: PaymentTermDeleteRequest): Promise<OrderPaymentTermActionResponse>;
1396
2191
  /**
1397
2192
  * Refunds a specific payment term
1398
2193
  *
@@ -1447,17 +2242,97 @@ declare class TapsilatSDK {
1447
2242
  * @throws {TapsilatError} When API returns an error response
1448
2243
  */
1449
2244
  terminateOrder(terminateData: OrderTerminateRequest): Promise<OrderTerminateResponse>;
1450
- orderManualCallback(referenceId: string, conversationId?: string): Promise<APIResponse<unknown>>;
1451
- orderRelatedUpdate(referenceId: string, relatedReferenceId: string): Promise<APIResponse<unknown>>;
2245
+ orderManualCallback(referenceId: string, conversationId?: string): Promise<OrderManualCallbackResponse>;
2246
+ orderRelatedUpdate(referenceId: string, relatedReferenceId: string): Promise<OrderRelatedUpdateResponse>;
1452
2247
  getOrganizationSettings(): Promise<OrganizationSettings>;
1453
- getOrderTerm(termReferenceId: string): Promise<PaymentTermResponse>;
2248
+ getOrderTerm(termReferenceId: string): Promise<GetOrderTermResponse>;
2249
+ /**
2250
+ * Add a new item to an existing order basket
2251
+ */
2252
+ addBasketItem(request: AddBasketItemRequest): Promise<AddBasketItemResponse>;
2253
+ /**
2254
+ * Remove an item from an existing order basket
2255
+ */
2256
+ removeBasketItem(request: RemoveBasketItemRequest): Promise<RemoveBasketItemResponse>;
2257
+ /**
2258
+ * Update an existing item in an order basket
2259
+ */
2260
+ updateBasketItem(request: UpdateBasketItemRequest): Promise<UpdateBasketItemResponse>;
2261
+ /**
2262
+ * Retrieve organization callback (webhook) settings
2263
+ */
2264
+ getOrganizationCallback(): Promise<CallbackURLDTO>;
2265
+ /**
2266
+ * Update organization callback (webhook) settings
2267
+ */
2268
+ updateOrganizationCallback(request: CallbackURLDTO): Promise<OrganizationResponse>;
2269
+ /**
2270
+ * Create a new business entity within the organization
2271
+ */
2272
+ createOrganizationBusiness(request: OrgCreateBusinessRequest): Promise<OrgCreateBusinessResponse>;
2273
+ /**
2274
+ * Retrieve supported currencies for the organization
2275
+ */
2276
+ getOrganizationCurrencies(): Promise<GetOrganizationCurrenciesResponse>;
2277
+ /**
2278
+ * Retrieves organization currency presets.
2279
+ * Based on `get_organization_currency_presets` from Python SDK.
2280
+ */
2281
+ getOrganizationCurrencyPresets(): Promise<GetOrganizationCurrencyPresetsResponse>;
2282
+ /**
2283
+ * Retrieves organization suborganization details.
2284
+ * Based on `get_organization_suborganization_details` from Python SDK.
2285
+ */
2286
+ getOrganizationSuborganizationDetails(id: string): Promise<GetSuborganizationDetailsResponse>;
2287
+ /**
2288
+ * Retrieves organization suborganization submerchants.
2289
+ * Based on `get_organization_suborganization_submerchants` from Python SDK.
2290
+ */
2291
+ getOrganizationSuborganizationSubmerchants(id: string): Promise<GetSuborganizationSubmerchantsResponse>;
2292
+ /**
2293
+ * Retrieve limit information for a specific organization user
2294
+ */
2295
+ getOrganizationLimitUser(request: GetUserLimitRequest): Promise<GetUserLimitResponse>;
2296
+ /**
2297
+ * Set limit for a specific organization user
2298
+ */
2299
+ setOrganizationLimitUser(request: SetLimitUserRequest): Promise<SetLimitUserResponse>;
2300
+ /**
2301
+ * Retrieve organization overall limits
2302
+ */
2303
+ getOrganizationLimits(): Promise<GetOrganizationLimitsResponse>;
2304
+ /**
2305
+ * Retrieve meta information for the organization
2306
+ */
2307
+ getOrganizationMeta(name: string): Promise<GetMetaResponse>;
2308
+ /**
2309
+ * Retrieve supported scopes for the organization
2310
+ */
2311
+ getOrganizationScopes(): Promise<GetOrganizationScopesResponse>;
2312
+ /**
2313
+ * Retrieve list of sub-organizations
2314
+ */
2315
+ getOrganizationSuborganizations(params?: GetSuborganizationsRequest): Promise<GetSubOrganizationListResponse>;
2316
+ /**
2317
+ * Create a new user within the organization
2318
+ */
2319
+ createOrganizationUser(request: OrgCreateUserRequest): Promise<OrgCreateUserResponse>;
2320
+ /**
2321
+ * Verify an organization user
2322
+ */
2323
+ verifyOrganizationUser(request: OrgUserVerifyRequest): Promise<OrgUserVerifyResponse>;
2324
+ /**
2325
+ * Verify an organization user via mobile
2326
+ */
2327
+ verifyOrganizationUserMobile(request: OrgUserMobileVerifyRequest): Promise<OrgUserMobileVerifyResponse>;
2328
+ /**
2329
+ * List virtual POS terminals for the organization
2330
+ */
2331
+ listOrganizationVpos(request: GetVposRequest): Promise<GetVposResponse>;
1454
2332
  createSubscription(request: SubscriptionCreateRequest): Promise<SubscriptionCreateResponse>;
1455
2333
  getSubscription(request: SubscriptionGetRequest): Promise<SubscriptionDetail>;
1456
- listSubscriptions(params?: {
1457
- page?: number;
1458
- per_page?: number;
1459
- }): Promise<PaginatedResponse<SubscriptionDetail>>;
1460
- cancelSubscription(request: SubscriptionCancelRequest): Promise<APIResponse<unknown>>;
2334
+ listSubscriptions(params?: ListSubscriptionsRequest): Promise<ListSubscriptionsResponse>;
2335
+ cancelSubscription(request: SubscriptionCancelRequest): Promise<CancelSubscriptionResponse>;
1461
2336
  redirectSubscription(request: SubscriptionRedirectRequest): Promise<SubscriptionRedirectResponse>;
1462
2337
  }
1463
2338
 
@@ -1665,5 +2540,5 @@ declare function validateGsmNumber(gsmNumber: string | number): GsmValidationRes
1665
2540
  */
1666
2541
  declare function validateInstallments(installments: string | number | number[]): InstallmentsValidationResult;
1667
2542
 
1668
- export { ConfigManager, TapsilatAuthenticationError, TapsilatError, TapsilatNetworkError, TapsilatRateLimitError, TapsilatSDK, TapsilatValidationError, isValidCurrency, isValidPaymentMethod, isValidUrl, sanitizeMetadata, validateEmail, validateGsmNumber, validateInstallments, validatePaymentRequest };
1669
- export type { APIError, APIResponse, Address, BasketItem, BasketItemDTO, BasketItemPayerDTO, BillingAddress, BillingAddressDTO, Buyer, BuyerDTO, CheckoutDesignDTO, Currency, Customer, GsmValidationResult, InstallmentsValidationResult, Locale, MetadataDTO, Order, OrderAccountingRequest, OrderCardDTO, OrderCreateDTO, OrderCreateRequest, OrderCreateResponse, OrderPFSubMerchantDTO, OrderPaymentDetail, OrderPaymentTermCreateDTO, OrderPaymentTermUpdateDTO, OrderPostAuthRequest, OrderRefundRequest, OrderRefundResponse, OrderResponse, OrderStatusResponse, OrderSubmerchant, OrderTermRefundRequest, OrderTerminateRequest, OrderTerminateResponse, OrderTransaction, OrganizationSettings, PaginatedResponse, PaginationParams, PaymentMethod, PaymentOption, PaymentRequest, PaymentResponse, PaymentStatus, PaymentTermDTO, PaymentTermDeleteRequest, PaymentTermRefundResponse, PaymentTermResponse, PaymentTermTerminateRequest, RefundOrderDTO, RefundRequest, RefundResponse, ShippingAddressDTO, SubOrganizationDTO, SubmerchantDTO, SubscriptionBilling, SubscriptionCancelRequest, SubscriptionCreateRequest, SubscriptionCreateResponse, SubscriptionDetail, SubscriptionGetRequest, SubscriptionOrder, SubscriptionRedirectRequest, SubscriptionRedirectResponse, SubscriptionUser, TapsilatConfig, WebhookEvent };
2543
+ export { BusinessType, ConfigManager, TapsilatAuthenticationError, TapsilatError, TapsilatNetworkError, TapsilatRateLimitError, TapsilatSDK, TapsilatValidationError, isValidCurrency, isValidPaymentMethod, isValidUrl, sanitizeMetadata, validateEmail, validateGsmNumber, validateInstallments, validatePaymentRequest };
2544
+ export type { APIError, APIResponse, AddBasketItemRequest, AddBasketItemResponse, Address, BasketItem, BasketItemDTO, BasketItemPayerDTO, BasketItemPaymentDTO, BillingAddress, BillingAddressDTO, Buyer, BuyerDTO, CallbackURLDTO, CancelOrderRequest, CancelOrderResponse, CancelSubscriptionResponse, CheckoutDesignDTO, Currency, Customer, GetMetaResponse, GetOrderPaymentDetailsResponse, GetOrderResponse, GetOrderSubmerchantsRequest, GetOrderSubmerchantsResponse, GetOrderTermResponse, GetOrderTransactionsResponse, GetOrdersListItem, GetOrdersRequest, GetOrdersResponse, GetOrganizationCurrenciesResponse, GetOrganizationLimitsResponse, GetOrganizationScopesResponse, GetSubOrganizationListResponse, GetSuborganizationsRequest, GetSystemOrderStatusesResponse, GetUserLimitRequest, GetUserLimitResponse, GetVposRequest, GetVposResponse, GsmValidationResult, InstallmentsValidationResult, ListSubscriptionsRequest, ListSubscriptionsResponse, Locale, MetadataDTO, Order, OrderAccountingRequest, OrderAccountingResponse, OrderCardDTO, OrderCreateDTO, OrderCreateRequest, OrderCreateResponse, OrderManualCallbackRequest, OrderManualCallbackResponse, OrderPFSubMerchantDTO, OrderPaymentDetail, OrderPaymentDetailDTO, OrderPaymentTermActionResponse, OrderPaymentTermCreateDTO, OrderPaymentTermUpdateDTO, OrderPostAuthRequest, OrderPostAuthResponse, OrderRefundRequest, OrderRefundResponse, OrderRelatedUpdateRequest, OrderRelatedUpdateResponse, OrderResponse, OrderStatusResponse, OrderSubmerchant, OrderTermRefundRequest, OrderTerminateRequest, OrderTerminateResponse, OrderTransaction, OrgCreateBusinessRequest, OrgCreateBusinessResponse, OrgCreateUserReq, OrgCreateUserRequest, OrgCreateUserResponse, OrgUserMobileVerifyReq, OrgUserMobileVerifyRequest, OrgUserMobileVerifyResponse, OrgUserVerifyReq, OrgUserVerifyRequest, OrgUserVerifyResponse, OrganizationResponse, OrganizationSettings, PaginatedResponse, PaginationParams, PaymentMethod, PaymentOption, PaymentRequest, PaymentResponse, PaymentStatus, PaymentTermDTO, PaymentTermDeleteRequest, PaymentTermRefundResponse, PaymentTermResponse, PaymentTermTerminateRequest, RefundAllOrderDTO, RefundOrderDTO, RefundRequest, RefundResponse, RemoveBasketItemRequest, RemoveBasketItemResponse, SetLimitUserRequest, SetLimitUserResponse, ShippingAddressDTO, SubOrganizationDTO, SubmerchantDTO, SubscriptionBilling, SubscriptionCancelRequest, SubscriptionCreateRequest, SubscriptionCreateResponse, SubscriptionDetail, SubscriptionGetRequest, SubscriptionListItem, SubscriptionOrder, SubscriptionRedirectRequest, SubscriptionRedirectResponse, SubscriptionUser, SystemOrderStatus, TapsilatConfig, TimestampDTO, UpdateBasketItemRequest, UpdateBasketItemResponse, WebhookEvent };