Quick start


This quick start uses Python. If you are using a different programming language, please see the full documentation for information on how to generate LaterPay links.

The easiest way to generate links for email or for your website is using the Laterpay Python Client. Links are good for up to 60 days after you generate them using the method discussed below.

For example: Using LaterPay’s Python client, a contribution for “Spring Fundraising Event for Candidate X” for $5.00 USD, would work like this:


# This example uses the official LaterPay Python client library from pypi.
# You can find it here: https://github.com/laterpay/laterpay-client-python
# To get started quickly, run:
# $ virtualenv example
# $ example/bin/pip install laterpay-client
# $ example/bin/python
from datetime import datetime
from laterpay import LaterPayClient, ItemDefinition

# get us a LaterPay client
lpc = LaterPayClient(
    "your merchant-id",
    "your API key",

i  = ItemDefinition(item_id="spring-fundraising",
                    title="Spring Fundraising Event for Candidate X",

# Creates a dialog URL for a contribution. Historically, these are called
# "buy" instead of "pay now", and "add" instead of "pay later".
pay_now_url = lpc.get_buy_url(i)
pay_later_url = lpc.get_add_url(i)


<a href="{{ pay_now_url }}">Contribute Now $5.00</a>

Please see the interface guide for more information on how to style HTML links and buttons.