Payment links, invoicing, and SMS checkout
One-click checkout
Secure transactions
Automated billing
Subscription support
X-Smsly-Key-Id: sk_live_xxxX-SMSLY-SDK-KEY: sdk_live_xxxfrom smsly import SMSly
# === DUAL KEY SECURITY ===
client = SMSly(
api_key="sk_live_xxx",
sdk_key="sdk_live_xxx"
)
# Create an invoice
invoice = client.payment.invoice_create(
amount=99.99,
currency="USD",
description="Premium Plan - Monthly"
)
print(f"Invoice ID: {invoice.id}")
# Generate payment link
link = client.payment.link_create(invoice_id=invoice.id)
print(f"Payment URL: {link.url}")
# Send payment request via SMS
response = client.payment.payment_send(
to="+1234567890",
link_id=link.id,
message="Please complete your payment"
)/v1/payment/invoiceCreate invoice/v1/payment/linkGenerate payment link/v1/payment/sendSend payment request via SMS/v1/payment/status/:idCheck payment status/v1/payment/refundProcess refund