Skip to documentation
Developers
Dashboard ↗
Documentation / Integrations
Sandbox Only

Python integration

Generate a hosted link using Python's standard library.

Build in sandbox. These guides describe the current implementation. Live payments and payouts are disabled; planned capabilities are labelled explicitly.

Server-side request

python
import json, os
from urllib.request import Request, urlopen
request = Request(
    'https://api.unalaunch.com/api/v1/integration/checkout-links',
    data=json.dumps({'productId': os.environ['UNA_PRODUCT_ID']}).encode(),
    headers={
        'Authorization': 'Bearer ' + os.environ['UNA_SANDBOX_KEY'],
        'Content-Type': 'application/json',
    },
    method='POST',
)
with urlopen(request, timeout=15) as response:
    checkout_url = json.load(response)['checkoutUrl']
# Redirect from your web framework. Do not log secrets or order capabilities.