Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Use this Python library to manage Ping Payments API regarding merchants, payment orders, payments and payouts
The Ping Payments Python SDK manages the Ping Payments API and Ping Payment Links API.
The Ping Payments Python SDK supports the following versions of Python:
Install the latest Ping Payments Python SDK using pip:
pip install ping-sdk
The Ping Payments Python SDK documentation contains complete information to be able to work with the SDK. Go to Python SDK documentation for the full documentation.
The Ping Payments API is implemented as the PaymentsApi
class contains a number of endpoints.
Ping Payments API Endpoints
The Ping Payments API is implemented as the PaymentLinksApi
contains a number of endpoints.
Ping Payment Links API Endpoints
Ping Payments provides you with a tenant ID
and are used for resource permissions.
Important: Make sure you store and access the tenant ID securely.
from ping.payments_api import PaymentsApi
Initialize the PaymentsApi in production mode:
payments_api = PaymentsApi(
tenant_id = '55555555-5555-5555-5555-555555555555'
)
Initialize the PaymentsApi in sandbox mode, for testing:
payments_api = PaymentsApi(
tenant_id = '55555555-5555-5555-5555-555555555555',
environment = 'sandbox'
)
Work with the API by by choosing a Endpoint and calling it´s methods. For example, you can choose the endpoint merchants
and call the method list()
to a list of all merchants connected to a tenant:
result = payments_api.merchant.list()
Calls to the Ping Payments API endpoint methods returns an ApiResponse object. Properties of the ApiResponse object contains information regarding request (headers and request) and the response (status_code, reason_phrase, text, errors, body, and cursor).
Using the response:
Check whether the response succeeded or failed. Two helper methods is_success()
and is_error()
in the ApiResponse object determine the success or failure of a call:
if result.is_success():
# Display the successful response as text
print(result.text)
elif result.is_error():
# Display the error response
print(f"Errors: {result.errors}")
FAQs
Use this Python library to manage Ping Payments API regarding merchants, payment orders, payments and payouts
We found that ping-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.