Nexus takes USDC payments on Algorand. Customers pay from any Algorand wallet (Pera, Defly), you are paid directly, and there is no card processor or approval queue. This is the whole Flask (Python) integration.
Create the session on your server so the price is fixed and the buyer cannot change it. Amounts are integer US cents.
import os, requests
from flask import Flask, redirect
app = Flask(__name__)
@app.post("/checkout")
def checkout():
s = requests.post(
os.environ["NEXUS_URL"] + "/v1/sessions",
headers={"x-nexus-api-key": os.environ["NEXUS_API_KEY"]},
json={"creatorId": os.environ["NEXUS_CREATOR_ID"], "amount": 4900}, # US cents
).json()
return redirect(f'{os.environ["NEXUS_URL"]}/pay/{s["sessionId"]}?t={s["confirmToken"]}')
Never trust the browser. Nexus matches the payment on-chain and only marks the session completed when the USDC has actually arrived.
s = requests.get(os.environ["NEXUS_URL"] + f"/v1/sessions/{session_id}",
headers={"x-nexus-api-key": os.environ["NEXUS_API_KEY"]}).json()
if s["status"] == "completed":
fulfil(order)
npm run dev locally; use NEXUS_NETWORK=testnet to try it free.NEXUS_CREATOR_ID, NEXUS_URL, NEXUS_API_KEY.Using an AI coding agent? Point it at /llms.txt or the OpenAPI spec, or install the Nexus MCP server.