Skip to main content

PaymentApiClient

Contains all the endpoints needed to manage payments.

Constructors

Constructor

new PaymentApiClient(): PaymentApiClient

Returns

PaymentApiClient

Methods

checkoutCompleteSession()

static checkoutCompleteSession(data, config?): Promise<SCCheckoutSessionComplete>

This endpoint complete checkout session

Parameters

ParameterTypeDescription
dataCheckoutSessionParams | FormData
config?AxiosRequestConfig

Returns

Promise<SCCheckoutSessionComplete>


checkoutCreateSession()

static checkoutCreateSession(data, config?): Promise<SCCheckoutSession>

This endpoint creates a checkout session.

Parameters

ParameterTypeDescription
dataCheckoutCreateSessionParams | FormData
config?AxiosRequestConfig

Returns

Promise<SCCheckoutSession>


createPaymentProduct()

static createPaymentProduct(data, config?): Promise<SCPaymentProduct>

Create payment product

Parameters

ParameterTypeDescription
dataCreatePaymentProductParams | FormData
config?AxiosRequestConfig

Returns

Promise<SCPaymentProduct>


getCheckoutSession()

static getCheckoutSession(params?, config?): Promise<SCCheckoutSessionDetail>

This endpoint retrieve checkout session

Parameters

ParameterTypeDescription
params?CheckoutSessionParams
config?AxiosRequestConfig

Returns

Promise<SCCheckoutSessionDetail>


getPaymentContentStatus()

static getPaymentContentStatus(params?, config?): Promise<PaymentContentStatus>

This endpoint retrieves all the products related to an object of type <content_type> and id <content_id> and the current payment_order

Parameters

ParameterTypeDescription
params?PaymentContentStatusParams
config?AxiosRequestConfig

Returns

Promise<PaymentContentStatus>


getPaymentOrder()

static getPaymentOrder(id, config?): Promise<SCPaymentOrder>

This endpoint retrieves the single payment order

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig

Returns

Promise<SCPaymentOrder>


getPaymentOrderPdf()

static getPaymentOrderPdf(id, config?): Promise<Blob>

This endpoint retrieves the single payment order in pdf format

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig

Returns

Promise<Blob>


getPaymentProduct()

static getPaymentProduct(id, config?): Promise<SCPaymentProduct>

This endpoint retrieves a specific payment product.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig

Returns

Promise<SCPaymentProduct>


getPaymentProductPrices()

static getPaymentProductPrices(id, params?, config?): Promise<SCPaginatedResponse<SCPaymentPrice>>

This endpoint retrieves all the prices related to a product

Parameters

ParameterTypeDescription
idstring | number
params?BaseGetParams
config?AxiosRequestConfig

Returns

Promise<SCPaginatedResponse<SCPaymentPrice>>


getPaymentProducts()

static getPaymentProducts(params?, config?): Promise<SCPaginatedResponse<SCPaymentProduct>>

This endpoint retrieves all the payment products

Parameters

ParameterTypeDescription
params?PaymentProductsParams
config?AxiosRequestConfig

Returns

Promise<SCPaginatedResponse<SCPaymentProduct>>


getPaymentsCustomerPortal()

static getPaymentsCustomerPortal(data, config?): Promise<SCPaymentsCustomerPortalSession>

This endpoint retrive customer portal

Parameters

ParameterTypeDescription
dataCustomerPortalCreateSessionParams | FormData
config?AxiosRequestConfig

Returns

Promise<SCPaymentsCustomerPortalSession>


getPaymentsOrder()

static getPaymentsOrder(params?, config?): Promise<SCPaginatedResponse<SCPaymentOrder>>

This endpoint retrive order history of authenticated user

Parameters

ParameterTypeDescription
params?PaymentOrderParams
config?AxiosRequestConfig

Returns

Promise<SCPaginatedResponse<SCPaymentOrder>>


getPaywalls()

static getPaywalls(params?, config?): Promise<SCPaginatedResponse<SCPaywall>>

This endpoint retrieves all the products related to an object of type <content_type> and id <content_id>

Parameters

ParameterTypeDescription
params?PaymentProductsParams
config?AxiosRequestConfig

Returns

Promise<SCPaginatedResponse<SCPaywall>>