UNPKG

mtn-momo-client

Version:

A collection of utils to interact with the mtn-momo api

20 lines (19 loc) 1.11 kB
import { TargetEnvironment } from '../types'; type CreateAPIUserResult = { /** The environment which we are accessing. Its always 'sandbox' when in the sandbox environment */ targetEnvironment: TargetEnvironment; /** The key to be used in the authentication header when requesting for an access token */ apiKey: string; /** A uuid which corresponds to the id of the user to be created */ userId: string; /** * The primary key for any of the subscriptions you want to access. Can be found in your momo developer profile under subscriptions * Check out https://momodeveloper.mtn.com/products to subscribe to a product and obtain a subscription key */ subscriptionKey: string; /** The host to redirect to after some actions that require redirection */ providerCallbackHost: string; }; type CreateAPIUserAndKeyOptions = Pick<CreateAPIUserResult, 'subscriptionKey' | 'providerCallbackHost'>; declare const createAPIUserAndKey: ({ subscriptionKey, providerCallbackHost, }: CreateAPIUserAndKeyOptions) => Promise<CreateAPIUserResult>; export { createAPIUserAndKey };