Time-Based
Your business gets paid almost instantly when your customers send and receive payments using Lightspark.
Unlock Groundbreaking New Payment Experiences
import lightspark
client = lightspark.LightsparkSyncClient(
api_token_client_id=os.environ.get("LIGHTSPARK_API_TOKEN_CLIENT_ID"),
api_token_client_secret=os.environ.get("LIGHTSPARK_API_TOKEN_CLIENT_SECRET"),
)
# Use the invoice string you obtained during Step 4
encoded_invoice = "lnbc3424740n1p3u42h3pp5jq[...]7dpy6v6m807egpjzydw2"
payment = client.pay_invoice(
encoded_invoice=encoded_invoice,
timeout_secs=60,
maximum_fees_sats=500,
)
print(f"Congrats! You sent your first Lightning payment! Its ID is {payment.id} and its current status is {payment.status}.")