@crediblemark/buayar 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -18
- package/dist/cli/index.js +1 -1
- package/dist/index.d.mts +77 -17
- package/dist/index.d.ts +77 -17
- package/dist/index.js +213 -229
- package/dist/index.mjs +213 -229
- package/docs/guide.md +19 -19
- package/docs/ipaymu.md +295 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,30 +32,30 @@
|
|
|
32
32
|
|
|
33
33
|
| Provider | Status | Redirect | Direct API | Webhook | Client |
|
|
34
34
|
|---|:---:|:---:|:---:|:---:|:---:|
|
|
35
|
-
| Midtrans |
|
|
36
|
-
| Duitku |
|
|
35
|
+
| Midtrans | - | ✅ Snap | ✅ Core API | SHA-512 | `MidtransClient` |
|
|
36
|
+
| Duitku | - | ✅ | ✅ | MD5 | `DuitkuClient` |
|
|
37
37
|
| iPaymu | Tested | ✅ | ✅ | HMAC-SHA256 | `IpaymuClient` |
|
|
38
|
-
| Xendit |
|
|
39
|
-
| DOKU Jokul |
|
|
40
|
-
| PrismaLink |
|
|
41
|
-
| Faspay |
|
|
42
|
-
| Finpay |
|
|
43
|
-
| Nicepay |
|
|
44
|
-
| OY! Bisnis |
|
|
38
|
+
| Xendit | - | ✅ Invoice v2 | ✅ Payments v3 | Token | `XenditClient` |
|
|
39
|
+
| DOKU Jokul | - | ✅ v1 | ✅ v2 | HMAC-SHA256 | `DokuClient` |
|
|
40
|
+
| PrismaLink | - | ✅ | ✅ | SHA-256 | `PrismalinkClient` |
|
|
41
|
+
| Faspay | - | ✅ | ✅ | SHA1(MD5) | `FaspayClient` |
|
|
42
|
+
| Finpay | - | ✅ | ✅ | HMAC-SHA512 | `FinpayClient` |
|
|
43
|
+
| Nicepay | - | ✅ | ✅ | SHA-256 | `NicepayClient` |
|
|
44
|
+
| OY! Bisnis | - | ✅ | ✅ | Header Auth | `OyClient` |
|
|
45
45
|
|
|
46
46
|
#### 🌍 International (9)
|
|
47
47
|
|
|
48
48
|
| Provider | Status | Redirect | Direct API | Webhook | Client |
|
|
49
49
|
|---|:---:|:---:|:---:|:---:|:---:|
|
|
50
|
-
| Stripe |
|
|
51
|
-
| PayPal |
|
|
52
|
-
| Adyen |
|
|
53
|
-
| Checkout.com |
|
|
54
|
-
| Razorpay |
|
|
55
|
-
| Square |
|
|
56
|
-
| PayU |
|
|
57
|
-
| Braintree |
|
|
58
|
-
| 2Checkout |
|
|
50
|
+
| Stripe | - | ✅ Checkout Sessions | ✅ Payment Intents | HMAC-SHA256 | `StripeClient` |
|
|
51
|
+
| PayPal | - | ✅ Orders v2 | ✅ Capture | OAuth2 | `PaypalClient` |
|
|
52
|
+
| Adyen | - | ✅ Sessions v68 | ✅ Payments v68 | HMAC-SHA256 | `AdyenClient` |
|
|
53
|
+
| Checkout.com | - | ✅ Payment Links | ✅ Payments API | HMAC-SHA256 | `CheckoutComClient` |
|
|
54
|
+
| Razorpay | - | ✅ Payment Links | ✅ Orders API | HMAC-SHA256 | `RazorpayClient` |
|
|
55
|
+
| Square | - | ✅ Payment Links | ✅ Payments API | HMAC-SHA256 | `SquareClient` |
|
|
56
|
+
| PayU | - | ✅ Orders v2.1 | ✅ Pay Methods | MD5/SHA-256 | `PayuClient` |
|
|
57
|
+
| Braintree | - | ✅ Drop-in UI Token | ✅ Transaction API | SHA1 HMAC | `BraintreeClient` |
|
|
58
|
+
| 2Checkout | - | ✅ REST v6.0 | ✅ REST v6.0 | IPN MD5 | `TwoCheckoutClient` |
|
|
59
59
|
|
|
60
60
|
### ⚙️ Environment Variables
|
|
61
61
|
|
package/dist/cli/index.js
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type CanonicalPaymentMethod = "bca_va" | "mandiri_va" | "bni_va" | "bri_va" | "permata_va" | "cimb_va" | "danamon_va" | "bsi_va" | "seabank_va" | "muamalat_va" | "bag_va" | "artajasa_va" | "qris" | "gopay_qris" | "shopeepay_qris" | "nobu_qris" | "gopay" | "shopeepay" | "ovo" | "dana" | "linkaja" | "jenius" | "alfamart" | "indomaret" | "pos" | "credit_card" | "kredivo" | "akulaku" | "indodana" | string;
|
|
1
|
+
type CanonicalPaymentMethod = "bca_va" | "mandiri_va" | "bni_va" | "bri_va" | "permata_va" | "cimb_va" | "danamon_va" | "bsi_va" | "seabank_va" | "muamalat_va" | "bag_va" | "btn_va" | "artajasa_va" | "qris" | "gopay_qris" | "shopeepay_qris" | "nobu_qris" | "gopay" | "shopeepay" | "ovo" | "dana" | "linkaja" | "jenius" | "alfamart" | "indomaret" | "pos" | "credit_card" | "kredivo" | "akulaku" | "indodana" | "cod" | string;
|
|
2
2
|
|
|
3
3
|
interface CustomerDetails {
|
|
4
4
|
name: string;
|
|
@@ -48,6 +48,11 @@ interface CreateInvoiceParams {
|
|
|
48
48
|
width?: number;
|
|
49
49
|
height?: number;
|
|
50
50
|
}>;
|
|
51
|
+
/**
|
|
52
|
+
* Nomor sub-account / child account tujuan split payment (didukung iPaymu dll).
|
|
53
|
+
* Pada iPaymu, diisi nomor Virtual Account (VA) child account milik agen / reseller / mitra.
|
|
54
|
+
*/
|
|
55
|
+
subAccountId?: string;
|
|
51
56
|
/** Parameter kustom tambahan untuk provider spesifik (opsional) */
|
|
52
57
|
providerParams?: any;
|
|
53
58
|
/** Konfigurasi atau data kustom tambahan untuk provider (opsional) */
|
|
@@ -657,11 +662,15 @@ declare class IpaymuClient {
|
|
|
657
662
|
*/
|
|
658
663
|
checkTransaction(transactionId: string | number): Promise<any>;
|
|
659
664
|
/**
|
|
660
|
-
* Ambil daftar channel pembayaran aktif milik merchant
|
|
665
|
+
* Ambil daftar channel pembayaran aktif milik merchant (Official v2: GET /payment-channels)
|
|
661
666
|
*/
|
|
662
667
|
getPaymentMethods(): Promise<any>;
|
|
663
668
|
/**
|
|
664
|
-
*
|
|
669
|
+
* Alias untuk getPaymentMethods (Official v2)
|
|
670
|
+
*/
|
|
671
|
+
getPaymentChannels(): Promise<any>;
|
|
672
|
+
/**
|
|
673
|
+
* Ambil riwayat transaksi merchant berpaginasi (Official v2: POST /history)
|
|
665
674
|
*/
|
|
666
675
|
getHistory(params?: {
|
|
667
676
|
page?: number;
|
|
@@ -671,39 +680,90 @@ declare class IpaymuClient {
|
|
|
671
680
|
start_date?: string;
|
|
672
681
|
end_date?: string;
|
|
673
682
|
bulkId?: string[];
|
|
683
|
+
[key: string]: any;
|
|
674
684
|
}): Promise<any>;
|
|
675
685
|
/**
|
|
676
|
-
* Ambil daftar seluruh bank di Indonesia
|
|
686
|
+
* Ambil daftar seluruh bank di Indonesia (Official v2: POST /banklist)
|
|
677
687
|
*/
|
|
678
688
|
getBankList(): Promise<any>;
|
|
679
689
|
/**
|
|
680
|
-
*
|
|
690
|
+
* Cari jangkauan area pengiriman COD (Official v2: GET /cod/area?area=keyword)
|
|
681
691
|
*/
|
|
682
|
-
getCodArea(
|
|
692
|
+
getCodArea(area: string): Promise<any>;
|
|
683
693
|
/**
|
|
684
|
-
* Hitung tarif ongkir pengiriman COD
|
|
694
|
+
* Hitung tarif ongkir pengiriman COD (Official v2: POST /cod/shipping-calculate)
|
|
685
695
|
*/
|
|
686
696
|
getCodRate(params: {
|
|
687
|
-
|
|
688
|
-
|
|
697
|
+
pickup_area_id?: string | number;
|
|
698
|
+
destination_area_id?: string | number;
|
|
699
|
+
pickupArea?: string | number;
|
|
700
|
+
deliveryArea?: string | number;
|
|
689
701
|
weight: number;
|
|
690
|
-
|
|
691
|
-
length?: number;
|
|
692
|
-
width?: number;
|
|
702
|
+
amount?: number;
|
|
693
703
|
[key: string]: any;
|
|
694
704
|
}): Promise<any>;
|
|
695
705
|
/**
|
|
696
|
-
* Request pickup kurir COD
|
|
706
|
+
* Request pickup kurir COD (Official v2: POST /cod/pickup)
|
|
697
707
|
*/
|
|
698
|
-
getCodPickup(params:
|
|
708
|
+
getCodPickup(params: {
|
|
709
|
+
transaction_id?: string | number;
|
|
710
|
+
transactionId?: string | number;
|
|
711
|
+
pickup_date: string;
|
|
712
|
+
pickup_time: string;
|
|
713
|
+
pickup_vehicle: "Motor" | "Mobil" | string;
|
|
714
|
+
[key: string]: any;
|
|
715
|
+
}): Promise<any>;
|
|
699
716
|
/**
|
|
700
|
-
*
|
|
717
|
+
* Unduh label pengiriman / AWB COD (Official v2: GET /cod/download-label/:transaction_id)
|
|
701
718
|
*/
|
|
702
719
|
getCodAwb(transactionId: string | number): Promise<any>;
|
|
703
720
|
/**
|
|
704
|
-
* Lacak status pengiriman kurir berdasarkan no resi / AWB
|
|
721
|
+
* Lacak status pengiriman kurir COD berdasarkan no resi / AWB (Official v2: POST /cod/tracking)
|
|
722
|
+
*/
|
|
723
|
+
getCodTracking(params: string | {
|
|
724
|
+
awb: string;
|
|
725
|
+
transaction_id?: string | number;
|
|
726
|
+
transactionId?: string | number;
|
|
727
|
+
}): Promise<any>;
|
|
728
|
+
/**
|
|
729
|
+
* Ambil daftar seluruh provinsi di Indonesia
|
|
730
|
+
*/
|
|
731
|
+
getAreasProvince(): Promise<any>;
|
|
732
|
+
/**
|
|
733
|
+
* Ambil daftar kota / kabupaten berdasarkan ID provinsi
|
|
734
|
+
*/
|
|
735
|
+
getAreasCity(provinceId: string | number): Promise<any>;
|
|
736
|
+
/**
|
|
737
|
+
* Ambil daftar kecamatan berdasarkan ID kota / kabupaten
|
|
738
|
+
*/
|
|
739
|
+
getAreasDistrict(cityId: string | number): Promise<any>;
|
|
740
|
+
/**
|
|
741
|
+
* Ambil daftar kelurahan berdasarkan ID kecamatan
|
|
705
742
|
*/
|
|
706
|
-
|
|
743
|
+
getAreasVillage(districtId: string | number): Promise<any>;
|
|
744
|
+
/**
|
|
745
|
+
* Daftarkan agen / reseller / mitra baru untuk Split Payment (Single Register API: POST /api/v2/register)
|
|
746
|
+
* Mengembalikan VA child account yang siap digunakan untuk parameter `subAccountId` saat membuat transaksi.
|
|
747
|
+
*/
|
|
748
|
+
registerUser(params: {
|
|
749
|
+
name: string;
|
|
750
|
+
email: string;
|
|
751
|
+
phone: string;
|
|
752
|
+
password?: string;
|
|
753
|
+
[key: string]: any;
|
|
754
|
+
}): Promise<{
|
|
755
|
+
Status: number;
|
|
756
|
+
Success: boolean;
|
|
757
|
+
Message: string;
|
|
758
|
+
Data: {
|
|
759
|
+
Email: string;
|
|
760
|
+
Phone: string;
|
|
761
|
+
Va: string;
|
|
762
|
+
VaName: string;
|
|
763
|
+
IsNewUser: boolean;
|
|
764
|
+
Notes?: string;
|
|
765
|
+
};
|
|
766
|
+
}>;
|
|
707
767
|
}
|
|
708
768
|
|
|
709
769
|
interface XenditDisbursementParams {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type CanonicalPaymentMethod = "bca_va" | "mandiri_va" | "bni_va" | "bri_va" | "permata_va" | "cimb_va" | "danamon_va" | "bsi_va" | "seabank_va" | "muamalat_va" | "bag_va" | "artajasa_va" | "qris" | "gopay_qris" | "shopeepay_qris" | "nobu_qris" | "gopay" | "shopeepay" | "ovo" | "dana" | "linkaja" | "jenius" | "alfamart" | "indomaret" | "pos" | "credit_card" | "kredivo" | "akulaku" | "indodana" | string;
|
|
1
|
+
type CanonicalPaymentMethod = "bca_va" | "mandiri_va" | "bni_va" | "bri_va" | "permata_va" | "cimb_va" | "danamon_va" | "bsi_va" | "seabank_va" | "muamalat_va" | "bag_va" | "btn_va" | "artajasa_va" | "qris" | "gopay_qris" | "shopeepay_qris" | "nobu_qris" | "gopay" | "shopeepay" | "ovo" | "dana" | "linkaja" | "jenius" | "alfamart" | "indomaret" | "pos" | "credit_card" | "kredivo" | "akulaku" | "indodana" | "cod" | string;
|
|
2
2
|
|
|
3
3
|
interface CustomerDetails {
|
|
4
4
|
name: string;
|
|
@@ -48,6 +48,11 @@ interface CreateInvoiceParams {
|
|
|
48
48
|
width?: number;
|
|
49
49
|
height?: number;
|
|
50
50
|
}>;
|
|
51
|
+
/**
|
|
52
|
+
* Nomor sub-account / child account tujuan split payment (didukung iPaymu dll).
|
|
53
|
+
* Pada iPaymu, diisi nomor Virtual Account (VA) child account milik agen / reseller / mitra.
|
|
54
|
+
*/
|
|
55
|
+
subAccountId?: string;
|
|
51
56
|
/** Parameter kustom tambahan untuk provider spesifik (opsional) */
|
|
52
57
|
providerParams?: any;
|
|
53
58
|
/** Konfigurasi atau data kustom tambahan untuk provider (opsional) */
|
|
@@ -657,11 +662,15 @@ declare class IpaymuClient {
|
|
|
657
662
|
*/
|
|
658
663
|
checkTransaction(transactionId: string | number): Promise<any>;
|
|
659
664
|
/**
|
|
660
|
-
* Ambil daftar channel pembayaran aktif milik merchant
|
|
665
|
+
* Ambil daftar channel pembayaran aktif milik merchant (Official v2: GET /payment-channels)
|
|
661
666
|
*/
|
|
662
667
|
getPaymentMethods(): Promise<any>;
|
|
663
668
|
/**
|
|
664
|
-
*
|
|
669
|
+
* Alias untuk getPaymentMethods (Official v2)
|
|
670
|
+
*/
|
|
671
|
+
getPaymentChannels(): Promise<any>;
|
|
672
|
+
/**
|
|
673
|
+
* Ambil riwayat transaksi merchant berpaginasi (Official v2: POST /history)
|
|
665
674
|
*/
|
|
666
675
|
getHistory(params?: {
|
|
667
676
|
page?: number;
|
|
@@ -671,39 +680,90 @@ declare class IpaymuClient {
|
|
|
671
680
|
start_date?: string;
|
|
672
681
|
end_date?: string;
|
|
673
682
|
bulkId?: string[];
|
|
683
|
+
[key: string]: any;
|
|
674
684
|
}): Promise<any>;
|
|
675
685
|
/**
|
|
676
|
-
* Ambil daftar seluruh bank di Indonesia
|
|
686
|
+
* Ambil daftar seluruh bank di Indonesia (Official v2: POST /banklist)
|
|
677
687
|
*/
|
|
678
688
|
getBankList(): Promise<any>;
|
|
679
689
|
/**
|
|
680
|
-
*
|
|
690
|
+
* Cari jangkauan area pengiriman COD (Official v2: GET /cod/area?area=keyword)
|
|
681
691
|
*/
|
|
682
|
-
getCodArea(
|
|
692
|
+
getCodArea(area: string): Promise<any>;
|
|
683
693
|
/**
|
|
684
|
-
* Hitung tarif ongkir pengiriman COD
|
|
694
|
+
* Hitung tarif ongkir pengiriman COD (Official v2: POST /cod/shipping-calculate)
|
|
685
695
|
*/
|
|
686
696
|
getCodRate(params: {
|
|
687
|
-
|
|
688
|
-
|
|
697
|
+
pickup_area_id?: string | number;
|
|
698
|
+
destination_area_id?: string | number;
|
|
699
|
+
pickupArea?: string | number;
|
|
700
|
+
deliveryArea?: string | number;
|
|
689
701
|
weight: number;
|
|
690
|
-
|
|
691
|
-
length?: number;
|
|
692
|
-
width?: number;
|
|
702
|
+
amount?: number;
|
|
693
703
|
[key: string]: any;
|
|
694
704
|
}): Promise<any>;
|
|
695
705
|
/**
|
|
696
|
-
* Request pickup kurir COD
|
|
706
|
+
* Request pickup kurir COD (Official v2: POST /cod/pickup)
|
|
697
707
|
*/
|
|
698
|
-
getCodPickup(params:
|
|
708
|
+
getCodPickup(params: {
|
|
709
|
+
transaction_id?: string | number;
|
|
710
|
+
transactionId?: string | number;
|
|
711
|
+
pickup_date: string;
|
|
712
|
+
pickup_time: string;
|
|
713
|
+
pickup_vehicle: "Motor" | "Mobil" | string;
|
|
714
|
+
[key: string]: any;
|
|
715
|
+
}): Promise<any>;
|
|
699
716
|
/**
|
|
700
|
-
*
|
|
717
|
+
* Unduh label pengiriman / AWB COD (Official v2: GET /cod/download-label/:transaction_id)
|
|
701
718
|
*/
|
|
702
719
|
getCodAwb(transactionId: string | number): Promise<any>;
|
|
703
720
|
/**
|
|
704
|
-
* Lacak status pengiriman kurir berdasarkan no resi / AWB
|
|
721
|
+
* Lacak status pengiriman kurir COD berdasarkan no resi / AWB (Official v2: POST /cod/tracking)
|
|
722
|
+
*/
|
|
723
|
+
getCodTracking(params: string | {
|
|
724
|
+
awb: string;
|
|
725
|
+
transaction_id?: string | number;
|
|
726
|
+
transactionId?: string | number;
|
|
727
|
+
}): Promise<any>;
|
|
728
|
+
/**
|
|
729
|
+
* Ambil daftar seluruh provinsi di Indonesia
|
|
730
|
+
*/
|
|
731
|
+
getAreasProvince(): Promise<any>;
|
|
732
|
+
/**
|
|
733
|
+
* Ambil daftar kota / kabupaten berdasarkan ID provinsi
|
|
734
|
+
*/
|
|
735
|
+
getAreasCity(provinceId: string | number): Promise<any>;
|
|
736
|
+
/**
|
|
737
|
+
* Ambil daftar kecamatan berdasarkan ID kota / kabupaten
|
|
738
|
+
*/
|
|
739
|
+
getAreasDistrict(cityId: string | number): Promise<any>;
|
|
740
|
+
/**
|
|
741
|
+
* Ambil daftar kelurahan berdasarkan ID kecamatan
|
|
705
742
|
*/
|
|
706
|
-
|
|
743
|
+
getAreasVillage(districtId: string | number): Promise<any>;
|
|
744
|
+
/**
|
|
745
|
+
* Daftarkan agen / reseller / mitra baru untuk Split Payment (Single Register API: POST /api/v2/register)
|
|
746
|
+
* Mengembalikan VA child account yang siap digunakan untuk parameter `subAccountId` saat membuat transaksi.
|
|
747
|
+
*/
|
|
748
|
+
registerUser(params: {
|
|
749
|
+
name: string;
|
|
750
|
+
email: string;
|
|
751
|
+
phone: string;
|
|
752
|
+
password?: string;
|
|
753
|
+
[key: string]: any;
|
|
754
|
+
}): Promise<{
|
|
755
|
+
Status: number;
|
|
756
|
+
Success: boolean;
|
|
757
|
+
Message: string;
|
|
758
|
+
Data: {
|
|
759
|
+
Email: string;
|
|
760
|
+
Phone: string;
|
|
761
|
+
Va: string;
|
|
762
|
+
VaName: string;
|
|
763
|
+
IsNewUser: boolean;
|
|
764
|
+
Notes?: string;
|
|
765
|
+
};
|
|
766
|
+
}>;
|
|
707
767
|
}
|
|
708
768
|
|
|
709
769
|
interface XenditDisbursementParams {
|