0.0.19 • Published 3 years ago

@withkoji/iap v0.0.19

Weekly downloads
61
License
MIT
Repository
github
Last release
3 years ago

Koji IAP (deprecated)

npm (scoped)

In-app purchase infrastructure for Koji templates.

Overview

The @withkoji/koji-iap package enables you to implement in-app purchases from your Koji templates. For example, require a purchase to unlock a premium asset or a game. This package provides frontend methods, for managing transactions with users, and backend methods, for validating purchases against receipts.

DEPRECATED This package is deprecated and is included only for backwards compatibility. For new templates, use @withkoji/core.

Installation

Install the package in the frontend and backend services of your Koji project.

npm install --save @withkoji/iap

NOTE: To support instant remixes of your template, you must also install the @withkoji/vcc package and implement the VccMiddleware on your backend server. This middleware maintains the process variables for instant remixes, ensuring that purchases are applied to the correct remix version.

Basic use

Instantiate Iap on the frontend.

import Iap from '@withkoji/iap';
const iap = new Iap();

Instantiate Iap on the backend.

import Iap from '@withkoji/iap';
const iap = new Iap(
  res.locals.KOJI_PROJECT_ID,
  res.locals.KOJI_PROJECT_TOKEN,
);

Related resources

Contributions and questions

See the contributions page on the developer site for info on how to make contributions to Koji repositories and developer documentation.

For any questions, reach out to the developer community or the @Koji Team on our Discord server.

0.0.19

3 years ago

0.0.18

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago