Skip to main content
Pay with Zend lets any website, backend or script ask for money on the Zend network. You create a payment request; Zend gives you a link. On a phone with Zend, the link opens Zend’s own confirm sheet. Everywhere else it opens web checkout at zdfi.me. It’s the same link either way. Money settles to your own Zend account. There’s no separate merchant account.
Building something that runs inside Zend, in chats and the feed? Use ZApps instead.

Get an API key

Approve the login on your phone. The CLI saves an API key (zdev_live_...) to ~/.zend/config.json. To make a narrower key for your server, run zend keys create.

Create a payment request

Send payment.linkUrl to your customer, or put it behind a Pay with Zend button. Needs the create_payment_request scope.

Confirm the payment

Credit the order on the webhook, not on the redirect.
Set where events go with zend config set webhookUrl <url>. Zend creates your webhook secret (whsec_...) the first time you set a URL. Signatures use the same t=<unix>,v1=<hex> scheme as ZApp webhooks, and are rejected after 5 minutes. Events fire only for requests you created through the API or CLI, never for ordinary payments between people. Failed deliveries retry after 1 minute, 5 minutes, 15 minutes, 1 hour and 1 day. See recent deliveries with zend logs tail.

Return to your site

With redirectUrl set, the payer comes back to your site with ?zend_return_token=.... Check it before resuming their session:
Tokens are single-use and expire after 5 minutes. Every failure returns valid: false, with no reason given.

Check without charging

zend payments test, or zend.testPaymentRequest(input), runs the same checks as a real request without creating it, moving money, or sending a webhook. Use it in CI.

Look up requests

status is pending, paid, expired or cancelled.

Full SDK reference

TypeScript

pay-with-zend-sdk on npm

Python

pay-with-zend-sdk on PyPI

Go

github.com/zendfi/zend-go-sdk