Skip to main content

Monetization

Fusio helps you to monetize your API. It has a concept of points which each user can buy. A user can then spend those points by calling specific operations which cost a specific amount of points.

Installation​

At first you need to create a plan at the Fusio backend. A plan has a name, a specific amount of points and a price assigned.

plan

Then you need to configure a payment provider. For this you need to include i.e. the stripe adapter which configures a payment provider.

composer require fusio/adapter-stripe
php bin/fusio system:register "Fusio\Adapter\Stripe\Adapter"

Then you need to create a new connection at the Fusio backend. This connection must be named "stripe" and you need to provide your app credentials.

Webhook​

Fusio uses the webhook system of Stripe to get information about the payment status. You need to register a webhook at the Stripe portal which calls the /system/payment/stripe/webhook endpoint of your Fusio instance. Also you need to set the payment_stripe_secret system setting to the webhook secret key provided by stripe.

Video​