ProvidesPaymentMethods

Payment methods that exist only because of a platform — the NativePaymentProvider contract, why the capability is official-only, and how the core shows, sets up and rates a native currency.

Subscriby\Connector\Contracts\Ports\ProvidesPaymentMethods. Bound by native_payments, which the registry reserves for connectors Subscriby configures as official.

Some platforms have money of their own (Telegram Stars). A connector that carries such a method describes it here, the core offers it in the project's payment methods and on the portal's checkout, and the connector's payment_setup and checkout_method slots render the screens. Because a native provider settles sales and meters the platform's fee, the path is not open to a package Subscriby has not reviewed: the registry refuses the capability at boot for a community connector.

The method

public function paymentProviders(): array; // list<NativePaymentProvider>

NativePaymentProvider

MethodReturns
key()<connector>:<provider>, such as telegram:stars. The stored provider key; also the PaymentProviderKey value object.
label()The name the payment-method picker shows.
currencies()The currency codes the provider settles in (['XTR']). At least one.
setupFields()The Fields a creator fills in to enable it; empty when nothing is needed.
supportsSandbox()Whether a test-mode method can exist beside the live one.
icon()The file name, without extension, of the provider's mark under the platform's payment icons.
tagline()One line under the name in the picker, saying where it works and what a unit is worth.
explainer()A sentence the plan editor shows under the price while a plan is priced in this currency, about where and how members can pay in it.
unitInUsd()The fixed dollar value of one unit when the platform fixes it (a Star), or null when the currency floats and an exchange feed carries it. The rate job records the reciprocal as units per dollar.

What the core does with it

  • Lists the provider in the project's Payment methods with its label, icon and tagline, and renders setupFields() plus the connector's payment_setup slot when the creator enables it.
  • Offers it on the portal's checkout through the checkout_method slot, for plans priced in one of its currencies.
  • Records its rate from unitInUsd() so prices convert like every other currency.
  • Returns it in the MCP catalogue's payment-provider resource with connector and requires_connector, so an agent knows the method exists only where the connector is installed.

The checkout itself, settlement of a sale and refunds are still performed inside the official connector rather than through an SDK contract; that half of the contract joins the SDK in the payments slice, which is one more reason the capability is official-only today.

How Telegram does it

TelegramPaymentMethods returns one provider, Stars: key telegram:stars, currency XTR, no setup fields, a fixed dollar value per Star, the Stars mark, and a tagline naming where it works. Its setup explainer and checkout option are the connector's payment_setup and checkout_method slots.

What the kit checks

payments.provider_keys: every provider is a NativePaymentProvider, keyed <connector>:<provider> with the connector's own key, labelled, and settling in at least one currency. The registry adds the boot-time refusal for a non-official connector.

Gateways are not native providers

Stripe, PayPal, crypto and the other gateways are the core's, available on every connector. This port is only for money that exists on the platform and nowhere else.

How is this guide?

On this page

Subscriby is a product designed by you — for you.

No boardroom full of executives deciding what we ships next. Our roadmap always shaped by you with your feedback.

Share feedback or a request