@mitumba/sdk 1.27.1 → 1.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -5
- package/dist/index.d.mts +218 -131
- package/dist/index.d.ts +218 -131
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -1
package/dist/index.mjs
CHANGED
|
@@ -723,12 +723,36 @@ var PayModule = class {
|
|
|
723
723
|
async initPaystack(input, options) {
|
|
724
724
|
return this.client.post("/pay/paystack/init", input, options);
|
|
725
725
|
}
|
|
726
|
+
/**
|
|
727
|
+
* Initiate a provider-neutral checkout for an order.
|
|
728
|
+
*
|
|
729
|
+
* The payment provider is selected by the API. Continue checkout using the
|
|
730
|
+
* returned next action, then poll {@link getCheckoutStatus} for payment state.
|
|
731
|
+
* Retrying after cancellation requires the same input and idempotency key.
|
|
732
|
+
*
|
|
733
|
+
* @param input - Order, idempotency key, and buyer-selected payment method.
|
|
734
|
+
* @param options - Request options, including an optional abort signal.
|
|
735
|
+
* @returns The initiated attempt and its required continuation action.
|
|
736
|
+
* @throws {APIError} When the API rejects or cannot initiate the checkout.
|
|
737
|
+
*/
|
|
738
|
+
async initiateCheckout(input, options) {
|
|
739
|
+
return this.client.post("/pay/checkout/initiate", input, options);
|
|
740
|
+
}
|
|
726
741
|
/**
|
|
727
742
|
* Poll for the current status of a payment by its order ID.
|
|
743
|
+
*
|
|
744
|
+
* @deprecated Use {@link getCheckoutStatus} for the typed checkout lifecycle.
|
|
745
|
+
* This method retains its legacy route and response for compatibility.
|
|
728
746
|
*/
|
|
729
747
|
async getStatus(orderId, options) {
|
|
730
748
|
return this.client.get(`/pay/status/${orderId}`, void 0, options);
|
|
731
749
|
}
|
|
750
|
+
/**
|
|
751
|
+
* Get the buyer-visible checkout lifecycle for a retail or bale order.
|
|
752
|
+
*/
|
|
753
|
+
async getCheckoutStatus(orderId, options) {
|
|
754
|
+
return this.client.get(`/pay/checkout-status/${orderId}`, void 0, options);
|
|
755
|
+
}
|
|
732
756
|
};
|
|
733
757
|
|
|
734
758
|
// src/modules/vazi.ts
|