Skip to main content
Every method returns a promise and rejects with ZendError { code, message }. Calls time out after 10 minutes, because money sheets can stay open while the user decides. See Errors.

init(options?)

string[]
default:"[\"https://app.usezend.app\"]"
Zend web origins allowed to host your page. Add a staging origin while testing.
Returns the zend object below.

zend.environment

"zend-app" (mobile WebView), "zend-web" (frame in app.usezend.app), or "external" (plain browser). In external, every call rejects with NOT_IN_ZEND.

zend.launch

Read from the URL once, on load.

Identity

identity.get()

Returns { appUserId, username, name, scopes, appSession }. See Sign in with Zend.

Money

pay(params)

Send money to a Zend user. Needs pay. See Take a payment.

request(params)

Make an ask link others can pay. Needs request_payment. See Ask links.
Make a money link. Zend shares it; you only get its id. Needs create_link. See Money links.

allowance.request(params?) / allowance.get()

Ask for, or read, a spend allowance. See Spend allowance.

prize.create / join / cancel / get

Host-funded prizes. Needs prize. See Prizes.

Interactions

See Interactions.

interaction.create(params)

interaction.get(id)

interaction.update(id, params)

Cards

postCard(params)

Needs post_card and the user’s consent to post. See Cards.

Realtime

live.join(interactionId)

Join the interaction’s live room. See Live rooms.

People

people.pick(params?)

Open Zend’s friend picker. See People picker.

Fair results

random(params)

A draw nobody can rig. See Random draws.

attest(params)

Record a hash with Zend. Needs attest. See Attestations.

App

report(params)

Let the user report something in your app to Zend.

close(result?)

Close your app. result goes back to whatever opened it inside Zend.