export type GetApiMntfeeServicesV2MaintenancefeePaymentsuccessReceiptIdArgs = {receiptId: string}; export type GetApiMntfeeServicesV2MaintenancefeePaymentsuccessReceiptIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Acknowledges the receipt id and redirect the users back to the storefront * * GET /mntfee-services/v2/maintenancefee/paymentsuccess/{receiptId} */ export const getApiMntfeeServicesV2MaintenancefeePaymentsuccessReceiptId = async (args: GetApiMntfeeServicesV2MaintenancefeePaymentsuccessReceiptIdArgs, options: GetApiMntfeeServicesV2MaintenancefeePaymentsuccessReceiptIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/mntfee-services/v2/maintenancefee/paymentsuccess/${encodeURIComponent(String(args.receiptId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };