Getting Started with Paysecure API Documentation - Live
Introduction
Overview
Paysecure is a payment gateway optimization and intelligence service that merchants can use to provide a remote and frictionless payment experience.
This documentation will help you get started with integrating Paysecure but if you have any questions, please do not hesitate to reach out to us via email at info@paysecure.net
Please be advised that our support team is only available during standard business hours.
Environments
These are the BaseUrls for the APIs on different environments:
| Environment | Base URL |
|---|---|
| Production | https://api.paysecure.net/api/v1 |
| Sandbox | https://api.paysecure.net/api/v1 Note: set the Sandbox flag true (checked) in your merchant account. As shown in the image below |
Authentication
To access the API, you must acquire your unique API key from the merchant dashboard -> API Keys section in your account. Make sure to use this key as a bearer token in the Authorization header for every request you send.
AUTHORIZATION: Bearer Token
Token: {{APIKey}} .
Access your sandbox API key credentials by navigating to your merchant login and checking the 'is sandbox' option, located in the top right corner under merchant profile.
To get to the live API key, uncheck the 'Is Sandbox' option in the top right corner of your merchant dashboard. After unchecking, the page will refresh, and you can generate an API key for live transactions in this environment."
Reiterating, the API keys in Sandbox mode are for testing (when 'is sandbox' is CHECKED in the top right corner under merchant profile). The live API key credentials are for processing actual card transactions in Live mode (when 'is sandbox' is UNCHECKED in the same location)
Request Headers
Use these headers on every API call unless noted.
| Header | Value | Required | Notes |
|---|---|---|---|
Content-Type |
application/json |
Yes | All endpoints. Send JSON payloads. |
Authorization |
Bearer {MERCHANT_API_KEY} |
Yes | All endpoints. Replace with your merchant API key. |
BrandId |
{YOUR_BRAND_ID} |
Conditional | Session and CustomerAPIs. optional in customer APIs but Mandatory in Session APIs |
Install the Package
The package is compatible with Python versions 3.7+.
Install the package from PyPi using the following pip command:
pip install ps-apimatic-sdk==0.0.2
You can also view the package at: https://pypi.python.org/pypi/ps-apimatic-sdk/0.0.2
Initialize the API Client
Note: Documentation for the client can be found here.
The following parameters are configurable for the API Client:
| Parameter | Type | Description |
|---|---|---|
| environment | Environment |
The API environment. Default: Environment.PRODUCTION |
| http_client_instance | Union[Session, HttpClientProvider] |
The Http Client passed from the sdk user for making requests |
| override_http_client_configuration | bool |
The value which determines to override properties of the passed Http Client from the sdk user |
| http_call_back | HttpCallBack |
The callback value that is invoked before and after an HTTP call is made to an endpoint |
| timeout | float |
The value to use for connection timeout. Default: 30 |
| max_retries | int |
The number of times to retry an endpoint call if it fails. Default: 0 |
| backoff_factor | float |
A backoff factor to apply between attempts after the second try. Default: 2 |
| retry_statuses | Array of int |
The http statuses on which retry is to be done. Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524] |
| retry_methods | Array of string |
The http methods on which retry is to be done. Default: ["GET", "PUT"] |
| proxy_settings | ProxySettings |
Optional proxy configuration to route HTTP requests through a proxy server. |
| logging_configuration | LoggingConfiguration |
The SDK logging configuration for API calls |
| bearer_auth_credentials | BearerAuthCredentials |
The credential object for OAuth 2 Bearer token |
The API client can be initialized as follows:
Code-Based Client Initialization
import logging
from paysecureapidocumentationlive.configuration import Environment
from paysecureapidocumentationlive.http.auth.oauth_2 import BearerAuthCredentials
from paysecureapidocumentationlive.logging.configuration.api_logging_configuration import LoggingConfiguration
from paysecureapidocumentationlive.logging.configuration.api_logging_configuration import RequestLoggingConfiguration
from paysecureapidocumentationlive.logging.configuration.api_logging_configuration import ResponseLoggingConfiguration
from paysecureapidocumentationlive.paysecureapidocumentationlive_client import PaysecureapidocumentationliveClient
client = PaysecureapidocumentationliveClient(
bearer_auth_credentials=BearerAuthCredentials(
access_token='AccessToken'
),
environment=Environment.PRODUCTION,
logging_configuration=LoggingConfiguration(
log_level=logging.INFO,
request_logging_config=RequestLoggingConfiguration(
log_body=True
),
response_logging_config=ResponseLoggingConfiguration(
log_headers=True
)
)
)
Environment-Based Client Initialization
from paysecureapidocumentationlive.paysecureapidocumentationlive_client import PaysecureapidocumentationliveClient
# Specify the path to your .env file if it’s located outside the project’s root directory.
client = PaysecureapidocumentationliveClient.from_environment(dotenv_path='/path/to/.env')
See the Environment-Based Client Initialization section for details.
Environments
The SDK can be configured to use a different environment for making API calls. Available environments are:
Fields
| Name | Description |
|---|---|
| PRODUCTION | Default |
Authorization
This API uses the following authentication schemes.
List of APIs
- Payin AP Is
- Payout AP Is
- Get Balance API
- Refund API
- 🌎 Paypal Wallet
- 💳 Virtual Cards Payout
- Trust Score
- Cashier AP Is
- Transaction Reporting
- Get Balance API V2-Orchestration
- Global Collection
- Payout Manual Review
- AP Is
- Payout
- Payin
- API
SDK Infrastructure
Configuration
- ProxySettings
- Environment-Based Client Initialization
- AbstractLogger
- LoggingConfiguration
- RequestLoggingConfiguration
- ResponseLoggingConfiguration
HTTP
Utilities
Metadata
Release files for ps-apimatic-sdk 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ps_apimatic_sdk-0.0.2.tar.gz | 258.9 kB | Without provenance | Details for ps_apimatic_sdk-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ps_apimatic_sdk-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for ps_apimatic_sdk-0.0.2-py3-none-any.whl |
Total release size: 1.0 MB
Release files / ps_apimatic_sdk-0.0.2.tar.gz
| Download URL | ps_apimatic_sdk-0.0.2.tar.gz |
|---|---|
| Size | 258.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
419246bc7b4639be04fba4a8d6f2f228abc40dc3a9cc4414869bbed609906189
|
|
BLAKE2b-256 checksum How to use checksums |
7df5635cbe0f3a04f13463642fff5662a21d3141546355a1ba7934305a611988
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.13
|
Release files / ps_apimatic_sdk-0.0.2-py3-none-any.whl
| Download URL | ps_apimatic_sdk-0.0.2-py3-none-any.whl |
|---|---|
| Size | 789.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
13b00d0e808293f158ae1b36611d9f930511e3b80145edd1a7b922af5a8ad0dc
|
|
BLAKE2b-256 checksum How to use checksums |
85ae2cc7d3d34a9722769feb557bd17479b5ed7bf0357b6d8d0c5bda02ea0f2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.13
|
Security for ps-apimatic-sdk 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.