Using payment links
Making payment links
Payment links reference one or many product (called items). You can add additional configurations such as pre-filling the email, passing in a reference-id or hiding the cart to the links by appending the details to the end of the URL.
Payment link for a single product (item) purchase
New product
See the products page for more details how on products work.
If you are collecting payment for a new product, you need to create the item in Loop. Call the POST Items endpoint, passing in the amount
, name
and frequencyCount
where 0
is used for a one-time purchase and any number great than 0
denotes a subscription and set the autoinvoce:true.
By default, each item will accept all tokens on every network the entity has configured. This default token list can be overridden by specifying a subset of that list per item.
The response will contain the payment link in the URL
parameter.
Existing product
If you already created the product, you can use the GET Items endpoint and retrieve the payment link in the response. The parameter is called URL
.
Payment links for a multi-product purchase
You can append multiple itemIds
together so that one payment link results in the purchase of multiple products. This includes combining multiple subscription products, one-time purchases or a combination of both (i.e. subscription(s) with one or many one-time payment). When combining multiple subscriptions, they must have the same billing frequency (i.e. monthly, yearly, etc.) and accept at least one of the same token/network pairs. Payment links will only display the token/network pairs that are accepted by all the products.
For example:
<https://checkout.loopcrypto.xyz/><entity-id>/<item-id>?item_id=<item_id>,<item_id>,...
Since you will need the itemIds
you will first have to create the product in Loop using the POST Items endpoint or retrieve an existing item using the GET Items endpoint.
Updated about 1 month ago