GET /dialog/buy

Returns a HTML-based dialog that starts a checkout process for a single item using a direct payment though a supported payment method.

Example URLs:

Available via

HTTPS

Parameters

article_id (required)

An unique, service consumer assigned identifier for the current article. Can be any UTF-8 string (☃ [Unicode Snowman] is not allowed) less than 200 characters long. This is subsequently used in calls to /access.

pricing (required)

A tuple of currency code and price matching your region. Examples: "EUR100" or "USD220". This translates to 1,00EUR or 2.20USD.

Note

To comply with EU regulations, all prices in the EU instance are regarded as including VAT by LaterPay. Otherwise the prices in the USA instance are tax-exclusive of any VAT or sales tax.

For example, if you provide a ‘price’ of 5.00 € on the EU instance, the user will always pay 5.00 €, as this price includes VAT. This amount can include a different VAT amount depending on the user’s country.

If you provide a ‘price’ of $5.00 on the U.S. instance, users will always pay $5.00 plus the applicable sales tax or VAT, depending on their state or country.

title (required)

The item title displayed next to the price inside the dialog. This must be descriptive of what the user is buying (for example, the article’s headline or the item’s full name).

url (required)

The URL where the user is sent after they successfully purchased `article_id`, i.e. probably the article itself. This is the url associated with purchased article title that users can view on their invoice in user backend i.e. this is a canonical url of the article. return_url parameter can be used to change where the user is redirected after a successful purchase.

failure_url

The URL where the user is sent when the purchase fails. This will receive additional information on the failure in a future release.

return_url

An optional URL where the user is sent when the purchase succeeds if it is provided. Use this to add additional private parameters to the successful purchase request, e.g. a hash of the user’s IP address for verification on your server.

return_lptoken

If this parameter is present and its value is 1, an lptoken will be created for the user and will be appended as a query parameter to the URL the user will be redirected to after successful purchase. See how to receive user tokens here.

muid

Merchant Provided User ID. If provided then LaterPay user’s identity will be bound to its value upon user interacting with the dialog. Merchant will be able to use a muid parameter to /access.

consumable (Deprecated and ignored)

Either 1 or 0 (default). Marks the sold content as “consumable” content. It will not be tracked through /access.

tref (Deprecated and ignored)

Required if consumable==1, ignored otherwise). A unique service consumer assigned transaction ID. The ID must be unique within your own system and can’t be reused. This ID can subsequently be used to query the transaction’s state. This is the only way of tracking consumable items.

renewable

Either 1 or 0 (default). When set to 1, an expiring item is marked as renewable. Only expiring items with relative expiry can be marked as renewable. Users will be able to continuously and indefinitely purchase renewals of that expiring item for the same price before the previous one expires. Renewal links are sent to users via email notification and are listed in their LaterPay user account.

expiry

Specifies when access to the purchased item will expire. This can be either: An absolute timestamp as number of seconds since the unix epoch (e.g. 1483228800 for 2017-01-01T00:00:00 +00:00), OR: A relative value as number of seconds prefixed by a plus sign (e.g. +604800 for 7 days from the exact time user confirms the purchase and gains access to the item).

cp, hmac, ts (required)