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
Parameter | Type | Description |
---|---|---|
data | CheckoutSessionParams | FormData | |
config? | AxiosRequestConfig |
Returns
Promise
<SCCheckoutSessionComplete
>
checkoutCreateSession()
static
checkoutCreateSession(data
,config?
):Promise
<SCCheckoutSession
>
This endpoint creates a checkout session.
Parameters
Parameter | Type | Description |
---|---|---|
data | CheckoutCreateSessionParams | FormData | |
config? | AxiosRequestConfig |
Returns
Promise
<SCCheckoutSession
>
createPaymentProduct()
static
createPaymentProduct(data
,config?
):Promise
<SCPaymentProduct
>
Create payment product
Parameters
Parameter | Type | Description |
---|---|---|
data | CreatePaymentProductParams | FormData | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaymentProduct
>
getCheckoutSession()
static
getCheckoutSession(params?
,config?
):Promise
<SCCheckoutSessionDetail
>
This endpoint retrieve checkout session
Parameters
Parameter | Type | Description |
---|---|---|
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
Parameter | Type | Description |
---|---|---|
params? | PaymentContentStatusParams | |
config? | AxiosRequestConfig |
Returns
Promise
<PaymentContentStatus
>
getPaymentOrder()
static
getPaymentOrder(id
,config?
):Promise
<SCPaymentOrder
>
This endpoint retrieves the single payment order
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaymentOrder
>
getPaymentOrderPdf()
static
getPaymentOrderPdf(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()
static
getPaymentProduct(id
,config?
):Promise
<SCPaymentProduct
>
This endpoint retrieves a specific payment product.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | 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
Parameter | Type | Description |
---|---|---|
id | string | 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
Parameter | Type | Description |
---|---|---|
params? | PaymentProductsParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCPaymentProduct
>>
getPaymentsCustomerPortal()
static
getPaymentsCustomerPortal(data
,config?
):Promise
<SCPaymentsCustomerPortalSession
>
This endpoint retrive customer portal
Parameters
Parameter | Type | Description |
---|---|---|
data | CustomerPortalCreateSessionParams | FormData | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaymentsCustomerPortalSession
>
getPaymentsOrder()
static
getPaymentsOrder(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()
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
Parameter | Type | Description |
---|---|---|
params? | PaymentProductsParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCPaywall
>>