1import { GetPaymentLink } from "@distilled.cloud/stripe/stripe";
2import * as Layer from "effect/Layer";
3import { RetrievePaymentLink } from "./RetrievePaymentLink.ts";
4import { makeHttpStripeIdBinding } from "./StripeHttp.ts";
5
6/**
7 * HTTP implementation of {@link RetrievePaymentLink}. Provide it on the
8 * Function or Worker Effect.
9 *
10 * @layer
11 * @product Checkout
12 * @provides Stripe.RetrievePaymentLink
13 */
14export const RetrievePaymentLinkHttp = Layer.effect(
15 RetrievePaymentLink,
16 makeHttpStripeIdBinding({
17 tag: "Stripe.RetrievePaymentLink",
18 operation: GetPaymentLink,
19 idField: "payment_link",
20 permissions: ["payment_links_read"],
21 }),
22);