splitit-web-python-sdk
Splitit's Web API
Table of Contents
- Requirements
- Installation
- Getting Started
- Async
- Reference
splitit.installment_plan.check_eligibilitysplitit.installment_plan.getsplitit.installment_plan.get_eligibility_terms_and_conditionsplitit.installment_plan.postsplitit.installment_plan.post2splitit.installment_plan.refundsplitit.installment_plan.searchsplitit.installment_plan.update_ordersplitit.installment_plan.update_order2splitit.installment_plan.verify_authorization
Requirements
Python >=3.7
Installation
pip install splitit-web-python-sdk==3.0.9
Getting Started
from pprint import pprint
from splitit_client import Splitit, ApiException
splitit = Splitit(
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
)
try:
check_eligibility_response = splitit.installment_plan.check_eligibility(
x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
x_splitit_touch_point="",
plan_data={
"total_amount": 3.14,
"number_of_installments": 1,
"purchase_method": "InStore",
"strategy": "SecuredPlan",
},
card_details={
"card_brand": "Mastercard",
"card_type": "Credit",
},
billing_address={},
shopper_identifier="string_example",
)
pprint(check_eligibility_response.body)
pprint(check_eligibility_response.body["installment_provider"])
pprint(check_eligibility_response.body["payment_plan_options"])
pprint(check_eligibility_response.headers)
pprint(check_eligibility_response.status)
pprint(check_eligibility_response.round_trip_time)
except ApiException as e:
print("Exception when calling InstallmentPlanApi.check_eligibility: %s\n" % e)
pprint(e.body)
if e.status == 401:
pprint(e.body["trace_id"])
pprint(e.body["error"])
if e.status == 500:
pprint(e.body["trace_id"])
pprint(e.body["error"])
if e.status == 403:
pprint(e.body["trace_id"])
pprint(e.body["error"])
if e.status == 404:
pprint(e.body["trace_id"])
pprint(e.body["error"])
pprint(e.headers)
pprint(e.status)
pprint(e.reason)
pprint(e.round_trip_time)
Async
async support is available by prepending a to any method.
import asyncio
from pprint import pprint
from splitit_client import Splitit, ApiException
splitit = Splitit(
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
)
async def main():
try:
check_eligibility_response = await splitit.installment_plan.acheck_eligibility(
x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
x_splitit_touch_point="",
plan_data={
"total_amount": 3.14,
"number_of_installments": 1,
"purchase_method": "InStore",
"strategy": "SecuredPlan",
},
card_details={
"card_brand": "Mastercard",
"card_type": "Credit",
},
billing_address={},
shopper_identifier="string_example",
)
pprint(check_eligibility_response.body)
pprint(check_eligibility_response.body["installment_provider"])
pprint(check_eligibility_response.body["payment_plan_options"])
pprint(check_eligibility_response.headers)
pprint(check_eligibility_response.status)
pprint(check_eligibility_response.round_trip_time)
except ApiException as e:
print("Exception when calling InstallmentPlanApi.check_eligibility: %s\n" % e)
pprint(e.body)
if e.status == 401:
pprint(e.body["trace_id"])
pprint(e.body["error"])
if e.status == 500:
pprint(e.body["trace_id"])
pprint(e.body["error"])
if e.status == 403:
pprint(e.body["trace_id"])
pprint(e.body["error"])
if e.status == 404:
pprint(e.body["trace_id"])
pprint(e.body["error"])
pprint(e.headers)
pprint(e.status)
pprint(e.reason)
pprint(e.round_trip_time)
asyncio.run(main())
Reference
splitit.installment_plan.check_eligibility
🛠️ Usage
check_eligibility_response = splitit.installment_plan.check_eligibility(
x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
x_splitit_touch_point="",
plan_data={
"total_amount": 3.14,
"number_of_installments": 1,
"purchase_method": "InStore",
"strategy": "SecuredPlan",
},
card_details={
"card_brand": "Mastercard",
"card_type": "Credit",
},
billing_address={},
shopper_identifier="string_example",
)
⚙️ Parameters
x_splitit_idempotency_key: str
x_splitit_touch_point: str
TouchPoint
plan_data: PlanData
card_details: CardData
billing_address: AddressData
shopper_identifier: str
⚙️ Request Body
CheckInstallmentsEligibilityRequest
🔄 Return
InstallmentsEligibilityResponse
🌐 Endpoint
/api/installmentplans/check-eligibility post
splitit.installment_plan.get
🛠️ Usage
get_response = splitit.installment_plan.get(
installment_plan_number="installmentPlanNumber_example",
x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
x_splitit_touch_point="",
)
⚙️ Parameters
installment_plan_number: str
x_splitit_idempotency_key: str
x_splitit_touch_point: str
TouchPoint
🔄 Return
🌐 Endpoint
/api/installmentplans/{installmentPlanNumber} get
splitit.installment_plan.get_eligibility_terms_and_condition
🛠️ Usage
get_eligibility_terms_and_condition_response = (
splitit.installment_plan.get_eligibility_terms_and_condition(
ipn="ipn_example",
x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
x_splitit_touch_point="",
)
)
⚙️ Parameters
ipn: str
x_splitit_idempotency_key: str
x_splitit_touch_point: str
TouchPoint
🔄 Return
EligibilityTermsAndConditionResponse
🌐 Endpoint
/api/installmentplans/{ipn}/legal get
splitit.installment_plan.post
🛠️ Usage
post_response = splitit.installment_plan.post(
x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
x_splitit_touch_point="",
auto_capture=True,
attempt3d_secure=True,
shopper={},
plan_data={
"total_amount": 3.14,
"purchase_method": "InStore",
},
billing_address={},
redirect_urls={},
ux_settings={},
events_endpoints={},
processing_data={},
x_splitit_test_mode="None",
x_splitit_strategy="SecuredPlan",
splititclientinfo="string_example",
)
⚙️ Parameters
x_splitit_idempotency_key: str
x_splitit_touch_point: str
TouchPoint
auto_capture: bool
attempt3d_secure: bool
shopper: ShopperData
plan_data: PlanDataModel
billing_address: AddressDataModel
redirect_urls: InitiateRedirectionEndpointsModel
ux_settings: UxSettingsModel
events_endpoints: EventsEndpointsModel
processing_data: ProcessingData
x_splitit_test_mode: str
x_splitit_strategy: str
splititclientinfo: str
⚙️ Request Body
InstallmentPlanInitiateRequest
🔄 Return
🌐 Endpoint
/api/installmentplans/initiate post
splitit.installment_plan.post2
🛠️ Usage
post2_response = splitit.installment_plan.post2(
auto_capture=True,
terms_and_conditions_accepted=True,
x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
x_splitit_touch_point="",
attempt3d_secure=True,
shopper={},
plan_data={
"total_amount": 3.14,
"purchase_method": "InStore",
},
billing_address={},
payment_method={
"type": "Card",
},
redirect_urls={},
processing_data={},
events_endpoints={},
x_splitit_test_mode="None",
x_splitit_strategy="SecuredPlan",
splititclientinfo="string_example",
)
⚙️ Parameters
auto_capture: bool
terms_and_conditions_accepted: bool
x_splitit_idempotency_key: str
x_splitit_touch_point: str
TouchPoint
attempt3d_secure: bool
shopper: ShopperData
plan_data: PlanDataModel
billing_address: AddressDataModel
payment_method: PaymentMethodModel
redirect_urls: RedirectionEndpointsModel
processing_data: ProcessingData
events_endpoints: EventsEndpointsModel
x_splitit_test_mode: str
x_splitit_strategy: str
splititclientinfo: str
⚙️ Request Body
🔄 Return
🌐 Endpoint
/api/installmentplans post
splitit.installment_plan.refund
🛠️ Usage
refund_response = splitit.installment_plan.refund(
amount=3.14,
installment_plan_number="installmentPlanNumber_example",
x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
x_splitit_touch_point="",
refund_strategy="FutureInstallmentsFirst",
reference_id="string_example",
)
⚙️ Parameters
amount: Union[int, float]
installment_plan_number: str
x_splitit_idempotency_key: str
x_splitit_touch_point: str
TouchPoint
refund_strategy: RefundStrategy
reference_id: str
⚙️ Request Body
🔄 Return
🌐 Endpoint
/api/installmentplans/{installmentPlanNumber}/refund post
splitit.installment_plan.search
🛠️ Usage
search_response = splitit.installment_plan.search(
x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
x_splitit_touch_point="",
installment_plan_number="string_example",
ref_order_number="string_example",
extended_params={
"key": "string_example",
},
)
⚙️ Parameters
x_splitit_idempotency_key: str
x_splitit_touch_point: str
TouchPoint
installment_plan_number: str
ref_order_number: str
extended_params: Dict[str, str]
🔄 Return
🌐 Endpoint
/api/installmentplans/search get
splitit.installment_plan.update_order
🛠️ Usage
update_order_response = splitit.installment_plan.update_order(
installment_plan_number="installmentPlanNumber_example",
x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
x_splitit_touch_point="",
ref_order_number="string_example",
tracking_number="string_example",
capture=True,
shipping_status="Pending",
new_amount=3.14,
)
⚙️ Parameters
installment_plan_number: str
x_splitit_idempotency_key: str
x_splitit_touch_point: str
TouchPoint
ref_order_number: str
tracking_number: str
capture: bool
shipping_status: ShippingStatus
new_amount: Union[int, float]
⚙️ Request Body
🔄 Return
🌐 Endpoint
/api/installmentplans/{installmentPlanNumber}/updateorder put
splitit.installment_plan.update_order2
🛠️ Usage
update_order2_response = splitit.installment_plan.update_order2(
body=None,
x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
x_splitit_touch_point="",
ref_order_number="string_example",
tracking_number="string_example",
capture=True,
shipping_status="Pending",
new_amount=3.14,
identifier={},
)
⚙️ Parameters
x_splitit_idempotency_key: str
x_splitit_touch_point: str
TouchPoint
ref_order_number: str
tracking_number: str
capture: bool
shipping_status: ShippingStatus
new_amount: Union[int, float]
identifier: IdentifierContract
⚙️ Request Body
InstallmentPlanUpdateRequestByIdentifier
🔄 Return
🌐 Endpoint
/api/installmentplans/updateorder put
splitit.installment_plan.verify_authorization
🛠️ Usage
verify_authorization_response = splitit.installment_plan.verify_authorization(
installment_plan_number="installmentPlanNumber_example",
x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
x_splitit_touch_point="",
)
⚙️ Parameters
installment_plan_number: str
x_splitit_idempotency_key: str
x_splitit_touch_point: str
TouchPoint
🔄 Return
🌐 Endpoint
/api/installmentplans/{installmentPlanNumber}/verifyauthorization get
Author
This Python package is automatically generated by Konfig
Release files for splitit-web-python-sdk 3.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| splitit_web_python_sdk-3.0.9.tar.gz | 109.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| splitit_web_python_sdk-3.0.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 443.1 kB
Release files / splitit_web_python_sdk-3.0.9.tar.gz
| Download URL | splitit_web_python_sdk-3.0.9.tar.gz |
|---|---|
| Size | 109.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c5a264bd55ae9b6293e9020f47a8e52d830531245f741f9b0b75045817160d5
|
|
BLAKE2b-256 checksum How to use checksums |
877766cb10bc51ef358ac28f7067e0750d653ef8f215e0744c438e4442e31d0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.2
|
Release files / splitit_web_python_sdk-3.0.9-py3-none-any.whl
| Download URL | splitit_web_python_sdk-3.0.9-py3-none-any.whl |
|---|---|
| Size | 333.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
939f82af9b55922df4d34b9f64c9dd7a46ec862cb891b7673b75e27c12cf60c1
|
|
BLAKE2b-256 checksum How to use checksums |
1c99dcd9dc599fc80367cdd88cf23a3a959bb4df06171423dccc25b77a45bb6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.2
|