@eigeninteractive/server/commerce/razorpay
Razorpay for the EigenInteractive commerce runtime.
Razorpay is the third storefront because India is a card-hostile market that runs on UPI, netbanking and mandates, and neither Play nor Stripe covers it the same way. The integration differs from Stripe in three ways worth knowing before reading further:
- There is no Price object. A one-time sale is an Order carrying an
amount, and a recurring one is a Plan. The engine's
providerReferenceis therefore aplan_...for a subscription and the engine's own offer key for a one-time sale, whose amount comes from the catalog rather than the provider.amountscarries those, in the minor unit, because Razorpay has nothing to read them from. - Hosted checkout is a Payment Link. There is no Checkout Session; a link
is created server-side and the player is sent to its
short_url. - There is no customer portal. Razorpay has no Stripe-style billing
portal, so
managementis deliberately absent and the engine's management route answers that this provider is managed elsewhere.
Interfaces
RazorpayCommerceConfig
Defined in: server/packages/server/src/commerce/providers/razorpay.ts:30
Type Parameters
| Type Parameter |
|---|
TEnv |
Properties
amounts?
optional amounts?: Readonly<Record<string, {
amount: number;
currency: string;
}>>;
Defined in: server/packages/server/src/commerce/providers/razorpay.ts:39
Amount in the minor unit and currency per one-time providerReference.
Razorpay has no priced product to read, so a payment link must be told.
now?
optional now?: () => number;
Defined in: server/packages/server/src/commerce/providers/razorpay.ts:40
Returns
number
Methods
keyId()
keyId(env): string | undefined;
Defined in: server/packages/server/src/commerce/providers/razorpay.ts:31
Parameters
| Parameter | Type |
|---|---|
env | TEnv |
Returns
string | undefined
keySecret()
keySecret(env): string | undefined;
Defined in: server/packages/server/src/commerce/providers/razorpay.ts:32
Parameters
| Parameter | Type |
|---|---|
env | TEnv |
Returns
string | undefined
webhookSecret()
webhookSecret(env): string | undefined;
Defined in: server/packages/server/src/commerce/providers/razorpay.ts:34
The secret configured on the webhook, not the API key secret.
Parameters
| Parameter | Type |
|---|---|
env | TEnv |
Returns
string | undefined
Functions
razorpayCommerceProvider()
function razorpayCommerceProvider<TEnv>(config): CommerceProvider<TEnv>;
Defined in: server/packages/server/src/commerce/providers/razorpay.ts:93
Type Parameters
| Type Parameter |
|---|
TEnv |
Parameters
| Parameter | Type |
|---|---|
config | RazorpayCommerceConfig<TEnv> |
Returns
CommerceProvider<TEnv>