Client for splitit-web-api-v3
Project description
splitit-web-python-sdk
Splitit's Web API
Table of Contents
- Requirements
- Installation
- Getting Started
- Async
- Reference
splitit.installment_plan.cancel
splitit.installment_plan.check_eligibility
splitit.installment_plan.get
splitit.installment_plan.post
splitit.installment_plan.post2
splitit.installment_plan.refund
splitit.installment_plan.search
splitit.installment_plan.update_order
splitit.installment_plan.update_order2
splitit.installment_plan.verify_authorization
Requirements
Python >=3.7
Installation
pip install splitit-web-python-sdk==2.6.6
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:
cancel_response = splitit.installment_plan.cancel(
installment_plan_number="installmentPlanNumber_example",
x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
x_splitit_touch_point="",
)
pprint(cancel_response.body)
pprint(cancel_response.body["installment_plan_number"])
pprint(cancel_response.body["installment_plan_response"])
pprint(cancel_response.headers)
pprint(cancel_response.status)
pprint(cancel_response.round_trip_time)
except ApiException as e:
print("Exception when calling InstallmentPlanApi.cancel: %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:
cancel_response = await splitit.installment_plan.acancel(
installment_plan_number="installmentPlanNumber_example",
x_splitit_idempotency_key="X-Splitit-IdempotencyKey_example",
x_splitit_touch_point="",
)
pprint(cancel_response.body)
pprint(cancel_response.body["installment_plan_number"])
pprint(cancel_response.body["installment_plan_response"])
pprint(cancel_response.headers)
pprint(cancel_response.status)
pprint(cancel_response.round_trip_time)
except ApiException as e:
print("Exception when calling InstallmentPlanApi.cancel: %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.cancel
๐ ๏ธ Usage
cancel_response = splitit.installment_plan.cancel(
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}/cancel
post
๐ Back to Table of Contents
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",
},
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
๐ Back to Table of Contents
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
๐ Back to Table of Contents
splitit.installment_plan.post
๐ ๏ธ Usage
post_response = splitit.installment_plan.post(
auto_capture=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={},
redirect_urls={},
ux_settings={},
events_endpoints={},
processing_data={},
x_splitit_test_mode="None",
splititclientinfo="string_example",
)
โ๏ธ Parameters
auto_capture: bool
x_splitit_idempotency_key: str
x_splitit_touch_point: str
TouchPoint
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
splititclientinfo: str
โ๏ธ Request Body
InstallmentPlanInitiateRequest
๐ Return
๐ Endpoint
/api/installmentplans/initiate
post
๐ Back to Table of Contents
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",
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
splititclientinfo: str
โ๏ธ Request Body
๐ Return
๐ Endpoint
/api/installmentplans
post
๐ Back to Table of Contents
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",
)
โ๏ธ Parameters
amount: Union[int, float]
installment_plan_number: str
x_splitit_idempotency_key: str
x_splitit_touch_point: str
TouchPoint
refund_strategy: RefundStrategy
โ๏ธ Request Body
๐ Return
๐ Endpoint
/api/installmentplans/{installmentPlanNumber}/refund
post
๐ Back to Table of Contents
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
๐ Back to Table of Contents
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
๐ Back to Table of Contents
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
๐ Back to Table of Contents
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
๐ Back to Table of Contents
Author
This Python package is automatically generated by Konfig
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for splitit_web_python_sdk-2.6.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b94c85ab7213310082f9755468f4810e1fa8edfbd6c2c366bb3f4b0603d0c6f |
|
MD5 | 01913e5a4408c7b2259ee389b8e407ea |
|
BLAKE2b-256 | 3ed1bb2de0b97f45db6c730cdafe6b436df45caf790197fa37bf793e65cd2ea9 |
Hashes for splitit_web_python_sdk-2.6.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78971350db99c594be8dde1c25a8a1a84a5b7a2f9f7297bbd4c6542ab7836a0a |
|
MD5 | 2b082a73999aba9df142f6491f18b354 |
|
BLAKE2b-256 | a6c7a0e2b8d28907755543c0a3ea0a48e204339a023e036d6933a279dbd2c1a0 |