File size: 604 Bytes
b59aa07
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { delay, http, HttpResponse } from "msw";

export const STRIPE_BILLING_HANDLERS = [
  http.get("/api/billing/credits", async () => {
    await delay();
    return HttpResponse.json({ credits: "100" });
  }),

  http.post("/api/billing/create-checkout-session", async () => {
    await delay();
    return HttpResponse.json({
      redirect_url: "https://stripe.com/some-checkout",
    });
  }),

  http.post("/api/billing/create-customer-setup-session", async () => {
    await delay();
    return HttpResponse.json({
      redirect_url: "https://stripe.com/some-customer-setup",
    });
  }),
];