Skip to main content

PaymentApiClientInterface

Methods

checkoutCompleteSession()

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

Complete session checkout

Parameters

ParameterTypeDescription
dataCheckoutSessionParams | FormData
config?AxiosRequestConfig

Returns

Promise<SCCheckoutSessionComplete>


checkoutCreateSession()

checkoutCreateSession(data, config?): Promise<any>

Create session checkout with price_id for an object of type <content_type> and id <content_id>

Parameters

ParameterTypeDescription
dataCheckoutCreateSessionParams | FormData
config?AxiosRequestConfig

Returns

Promise<any>


createPaymentProduct()

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

Create payment product

Parameters

ParameterTypeDescription
dataCreatePaymentProductParams | FormData
config?AxiosRequestConfig

Returns

Promise<SCPaymentProduct>


getCheckoutSession()

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

This endpoint retrieve checkout session

Parameters

ParameterTypeDescription
params?CheckoutSessionParams
config?AxiosRequestConfig

Returns

Promise<SCCheckoutSessionDetail>


getPaymentContentStatus()

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

Get payment products related to an object (aka paywalls) of type <content_type> and id <content_id> and the current payment_order

Parameters

ParameterTypeDescription
params?PaymentContentStatusParams
config?AxiosRequestConfig

Returns

Promise<PaymentContentStatus>


getPaymentOrder()

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

This endpoint retrieves the single payment order

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig

Returns

Promise<SCPaymentOrder>


getPaymentOrderPdf()

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()

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

Get product

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig

Returns

Promise<SCPaymentProduct>


getPaymentProductPrices()

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

Get prices related to a product

Parameters

ParameterTypeDescription
idstring | number
params?BaseGetParams
config?AxiosRequestConfig

Returns

Promise<SCPaginatedResponse<SCPaymentPrice>>


getPaymentProducts()

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

Get payment products

Parameters

ParameterTypeDescription
params?PaymentProductsParams
config?AxiosRequestConfig

Returns

Promise<SCPaginatedResponse<SCPaymentProduct>>


getPaymentsCustomerPortal()

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

This endpoint retrieve customer portal

Parameters

ParameterTypeDescription
dataCustomerPortalCreateSessionParams | FormData
config?AxiosRequestConfig

Returns

Promise<SCPaymentsCustomerPortalSession>


getPaymentsOrder()

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

This endpoint retrieve order history of authenticated user

Parameters

ParameterTypeDescription
params?PaymentOrderParams
config?AxiosRequestConfig

Returns

Promise<SCPaginatedResponse<SCPaymentOrder>>


getPaywalls()

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

Get payment products related to an object (aka paywalls) of type <content_type> and id <content_id>

Parameters

ParameterTypeDescription
params?PaymentProductsParams
config?AxiosRequestConfig

Returns

Promise<SCPaginatedResponse<SCPaywall>>