PaymentApiClient
Contains all the endpoints needed to manage payments.
Constructors
Constructor
new PaymentApiClient():
PaymentApiClient
Returns
PaymentApiClient
Methods
checkoutCompleteSession()
staticcheckoutCompleteSession(data,config?):Promise<SCCheckoutSessionComplete>
This endpoint complete checkout session
Parameters
| Parameter | Type | Description | 
|---|---|---|
| data | CheckoutSessionParams|FormData | |
| config? | AxiosRequestConfig | 
Returns
Promise<SCCheckoutSessionComplete>
checkoutCreateSession()
staticcheckoutCreateSession(data,config?):Promise<SCCheckoutSession>
This endpoint creates a checkout session.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| data | CheckoutCreateSessionParams|FormData | |
| config? | AxiosRequestConfig | 
Returns
Promise<SCCheckoutSession>
createPaymentProduct()
staticcreatePaymentProduct(data,config?):Promise<SCPaymentProduct>
Create payment product
Parameters
| Parameter | Type | Description | 
|---|---|---|
| data | CreatePaymentProductParams|FormData | |
| config? | AxiosRequestConfig | 
Returns
Promise<SCPaymentProduct>
getCheckoutSession()
staticgetCheckoutSession(params?,config?):Promise<SCCheckoutSessionDetail>
This endpoint retrieve checkout session
Parameters
| Parameter | Type | Description | 
|---|---|---|
| params? | CheckoutSessionParams | |
| config? | AxiosRequestConfig | 
Returns
Promise<SCCheckoutSessionDetail>
getPaymentContentStatus()
staticgetPaymentContentStatus(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
| Parameter | Type | Description | 
|---|---|---|
| params? | PaymentContentStatusParams | |
| config? | AxiosRequestConfig | 
Returns
Promise<PaymentContentStatus>
getPaymentOrder()
staticgetPaymentOrder(id,config?):Promise<SCPaymentOrder>
This endpoint retrieves the single payment order
Parameters
| Parameter | Type | Description | 
|---|---|---|
| id | string|number | |
| config? | AxiosRequestConfig | 
Returns
Promise<SCPaymentOrder>
getPaymentOrderPdf()
staticgetPaymentOrderPdf(id,config?):Promise<Blob>
This endpoint retrieves the single payment order in pdf format
Parameters
| Parameter | Type | Description | 
|---|---|---|
| id | string|number | |
| config? | AxiosRequestConfig | 
Returns
Promise<Blob>
getPaymentProduct()
staticgetPaymentProduct(id,config?):Promise<SCPaymentProduct>
This endpoint retrieves a specific payment product.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| id | string|number | |
| config? | AxiosRequestConfig | 
Returns
Promise<SCPaymentProduct>
getPaymentProductPrices()
staticgetPaymentProductPrices(id,params?,config?):Promise<SCPaginatedResponse<SCPaymentPrice>>
This endpoint retrieves all the prices related to a product
Parameters
| Parameter | Type | Description | 
|---|---|---|
| id | string|number | |
| params? | BaseGetParams | |
| config? | AxiosRequestConfig | 
Returns
Promise<SCPaginatedResponse<SCPaymentPrice>>
getPaymentProducts()
staticgetPaymentProducts(params?,config?):Promise<SCPaginatedResponse<SCPaymentProduct>>
This endpoint retrieves all the payment products
Parameters
| Parameter | Type | Description | 
|---|---|---|
| params? | PaymentProductsParams | |
| config? | AxiosRequestConfig | 
Returns
Promise<SCPaginatedResponse<SCPaymentProduct>>
getPaymentsCustomerPortal()
staticgetPaymentsCustomerPortal(data,config?):Promise<SCPaymentsCustomerPortalSession>
This endpoint retrive customer portal
Parameters
| Parameter | Type | Description | 
|---|---|---|
| data | CustomerPortalCreateSessionParams|FormData | |
| config? | AxiosRequestConfig | 
Returns
Promise<SCPaymentsCustomerPortalSession>
getPaymentsOrder()
staticgetPaymentsOrder(params?,config?):Promise<SCPaginatedResponse<SCPaymentOrder>>
This endpoint retrive order history of authenticated user
Parameters
| Parameter | Type | Description | 
|---|---|---|
| params? | PaymentOrderParams | |
| config? | AxiosRequestConfig | 
Returns
Promise<SCPaginatedResponse<SCPaymentOrder>>
getPaywalls()
staticgetPaywalls(params?,config?):Promise<SCPaginatedResponse<SCPaywall>>
This endpoint retrieves all the products related to an object of type <content_type> and id <content_id>
Parameters
| Parameter | Type | Description | 
|---|---|---|
| params? | PaymentProductsParams | |
| config? | AxiosRequestConfig | 
Returns
Promise<SCPaginatedResponse<SCPaywall>>