Skip to main content
A payment link is a page a shopper opens to pay for set items with an HSA/FSA card. These are the links the merchant app shows under Payments. The roots are experimental: add @experimental to each one. Reads need the payments_read scope and writes need payments_write. HSA/FSA payments must be on for the store, which fails with PAYMENTS_NOT_ENABLED otherwise, and links need a Shopify store: a store without one has no links, and a write fails with HSA_PAYMENT_LINKS_REQUIRE_SHOPIFY.

1. Find the products to sell

A line takes a Product id. Read them with products (products_read): a line needs a live Shopify variant priced in USD whose HSA/FSA eligibility Redo knows. Amounts are MoneyInput values in USD. Fields you leave out take the merchant app’s defaults: a single-use link expires 15 days after it is created, and a reusable one never expires and lets the shopper change quantities.
A link the rules refuse fails with INVALID_HSA_PAYMENT_LINK, its message naming the field: for example a discount larger than the items, or a total below $2.00.

3. Share its url

Send the shopper the link’s url as given. While its state is ACTIVE, shoppers can pay it.

4. Read its payments

hsaPaymentLink returns paidCount and paidAmount for the whole link.

5. Turn it off

New shoppers can’t pay a link that is off. A checkout a shopper already started can still be paid.

6. Delete it

Only a link that is off or expired, took no payment, and has no checkout a shopper may still pay can be deleted. Read deleteBlockedReason first: it is null when the link can be deleted. hsaPaymentLinkDelete returns true once the link is gone, and fails with HSA_PAYMENT_LINK_DELETE_BLOCKED when it can’t be deleted. A link that took a payment keeps the record of it, so turn it off instead.