Payments
Payments are the core resource in ZendFi. A payment represents a request for funds from a customer, tracked from creation through to on-chain confirmation or expiry.Create a Payment
Requires authentication with a valid API key.
Request Body
Payment amount in the specified currency. Must be greater than zero.
Currency code. Supported values:
USD, EUR, GBP.Solana token to accept. Supported values:
USDC, USDT, SOL.Description shown to the customer on the checkout page.
Arbitrary key-value pairs attached to the payment. Useful for storing order IDs or internal references.
Override the default webhook URL for this specific payment.
Optional array of recipients for payment splits. See Payment Splits for details.
Example Request
Response
Unique payment identifier. Prefixed with
pay_test_ or pay_live_.Current payment status:
pending, confirmed, failed, or expired.Hosted checkout URL. Redirect the customer here or embed it in an iframe.
Solana Pay compatible URI for QR code generation.
ISO 8601 timestamp after which the payment will be marked as expired if not confirmed.
Get a Payment
Path Parameters
The payment ID (e.g.,
pay_test_abc123).Example
Response
Returns the full payment object as shown above, with additional fields if the payment has been confirmed:Solana transaction signature. Only present when status is
confirmed.ISO 8601 timestamp of when the payment was confirmed on-chain.
The Solana wallet address that sent the payment.
Check Payment Status
Example
Response
Payment Statuses
| Status | Description | Terminal |
|---|---|---|
pending | Payment created, awaiting customer transaction | No |
confirmed | Transaction verified on Solana. Funds settled. | Yes |
failed | Transaction found but verification failed | Yes |
expired | No valid transaction received before timeout | Yes |
Checkout Flow
ZendFi provides several ways for customers to complete payment:Hosted Checkout
Redirect the customer to thepayment_url returned in the create response. The hosted checkout page handles wallet connection, QR codes, and payment status automatically.
Embedded Checkout
Use the Embedded Checkout SDK component to render the checkout directly in your application without a redirect.Direct Transfer
Customers can send funds directly to the payment wallet address or scan the QR code with any Solana wallet app.Gasless Transactions
For a frictionless experience, use the transaction builder endpoints to create gasless transactions:Webhook Events
Payments trigger the following webhook events:| Event | When |
|---|---|
PaymentCreated | Payment is created |
PaymentConfirmed | Payment is confirmed on-chain |
PaymentFailed | Payment verification failed |
PaymentExpired | Payment window elapsed |