Payments and credits

Planned store purchases for credits, with credit balances and atomic, refund-aware accounting.

PlannedMonetization module. Not available yet. Edict is in development.

Illustrative credit balance config

AgentEdit edict.yaml+10illustrative
Illustrative credit balance config. Line number, change, code. Lines under modules are added.
1modules:
2+Added payments:
3+Added consumables:
4+Added credit_pack:
5+Added stores: [app_store, google_play]
6+Added credits: 20
7+Added credits:
8+Added balance: image_credits
9+Added reserve:
10+Added per_request: 1
11+Added release_on: failure

The syntax is not final. Your coding agent would edit this file.

What is the planned Payments and credits module designed to do?

This module covers money that does not come from a store subscription, and the balances that sit on top of it. Planned functionality includes App Store and Google Play in-app purchases for credit packs and other mobile digital goods, Stripe integration for appropriate payment models, transaction verification, payment lifecycle events, credits and balances, usage reservations, refund-aware accounting, and atomic quantity adjustments.

Payments and subscription purchases have different platform requirements. Edict is intended to respect App Store and Google Play payment policies, which means this module is for payment models where those policies allow it. You decide which model fits your app and your obligations.

How does the Payments and credits module connect to other modules?

Credits become useful when something spends them.

  • Payments and credits + AI gateway. Each AI request is designed to reserve credits first. If the provider call succeeds, the reservation would be spent. If it fails, the credits would be released, so a user is not charged for a failed generation.
  • Payments and credits + Subscriptions. A plan can grant a monthly credit allowance, and a user can buy extra packs. The balance logic is designed to stay consistent when both are used.
  • Payments and credits + Authentication. Balances are designed to belong to a user, and each payment to be verified for the person who made it.
  • Payments and credits + Database. Balance changes are intended to be atomic, so two parallel requests cannot spend the same credit.

For example, an AI photo app could combine Authentication, Files, AI gateway, Background jobs, and credits. A user uploads a photo, one credit is reserved, a job runs the provider call, and the credit is spent or released based on the result.

What would you configure in the Payments and credits module?

You define the balances you track, how credits are granted, how many are reserved per operation, and what happens on failure or refund. You also set which stores sell each pack and the events you want to react to.

The configuration on this page is illustrative. The syntax is not final.

What stays your own code with the Payments and credits module?

You choose what a credit means in your product and what it costs your users. You also own the legal and tax duties of selling to customers, your refund policy, and compliance with store rules. Edict does not give legal advice, and it does not decide what you may sell.

Is the Payments and credits module available yet?

Planned. Edict is in development, and this module is not available. Real payment integrations are not claimed until they are implemented and verified. This page does not list prices, and pricing for Edict itself is not decided.

Join the beta waitlist to follow progress.

What does the Payments and credits module work with?

Payments and credits is designed to connect to 5 other modules. The lit arcs on the map show which.

Composition mapplanned, illustrative

Common questions about the Payments and credits module

Short answers about this planned module.

Does this replace store subscriptions?
No. Payments and subscription purchases have different platform requirements. Edict is intended to respect App Store and Google Play payment policies.
What is a usage reservation?
A reservation holds credits before work starts and releases them if the work fails. It is designed to stop two requests from spending the same balance.
How would credit packs be bought in a mobile app?
Through App Store and Google Play in-app purchases, which is what their policies require for digital goods in a mobile app. Stripe is planned only for payment models where those policies allow it. None of this is available yet.

Get an invitation when the beta opens.

Joining gets you email updates while Edict is built, and an invitation to the hosted beta when it opens.

Building now. No launch date yet.