Worldline Acquiring Python SDK¶
Introduction¶
The Python SDK helps you to communicate with the Worldline Acquiring API. Its primary features are:
convenient Python library for the API calls and responses
marshals Python request objects to HTTP requests
unmarshals HTTP responses to Python response objects or Python exceptions
handling of all the details concerning authentication
handling of required metadata
See the Worldline Acquiring Documentation for more information on how to use the SDK.
Structure of this repository¶
This repository consists out of four main components:
The source code of the SDK itself:
/worldline/acquiring/sdk/
The source code of the SDK unit tests:
/tests/unit/
The source code of the SDK integration tests:
/tests/integration/
Note that the source code of the unit tests and integration tests can only be found on GitHub.
Requirements¶
Python 3.7 or higher is required. In addition, the following packages are required:
requests 2.25.0 or higher
requests-toolbelt 0.8.0 or higher
These packages will be installed automatically if the SDK is installed manually or using pip following the below instructions.
Installation¶
To install the SDK using pip, execute the following command:
pip install acquiring-sdk-python
Alternatively, you can install the SDK from a source distribution file:
Download the latest version of the Python SDK from GitHub. Choose the
acquiring-sdk-python-x.y.z.zip
file from the releases page, wherex.y.z
is the version number.Execute the following command in the folder where the SDK was downloaded to:
pip install acquiring-sdk-python-x.y.z.zip
Uninstalling¶
After the Python SDK has been installed, it can be uninstalled using the following command:
pip uninstall acquiring-sdk-python
The required packages can be uninstalled in the same way.
Running tests¶
There are two types of tests: unit tests and integration tests. The unit tests will work out-of-the-box; for the integration tests some configuration is required. First, some environment variables need to be set:
acquiring.api.oauth2.clientId
for the OAUth2 client id to use.acquiring.api.oauth2.clientSecret
for the OAuth2 client secret to use.acquiring.api.merchantId
for your merchant ID.
In addition, to run the proxy integration tests, the proxy URI, username and password should be set in the tests/resources/configuration.proxy.ini
file.
In order to run the unit and integration tests, the mock backport and mockito are required. These can be installed using the following command:
pip install mock mockito
The following commands can now be executed from the tests
directory to execute the tests:
Unit tests:
python run_unit_tests.py
Integration tests:
python run_integration_tests.py
Both unit and integration tests:
python run_all_tests.py
API Reference¶
- class worldline.acquiring.sdk.api_resource.ApiResource(parent: ApiResource | None = None, communicator: Communicator | None = None, path_context: Mapping[str, str] | None = None)[source]¶
Bases:
object
Base class of all Worldline Acquiring platform API resources.
- __init__(parent: ApiResource | None = None, communicator: Communicator | None = None, path_context: Mapping[str, str] | None = None)[source]¶
The parent and/or communicator must be given.
- class worldline.acquiring.sdk.call_context.CallContext[source]¶
Bases:
object
A call context can be used to send extra information with a request, and to receive extra information from a response.
Please note that this class is not thread-safe. Each request should get its own call context instance.
- class worldline.acquiring.sdk.client.Client(communicator: Communicator)[source]¶
Bases:
ApiResource
,LoggingCapable
,ObfuscationCapable
Worldline Acquiring platform client.
Thread-safe.
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {}¶
- __init__(communicator: Communicator)[source]¶
- Parameters:
communicator –
worldline.acquiring.sdk.communicator.Communicator
- close_expired_connections() None [source]¶
Utility method that delegates the call to this client’s communicator.
- close_idle_connections(idle_time: timedelta) None [source]¶
Utility method that delegates the call to this client’s communicator.
- Parameters:
idle_time – a datetime.timedelta object indicating the idle time
- enable_logging(communicator_logger: CommunicatorLogger) None [source]¶
Turns on logging using the given communicator logger.
- Raises:
ValueError – If the given communicator logger is None.
- set_body_obfuscator(body_obfuscator: BodyObfuscator) None [source]¶
Sets the current body obfuscator to use.
- set_header_obfuscator(header_obfuscator: HeaderObfuscator) None [source]¶
Sets the current header obfuscator to use.
- class worldline.acquiring.sdk.communicator.Communicator(api_endpoint: str | ParseResult, connection: Connection, authenticator: Authenticator, metadata_provider: MetadataProvider, marshaller: Marshaller)[source]¶
Bases:
LoggingCapable
,ObfuscationCapable
Used to communicate with the Worldline Acquiring platform web services.
It contains all the logic to transform a request object to an HTTP request and an HTTP response to a response object.
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {}¶
- close_expired_connections() None [source]¶
Utility method that delegates the call to this communicator’s connection if that’s an instance of PooledConnection. If not this method does nothing.
- close_idle_connections(idle_time: timedelta) None [source]¶
Utility method that delegates the call to this communicator’s connection if that’s an instance of PooledConnection. If not this method does nothing.
- Parameters:
idle_time – a datetime.timedelta object indicating the idle time
- delete(relative_path: str, request_headers: List[RequestHeader] | None, request_parameters: ParamRequest | None, response_type: Type[T], context: CallContext | None) T [source]¶
Corresponds to the HTTP DELETE method.
- Parameters:
relative_path – The path to call, relative to the base URI.
request_headers – An optional list of request headers.
request_parameters – An optional set of request parameters.
response_type – The type of response to return.
context – The optional call context to use.
- Raises:
CommunicationException – when an exception occurred communicating with the Worldline Acquiring platform
ResponseException – when an error response was received from the Worldline Acquiring platform
- delete_with_binary_response(relative_path: str, request_headers: List[RequestHeader] | None, request_parameters: ParamRequest | None, context: CallContext | None) Tuple[Mapping[str, str], Iterable[bytes]] [source]¶
Corresponds to the HTTP DELETE method.
- Parameters:
relative_path – The path to call, relative to the base URI.
request_headers – An optional list of request headers.
request_parameters – An optional set of request parameters.
context – The optional call context to use.
- Raises:
CommunicationException – when an exception occurred communicating with the Worldline Acquiring platform
ResponseException – when an error response was received from the Worldline Acquiring platform
- enable_logging(communicator_logger: CommunicatorLogger) None [source]¶
Turns on logging using the given communicator logger.
- Raises:
ValueError – If the given communicator logger is None.
- get(relative_path: str, request_headers: List[RequestHeader] | None, request_parameters: ParamRequest | None, response_type: Type[T], context: CallContext | None) T [source]¶
Corresponds to the HTTP GET method.
- Parameters:
relative_path – The path to call, relative to the base URI.
request_headers – An optional list of request headers.
request_parameters – An optional set of request parameters.
response_type – The type of response to return.
context – The optional call context to use.
- Raises:
CommunicationException – when an exception occurred communicating with the Worldline Acquiring platform
ResponseException – when an error response was received from the Worldline Acquiring platform
- get_with_binary_response(relative_path: str, request_headers: List[RequestHeader] | None, request_parameters: ParamRequest | None, context: CallContext | None) Tuple[Mapping[str, str], Iterable[bytes]] [source]¶
Corresponds to the HTTP GET method.
- Parameters:
relative_path – The path to call, relative to the base URI.
request_headers – An optional list of request headers.
request_parameters – An optional set of request parameters.
context – The optional call context to use.
- Raises:
CommunicationException – when an exception occurred communicating with the Worldline Acquiring platform
ResponseException – when an error response was received from the Worldline Acquiring platform
- property marshaller: Marshaller¶
- Returns:
The Marshaller object associated with this communicator. Never None.
- post(relative_path: str, request_headers: List[RequestHeader] | None, request_parameters: ParamRequest | None, request_body: Any, response_type: Type[T], context: CallContext | None) T [source]¶
Corresponds to the HTTP POST method.
- Parameters:
relative_path – The path to call, relative to the base URI.
request_headers – An optional list of request headers.
request_parameters – An optional set of request parameters.
request_body – The optional request body to send.
response_type – The type of response to return.
context – The optional call context to use.
- Raises:
CommunicationException – when an exception occurred communicating with the Worldline Acquiring platform
ResponseException – when an error response was received from the Worldline Acquiring platform
- post_with_binary_response(relative_path: str, request_headers: List[RequestHeader] | None, request_parameters: ParamRequest | None, request_body: Any, context: CallContext | None) Tuple[Mapping[str, str], Iterable[bytes]] [source]¶
Corresponds to the HTTP POST method.
- Parameters:
relative_path – The path to call, relative to the base URI.
request_headers – An optional list of request headers.
request_parameters – An optional set of request parameters.
request_body – The optional request body to send.
context – The optional call context to use.
- Raises:
CommunicationException – when an exception occurred communicating with the Worldline Acquiring platform
ResponseException – when an error response was received from the Worldline Acquiring platform
- put(relative_path: str, request_headers: List[RequestHeader] | None, request_parameters: ParamRequest | None, request_body: Any, response_type: Type[T], context: CallContext | None) T [source]¶
Corresponds to the HTTP PUT method.
- Parameters:
relative_path – The path to call, relative to the base URI.
request_headers – An optional list of request headers.
request_parameters – An optional set of request parameters.
request_body – The optional request body to send.
response_type – The type of response to return.
context – The optional call context to use.
- Raises:
CommunicationException – when an exception occurred communicating with the Worldline Acquiring platform
ResponseException – when an error response was received from the Worldline Acquiring platform
- put_with_binary_response(relative_path: str, request_headers: List[RequestHeader] | None, request_parameters: ParamRequest | None, request_body: Any, context: CallContext | None) Tuple[Mapping[str, str], Iterable[bytes]] [source]¶
Corresponds to the HTTP PUT method.
- Parameters:
relative_path – The path to call, relative to the base URI.
request_headers – An optional list of request headers.
request_parameters – An optional set of request parameters.
request_body – The optional request body to send.
context – The optional call context to use.
- Raises:
CommunicationException – when an exception occurred communicating with the Worldline Acquiring platform
ResponseException – when an error response was received from the Worldline Acquiring platform
- set_body_obfuscator(body_obfuscator: BodyObfuscator) None [source]¶
Sets the current body obfuscator to use.
- set_header_obfuscator(header_obfuscator: HeaderObfuscator) None [source]¶
Sets the current header obfuscator to use.
- class worldline.acquiring.sdk.communicator_configuration.CommunicatorConfiguration(properties: ConfigParser | None = None, api_endpoint: str | ParseResult | None = None, authorization_id: str | None = None, authorization_secret: str | None = None, oauth2_client_id: str | None = None, oauth2_client_secret: str | None = None, oauth2_token_uri: str | None = None, authorization_type: str | None = None, connect_timeout: int | None = None, socket_timeout: int | None = None, max_connections: int | None = None, proxy_configuration: ProxyConfiguration | None = None, integrator: str | None = None, shopping_cart_extension: ShoppingCartExtension | None = None)[source]¶
Bases:
object
Configuration for the communicator.
- DEFAULT_MAX_CONNECTIONS = 10¶
- __annotations__ = {'_CommunicatorConfiguration__api_endpoint': typing.Optional[urllib.parse.ParseResult], '_CommunicatorConfiguration__authorization_id': typing.Optional[str], '_CommunicatorConfiguration__authorization_secret': typing.Optional[str], '_CommunicatorConfiguration__authorization_type': typing.Optional[str], '_CommunicatorConfiguration__connect_timeout': typing.Optional[int], '_CommunicatorConfiguration__integrator': typing.Optional[str], '_CommunicatorConfiguration__max_connections': typing.Optional[int], '_CommunicatorConfiguration__oauth2_token_uri': typing.Optional[str], '_CommunicatorConfiguration__proxy_configuration': typing.Optional[worldline.acquiring.sdk.proxy_configuration.ProxyConfiguration], '_CommunicatorConfiguration__shopping_cart_extension': typing.Optional[worldline.acquiring.sdk.domain.shopping_cart_extension.ShoppingCartExtension], '_CommunicatorConfiguration__socket_timeout': typing.Optional[int], '__api_endpoint': 'Optional[ParseResult]', '__authorization_id': 'Optional[str]', '__authorization_secret': 'Optional[str]', '__authorization_type': 'Optional[str]', '__connect_timeout': 'Optional[int]', '__integrator': 'Optional[str]', '__max_connections': 'Optional[int]', '__oauth2_token_uri': 'Optional[str]', '__proxy_configuration': 'Optional[ProxyConfiguration]', '__shopping_cart_extension': 'Optional[ShoppingCartExtension]', '__socket_timeout': 'Optional[int]'}¶
- __init__(properties: ConfigParser | None = None, api_endpoint: str | ParseResult | None = None, authorization_id: str | None = None, authorization_secret: str | None = None, oauth2_client_id: str | None = None, oauth2_client_secret: str | None = None, oauth2_token_uri: str | None = None, authorization_type: str | None = None, connect_timeout: int | None = None, socket_timeout: int | None = None, max_connections: int | None = None, proxy_configuration: ProxyConfiguration | None = None, integrator: str | None = None, shopping_cart_extension: ShoppingCartExtension | None = None)[source]¶
- Parameters:
properties – a ConfigParser.ConfigParser object containing configuration data
connect_timeout – connection timeout for the network communication in seconds
socket_timeout – socket timeout for the network communication in seconds
max_connections – The maximum number of connections in the connection pool
- property api_endpoint: ParseResult | None¶
The Worldline Acquiring platform API endpoint URI.
- property authorization_id: str | None¶
An id used for authorization. The meaning of this id is different for each authorization type. For instance, for OAuth2 this is the client id.
- property authorization_secret: str | None¶
A secret used for authorization. The meaning of this secret is different for each authorization type. For instance, for OAuth2 this is the client secret.
- property authorization_type: str | None¶
- property connect_timeout: int | None¶
Connection timeout for the underlying network communication in seconds
- property integrator: str | None¶
- property max_connections: int | None¶
- property oauth2_client_id: str | None¶
The OAuth2 client id.
This property is an alias for authorization_id
- property oauth2_client_secret: str | None¶
The OAuth2 client secret.
This property is an alias for authorization_secret
- property oauth2_token_uri: str | None¶
- property proxy_configuration: ProxyConfiguration | None¶
- property shopping_cart_extension: ShoppingCartExtension | None¶
- property socket_timeout: int | None¶
Socket timeout for the underlying network communication in seconds
- class worldline.acquiring.sdk.factory.Factory[source]¶
Bases:
object
Worldline Acquiring platform factory for several SDK components.
- static create_client_from_communicator(communicator: Communicator) Client [source]¶
Create a Client based on the settings stored in the Communicator argument
- static create_client_from_configuration(communicator_configuration: CommunicatorConfiguration, metadata_provider: MetadataProvider | None = None, connection: Connection | None = None, authenticator: Authenticator | None = None, marshaller: Marshaller | None = None) Client [source]¶
Create a Client based on the configuration stored in the CommunicatorConfiguration argument
- static create_client_from_file(configuration_file_name: str | bytes, authorization_id: str, authorization_secret: str, metadata_provider: MetadataProvider | None = None, connection: Connection | None = None, authenticator: Authenticator | None = None, marshaller: Marshaller | None = None) Client [source]¶
Creates a Client based on the configuration values in configuration_file_name, authorization_id and authorization_secret.
- static create_communicator_from_configuration(communicator_configuration: CommunicatorConfiguration, metadata_provider: MetadataProvider | None = None, connection: Connection | None = None, authenticator: Authenticator | None = None, marshaller: Marshaller | None = None) Communicator [source]¶
Creates a Communicator based on the configuration stored in the CommunicatorConfiguration argument
- static create_communicator_from_file(configuration_file_name: str | bytes, authorization_id: str, authorization_secret: str, metadata_provider: MetadataProvider | None = None, connection: Connection | None = None, authenticator: Authenticator | None = None, marshaller: Marshaller | None = None) Communicator [source]¶
Creates a Communicator based on the configuration values in configuration_file_name, api_id_key and authorization_secret.
- static create_configuration(configuration_file_name: str | bytes, authorization_id: str, authorization_secret: str) CommunicatorConfiguration [source]¶
Creates a CommunicatorConfiguration based on the configuration values in configuration_file_name, authorization_id and authorization_secret.
- class worldline.acquiring.sdk.proxy_configuration.ProxyConfiguration(host: str, port: int, scheme: str = 'http', username: str | None = None, password: str | None = None)[source]¶
Bases:
object
HTTP proxy configuration.
Can be initialised directly from a host and port or can be constructed from a uri using fromuri
- __str__()[source]¶
Return a proxy string in the form scheme://username:password@host:port or scheme://host:port if authentication is absent
Supports HTTP Basic Auth
- static from_uri(uri: str, username: str | None = None, password: str | None = None) ProxyConfiguration [source]¶
Constructs a ProxyConfiguration from a URI; if username and/or password are given they will be used instead of corresponding data in the URI
- property host: str¶
- property password: str | None¶
- property port: int¶
- property scheme: str¶
- property username: str | None¶
- class worldline.acquiring.sdk.authentication.authenticator.Authenticator[source]¶
Bases:
ABC
Used to authenticate requests to the Worldline Acquiring platform.
- __abstractmethods__ = frozenset({'get_authorization'})¶
- __annotations__ = {}¶
- abstract get_authorization(http_method: str, resource_uri: ParseResult, request_headers: Sequence[RequestHeader] | None) str [source]¶
Returns a value that can be used for the “Authorization” header.
- Parameters:
http_method – The HTTP method.
resource_uri – The URI of the resource.
request_headers – A sequence of RequestHeaders. This sequence may not be modified and may not contain headers with the same name.
- class worldline.acquiring.sdk.authentication.authorization_type.AuthorizationType[source]¶
Bases:
object
- AUTHORIZATION_TYPES = ['OAuth2']¶
- OAUTH2 = 'OAuth2'¶
- class worldline.acquiring.sdk.authentication.oauth2_authenticator.OAuth2Authenticator(communicator_configuration: CommunicatorConfiguration)[source]¶
Bases:
Authenticator
OAuth2 Authenticator implementation.
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {}¶
- __init__(communicator_configuration: CommunicatorConfiguration)[source]¶
Constructs a new OAuth2Authenticator instance using the provided CommunicatorConfiguration.
- Parameters:
communicator_configuration – The configuration object containing the OAuth2 client id, client secret and token URI, connection timeout, and socket timeout. None of these can be None or empty, and the timeout values must be positive.
- get_authorization(http_method: str | None, resource_uri: ParseResult | None, request_headers: Sequence[RequestHeader] | None) str [source]¶
Returns a value that can be used for the “Authorization” header.
- Parameters:
http_method – The HTTP method.
resource_uri – The URI of the resource.
request_headers – A sequence of RequestHeaders. This sequence may not be modified and may not contain headers with the same name.
- exception worldline.acquiring.sdk.authentication.oauth2_exception.OAuth2Exception(message: str | None = None)[source]¶
Bases:
RuntimeError
Indicates an exception regarding the authorization with the Worldline OAuth2 Authorization Server.
- exception worldline.acquiring.sdk.communication.communication_exception.CommunicationException(exception: Exception)[source]¶
Bases:
RuntimeError
Indicates an exception regarding the communication with the Worldline Acquiring platform such as a connection exception.
- class worldline.acquiring.sdk.communication.connection.Connection[source]¶
Bases:
LoggingCapable
,ObfuscationCapable
,ABC
Represents a connection to the Worldline Acquiring platform server.
- __abstractmethods__ = frozenset({'delete', 'disable_logging', 'enable_logging', 'get', 'post', 'put', 'set_body_obfuscator', 'set_header_obfuscator'})¶
- __annotations__ = {}¶
- abstract delete(url: str | ParseResult, request_headers: Sequence[RequestHeader]) Tuple[int, Mapping[str, str], Iterable[bytes]] [source]¶
Send a DELETE request to the Worldline Acquiring platform and return the response.
- Parameters:
url – The URI to call, including any necessary query parameters.
request_headers – An optional sequence of request headers.
- Returns:
The response from the Worldline Acquiring platform as a tuple with the status code, headers and a generator of body chunks
- Raises:
CommunicationException – when an exception occurred communicating with the Worldline Acquiring platform
- abstract get(url: str | ParseResult, request_headers: Sequence[RequestHeader]) Tuple[int, Mapping[str, str], Iterable[bytes]] [source]¶
Send a GET request to the Worldline Acquiring platform and return the response.
- Parameters:
url – The URI to call, including any necessary query parameters.
request_headers – An optional sequence of request headers.
- Returns:
The response from the Worldline Acquiring platform as a tuple with the status code, headers and a generator of body chunks
- Raises:
CommunicationException – when an exception occurred communicating with the Worldline Acquiring platform
- abstract post(url: str | ParseResult, request_headers: Sequence[RequestHeader], body: str | MultipartFormDataObject | None) Tuple[int, Mapping[str, str], Iterable[bytes]] [source]¶
Send a POST request to the Worldline Acquiring platform and return the response.
- Parameters:
url – The URI to call, including any necessary query parameters.
request_headers – An optional sequence of request headers.
body – The optional body to send.
- Returns:
The response from the Worldline Acquiring platform as a tuple with the status code, headers and a generator of body chunks
- Raises:
CommunicationException – when an exception occurred communicating with the Worldline Acquiring platform
- abstract put(url: str | ParseResult, request_headers: Sequence[RequestHeader], body: str | MultipartFormDataObject | None) Tuple[int, Mapping[str, str], Iterable[bytes]] [source]¶
Send a PUT request to the Worldline Acquiring platform and return the response.
- Parameters:
url – The URI to call, including any necessary query parameters.
request_headers – An optional sequence of request headers.
body – The optional body to send.
- Returns:
The response from the Worldline Acquiring platform as a tuple with the status code, headers and a generator of body chunks
- Raises:
CommunicationException – when an exception occurred communicating with the Worldline Acquiring platform
- class worldline.acquiring.sdk.communication.default_connection.DefaultConnection(connect_timeout: int, socket_timeout: int, max_connections: int = 10, proxy_configuration: ProxyConfiguration | None = None)[source]¶
Bases:
PooledConnection
Provides an HTTP request interface, thread-safe
- Parameters:
connect_timeout – timeout in seconds before a pending connection is dropped
socket_timeout – timeout in seconds before dropping an established connection. This is the time the server is allowed for a response
max_connections – the maximum number of connections in the connection pool
proxy_configuration – ProxyConfiguration object that contains data about proxy settings if present. It should be writeable as string and have a scheme attribute.
Use the methods get, delete, post and put to perform the corresponding HTTP request. Alternatively you can use request with the request method as the first parameter.
URI, headers and body should be given on a per-request basis.
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {}¶
- close_idle_connections(idle_time: timedelta) None [source]¶
- Parameters:
idle_time – a datetime.timedelta object indicating the idle time
- property connect_timeout: int | None¶
Connection timeout in seconds
- delete(url: str | ParseResult, request_headers: Sequence[RequestHeader]) Tuple[int, Mapping[str, str], Iterable[bytes]] [source]¶
Perform a request to the server given by url
- Parameters:
url – the url to the server, given as a parsed url
request_headers – a sequence containing RequestHeader objects representing the request headers
- enable_logging(communicator_logger: CommunicatorLogger) None [source]¶
Turns on logging using the given communicator logger.
- Raises:
ValueError – If the given communicator logger is None.
- get(url: str | ParseResult, request_headers: Sequence[RequestHeader]) Tuple[int, Mapping[str, str], Iterable[bytes]] [source]¶
Perform a request to the server given by url
- Parameters:
url – the url to the server, given as a parsed url
request_headers – a sequence containing RequestHeader objects representing the request headers
- post(url: str | ParseResult, request_headers: Sequence[RequestHeader], body: str | MultipartFormDataObject | None) Tuple[int, Mapping[str, str], Iterable[bytes]] [source]¶
Perform a request to the server given by url
- Parameters:
url – the url to the server, given as a parsed url
request_headers – a sequence containing RequestHeader objects representing the request headers
body – the request body
- put(url: str | ParseResult, request_headers: Sequence[RequestHeader], body: str | MultipartFormDataObject | None) Tuple[int, Mapping[str, str], Iterable[bytes]] [source]¶
Perform a request to the server given by url
- Parameters:
url – the url to the server, given as a parsed url
request_headers – a sequence containing RequestHeader objects representing the request headers
body – the request body
- set_body_obfuscator(body_obfuscator: BodyObfuscator) None [source]¶
Sets the current body obfuscator to use.
- set_header_obfuscator(header_obfuscator: HeaderObfuscator) None [source]¶
Sets the current header obfuscator to use.
- property socket_timeout: int | None¶
Socket timeout in seconds
- class worldline.acquiring.sdk.communication.metadata_provider.MetadataProvider(integrator: str | None, shopping_cart_extension: ShoppingCartExtension | None = None, additional_request_headers: Sequence[RequestHeader] | None = ())[source]¶
Bases:
object
Provides meta info about the server.
- __annotations__ = {'_MetadataProvider__metadata_headers': typing.Sequence[worldline.acquiring.sdk.communication.request_header.RequestHeader]}¶
- property metadata_headers: Sequence[RequestHeader]¶
- Returns:
The server related headers containing the metadata to be associated with the request (if any). This will always contain at least an automatically generated header X-WL-ServerMetaInfo.
- prohibited_headers = ('Authorization', 'Content-Type', 'Date', 'X-WL-ServerMetaInfo')¶
- class worldline.acquiring.sdk.communication.multipart_form_data_object.MultipartFormDataObject[source]¶
Bases:
object
A representation of a multipart/form-data object.
- add_file(parameter_name: str, uploadable_file: UploadableFile) None [source]¶
- property boundary: str¶
- property content_type: str¶
- property files: Mapping[str, UploadableFile]¶
- property values: Mapping[str, str]¶
- class worldline.acquiring.sdk.communication.multipart_form_data_request.MultipartFormDataRequest[source]¶
Bases:
ABC
A representation of a multipart/form-data request.
- __abstractmethods__ = frozenset({'to_multipart_form_data_object'})¶
- __annotations__ = {}¶
- abstract to_multipart_form_data_object() MultipartFormDataObject [source]¶
- Returns:
worldline.acquiring.sdk.communication.MultipartFormDataObject
- exception worldline.acquiring.sdk.communication.not_found_exception.NotFoundException(exception: Exception, message: str)[source]¶
Bases:
RuntimeError
Indicates an exception that occurs when the requested resource is not found. In normal usage of the SDK, this exception should not occur, however it is possible. For example when path parameters are set with invalid values.
- class worldline.acquiring.sdk.communication.param_request.ParamRequest[source]¶
Bases:
ABC
Represents a set of request parameters.
- __abstractmethods__ = frozenset({'to_request_parameters'})¶
- __annotations__ = {}¶
- abstract to_request_parameters() List[RequestParam] [source]¶
- Returns:
list[
worldline.acquiring.sdk.communication.RequestParam
] representing the HTTP request parameters
- class worldline.acquiring.sdk.communication.pooled_connection.PooledConnection[source]¶
Bases:
Connection
,ABC
Represents a pooled connection to the Worldline Acquiring platform server. Instead of setting up a new HTTP connection for each request, this connection uses a pool of HTTP connections.
- __abstractmethods__ = frozenset({'close_expired_connections', 'close_idle_connections', 'delete', 'disable_logging', 'enable_logging', 'get', 'post', 'put', 'set_body_obfuscator', 'set_header_obfuscator'})¶
- __annotations__ = {}¶
- class worldline.acquiring.sdk.communication.request_header.RequestHeader(name: str, value: str | None)[source]¶
Bases:
object
A single request header. Immutable.
- property name: str¶
- Returns:
The header name.
- property value: str | None¶
- Returns:
The un-encoded value.
- worldline.acquiring.sdk.communication.request_header.get_header(headers: Sequence[RequestHeader] | Mapping[str, str] | None, header_name: str) RequestHeader | None [source]¶
- Returns:
The header with the given name, or None if there was no such header.
- worldline.acquiring.sdk.communication.request_header.get_header_value(headers: Sequence[RequestHeader] | Mapping[str, str] | None, header_name: str) str | None [source]¶
- Returns:
The value of the header with the given name, or None if there was no such header.
- class worldline.acquiring.sdk.communication.request_param.RequestParam(name: str, value: str | None)[source]¶
Bases:
object
A single request parameter. Immutable.
- property name: str¶
- Returns:
The parameter name.
- property value: str | None¶
- Returns:
The un-encoded value.
- exception worldline.acquiring.sdk.communication.response_exception.ResponseException(status: int, body: str | None, headers: Mapping[str, str] | None)[source]¶
Bases:
RuntimeError
Thrown when a response was received from the Worldline Acquiring platform which indicates an error.
- property body: str | None¶
- Returns:
The raw response body that was returned by the Worldline Acquiring platform.
- get_header(header_name: str) Tuple[str, str] | None [source]¶
- Returns:
The header with the given name, or None if there was no such header.
- get_header_value(header_name: str) str | None [source]¶
- Returns:
The value header with the given name, or None if there was no such header.
- property headers: Mapping[str, str]¶
- Returns:
The headers that were returned by the Worldline Acquiring platform. Never None.
- property status_code: int¶
- Returns:
The HTTP status code that was returned by the Worldline Acquiring platform.
- worldline.acquiring.sdk.communication.response_header.get_disposition_filename(headers: Mapping[str, str] | None) str | None [source]¶
- Returns:
The value of the filename parameter of the Content-Disposition header, or None if there was no such header or parameter.
- worldline.acquiring.sdk.communication.response_header.get_header(headers: Mapping[str, str] | None, header_name: str) Tuple[str, str] | None [source]¶
- Returns:
The header with the given name as a tuple with the name and value, or None if there was no such header.
- worldline.acquiring.sdk.communication.response_header.get_header_value(headers: Mapping[str, str] | None, header_name: str) str | None [source]¶
- Returns:
The value of the header with the given name, or None if there was no such header.
- class worldline.acquiring.sdk.domain.data_object.DataObject[source]¶
Bases:
object
- from_dictionary(dictionary: dict) DataObject [source]¶
- class worldline.acquiring.sdk.domain.shopping_cart_extension.ShoppingCartExtension(creator: str, name: str, version: str, extension_id: str | None = None)[source]¶
Bases:
DataObject
- __annotations__ = {}¶
- static create_from_dictionary(dictionary: dict) ShoppingCartExtension [source]¶
- property creator: str¶
- property extension_id: str | None¶
- from_dictionary(dictionary: dict) ShoppingCartExtension [source]¶
- property name: str¶
- property version: str¶
- class worldline.acquiring.sdk.domain.uploadable_file.UploadableFile(file_name: str, content: Any, content_type: str, content_length: int = -1)[source]¶
Bases:
object
A file that can be uploaded.
The allowed forms of content are defined by the Connection implementation. The default implementation supports strings, file descriptors and io.BytesIO objects.
- property content: Any¶
- Returns:
The file’s content.
- property content_length: int¶
- Returns:
The file’s content length, or -1 if not known.
- property content_type: str¶
- Returns:
The file’s content type.
- property file_name: str¶
- Returns:
The name of the file.
- class worldline.acquiring.sdk.json.default_marshaller.DefaultMarshaller[source]¶
Bases:
Marshaller
Marshaller implementation based on json.
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {}¶
- static instance() DefaultMarshaller [source]¶
- marshal(request_object: Any) str [source]¶
Marshal a request object to a JSON string.
- Parameters:
request_object – the object to marshal into a serialized JSON string
- Returns:
the serialized JSON string of the request_object
- unmarshal(response_json: str | bytes | None, type_class: Type[T]) T [source]¶
Unmarshal a JSON string to a response object.
- Parameters:
response_json – the json body that should be unmarshalled
type_class – The class to which the response_json should be unmarshalled
- Raises:
MarshallerSyntaxException – if the JSON is not a valid representation for an object of the given type
- class worldline.acquiring.sdk.json.marshaller.Marshaller[source]¶
Bases:
ABC
Used to marshal and unmarshal Worldline Acquiring platform request and response objects to and from JSON.
- __abstractmethods__ = frozenset({'marshal', 'unmarshal'})¶
- __annotations__ = {}¶
- abstract marshal(request_object: Any) str [source]¶
Marshal a request object to a JSON string.
- Parameters:
request_object – the object to marshal into a serialized JSON string
- Returns:
the serialized JSON string of the request_object
- abstract unmarshal(response_json: str | bytes | None, type_class: Type[T]) T | None [source]¶
Unmarshal a JSON string to a response object.
- Parameters:
response_json – the json body that should be unmarshalled
type_class – The class to which the response_json should be unmarshalled
- Raises:
MarshallerSyntaxException – if the JSON is not a valid representation for an object of the given type
- exception worldline.acquiring.sdk.json.marshaller_syntax_exception.MarshallerSyntaxException(cause: Exception | None = None)[source]¶
Bases:
RuntimeError
Thrown when a JSON string cannot be converted to a response object.
- class worldline.acquiring.sdk.log.body_obfuscator.BodyObfuscator(additional_rules: Mapping[str, Callable[[str], str]] | None = None)[source]¶
Bases:
object
A class that can be used to obfuscate properties in JSON bodies.
- __annotations__ = {'_BodyObfuscator__obfuscation_rules': typing.Dict[str, typing.Callable[[str], str]], '_BodyObfuscator__property_pattern': typing.Pattern[~AnyStr]}¶
- __init__(additional_rules: Mapping[str, Callable[[str], str]] | None = None)[source]¶
Creates a new body obfuscator. This will contain some pre-defined obfuscation rules, as well as any provided custom rules
- Parameters:
additional_rules – An optional mapping from property names to obfuscation rules, where an obfuscation rule is a function that obfuscates a single string,
- static default_body_obfuscator() BodyObfuscator [source]¶
- class worldline.acquiring.sdk.log.communicator_logger.CommunicatorLogger[source]¶
Bases:
ABC
Used to log messages from communicators.
- __abstractmethods__ = frozenset({'log'})¶
- __annotations__ = {}¶
- abstract log(message: str, thrown: Exception | None = None) None [source]¶
Logs a throwable with an accompanying message.
- Parameters:
message – The message accompanying the throwable.
thrown – The throwable to log.
- log_request(request_log_message: RequestLogMessage) None [source]¶
Logs a request message object
- log_response(response_log_message: ResponseLogMessage) None [source]¶
Logs a response message object
- class worldline.acquiring.sdk.log.header_obfuscator.HeaderObfuscator(additional_rules: Mapping[str, Callable[[str], str]] | None = None)[source]¶
Bases:
object
A class that can be used to obfuscate headers.
- __annotations__ = {'_HeaderObfuscator__obfuscation_rules': typing.Dict[str, typing.Callable[[str], str]]}¶
- __init__(additional_rules: Mapping[str, Callable[[str], str]] | None = None)[source]¶
Creates a new header obfuscator. This will contain some pre-defined obfuscation rules, as well as any provided custom rules
- Parameters:
additional_rules – An optional mapping from property names to obfuscation rules, where an obfuscation rule is a function that obfuscates a single string,
- static default_header_obfuscator() HeaderObfuscator [source]¶
- class worldline.acquiring.sdk.log.log_message.LogMessage(request_id: str, body_obfuscator: ~worldline.acquiring.sdk.log.body_obfuscator.BodyObfuscator = <worldline.acquiring.sdk.log.body_obfuscator.BodyObfuscator object>, header_obfuscator: ~worldline.acquiring.sdk.log.header_obfuscator.HeaderObfuscator = <worldline.acquiring.sdk.log.header_obfuscator.HeaderObfuscator object>)[source]¶
Bases:
ABC
A utility class to build log messages.
- __abstractmethods__ = frozenset({'get_message'})¶
- __annotations__ = {'_LogMessage__body': typing.Optional[str], '_LogMessage__body_obfuscator': <class 'worldline.acquiring.sdk.log.body_obfuscator.BodyObfuscator'>, '_LogMessage__content_type': typing.Optional[str], '_LogMessage__header_list': typing.List[typing.Tuple[str, str]], '_LogMessage__header_obfuscator': <class 'worldline.acquiring.sdk.log.header_obfuscator.HeaderObfuscator'>, '_LogMessage__headers': <class 'str'>, '_LogMessage__request_id': <class 'str'>, '__body': 'Optional[str]', '__body_obfuscator': 'BodyObfuscator', '__content_type': 'Optional[str]', '__header_list': 'List[Tuple[str, str]]', '__header_obfuscator': 'HeaderObfuscator', '__headers': 'str', '__request_id': 'str'}¶
- property body: str | None¶
- property content_type: str | None¶
- property headers: str¶
- property request_id: str¶
- class worldline.acquiring.sdk.log.logging_capable.LoggingCapable[source]¶
Bases:
ABC
Classes that extend this class have support for log messages from communicators.
- __abstractmethods__ = frozenset({'disable_logging', 'enable_logging'})¶
- __annotations__ = {}¶
- abstract enable_logging(communicator_logger: CommunicatorLogger) None [source]¶
Turns on logging using the given communicator logger.
- Raises:
ValueError – If the given communicator logger is None.
- class worldline.acquiring.sdk.log.obfuscation_capable.ObfuscationCapable[source]¶
Bases:
ABC
Classes that extend this class support obfuscating bodies and headers.
- __abstractmethods__ = frozenset({'set_body_obfuscator', 'set_header_obfuscator'})¶
- __annotations__ = {}¶
- abstract set_body_obfuscator(body_obfuscator: BodyObfuscator) None [source]¶
Sets the current body obfuscator to use.
- abstract set_header_obfuscator(header_obfuscator: HeaderObfuscator) None [source]¶
Sets the current header obfuscator to use.
- worldline.acquiring.sdk.log.obfuscation_rule.obfuscate_all() Callable[[str], str] [source]¶
Returns an obfuscation rule (function) that will replace all characters with *
- worldline.acquiring.sdk.log.obfuscation_rule.obfuscate_all_but_first(count: int) Callable[[str], str] [source]¶
Returns an obfuscation rule (function) that will keep a fixed number of characters at the start, then replaces all other characters with *
- worldline.acquiring.sdk.log.obfuscation_rule.obfuscate_all_but_last(count: int) Callable[[str], str] [source]¶
Returns an obfuscation rule that will keep a fixed number of characters at the end, then replaces all other characters with *
- worldline.acquiring.sdk.log.obfuscation_rule.obfuscate_with_fixed_length(fixed_length: int) Callable[[str], str] [source]¶
Returns an obfuscation rule (function) that will replace values with a fixed length string containing only *
- class worldline.acquiring.sdk.log.python_communicator_logger.PythonCommunicatorLogger(logger: Logger, log_level: int, error_log_level: int | None = None)[source]¶
Bases:
CommunicatorLogger
A communicator logger that is backed by the log library.
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {}¶
- __init__(logger: Logger, log_level: int, error_log_level: int | None = None)[source]¶
Logs messages to the argument logger using the argument log_level. If absent, the error_log_level will be equal to the log_level. Note that if the CommunicatorLogger’s log level is lower than the argument logger’s log level (e.g. the CommunicatorLogger is given log.INFO as level and the argument logger has a level of log.WARNING), then nothing will be logged to the logger.
- Parameters:
logger – the logger to log to
log_level – the log level that will be used for non-error messages logged via the CommunicatorLogger
error_log_level – the log level that will be used for error messages logged via the CommunicatorLogger.
- log(message: str, thrown: Exception | None = None) None [source]¶
Log a message to the underlying logger. If thrown is absent, the message will be logged with the CommunicatorLogger’s log_level, if a thrown object is provided, the message and exception will be logged with the CommunicatorLogger’s error_log_level.
- Parameters:
message – the message to be logged
thrown – an optional throwable object
- class worldline.acquiring.sdk.log.request_log_message.RequestLogMessage(request_id: str, method: str, uri: str, body_obfuscator: ~worldline.acquiring.sdk.log.body_obfuscator.BodyObfuscator = <worldline.acquiring.sdk.log.body_obfuscator.BodyObfuscator object>, header_obfuscator: ~worldline.acquiring.sdk.log.header_obfuscator.HeaderObfuscator = <worldline.acquiring.sdk.log.header_obfuscator.HeaderObfuscator object>)[source]¶
Bases:
LogMessage
A utility class to build request log messages.
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {'__body': 'Optional[str]', '__body_obfuscator': 'BodyObfuscator', '__content_type': 'Optional[str]', '__header_list': 'List[Tuple[str, str]]', '__header_obfuscator': 'HeaderObfuscator', '__headers': 'str', '__request_id': 'str'}¶
- class worldline.acquiring.sdk.log.response_log_message.ResponseLogMessage(request_id: str, status_code: int, duration: int = -1, body_obfuscator: ~worldline.acquiring.sdk.log.body_obfuscator.BodyObfuscator = <worldline.acquiring.sdk.log.body_obfuscator.BodyObfuscator object>, header_obfuscator: ~worldline.acquiring.sdk.log.header_obfuscator.HeaderObfuscator = <worldline.acquiring.sdk.log.header_obfuscator.HeaderObfuscator object>)[source]¶
Bases:
LogMessage
A utility class to build request log messages.
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {'__body': 'Optional[str]', '__body_obfuscator': 'BodyObfuscator', '__content_type': 'Optional[str]', '__header_list': 'List[Tuple[str, str]]', '__header_obfuscator': 'HeaderObfuscator', '__headers': 'str', '__request_id': 'str'}¶
- class worldline.acquiring.sdk.log.sys_out_communicator_logger.SysOutCommunicatorLogger[source]¶
Bases:
CommunicatorLogger
A communicator logger that prints its message to sys.stdout It includes a timestamp in yyyy-MM-ddTHH:mm:ss format in the system time zone.
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {}¶
- static instance() SysOutCommunicatorLogger [source]¶
- exception worldline.acquiring.sdk.v1.api_exception.ApiException(status_code: int, response_body: str, type: str | None, title: str | None, status: int | None, detail: str | None, instance: str | None, message: str = 'The Worldline Acquiring platform returned an error response')[source]¶
Bases:
RuntimeError
Represents an error response from the Worldline Acquiring platform.
- property detail: str | None¶
- Returns:
The detail received from the Worldline Acquiring platform if available.
- property instance: str | None¶
- Returns:
The instance received from the Worldline Acquiring platform if available.
- property response_body: str¶
- Returns:
The raw response body that was returned by the Worldline Acquiring platform.
- property status: int | None¶
- Returns:
The status received from the Worldline Acquiring platform if available.
- property status_code: int¶
- Returns:
The HTTP status code that was returned by the Worldline Acquiring platform.
- property title: str | None¶
- Returns:
The title received from the Worldline Acquiring platform if available.
- property type: str | None¶
- Returns:
The type received from the Worldline Acquiring platform if available.
- exception worldline.acquiring.sdk.v1.authorization_exception.AuthorizationException(status_code: int, response_body: str, type: str | None, title: str | None, status: int | None, detail: str | None, instance: str | None, message: str = 'The Worldline Acquiring platform returned an API authorization error response')[source]¶
Bases:
ApiException
Represents an error response from the Worldline Acquiring platform when API authorization failed.
- __annotations__ = {}¶
- worldline.acquiring.sdk.v1.exception_factory.create_exception(status_code: int, body: str, error_object: Any, context: CallContext | None) Exception [source]¶
Return a raisable API exception based on the error object given
- exception worldline.acquiring.sdk.v1.platform_exception.PlatformException(status_code: int, response_body: str, type: str | None, title: str | None, status: int | None, detail: str | None, instance: str | None, message: str = 'The Worldline Acquiring platform returned an error response')[source]¶
Bases:
ApiException
Represents an error response from the Worldline Acquiring platform when something went wrong at the Worldline Acquiring platform or further downstream.
- __annotations__ = {}¶
- exception worldline.acquiring.sdk.v1.reference_exception.ReferenceException(status_code: int, response_body: str, type: str | None, title: str | None, status: int | None, detail: str | None, instance: str | None, message: str = 'The Worldline Acquiring platform returned a reference error response')[source]¶
Bases:
ApiException
Represents an error response from the Worldline Acquiring platform when a non-existing or removed object is trying to be accessed.
- __annotations__ = {}¶
- class worldline.acquiring.sdk.v1.v1_client.V1Client(parent: ApiResource, path_context: Mapping[str, str] | None)[source]¶
Bases:
ApiResource
V1 client.
Thread-safe.
- __annotations__ = {}¶
- __init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]¶
- Parameters:
path_context – Mapping[str, str]
- acquirer(acquirer_id: str) AcquirerClient [source]¶
Resource /processing/v1/{acquirerId}
- Parameters:
acquirer_id – str
- Returns:
worldline.acquiring.sdk.v1.acquirer.acquirer_client.AcquirerClient
- ping() PingClient [source]¶
Resource /services/v1/ping
- exception worldline.acquiring.sdk.v1.validation_exception.ValidationException(status_code: int, response_body: str, type: str | None, title: str | None, status: int | None, detail: str | None, instance: str | None, message: str = 'The Worldline Acquiring platform returned an incorrect request error response')[source]¶
Bases:
ApiException
Represents an error response from the Worldline Acquiring platform when validation of requests failed.
- __annotations__ = {}¶
- class worldline.acquiring.sdk.v1.acquirer.acquirer_client.AcquirerClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]¶
Bases:
ApiResource
Acquirer client. Thread-safe.
- __annotations__ = {}¶
- __init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]¶
- Parameters:
path_context – Mapping[str, str]
- merchant(merchant_id: str) MerchantClient [source]¶
Resource /processing/v1/{acquirerId}/{merchantId}
- Parameters:
merchant_id – str
- Returns:
worldline.acquiring.sdk.v1.acquirer.merchant.merchant_client.MerchantClient
- class worldline.acquiring.sdk.v1.acquirer.merchant.merchant_client.MerchantClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]¶
Bases:
ApiResource
Merchant client. Thread-safe.
- __annotations__ = {}¶
- __init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]¶
- Parameters:
path_context – Mapping[str, str]
- account_verifications() AccountVerificationsClient [source]¶
Resource /processing/v1/{acquirerId}/{merchantId}/account-verifications
- dynamic_currency_conversion() DynamicCurrencyConversionClient [source]¶
Resource /services/v1/{acquirerId}/{merchantId}/dcc-rates
- payments() PaymentsClient [source]¶
Resource /processing/v1/{acquirerId}/{merchantId}/payments
- refunds() RefundsClient [source]¶
Resource /processing/v1/{acquirerId}/{merchantId}/refunds
- technical_reversals() TechnicalReversalsClient [source]¶
Resource /processing/v1/{acquirerId}/{merchantId}/operations/{operationId}/reverse
- class worldline.acquiring.sdk.v1.acquirer.merchant.accountverifications.account_verifications_client.AccountVerificationsClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]¶
Bases:
ApiResource
AccountVerifications client. Thread-safe.
- __annotations__ = {}¶
- __init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]¶
- Parameters:
path_context – Mapping[str, str]
- process_account_verification(body: ApiAccountVerificationRequest, context: CallContext | None = None) ApiAccountVerificationResponse [source]¶
Resource /processing/v1/{acquirerId}/{merchantId}/account-verifications - Verify account
- Parameters:
- Returns:
worldline.acquiring.sdk.v1.domain.api_account_verification_response.ApiAccountVerificationResponse
- Raises:
ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)
AuthorizationException – if the request was not allowed (HTTP status code 403)
ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
PlatformException – if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
ApiException – if the Worldline Acquiring platform returned any other error
- class worldline.acquiring.sdk.v1.acquirer.merchant.dynamiccurrencyconversion.dynamic_currency_conversion_client.DynamicCurrencyConversionClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]¶
Bases:
ApiResource
DynamicCurrencyConversion client. Thread-safe.
- __annotations__ = {}¶
- __init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]¶
- Parameters:
path_context – Mapping[str, str]
- request_dcc_rate(body: GetDCCRateRequest, context: CallContext | None = None) GetDccRateResponse [source]¶
Resource /services/v1/{acquirerId}/{merchantId}/dcc-rates - Request DCC rate
- Parameters:
- Returns:
worldline.acquiring.sdk.v1.domain.get_dcc_rate_response.GetDccRateResponse
- Raises:
ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)
AuthorizationException – if the request was not allowed (HTTP status code 403)
ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
PlatformException – if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
ApiException – if the Worldline Acquiring platform returned any other error
- class worldline.acquiring.sdk.v1.acquirer.merchant.payments.get_payment_status_params.GetPaymentStatusParams[source]¶
Bases:
ParamRequest
Query parameters for Retrieve payment
See also https://docs.acquiring.worldline-solutions.com/api-reference#tag/Payments/operation/getPaymentStatus
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {'_GetPaymentStatusParams__return_operations': typing.Optional[bool], '__return_operations': 'Optional[bool]'}¶
- property return_operations: bool | None¶
- If true, the response will contain the operations of the payment. False by default.
Type: bool
- to_request_parameters() List[RequestParam] [source]¶
- Returns:
list[RequestParam]
- class worldline.acquiring.sdk.v1.acquirer.merchant.payments.payments_client.PaymentsClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]¶
Bases:
ApiResource
Payments client. Thread-safe.
- __annotations__ = {}¶
- __init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]¶
- Parameters:
path_context – Mapping[str, str]
- create_refund(payment_id: str, body: ApiPaymentRefundRequest, context: CallContext | None = None) ApiActionResponseForRefund [source]¶
Resource /processing/v1/{acquirerId}/{merchantId}/payments/{paymentId}/refunds - Refund payment
See also https://docs.acquiring.worldline-solutions.com/api-reference#tag/Payments/operation/createRefund
- Parameters:
payment_id – str
body –
worldline.acquiring.sdk.v1.domain.api_payment_refund_request.ApiPaymentRefundRequest
- Returns:
worldline.acquiring.sdk.v1.domain.api_action_response_for_refund.ApiActionResponseForRefund
- Raises:
ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)
AuthorizationException – if the request was not allowed (HTTP status code 403)
ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
PlatformException – if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
ApiException – if the Worldline Acquiring platform returned any other error
- get_payment_status(payment_id: str, query: GetPaymentStatusParams, context: CallContext | None = None) ApiPaymentResource [source]¶
Resource /processing/v1/{acquirerId}/{merchantId}/payments/{paymentId} - Retrieve payment
See also https://docs.acquiring.worldline-solutions.com/api-reference#tag/Payments/operation/getPaymentStatus
- Parameters:
- Returns:
worldline.acquiring.sdk.v1.domain.api_payment_resource.ApiPaymentResource
- Raises:
ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)
AuthorizationException – if the request was not allowed (HTTP status code 403)
ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
PlatformException – if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
ApiException – if the Worldline Acquiring platform returned any other error
- increment_payment(payment_id: str, body: ApiIncrementRequest, context: CallContext | None = None) ApiIncrementResponse [source]¶
Resource /processing/v1/{acquirerId}/{merchantId}/payments/{paymentId}/increments - Increment authorization
See also https://docs.acquiring.worldline-solutions.com/api-reference#tag/Payments/operation/incrementPayment
- Parameters:
payment_id – str
body –
worldline.acquiring.sdk.v1.domain.api_increment_request.ApiIncrementRequest
- Returns:
worldline.acquiring.sdk.v1.domain.api_increment_response.ApiIncrementResponse
- Raises:
ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)
AuthorizationException – if the request was not allowed (HTTP status code 403)
ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
PlatformException – if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
ApiException – if the Worldline Acquiring platform returned any other error
- process_payment(body: ApiPaymentRequest, context: CallContext | None = None) ApiPaymentResponse [source]¶
Resource /processing/v1/{acquirerId}/{merchantId}/payments - Create payment
See also https://docs.acquiring.worldline-solutions.com/api-reference#tag/Payments/operation/processPayment
- Parameters:
- Returns:
worldline.acquiring.sdk.v1.domain.api_payment_response.ApiPaymentResponse
- Raises:
ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)
AuthorizationException – if the request was not allowed (HTTP status code 403)
ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
PlatformException – if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
ApiException – if the Worldline Acquiring platform returned any other error
- reverse_authorization(payment_id: str, body: ApiPaymentReversalRequest, context: CallContext | None = None) ApiReversalResponse [source]¶
Resource /processing/v1/{acquirerId}/{merchantId}/payments/{paymentId}/authorization-reversals - Reverse authorization
- Parameters:
payment_id – str
body –
worldline.acquiring.sdk.v1.domain.api_payment_reversal_request.ApiPaymentReversalRequest
- Returns:
worldline.acquiring.sdk.v1.domain.api_reversal_response.ApiReversalResponse
- Raises:
ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)
AuthorizationException – if the request was not allowed (HTTP status code 403)
ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
PlatformException – if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
ApiException – if the Worldline Acquiring platform returned any other error
- simple_capture_of_payment(payment_id: str, body: ApiCaptureRequest, context: CallContext | None = None) ApiActionResponse [source]¶
Resource /processing/v1/{acquirerId}/{merchantId}/payments/{paymentId}/captures - Capture payment
- Parameters:
payment_id – str
body –
worldline.acquiring.sdk.v1.domain.api_capture_request.ApiCaptureRequest
- Returns:
worldline.acquiring.sdk.v1.domain.api_action_response.ApiActionResponse
- Raises:
ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)
AuthorizationException – if the request was not allowed (HTTP status code 403)
ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
PlatformException – if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
ApiException – if the Worldline Acquiring platform returned any other error
- class worldline.acquiring.sdk.v1.acquirer.merchant.refunds.get_refund_params.GetRefundParams[source]¶
Bases:
ParamRequest
Query parameters for Retrieve refund
See also https://docs.acquiring.worldline-solutions.com/api-reference#tag/Refunds/operation/getRefund
- __abstractmethods__ = frozenset({})¶
- __annotations__ = {'_GetRefundParams__return_operations': typing.Optional[bool], '__return_operations': 'Optional[bool]'}¶
- property return_operations: bool | None¶
- If true, the response will contain the operations of the payment. False by default.
Type: bool
- to_request_parameters() List[RequestParam] [source]¶
- Returns:
list[RequestParam]
- class worldline.acquiring.sdk.v1.acquirer.merchant.refunds.refunds_client.RefundsClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]¶
Bases:
ApiResource
Refunds client. Thread-safe.
- __annotations__ = {}¶
- __init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]¶
- Parameters:
path_context – Mapping[str, str]
- capture_refund(refund_id: str, body: ApiCaptureRequestForRefund, context: CallContext | None = None) ApiActionResponseForRefund [source]¶
Resource /processing/v1/{acquirerId}/{merchantId}/refunds/{refundId}/captures - Capture refund
See also https://docs.acquiring.worldline-solutions.com/api-reference#tag/Refunds/operation/captureRefund
- Parameters:
- Returns:
worldline.acquiring.sdk.v1.domain.api_action_response_for_refund.ApiActionResponseForRefund
- Raises:
ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)
AuthorizationException – if the request was not allowed (HTTP status code 403)
ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
PlatformException – if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
ApiException – if the Worldline Acquiring platform returned any other error
- get_refund(refund_id: str, query: GetRefundParams, context: CallContext | None = None) ApiRefundResource [source]¶
Resource /processing/v1/{acquirerId}/{merchantId}/refunds/{refundId} - Retrieve refund
See also https://docs.acquiring.worldline-solutions.com/api-reference#tag/Refunds/operation/getRefund
- Parameters:
refund_id – str
query –
worldline.acquiring.sdk.v1.acquirer.merchant.refunds.get_refund_params.GetRefundParams
- Returns:
worldline.acquiring.sdk.v1.domain.api_refund_resource.ApiRefundResource
- Raises:
ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)
AuthorizationException – if the request was not allowed (HTTP status code 403)
ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
PlatformException – if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
ApiException – if the Worldline Acquiring platform returned any other error
- process_standalone_refund(body: ApiRefundRequest, context: CallContext | None = None) ApiRefundResponse [source]¶
Resource /processing/v1/{acquirerId}/{merchantId}/refunds - Create standalone refund
- Parameters:
- Returns:
worldline.acquiring.sdk.v1.domain.api_refund_response.ApiRefundResponse
- Raises:
ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)
AuthorizationException – if the request was not allowed (HTTP status code 403)
ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
PlatformException – if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
ApiException – if the Worldline Acquiring platform returned any other error
- reverse_refund_authorization(refund_id: str, body: ApiPaymentReversalRequest, context: CallContext | None = None) ApiActionResponseForRefund [source]¶
Resource /processing/v1/{acquirerId}/{merchantId}/refunds/{refundId}/authorization-reversals - Reverse refund authorization
- Parameters:
refund_id – str
body –
worldline.acquiring.sdk.v1.domain.api_payment_reversal_request.ApiPaymentReversalRequest
- Returns:
worldline.acquiring.sdk.v1.domain.api_action_response_for_refund.ApiActionResponseForRefund
- Raises:
ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)
AuthorizationException – if the request was not allowed (HTTP status code 403)
ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
PlatformException – if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
ApiException – if the Worldline Acquiring platform returned any other error
- class worldline.acquiring.sdk.v1.acquirer.merchant.technicalreversals.technical_reversals_client.TechnicalReversalsClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]¶
Bases:
ApiResource
TechnicalReversals client. Thread-safe.
- __annotations__ = {}¶
- __init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]¶
- Parameters:
path_context – Mapping[str, str]
- technical_reversal(operation_id: str, body: ApiTechnicalReversalRequest, context: CallContext | None = None) ApiTechnicalReversalResponse [source]¶
Resource /processing/v1/{acquirerId}/{merchantId}/operations/{operationId}/reverse - Technical reversal
- Parameters:
operation_id – str
body –
worldline.acquiring.sdk.v1.domain.api_technical_reversal_request.ApiTechnicalReversalRequest
- Returns:
worldline.acquiring.sdk.v1.domain.api_technical_reversal_response.ApiTechnicalReversalResponse
- Raises:
ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)
AuthorizationException – if the request was not allowed (HTTP status code 403)
ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
PlatformException – if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
ApiException – if the Worldline Acquiring platform returned any other error
- class worldline.acquiring.sdk.v1.domain.address_verification_data.AddressVerificationData[source]¶
Bases:
DataObject
- __annotations__ = {'_AddressVerificationData__cardholder_address': typing.Optional[str], '_AddressVerificationData__cardholder_postal_code': typing.Optional[str]}¶
- property cardholder_address: str | None¶
- Cardholder street address
Type: str
- property cardholder_postal_code: str | None¶
- Cardholder postal code, should be provided without spaces
Type: str
- from_dictionary(dictionary: dict) AddressVerificationData [source]¶
- class worldline.acquiring.sdk.v1.domain.amount_data.AmountData[source]¶
Bases:
DataObject
- __annotations__ = {'_AmountData__amount': typing.Optional[int], '_AmountData__currency_code': typing.Optional[str], '_AmountData__number_of_decimals': typing.Optional[int]}¶
- property amount: int | None¶
- Amount of transaction formatted according to card scheme specifications. E.g. 100 for 1.00 EUR. Either this or amount must be present.
Type: int
- property currency_code: str | None¶
- Alpha-numeric ISO 4217 currency code for transaction, e.g. EUR
Type: str
- from_dictionary(dictionary: dict) AmountData [source]¶
- property number_of_decimals: int | None¶
- Number of decimals in the amount
Type: int
- class worldline.acquiring.sdk.v1.domain.api_account_verification_request.ApiAccountVerificationRequest[source]¶
Bases:
DataObject
- __annotations__ = {'_ApiAccountVerificationRequest__card_payment_data': typing.Optional[worldline.acquiring.sdk.v1.domain.card_payment_data_for_verification.CardPaymentDataForVerification], '_ApiAccountVerificationRequest__merchant': typing.Optional[worldline.acquiring.sdk.v1.domain.merchant_data.MerchantData], '_ApiAccountVerificationRequest__operation_id': typing.Optional[str], '_ApiAccountVerificationRequest__references': typing.Optional[worldline.acquiring.sdk.v1.domain.payment_references.PaymentReferences], '_ApiAccountVerificationRequest__transaction_timestamp': typing.Optional[datetime.datetime]}¶
- property card_payment_data: CardPaymentDataForVerification | None¶
- Card data
Type:
worldline.acquiring.sdk.v1.domain.card_payment_data_for_verification.CardPaymentDataForVerification
- from_dictionary(dictionary: dict) ApiAccountVerificationRequest [source]¶
- property merchant: MerchantData | None¶
- Merchant Data
Type:
worldline.acquiring.sdk.v1.domain.merchant_data.MerchantData
- property operation_id: str | None¶
- A globally unique identifier of the operation, generated by you.We advise you to submit a UUID or an identifier composed of an arbitrary string and a UUID/URL-safe Base64 UUID (RFC 4648 §5).It’s used to detect duplicate requests or to reference an operation in technical reversals.
Type: str
- property references: PaymentReferences | None¶
- Payment References
Type:
worldline.acquiring.sdk.v1.domain.payment_references.PaymentReferences
- property transaction_timestamp: datetime | None¶
- Timestamp of transaction in ISO 8601 format (YYYY-MM-DDThh:mm:ss+TZD)It can be expressed in merchant time zone (ex: 2023-10-10T08:00+02:00) or in UTC (ex: 2023-10-10T08:00Z)
Type: datetime
- class worldline.acquiring.sdk.v1.domain.api_account_verification_response.ApiAccountVerificationResponse[source]¶
Bases:
DataObject
- __annotations__ = {'_ApiAccountVerificationResponse__authorization_code': typing.Optional[str], '_ApiAccountVerificationResponse__card_payment_data': typing.Optional[worldline.acquiring.sdk.v1.domain.card_payment_data_for_response.CardPaymentDataForResponse], '_ApiAccountVerificationResponse__operation_id': typing.Optional[str], '_ApiAccountVerificationResponse__references': typing.Optional[worldline.acquiring.sdk.v1.domain.api_references_for_responses.ApiReferencesForResponses], '_ApiAccountVerificationResponse__responder': typing.Optional[str], '_ApiAccountVerificationResponse__response_code': typing.Optional[str], '_ApiAccountVerificationResponse__response_code_category': typing.Optional[str], '_ApiAccountVerificationResponse__response_code_description': typing.Optional[str]}¶
- property authorization_code: str | None¶
- Authorization approval code
Type: str
- property card_payment_data: CardPaymentDataForResponse | None¶
Type:
worldline.acquiring.sdk.v1.domain.card_payment_data_for_response.CardPaymentDataForResponse
- from_dictionary(dictionary: dict) ApiAccountVerificationResponse [source]¶
- property operation_id: str | None¶
- A globally unique identifier of the operation, generated by you.We advise you to submit a UUID or an identifier composed of an arbitrary string and a UUID/URL-safe Base64 UUID (RFC 4648 §5).It’s used to detect duplicate requests or to reference an operation in technical reversals.
Type: str
- property references: ApiReferencesForResponses | None¶
- A set of references returned in responses
Type:
worldline.acquiring.sdk.v1.domain.api_references_for_responses.ApiReferencesForResponses
- property responder: str | None¶
- The party that originated the response
Type: str
- property response_code: str | None¶
- Numeric response code, e.g. 0000, 0005
Type: str
- property response_code_category: str | None¶
- Category of response code.
Type: str
- property response_code_description: str | None¶
- Description of the response code
Type: str
- class worldline.acquiring.sdk.v1.domain.api_action_response.ApiActionResponse[source]¶
Bases:
DataObject
- __annotations__ = {'_ApiActionResponse__operation_id': typing.Optional[str], '_ApiActionResponse__payment': typing.Optional[worldline.acquiring.sdk.v1.domain.api_payment_summary_for_response.ApiPaymentSummaryForResponse], '_ApiActionResponse__responder': typing.Optional[str], '_ApiActionResponse__response_code': typing.Optional[str], '_ApiActionResponse__response_code_category': typing.Optional[str], '_ApiActionResponse__response_code_description': typing.Optional[str]}¶
- from_dictionary(dictionary: dict) ApiActionResponse [source]¶
- property operation_id: str | None¶
- A globally unique identifier of the operation, generated by you.We advise you to submit a UUID or an identifier composed of an arbitrary string and a UUID/URL-safe Base64 UUID (RFC 4648 §5).It’s used to detect duplicate requests or to reference an operation in technical reversals.
Type: str
- property payment: ApiPaymentSummaryForResponse | None¶
- A summary of the payment used for responses
Type:
worldline.acquiring.sdk.v1.domain.api_payment_summary_for_response.ApiPaymentSummaryForResponse
- property responder: str | None¶
- The party that originated the response
Type: str
- property response_code: str | None¶
- Numeric response code, e.g. 0000, 0005
Type: str
- property response_code_category: str | None¶
- Category of response code.
Type: str
- property response_code_description: str | None¶
- Description of the response code
Type: str
- class worldline.acquiring.sdk.v1.domain.api_action_response_for_refund.ApiActionResponseForRefund[source]¶
Bases:
DataObject
- __annotations__ = {'_ApiActionResponseForRefund__operation_id': typing.Optional[str], '_ApiActionResponseForRefund__refund': typing.Optional[worldline.acquiring.sdk.v1.domain.api_refund_summary_for_response.ApiRefundSummaryForResponse], '_ApiActionResponseForRefund__responder': typing.Optional[str], '_ApiActionResponseForRefund__response_code': typing.Optional[str], '_ApiActionResponseForRefund__response_code_category': typing.Optional[str], '_ApiActionResponseForRefund__response_code_description': typing.Optional[str]}¶
- from_dictionary(dictionary: dict) ApiActionResponseForRefund [source]¶
- property operation_id: str | None¶
- A globally unique identifier of the operation, generated by you.We advise you to submit a UUID or an identifier composed of an arbitrary string and a UUID/URL-safe Base64 UUID (RFC 4648 §5).It’s used to detect duplicate requests or to reference an operation in technical reversals.
Type: str
- property refund: ApiRefundSummaryForResponse | None¶
- A summary of the refund used for responses
Type:
worldline.acquiring.sdk.v1.domain.api_refund_summary_for_response.ApiRefundSummaryForResponse
- property responder: str | None¶
- The party that originated the response
Type: str
- property response_code: str | None¶
- Numeric response code, e.g. 0000, 0005
Type: str
- property response_code_category: str | None¶
- Category of response code.
Type: str
- property response_code_description: str | None¶
- Description of the response code
Type: str
- class worldline.acquiring.sdk.v1.domain.api_capture_request.ApiCaptureRequest[source]¶
Bases:
DataObject
- __annotations__ = {'_ApiCaptureRequest__amount': typing.Optional[worldline.acquiring.sdk.v1.domain.amount_data.AmountData], '_ApiCaptureRequest__capture_sequence_number': typing.Optional[int], '_ApiCaptureRequest__dynamic_currency_conversion': typing.Optional[worldline.acquiring.sdk.v1.domain.dcc_data.DccData], '_ApiCaptureRequest__is_final': typing.Optional[bool], '_ApiCaptureRequest__operation_id': typing.Optional[str], '_ApiCaptureRequest__transaction_timestamp': typing.Optional[datetime.datetime]}¶
- property amount: AmountData | None¶
- Amount to capture. If not provided, the full amount will be captured.
Type:
worldline.acquiring.sdk.v1.domain.amount_data.AmountData
- property capture_sequence_number: int | None¶
- The index of the partial capture. Not needed for full capture.
Type: int
- property dynamic_currency_conversion: DccData | None¶
- Dynamic Currency Conversion (DCC) rate data from DCC lookup response.Mandatory for DCC transactions.
- from_dictionary(dictionary: dict) ApiCaptureRequest [source]¶
- property is_final: bool | None¶
- Indicates whether this partial capture is the final one.Not needed for full capture.
Type: bool
- property operation_id: str | None¶
- A globally unique identifier of the operation, generated by you.We advise you to submit a UUID or an identifier composed of an arbitrary string and a UUID/URL-safe Base64 UUID (RFC 4648 §5).It’s used to detect duplicate requests or to reference an operation in technical reversals.
Type: str
- property transaction_timestamp: datetime | None¶
- Timestamp of transaction in ISO 8601 format (YYYY-MM-DDThh:mm:ss+TZD)It can be expressed in merchant time zone (ex: 2023-10-10T08:00+02:00) or in UTC (ex: 2023-10-10T08:00Z)
Type: datetime
- class worldline.acquiring.sdk.v1.domain.api_capture_request_for_refund.ApiCaptureRequestForRefund[source]¶
Bases:
DataObject
- __annotations__ = {'_ApiCaptureRequestForRefund__operation_id': typing.Optional[str], '_ApiCaptureRequestForRefund__transaction_timestamp': typing.Optional[datetime.datetime]}¶
- from_dictionary(dictionary: dict) ApiCaptureRequestForRefund [source]¶
- property operation_id: str | None¶
- A globally unique identifier of the operation, generated by you.We advise you to submit a UUID or an identifier composed of an arbitrary string and a UUID/URL-safe Base64 UUID (RFC 4648 §5).It’s used to detect duplicate requests or to reference an operation in technical reversals.
Type: str
- property transaction_timestamp: datetime | None¶
- Timestamp of transaction in ISO 8601 format (YYYY-MM-DDThh:mm:ss+TZD)It can be expressed in merchant time zone (ex: 2023-10-10T08:00+02:00) or in UTC (ex: 2023-10-10T08:00Z)
Type: datetime
- class worldline.acquiring.sdk.v1.domain.api_increment_request.ApiIncrementRequest[source]¶
Bases:
DataObject
- __annotations__ = {'_ApiIncrementRequest__dynamic_currency_conversion': typing.Optional[worldline.acquiring.sdk.v1.domain.dcc_data.DccData], '_ApiIncrementRequest__increment_amount': typing.Optional[worldline.acquiring.sdk.v1.domain.amount_data.AmountData], '_ApiIncrementRequest__operation_id': typing.Optional[str], '_ApiIncrementRequest__transaction_timestamp': typing.Optional[datetime.datetime]}¶
- property dynamic_currency_conversion: DccData | None¶
- Dynamic Currency Conversion (DCC) rate data from DCC lookup response.Mandatory for DCC transactions.
- from_dictionary(dictionary: dict) ApiIncrementRequest [source]¶
- property increment_amount: AmountData | None¶
- Amount for the operation.
Type:
worldline.acquiring.sdk.v1.domain.amount_data.AmountData
- property operation_id: str | None¶
- A globally unique identifier of the operation, generated by you.We advise you to submit a UUID or an identifier composed of an arbitrary string and a UUID/URL-safe Base64 UUID (RFC 4648 §5).It’s used to detect duplicate requests or to reference an operation in technical reversals.
Type: str
- property transaction_timestamp: datetime | None¶
- Timestamp of transaction in ISO 8601 format (YYYY-MM-DDThh:mm:ss+TZD)It can be expressed in merchant time zone (ex: 2023-10-10T08:00+02:00) or in UTC (ex: 2023-10-10T08:00Z)
Type: datetime
- class worldline.acquiring.sdk.v1.domain.api_increment_response.ApiIncrementResponse[source]¶
Bases:
ApiActionResponse
- __annotations__ = {'_ApiIncrementResponse__authorization_code': typing.Optional[str], '_ApiIncrementResponse__total_authorized_amount': typing.Optional[worldline.acquiring.sdk.v1.domain.amount_data.AmountData]}¶
- property authorization_code: str | None¶
- Authorization approval code
Type: str
- from_dictionary(dictionary: dict) ApiIncrementResponse [source]¶
- property total_authorized_amount: AmountData | None¶
- Amount for the operation.
Type:
worldline.acquiring.sdk.v1.domain.amount_data.AmountData
- class worldline.acquiring.sdk.v1.domain.api_payment_error_response.ApiPaymentErrorResponse[source]¶
Bases:
DataObject
- __annotations__ = {'_ApiPaymentErrorResponse__detail': typing.Optional[str], '_ApiPaymentErrorResponse__instance': typing.Optional[str], '_ApiPaymentErrorResponse__status': typing.Optional[int], '_ApiPaymentErrorResponse__title': typing.Optional[str], '_ApiPaymentErrorResponse__type': typing.Optional[str]}¶
- property detail: str | None¶
- Any relevant details about the error.May include suggestions for handling it. Can be an empty string if no extra details are available.
Type: str
- from_dictionary(dictionary: dict) ApiPaymentErrorResponse [source]¶
- property instance: str | None¶
- A URI reference that identifies the specific occurrence of the error.It may or may not yield further information if dereferenced.
Type: str
- property status: int | None¶
- The HTTP status code of this error response.Included to aid those frameworks that have a hard time working with anything other than the body of an HTTP response.
Type: int
- property title: str | None¶
- The human-readable version of the error.
Type: str
- property type: str | None¶
- The type of the error.This is what you should match against when implementing error handling.It is in the form of a URL that identifies the error type.
Type: str
- class worldline.acquiring.sdk.v1.domain.api_payment_refund_request.ApiPaymentRefundRequest[source]¶
Bases:
DataObject
- __annotations__ = {'_ApiPaymentRefundRequest__amount': typing.Optional[worldline.acquiring.sdk.v1.domain.amount_data.AmountData], '_ApiPaymentRefundRequest__capture_immediately': typing.Optional[bool], '_ApiPaymentRefundRequest__dynamic_currency_conversion': typing.Optional[worldline.acquiring.sdk.v1.domain.dcc_data.DccData], '_ApiPaymentRefundRequest__operation_id': typing.Optional[str], '_ApiPaymentRefundRequest__references': typing.Optional[worldline.acquiring.sdk.v1.domain.payment_references.PaymentReferences], '_ApiPaymentRefundRequest__transaction_timestamp': typing.Optional[datetime.datetime]}¶
- property amount: AmountData | None¶
- Amount to refund. If not provided, the full amount will be refunded.
Type:
worldline.acquiring.sdk.v1.domain.amount_data.AmountData
- property capture_immediately: bool | None¶
- If true the transaction will be authorized and captured immediately
Type: bool
- property dynamic_currency_conversion: DccData | None¶
- Dynamic Currency Conversion (DCC) rate data from DCC lookup response.Mandatory for DCC transactions.
- from_dictionary(dictionary: dict) ApiPaymentRefundRequest [source]¶
- property operation_id: str | None¶
- A globally unique identifier of the operation, generated by you.We advise you to submit a UUID or an identifier composed of an arbitrary string and a UUID/URL-safe Base64 UUID (RFC 4648 §5).It’s used to detect duplicate requests or to reference an operation in technical reversals.
Type: str
- property references: PaymentReferences | None¶
- Payment References
Type:
worldline.acquiring.sdk.v1.domain.payment_references.PaymentReferences
- property transaction_timestamp: datetime | None¶
- Timestamp of transaction in ISO 8601 format (YYYY-MM-DDThh:mm:ss+TZD)It can be expressed in merchant time zone (ex: 2023-10-10T08:00+02:00) or in UTC (ex: 2023-10-10T08:00Z)
Type: datetime
- class worldline.acquiring.sdk.v1.domain.api_payment_request.ApiPaymentRequest[source]¶
Bases:
DataObject
- __annotations__ = {'_ApiPaymentRequest__amount': typing.Optional[worldline.acquiring.sdk.v1.domain.amount_data.AmountData], '_ApiPaymentRequest__authorization_type': typing.Optional[str], '_ApiPaymentRequest__card_payment_data': typing.Optional[worldline.acquiring.sdk.v1.domain.card_payment_data.CardPaymentData], '_ApiPaymentRequest__dynamic_currency_conversion': typing.Optional[worldline.acquiring.sdk.v1.domain.dcc_data.DccData], '_ApiPaymentRequest__merchant': typing.Optional[worldline.acquiring.sdk.v1.domain.merchant_data.MerchantData], '_ApiPaymentRequest__operation_id': typing.Optional[str], '_ApiPaymentRequest__references': typing.Optional[worldline.acquiring.sdk.v1.domain.payment_references.PaymentReferences], '_ApiPaymentRequest__transaction_timestamp': typing.Optional[datetime.datetime]}¶
- property amount: AmountData | None¶
- Amount for the operation.
Type:
worldline.acquiring.sdk.v1.domain.amount_data.AmountData
- property authorization_type: str | None¶
- The type of authorization
Type: str
- property card_payment_data: CardPaymentData | None¶
- Card data
Type:
worldline.acquiring.sdk.v1.domain.card_payment_data.CardPaymentData
- property dynamic_currency_conversion: DccData | None¶
- Dynamic Currency Conversion (DCC) rate data from DCC lookup response.Mandatory for DCC transactions.
- from_dictionary(dictionary: dict) ApiPaymentRequest [source]¶
- property merchant: MerchantData | None¶
- Merchant Data
Type:
worldline.acquiring.sdk.v1.domain.merchant_data.MerchantData
- property operation_id: str | None¶
- A globally unique identifier of the operation, generated by you.We advise you to submit a UUID or an identifier composed of an arbitrary string and a UUID/URL-safe Base64 UUID (RFC 4648 §5).It’s used to detect duplicate requests or to reference an operation in technical reversals.
Type: str
- property references: PaymentReferences | None¶
- Payment References
Type:
worldline.acquiring.sdk.v1.domain.payment_references.PaymentReferences
- property transaction_timestamp: datetime | None¶
- Timestamp of transaction in ISO 8601 format (YYYY-MM-DDThh:mm:ss+TZD)It can be expressed in merchant time zone (ex: 2023-10-10T08:00+02:00) or in UTC (ex: 2023-10-10T08:00Z)
Type: datetime
- class worldline.acquiring.sdk.v1.domain.api_payment_resource.ApiPaymentResource[source]¶
Bases:
DataObject
- __annotations__ = {'_ApiPaymentResource__card_payment_data': typing.Optional[worldline.acquiring.sdk.v1.domain.card_payment_data_for_resource.CardPaymentDataForResource], '_ApiPaymentResource__initial_authorization_code': typing.Optional[str], '_ApiPaymentResource__operations': typing.Optional[typing.List[worldline.acquiring.sdk.v1.domain.sub_operation.SubOperation]], '_ApiPaymentResource__payment_id': typing.Optional[str], '_ApiPaymentResource__references': typing.Optional[worldline.acquiring.sdk.v1.domain.api_references_for_responses.ApiReferencesForResponses], '_ApiPaymentResource__retry_after': typing.Optional[str], '_ApiPaymentResource__status': typing.Optional[str], '_ApiPaymentResource__status_timestamp': typing.Optional[datetime.datetime], '_ApiPaymentResource__total_authorized_amount': typing.Optional[worldline.acquiring.sdk.v1.domain.amount_data.AmountData]}¶
- property card_payment_data: CardPaymentDataForResource | None¶
Type:
worldline.acquiring.sdk.v1.domain.card_payment_data_for_resource.CardPaymentDataForResource
- from_dictionary(dictionary: dict) ApiPaymentResource [source]¶
- property initial_authorization_code: str | None¶
- Authorization approval code
Type: str
- property operations: List[SubOperation] | None¶
Type: list[
worldline.acquiring.sdk.v1.domain.sub_operation.SubOperation
]
- property payment_id: str | None¶
- the ID of the payment
Type: str
- property references: ApiReferencesForResponses | None¶
- A set of references returned in responses
Type:
worldline.acquiring.sdk.v1.domain.api_references_for_responses.ApiReferencesForResponses
- property retry_after: str | None¶
- The duration to wait after the initial submission before retrying the payment.Expressed using ISO 8601 duration format, ex: PT2H for 2 hours.This field is only present when the payment can be retried later.PT0 means that the payment can be retried immediately.
Type: str
- property status: str | None¶
- The status of the payment, refund or credit transfer
Type: str
- property status_timestamp: datetime | None¶
- Timestamp of the status in format yyyy-MM-ddTHH:mm:ssZ
Type: datetime
- property total_authorized_amount: AmountData | None¶
- Amount for the operation.
Type:
worldline.acquiring.sdk.v1.domain.amount_data.AmountData
- class worldline.acquiring.sdk.v1.domain.api_payment_response.ApiPaymentResponse[source]¶
Bases:
DataObject
- __annotations__ = {'_ApiPaymentResponse__card_payment_data': typing.Optional[worldline.acquiring.sdk.v1.domain.card_payment_data_for_response.CardPaymentDataForResponse], '_ApiPaymentResponse__initial_authorization_code': typing.Optional[str], '_ApiPaymentResponse__operation_id': typing.Optional[str], '_ApiPaymentResponse__payment_id': typing.Optional[str], '_ApiPaymentResponse__references': typing.Optional[worldline.acquiring.sdk.v1.domain.api_references_for_responses.ApiReferencesForResponses], '_ApiPaymentResponse__responder': typing.Optional[str], '_ApiPaymentResponse__response_code': typing.Optional[str], '_ApiPaymentResponse__response_code_category': typing.Optional[str], '_ApiPaymentResponse__response_code_description': typing.Optional[str], '_ApiPaymentResponse__retry_after': typing.Optional[str], '_ApiPaymentResponse__status': typing.Optional[str], '_ApiPaymentResponse__status_timestamp': typing.Optional[datetime.datetime], '_ApiPaymentResponse__total_authorized_amount': typing.Optional[worldline.acquiring.sdk.v1.domain.amount_data.AmountData]}¶
- property card_payment_data: CardPaymentDataForResponse | None¶
Type:
worldline.acquiring.sdk.v1.domain.card_payment_data_for_response.CardPaymentDataForResponse
- from_dictionary(dictionary: dict) ApiPaymentResponse [source]¶
- property initial_authorization_code: str | None¶
- Authorization approval code
Type: str
- property operation_id: str | None¶
- A globally unique identifier of the operation, generated by you.We advise you to submit a UUID or an identifier composed of an arbitrary string and a UUID/URL-safe Base64 UUID (RFC 4648 §5).It’s used to detect duplicate requests or to reference an operation in technical reversals.
Type: str
- property payment_id: str | None¶
- the ID of the payment
Type: str
- property references: ApiReferencesForResponses | None¶
- A set of references returned in responses
Type:
worldline.acquiring.sdk.v1.domain.api_references_for_responses.ApiReferencesForResponses
- property responder: str | None¶
- The party that originated the response
Type: str
- property response_code: str | None¶
- Numeric response code, e.g. 0000, 0005
Type: str
- property response_code_category: str | None¶
- Category of response code.
Type: str
- property response_code_description: str | None¶
- Description of the response code
Type: str
- property retry_after: str | None¶
- The duration to wait after the initial submission before retrying the payment.Expressed using ISO 8601 duration format, ex: PT2H for 2 hours.This field is only present when the payment can be retried later.PT0 means that the payment can be retried immediately.
Type: str
- property status: str | None¶
- The status of the payment, refund or credit transfer
Type: str
- property status_timestamp: datetime | None¶
- Timestamp of the status in format yyyy-MM-ddTHH:mm:ssZ
Type: datetime
- property total_authorized_amount: AmountData | None¶
- Amount for the operation.
Type:
worldline.acquiring.sdk.v1.domain.amount_data.AmountData
- class worldline.acquiring.sdk.v1.domain.api_payment_reversal_request.ApiPaymentReversalRequest[source]¶
Bases:
DataObject
- __annotations__ = {'_ApiPaymentReversalRequest__dynamic_currency_conversion': typing.Optional[worldline.acquiring.sdk.v1.domain.dcc_data.DccData], '_ApiPaymentReversalRequest__operation_id': typing.Optional[str], '_ApiPaymentReversalRequest__reversal_amount': typing.Optional[worldline.acquiring.sdk.v1.domain.amount_data.AmountData], '_ApiPaymentReversalRequest__transaction_timestamp': typing.Optional[datetime.datetime]}¶
- property dynamic_currency_conversion: DccData | None¶
- Dynamic Currency Conversion (DCC) rate data from DCC lookup response.Mandatory for DCC transactions.
- from_dictionary(dictionary: dict) ApiPaymentReversalRequest [source]¶
- property operation_id: str | None¶
- A globally unique identifier of the operation, generated by you.We advise you to submit a UUID or an identifier composed of an arbitrary string and a UUID/URL-safe Base64 UUID (RFC 4648 §5).It’s used to detect duplicate requests or to reference an operation in technical reversals.
Type: str
- property reversal_amount: AmountData | None¶
- Amount to reverse. If not provided, the full amount will be reversed.
Type:
worldline.acquiring.sdk.v1.domain.amount_data.AmountData
- property transaction_timestamp: datetime | None¶
- Timestamp of transaction in ISO 8601 format (YYYY-MM-DDThh:mm:ss+TZD)It can be expressed in merchant time zone (ex: 2023-10-10T08:00+02:00) or in UTC (ex: 2023-10-10T08:00Z)
Type: datetime
- class worldline.acquiring.sdk.v1.domain.api_payment_summary_for_response.ApiPaymentSummaryForResponse[source]¶
Bases:
DataObject
- __annotations__ = {'_ApiPaymentSummaryForResponse__payment_id': typing.Optional[str], '_ApiPaymentSummaryForResponse__references': typing.Optional[worldline.acquiring.sdk.v1.domain.api_references_for_responses.ApiReferencesForResponses], '_ApiPaymentSummaryForResponse__retry_after': typing.Optional[str], '_ApiPaymentSummaryForResponse__status': typing.Optional[str], '_ApiPaymentSummaryForResponse__status_timestamp': typing.Optional[datetime.datetime]}¶
- from_dictionary(dictionary: dict) ApiPaymentSummaryForResponse [source]¶
- property payment_id: str | None¶
- the ID of the payment
Type: str
- property references: ApiReferencesForResponses | None¶
- A set of references returned in responses
Type:
worldline.acquiring.sdk.v1.domain.api_references_for_responses.ApiReferencesForResponses
- property retry_after: str | None¶
- The duration to wait after the initial submission before retrying the payment.Expressed using ISO 8601 duration format, ex: PT2H for 2 hours.This field is only present when the payment can be retried later.PT0 means that the payment can be retried immediately.
Type: str
- property status: str | None¶
- The status of the payment, refund or credit transfer
Type: str
- property status_timestamp: datetime | None¶
- Timestamp of the status in format yyyy-MM-ddTHH:mm:ssZ
Type: datetime
- class worldline.acquiring.sdk.v1.domain.api_references_for_responses.ApiReferencesForResponses[source]¶
Bases:
DataObject
- __annotations__ = {'_ApiReferencesForResponses__payment_account_reference': typing.Optional[str], '_ApiReferencesForResponses__retrieval_reference_number': typing.Optional[str], '_ApiReferencesForResponses__scheme_transaction_id': typing.Optional[str]}¶
- from_dictionary(dictionary: dict) ApiReferencesForResponses [source]¶
- property payment_account_reference: str | None¶
- (PAR) Unique identifier associated with a specific cardholder PAN
Type: str
- property retrieval_reference_number: str | None¶
- Retrieval reference number for transaction, must be AN(12) if provided
Type: str
- property scheme_transaction_id: str | None¶
- ID assigned by the scheme to identify a transaction through its whole lifecycle.
Type: str
- class worldline.acquiring.sdk.v1.domain.api_refund_request.ApiRefundRequest[source]¶
Bases:
DataObject
- __annotations__ = {'_ApiRefundRequest__amount': typing.Optional[worldline.acquiring.sdk.v1.domain.amount_data.AmountData], '_ApiRefundRequest__card_payment_data': typing.Optional[worldline.acquiring.sdk.v1.domain.card_payment_data_for_refund.CardPaymentDataForRefund], '_ApiRefundRequest__dynamic_currency_conversion': typing.Optional[worldline.acquiring.sdk.v1.domain.dcc_data.DccData], '_ApiRefundRequest__merchant': typing.Optional[worldline.acquiring.sdk.v1.domain.merchant_data.MerchantData], '_ApiRefundRequest__operation_id': typing.Optional[str], '_ApiRefundRequest__references': typing.Optional[worldline.acquiring.sdk.v1.domain.payment_references.PaymentReferences], '_ApiRefundRequest__transaction_timestamp': typing.Optional[datetime.datetime]}¶
- property amount: AmountData | None¶
- Amount for the operation.
Type:
worldline.acquiring.sdk.v1.domain.amount_data.AmountData
- property card_payment_data: CardPaymentDataForRefund | None¶
- Card data for refund
Type:
worldline.acquiring.sdk.v1.domain.card_payment_data_for_refund.CardPaymentDataForRefund
- property dynamic_currency_conversion: DccData | None¶
- Dynamic Currency Conversion (DCC) rate data from DCC lookup response.Mandatory for DCC transactions.
- from_dictionary(dictionary: dict) ApiRefundRequest [source]¶
- property merchant: MerchantData | None¶
- Merchant Data
Type:
worldline.acquiring.sdk.v1.domain.merchant_data.MerchantData
- property operation_id: str | None¶
- A globally unique identifier of the operation, generated by you.We advise you to submit a UUID or an identifier composed of an arbitrary string and a UUID/URL-safe Base64 UUID (RFC 4648 §5).It’s used to detect duplicate requests or to reference an operation in technical reversals.
Type: str
- property references: PaymentReferences | None¶
- Payment References
Type:
worldline.acquiring.sdk.v1.domain.payment_references.PaymentReferences
- property transaction_timestamp: datetime | None¶
- Timestamp of transaction in ISO 8601 format (YYYY-MM-DDThh:mm:ss+TZD)It can be expressed in merchant time zone (ex: 2023-10-10T08:00+02:00) or in UTC (ex: 2023-10-10T08:00Z)
Type: datetime
- class worldline.acquiring.sdk.v1.domain.api_refund_resource.ApiRefundResource[source]¶
Bases:
DataObject
- __annotations__ = {'_ApiRefundResource__card_payment_data': typing.Optional[worldline.acquiring.sdk.v1.domain.card_payment_data_for_resource.CardPaymentDataForResource], '_ApiRefundResource__initial_authorization_code': typing.Optional[str], '_ApiRefundResource__operations': typing.Optional[typing.List[worldline.acquiring.sdk.v1.domain.sub_operation_for_refund.SubOperationForRefund]], '_ApiRefundResource__referenced_payment_id': typing.Optional[str], '_ApiRefundResource__references': typing.Optional[worldline.acquiring.sdk.v1.domain.api_references_for_responses.ApiReferencesForResponses], '_ApiRefundResource__refund_id': typing.Optional[str], '_ApiRefundResource__retry_after': typing.Optional[str], '_ApiRefundResource__status': typing.Optional[str], '_ApiRefundResource__status_timestamp': typing.Optional[datetime.datetime], '_ApiRefundResource__total_authorized_amount': typing.Optional[worldline.acquiring.sdk.v1.domain.amount_data.AmountData]}¶
- property card_payment_data: CardPaymentDataForResource | None¶
Type:
worldline.acquiring.sdk.v1.domain.card_payment_data_for_resource.CardPaymentDataForResource
- from_dictionary(dictionary: dict) ApiRefundResource [source]¶
- property initial_authorization_code: str | None¶
- Authorization approval code
Type: str
- property operations: List[SubOperationForRefund] | None¶
Type: list[
worldline.acquiring.sdk.v1.domain.sub_operation_for_refund.SubOperationForRefund
]
- property referenced_payment_id: str | None¶
- The identifier of the payment referenced by this refund.
Type: str
- property references: ApiReferencesForResponses | None¶
- A set of references returned in responses
Type:
worldline.acquiring.sdk.v1.domain.api_references_for_responses.ApiReferencesForResponses
- property refund_id: str | None¶
- the ID of the refund
Type: str
- property retry_after: str | None¶
- The duration to wait after the initial submission before retrying the payment.Expressed using ISO 8601 duration format, ex: PT2H for 2 hours.This field is only present when the payment can be retried later.PT0 means that the payment can be retried immediately.
Type: str
- property status: str | None¶
- The status of the payment, refund or credit transfer
Type: str
- property status_timestamp: datetime | None¶
- Timestamp of the status in format yyyy-MM-ddTHH:mm:ssZ
Type: datetime
- property total_authorized_amount: AmountData | None¶
- Amount for the operation.
Type:
worldline.acquiring.sdk.v1.domain.amount_data.AmountData
- class worldline.acquiring.sdk.v1.domain.api_refund_response.ApiRefundResponse[source]¶
Bases:
DataObject
- __annotations__ = {'_ApiRefundResponse__authorization_code': typing.Optional[str], '_ApiRefundResponse__card_payment_data': typing.Optional[worldline.acquiring.sdk.v1.domain.card_payment_data_for_resource.CardPaymentDataForResource], '_ApiRefundResponse__operation_id': typing.Optional[str], '_ApiRefundResponse__referenced_payment_id': typing.Optional[str], '_ApiRefundResponse__references': typing.Optional[worldline.acquiring.sdk.v1.domain.api_references_for_responses.ApiReferencesForResponses], '_ApiRefundResponse__refund_id': typing.Optional[str], '_ApiRefundResponse__responder': typing.Optional[str], '_ApiRefundResponse__response_code': typing.Optional[str], '_ApiRefundResponse__response_code_category': typing.Optional[str], '_ApiRefundResponse__response_code_description': typing.Optional[str], '_ApiRefundResponse__retry_after': typing.Optional[str], '_ApiRefundResponse__status': typing.Optional[str], '_ApiRefundResponse__status_timestamp': typing.Optional[datetime.datetime], '_ApiRefundResponse__total_authorized_amount': typing.Optional[worldline.acquiring.sdk.v1.domain.amount_data.AmountData]}¶
- property authorization_code: str | None¶
- Authorization approval code
Type: str
- property card_payment_data: CardPaymentDataForResource | None¶
Type:
worldline.acquiring.sdk.v1.domain.card_payment_data_for_resource.CardPaymentDataForResource
- from_dictionary(dictionary: dict) ApiRefundResponse [source]¶
- property operation_id: str | None¶
- A globally unique identifier of the operation, generated by you.We advise you to submit a UUID or an identifier composed of an arbitrary string and a UUID/URL-safe Base64 UUID (RFC 4648 §5).It’s used to detect duplicate requests or to reference an operation in technical reversals.
Type: str
- property referenced_payment_id: str | None¶
- The identifier of the payment referenced by this refund.
Type: str
- property references: ApiReferencesForResponses | None¶
- A set of references returned in responses
Type:
worldline.acquiring.sdk.v1.domain.api_references_for_responses.ApiReferencesForResponses
- property refund_id: str | None¶
- the ID of the refund
Type: str
- property responder: str | None¶
- The party that originated the response
Type: str
- property response_code: str | None¶
- Numeric response code, e.g. 0000, 0005
Type: str
- property response_code_category: str | None¶
- Category of response code.
Type: str
- property response_code_description: str | None¶
- Description of the response code
Type: str
- property retry_after: str | None¶
- The duration to wait after the initial submission before retrying the payment.Expressed using ISO 8601 duration format, ex: PT2H for 2 hours.This field is only present when the payment can be retried later.PT0 means that the payment can be retried immediately.
Type: str
- property status: str | None¶
- The status of the payment, refund or credit transfer
Type: str
- property status_timestamp: datetime | None¶
- Timestamp of the status in format yyyy-MM-ddTHH:mm:ssZ
Type: datetime
- property total_authorized_amount: AmountData | None¶
- Amount for the operation.
Type:
worldline.acquiring.sdk.v1.domain.amount_data.AmountData
- class worldline.acquiring.sdk.v1.domain.api_refund_summary_for_response.ApiRefundSummaryForResponse[source]¶
Bases:
DataObject
- __annotations__ = {'_ApiRefundSummaryForResponse__references': typing.Optional[worldline.acquiring.sdk.v1.domain.api_references_for_responses.ApiReferencesForResponses], '_ApiRefundSummaryForResponse__refund_id': typing.Optional[str], '_ApiRefundSummaryForResponse__retry_after': typing.Optional[str], '_ApiRefundSummaryForResponse__status': typing.Optional[str], '_ApiRefundSummaryForResponse__status_timestamp': typing.Optional[datetime.datetime]}¶
- from_dictionary(dictionary: dict) ApiRefundSummaryForResponse [source]¶
- property references: ApiReferencesForResponses | None¶
- A set of references returned in responses
Type:
worldline.acquiring.sdk.v1.domain.api_references_for_responses.ApiReferencesForResponses
- property refund_id: str | None¶
- the ID of the refund
Type: str
- property retry_after: str | None¶
- The duration to wait after the initial submission before retrying the payment.Expressed using ISO 8601 duration format, ex: PT2H for 2 hours.This field is only present when the payment can be retried later.PT0 means that the payment can be retried immediately.
Type: str
- property status: str | None¶
- The status of the payment, refund or credit transfer
Type: str
- property status_timestamp: datetime | None¶
- Timestamp of the status in format yyyy-MM-ddTHH:mm:ssZ
Type: datetime
- class worldline.acquiring.sdk.v1.domain.api_reversal_response.ApiReversalResponse[source]¶
Bases:
ApiActionResponse
- __annotations__ = {'_ApiReversalResponse__total_authorized_amount': typing.Optional[worldline.acquiring.sdk.v1.domain.amount_data.AmountData]}¶
- from_dictionary(dictionary: dict) ApiReversalResponse [source]¶
- property total_authorized_amount: AmountData | None¶
- Amount for the operation.
Type:
worldline.acquiring.sdk.v1.domain.amount_data.AmountData
- class worldline.acquiring.sdk.v1.domain.api_technical_reversal_request.ApiTechnicalReversalRequest[source]¶
Bases:
DataObject
- __annotations__ = {'_ApiTechnicalReversalRequest__operation_id': typing.Optional[str], '_ApiTechnicalReversalRequest__reason': typing.Optional[str], '_ApiTechnicalReversalRequest__transaction_timestamp': typing.Optional[datetime.datetime]}¶
- from_dictionary(dictionary: dict) ApiTechnicalReversalRequest [source]¶
- property operation_id: str | None¶
- A globally unique identifier of the operation, generated by you.We advise you to submit a UUID or an identifier composed of an arbitrary string and a UUID/URL-safe Base64 UUID (RFC 4648 §5).It’s used to detect duplicate requests or to reference an operation in technical reversals.
Type: str
- property reason: str | None¶
- Reason for reversal
Type: str
- property transaction_timestamp: datetime | None¶
- Timestamp of transaction in ISO 8601 format (YYYY-MM-DDThh:mm:ss+TZD)It can be expressed in merchant time zone (ex: 2023-10-10T08:00+02:00) or in UTC (ex: 2023-10-10T08:00Z)
Type: datetime
- class worldline.acquiring.sdk.v1.domain.api_technical_reversal_response.ApiTechnicalReversalResponse[source]¶
Bases:
DataObject
- __annotations__ = {'_ApiTechnicalReversalResponse__operation_id': typing.Optional[str], '_ApiTechnicalReversalResponse__responder': typing.Optional[str], '_ApiTechnicalReversalResponse__response_code': typing.Optional[str], '_ApiTechnicalReversalResponse__response_code_category': typing.Optional[str], '_ApiTechnicalReversalResponse__response_code_description': typing.Optional[str]}¶
- from_dictionary(dictionary: dict) ApiTechnicalReversalResponse [source]¶
- property operation_id: str | None¶
- A globally unique identifier of the operation, generated by you.We advise you to submit a UUID or an identifier composed of an arbitrary string and a UUID/URL-safe Base64 UUID (RFC 4648 §5).It’s used to detect duplicate requests or to reference an operation in technical reversals.
Type: str
- property responder: str | None¶
- The party that originated the response
Type: str
- property response_code: str | None¶
- Numeric response code, e.g. 0000, 0005
Type: str
- property response_code_category: str | None¶
- Category of response code.
Type: str
- property response_code_description: str | None¶
- Description of the response code
Type: str
- class worldline.acquiring.sdk.v1.domain.card_data_for_dcc.CardDataForDcc[source]¶
Bases:
DataObject
- __annotations__ = {'_CardDataForDcc__bin': typing.Optional[str], '_CardDataForDcc__brand': typing.Optional[str], '_CardDataForDcc__card_country_code': typing.Optional[str]}¶
- property bin: str | None¶
- Used to determine the currency of the card. The first 12 digits of the card number. The BIN number is on the first 6 or 8 digits. Some issuers are using subranges for different countries on digits 9-12.
Type: str
- property brand: str | None¶
- The card brand
Type: str
- property card_country_code: str | None¶
- The country code of the card
Type: str
- from_dictionary(dictionary: dict) CardDataForDcc [source]¶
- class worldline.acquiring.sdk.v1.domain.card_on_file_data.CardOnFileData[source]¶
Bases:
DataObject
- __annotations__ = {'_CardOnFileData__initial_card_on_file_data': typing.Optional[worldline.acquiring.sdk.v1.domain.initial_card_on_file_data.InitialCardOnFileData], '_CardOnFileData__is_initial_transaction': typing.Optional[bool], '_CardOnFileData__subsequent_card_on_file_data': typing.Optional[worldline.acquiring.sdk.v1.domain.subsequent_card_on_file_data.SubsequentCardOnFileData]}¶
- from_dictionary(dictionary: dict) CardOnFileData [source]¶
- property initial_card_on_file_data: InitialCardOnFileData | None¶
Type:
worldline.acquiring.sdk.v1.domain.initial_card_on_file_data.InitialCardOnFileData
- property is_initial_transaction: bool | None¶
- Indicate wether this is the initial Card on File transaction or not
Type: bool
- property subsequent_card_on_file_data: SubsequentCardOnFileData | None¶
Type:
worldline.acquiring.sdk.v1.domain.subsequent_card_on_file_data.SubsequentCardOnFileData
- class worldline.acquiring.sdk.v1.domain.card_payment_data.CardPaymentData[source]¶
Bases:
DataObject
- __annotations__ = {'_CardPaymentData__allow_partial_approval': typing.Optional[bool], '_CardPaymentData__brand': typing.Optional[str], '_CardPaymentData__capture_immediately': typing.Optional[bool], '_CardPaymentData__card_data': typing.Optional[worldline.acquiring.sdk.v1.domain.plain_card_data.PlainCardData], '_CardPaymentData__card_entry_mode': typing.Optional[str], '_CardPaymentData__card_on_file_data': typing.Optional[worldline.acquiring.sdk.v1.domain.card_on_file_data.CardOnFileData], '_CardPaymentData__cardholder_verification_method': typing.Optional[str], '_CardPaymentData__ecommerce_data': typing.Optional[worldline.acquiring.sdk.v1.domain.e_commerce_data.ECommerceData], '_CardPaymentData__network_token_data': typing.Optional[worldline.acquiring.sdk.v1.domain.network_token_data.NetworkTokenData], '_CardPaymentData__point_of_sale_data': typing.Optional[worldline.acquiring.sdk.v1.domain.point_of_sale_data.PointOfSaleData], '_CardPaymentData__wallet_id': typing.Optional[str]}¶
- property allow_partial_approval: bool | None¶
- Indicate wether you allow partial approval or not
Type: bool
- property brand: str | None¶
- The card brand
Type: str
- property capture_immediately: bool | None¶
- If true the transaction will be authorized and captured immediately
Type: bool
- property card_data: PlainCardData | None¶
- Card data in plain text
Type:
worldline.acquiring.sdk.v1.domain.plain_card_data.PlainCardData
- property card_entry_mode: str | None¶
- Card entry mode used in the transaction, defaults to ECOMMERCE
Type: str
- property card_on_file_data: CardOnFileData | None¶
Type:
worldline.acquiring.sdk.v1.domain.card_on_file_data.CardOnFileData
- property cardholder_verification_method: str | None¶
- Cardholder verification method used in the transaction
Type: str
- property ecommerce_data: ECommerceData | None¶
- Request data for eCommerce and MOTO transactions
Type:
worldline.acquiring.sdk.v1.domain.e_commerce_data.ECommerceData
- from_dictionary(dictionary: dict) CardPaymentData [source]¶
- property network_token_data: NetworkTokenData | None¶
Type:
worldline.acquiring.sdk.v1.domain.network_token_data.NetworkTokenData
- property point_of_sale_data: PointOfSaleData | None¶
- Payment terminal request data
Type:
worldline.acquiring.sdk.v1.domain.point_of_sale_data.PointOfSaleData
- property wallet_id: str | None¶
- Type of wallet, values are assigned by card schemes, e.g. 101 for MasterPass in eCommerce, 102 for MasterPass NFC, 103 for Apple Pay, 216 for Google Pay and 217 for Samsung Pay
Type: str
- class worldline.acquiring.sdk.v1.domain.card_payment_data_for_refund.CardPaymentDataForRefund[source]¶
Bases:
DataObject
- __annotations__ = {'_CardPaymentDataForRefund__brand': typing.Optional[str], '_CardPaymentDataForRefund__capture_immediately': typing.Optional[bool], '_CardPaymentDataForRefund__card_data': typing.Optional[worldline.acquiring.sdk.v1.domain.plain_card_data.PlainCardData], '_CardPaymentDataForRefund__card_entry_mode': typing.Optional[str], '_CardPaymentDataForRefund__network_token_data': typing.Optional[worldline.acquiring.sdk.v1.domain.network_token_data.NetworkTokenData], '_CardPaymentDataForRefund__point_of_sale_data': typing.Optional[worldline.acquiring.sdk.v1.domain.point_of_sale_data.PointOfSaleData], '_CardPaymentDataForRefund__wallet_id': typing.Optional[str]}¶
- property brand: str | None¶
- The card brand
Type: str
- property capture_immediately: bool | None¶
- If true the transaction will be authorized and captured immediately
Type: bool
- property card_data: PlainCardData | None¶
- Card data in plain text
Type:
worldline.acquiring.sdk.v1.domain.plain_card_data.PlainCardData
- property card_entry_mode: str | None¶
- Card entry mode used in the transaction, defaults to ECOMMERCE
Type: str
- from_dictionary(dictionary: dict) CardPaymentDataForRefund [source]¶
- property network_token_data: NetworkTokenData | None¶
Type:
worldline.acquiring.sdk.v1.domain.network_token_data.NetworkTokenData
- property point_of_sale_data: PointOfSaleData | None¶
- Payment terminal request data
Type:
worldline.acquiring.sdk.v1.domain.point_of_sale_data.PointOfSaleData
- property wallet_id: str | None¶
- Type of wallet, values are assigned by card schemes, e.g. 101 for MasterPass in eCommerce, 102 for MasterPass NFC, 103 for Apple Pay, 216 for Google Pay and 217 for Samsung Pay
Type: str
- class worldline.acquiring.sdk.v1.domain.card_payment_data_for_resource.CardPaymentDataForResource[source]¶
Bases:
DataObject
- __annotations__ = {'_CardPaymentDataForResource__brand': typing.Optional[str], '_CardPaymentDataForResource__point_of_sale_data': typing.Optional[worldline.acquiring.sdk.v1.domain.point_of_sale_data.PointOfSaleData]}¶
- property brand: str | None¶
- The card brand
Type: str
- from_dictionary(dictionary: dict) CardPaymentDataForResource [source]¶
- property point_of_sale_data: PointOfSaleData | None¶
- Payment terminal request data
Type:
worldline.acquiring.sdk.v1.domain.point_of_sale_data.PointOfSaleData
- class worldline.acquiring.sdk.v1.domain.card_payment_data_for_response.CardPaymentDataForResponse[source]¶
Bases:
DataObject
- __annotations__ = {'_CardPaymentDataForResponse__brand': typing.Optional[str], '_CardPaymentDataForResponse__ecommerce_data': typing.Optional[worldline.acquiring.sdk.v1.domain.e_commerce_data_for_response.ECommerceDataForResponse], '_CardPaymentDataForResponse__point_of_sale_data': typing.Optional[worldline.acquiring.sdk.v1.domain.point_of_sale_data.PointOfSaleData]}¶
- property brand: str | None¶
- The card brand
Type: str
- property ecommerce_data: ECommerceDataForResponse | None¶
Type:
worldline.acquiring.sdk.v1.domain.e_commerce_data_for_response.ECommerceDataForResponse
- from_dictionary(dictionary: dict) CardPaymentDataForResponse [source]¶
- property point_of_sale_data: PointOfSaleData | None¶
- Payment terminal request data
Type:
worldline.acquiring.sdk.v1.domain.point_of_sale_data.PointOfSaleData
- class worldline.acquiring.sdk.v1.domain.card_payment_data_for_verification.CardPaymentDataForVerification[source]¶
Bases:
DataObject
- __annotations__ = {'_CardPaymentDataForVerification__brand': typing.Optional[str], '_CardPaymentDataForVerification__card_data': typing.Optional[worldline.acquiring.sdk.v1.domain.plain_card_data.PlainCardData], '_CardPaymentDataForVerification__card_entry_mode': typing.Optional[str], '_CardPaymentDataForVerification__card_on_file_data': typing.Optional[worldline.acquiring.sdk.v1.domain.card_on_file_data.CardOnFileData], '_CardPaymentDataForVerification__cardholder_verification_method': typing.Optional[str], '_CardPaymentDataForVerification__ecommerce_data': typing.Optional[worldline.acquiring.sdk.v1.domain.e_commerce_data_for_account_verification.ECommerceDataForAccountVerification], '_CardPaymentDataForVerification__network_token_data': typing.Optional[worldline.acquiring.sdk.v1.domain.network_token_data.NetworkTokenData], '_CardPaymentDataForVerification__wallet_id': typing.Optional[str]}¶
- property brand: str | None¶
- The card brand
Type: str
- property card_data: PlainCardData | None¶
- Card data in plain text
Type:
worldline.acquiring.sdk.v1.domain.plain_card_data.PlainCardData
- property card_entry_mode: str | None¶
- Card entry mode used in the transaction, defaults to ECOMMERCE
Type: str
- property card_on_file_data: CardOnFileData | None¶
Type:
worldline.acquiring.sdk.v1.domain.card_on_file_data.CardOnFileData
- property cardholder_verification_method: str | None¶
- Cardholder verification method used in the transaction
Type: str
- property ecommerce_data: ECommerceDataForAccountVerification | None¶
- Request data for eCommerce and MOTO transactions
- from_dictionary(dictionary: dict) CardPaymentDataForVerification [source]¶
- property network_token_data: NetworkTokenData | None¶
Type:
worldline.acquiring.sdk.v1.domain.network_token_data.NetworkTokenData
- property wallet_id: str | None¶
- Type of wallet, values are assigned by card schemes, e.g. 101 for MasterPass in eCommerce, 102 for MasterPass NFC, 103 for Apple Pay, 216 for Google Pay and 217 for Samsung Pay
Type: str
- class worldline.acquiring.sdk.v1.domain.dcc_data.DccData[source]¶
Bases:
DataObject
- __annotations__ = {'_DccData__amount': typing.Optional[int], '_DccData__conversion_rate': typing.Optional[float], '_DccData__currency_code': typing.Optional[str], '_DccData__number_of_decimals': typing.Optional[int]}¶
- property amount: int | None¶
- Amount of transaction formatted according to card scheme specifications. E.g. 100 for 1.00 EUR. Either this or amount must be present.
Type: int
- property conversion_rate: float | None¶
- Currency conversion rate in decimal notation.Either this or isoConversionRate must be present
Type: float
- property currency_code: str | None¶
- Alpha-numeric ISO 4217 currency code for transaction, e.g. EUR
Type: str
- property number_of_decimals: int | None¶
- Number of decimals in the amount
Type: int
- class worldline.acquiring.sdk.v1.domain.dcc_proposal.DccProposal[source]¶
Bases:
DataObject
- __annotations__ = {'_DccProposal__original_amount': typing.Optional[worldline.acquiring.sdk.v1.domain.amount_data.AmountData], '_DccProposal__rate': typing.Optional[worldline.acquiring.sdk.v1.domain.rate_data.RateData], '_DccProposal__rate_reference_id': typing.Optional[str], '_DccProposal__resulting_amount': typing.Optional[worldline.acquiring.sdk.v1.domain.amount_data.AmountData]}¶
- from_dictionary(dictionary: dict) DccProposal [source]¶
- property original_amount: AmountData | None¶
- Amount for the operation.
Type:
worldline.acquiring.sdk.v1.domain.amount_data.AmountData
- property rate_reference_id: str | None¶
- The rate reference ID
Type: str
- property resulting_amount: AmountData | None¶
- Amount for the operation.
Type:
worldline.acquiring.sdk.v1.domain.amount_data.AmountData
- class worldline.acquiring.sdk.v1.domain.e_commerce_data.ECommerceData[source]¶
Bases:
DataObject
- __annotations__ = {'_ECommerceData__address_verification_data': typing.Optional[worldline.acquiring.sdk.v1.domain.address_verification_data.AddressVerificationData], '_ECommerceData__sca_exemption_request': typing.Optional[str], '_ECommerceData__three_d_secure': typing.Optional[worldline.acquiring.sdk.v1.domain.three_d_secure.ThreeDSecure]}¶
- property address_verification_data: AddressVerificationData | None¶
- Address Verification System data
Type:
worldline.acquiring.sdk.v1.domain.address_verification_data.AddressVerificationData
- from_dictionary(dictionary: dict) ECommerceData [source]¶
- property sca_exemption_request: str | None¶
- Strong customer authentication exemption request
Type: str
- property three_d_secure: ThreeDSecure | None¶
- 3D Secure data.Please note that if AAV or CAVV or equivalent is missing, transaction should not be flagged as 3D Secure.
Type:
worldline.acquiring.sdk.v1.domain.three_d_secure.ThreeDSecure
- class worldline.acquiring.sdk.v1.domain.e_commerce_data_for_account_verification.ECommerceDataForAccountVerification[source]¶
Bases:
DataObject
- __annotations__ = {'_ECommerceDataForAccountVerification__address_verification_data': typing.Optional[worldline.acquiring.sdk.v1.domain.address_verification_data.AddressVerificationData], '_ECommerceDataForAccountVerification__three_d_secure': typing.Optional[worldline.acquiring.sdk.v1.domain.three_d_secure.ThreeDSecure]}¶
- property address_verification_data: AddressVerificationData | None¶
- Address Verification System data
Type:
worldline.acquiring.sdk.v1.domain.address_verification_data.AddressVerificationData
- from_dictionary(dictionary: dict) ECommerceDataForAccountVerification [source]¶
- property three_d_secure: ThreeDSecure | None¶
- 3D Secure data.Please note that if AAV or CAVV or equivalent is missing, transaction should not be flagged as 3D Secure.
Type:
worldline.acquiring.sdk.v1.domain.three_d_secure.ThreeDSecure
- class worldline.acquiring.sdk.v1.domain.e_commerce_data_for_response.ECommerceDataForResponse[source]¶
Bases:
DataObject
- __annotations__ = {'_ECommerceDataForResponse__address_verification_result': typing.Optional[str], '_ECommerceDataForResponse__card_security_code_result': typing.Optional[str]}¶
- property address_verification_result: str | None¶
- Result of Address Verification Result
Type: str
- property card_security_code_result: str | None¶
- Result of card security code check
Type: str
- from_dictionary(dictionary: dict) ECommerceDataForResponse [source]¶
- class worldline.acquiring.sdk.v1.domain.get_dcc_rate_request.GetDCCRateRequest[source]¶
Bases:
DataObject
- __annotations__ = {'_GetDCCRateRequest__card_payment_data': typing.Optional[worldline.acquiring.sdk.v1.domain.card_data_for_dcc.CardDataForDcc], '_GetDCCRateRequest__operation_id': typing.Optional[str], '_GetDCCRateRequest__point_of_sale_data': typing.Optional[worldline.acquiring.sdk.v1.domain.point_of_sale_data_for_dcc.PointOfSaleDataForDcc], '_GetDCCRateRequest__rate_reference_id': typing.Optional[str], '_GetDCCRateRequest__target_currency': typing.Optional[str], '_GetDCCRateRequest__transaction': typing.Optional[worldline.acquiring.sdk.v1.domain.transaction_data_for_dcc.TransactionDataForDcc]}¶
- property card_payment_data: CardDataForDcc | None¶
Type:
worldline.acquiring.sdk.v1.domain.card_data_for_dcc.CardDataForDcc
- from_dictionary(dictionary: dict) GetDCCRateRequest [source]¶
- property operation_id: str | None¶
- A unique identifier of the operation, generated by the client.
Type: str
- property point_of_sale_data: PointOfSaleDataForDcc | None¶
Type:
worldline.acquiring.sdk.v1.domain.point_of_sale_data_for_dcc.PointOfSaleDataForDcc
- property rate_reference_id: str | None¶
- The reference of a previously used rateThis can be used in case of refund if you want to use the same rate as the original transaction.
Type: str
- property target_currency: str | None¶
- The currency to convert to
Type: str
- property transaction: TransactionDataForDcc | None¶
Type:
worldline.acquiring.sdk.v1.domain.transaction_data_for_dcc.TransactionDataForDcc
- class worldline.acquiring.sdk.v1.domain.get_dcc_rate_response.GetDccRateResponse[source]¶
Bases:
DataObject
- __annotations__ = {'_GetDccRateResponse__disclaimer_display': typing.Optional[str], '_GetDccRateResponse__disclaimer_receipt': typing.Optional[str], '_GetDccRateResponse__proposal': typing.Optional[worldline.acquiring.sdk.v1.domain.dcc_proposal.DccProposal], '_GetDccRateResponse__result': typing.Optional[str]}¶
- property disclaimer_display: str | None¶
- The disclaimer display
Type: str
- property disclaimer_receipt: str | None¶
- The disclaimer receipt
Type: str
- from_dictionary(dictionary: dict) GetDccRateResponse [source]¶
- property proposal: DccProposal | None¶
Type:
worldline.acquiring.sdk.v1.domain.dcc_proposal.DccProposal
- property result: str | None¶
- The result of the operation
Type: str
- class worldline.acquiring.sdk.v1.domain.initial_card_on_file_data.InitialCardOnFileData[source]¶
Bases:
DataObject
- __annotations__ = {'_InitialCardOnFileData__future_use': typing.Optional[str], '_InitialCardOnFileData__transaction_type': typing.Optional[str]}¶
- from_dictionary(dictionary: dict) InitialCardOnFileData [source]¶
- property future_use: str | None¶
- Future use
Type: str
- property transaction_type: str | None¶
- Transaction type
Type: str
- class worldline.acquiring.sdk.v1.domain.merchant_data.MerchantData[source]¶
Bases:
DataObject
- __annotations__ = {'_MerchantData__address': typing.Optional[str], '_MerchantData__city': typing.Optional[str], '_MerchantData__country_code': typing.Optional[str], '_MerchantData__merchant_category_code': typing.Optional[int], '_MerchantData__name': typing.Optional[str], '_MerchantData__postal_code': typing.Optional[str], '_MerchantData__state_code': typing.Optional[str]}¶
- property address: str | None¶
- Street address
Type: str
- property city: str | None¶
- Address city
Type: str
- property country_code: str | None¶
- Address country code, ISO 3166 international standard
Type: str
- from_dictionary(dictionary: dict) MerchantData [source]¶
- property merchant_category_code: int | None¶
- Merchant category code (MCC)
Type: int
- property name: str | None¶
- Merchant name
Type: str
- property postal_code: str | None¶
- Address postal code
Type: str
- property state_code: str | None¶
- Address state code, only supplied if country is US or CA
Type: str
- class worldline.acquiring.sdk.v1.domain.network_token_data.NetworkTokenData[source]¶
Bases:
DataObject
- __annotations__ = {'_NetworkTokenData__cryptogram': typing.Optional[str], '_NetworkTokenData__eci': typing.Optional[str]}¶
- property cryptogram: str | None¶
- Network token cryptogram
Type: str
- property eci: str | None¶
- Electronic Commerce IndicatorValue returned by the 3D Secure process that indicates the level of authentication.Contains different values depending on the brand.
Type: str
- from_dictionary(dictionary: dict) NetworkTokenData [source]¶
- class worldline.acquiring.sdk.v1.domain.payment_references.PaymentReferences[source]¶
Bases:
DataObject
- __annotations__ = {'_PaymentReferences__dynamic_descriptor': typing.Optional[str], '_PaymentReferences__merchant_reference': typing.Optional[str], '_PaymentReferences__retrieval_reference_number': typing.Optional[str]}¶
- property dynamic_descriptor: str | None¶
- Dynamic descriptor gives you the ability to control the descriptor on the credit card statement of the customer.
Type: str
- from_dictionary(dictionary: dict) PaymentReferences [source]¶
- property merchant_reference: str | None¶
- Reference for the transaction to allow the merchant to reconcile their payments in our report files.It is advised to submit a unique value per transaction.The value provided here is returned in the baseTrxType/addlMercData element of the MRX file.
Type: str
- property retrieval_reference_number: str | None¶
- Retrieval reference number for transaction, must be AN(12) if provided
Type: str
- class worldline.acquiring.sdk.v1.domain.plain_card_data.PlainCardData[source]¶
Bases:
DataObject
- __annotations__ = {'_PlainCardData__card_number': typing.Optional[str], '_PlainCardData__card_security_code': typing.Optional[str], '_PlainCardData__expiry_date': typing.Optional[str]}¶
- property card_number: str | None¶
- Card number (PAN, network token or DPAN).
Type: str
- property card_security_code: str | None¶
- The security code indicated on the cardBased on the card brand, it can be 3 or 4 digits longand have different names: CVV2, CVC2, CVN2, CID, CVC, CAV2, etc.
Type: str
- property expiry_date: str | None¶
- Card or token expiry date in format MMYYYY
Type: str
- from_dictionary(dictionary: dict) PlainCardData [source]¶
- class worldline.acquiring.sdk.v1.domain.point_of_sale_data.PointOfSaleData[source]¶
Bases:
DataObject
- __annotations__ = {'_PointOfSaleData__terminal_id': typing.Optional[str]}¶
- from_dictionary(dictionary: dict) PointOfSaleData [source]¶
- property terminal_id: str | None¶
- Terminal ID ANS(8)
Type: str
- class worldline.acquiring.sdk.v1.domain.point_of_sale_data_for_dcc.PointOfSaleDataForDcc[source]¶
Bases:
DataObject
- __annotations__ = {'_PointOfSaleDataForDcc__terminal_country_code': typing.Optional[str], '_PointOfSaleDataForDcc__terminal_id': typing.Optional[str]}¶
- from_dictionary(dictionary: dict) PointOfSaleDataForDcc [source]¶
- property terminal_country_code: str | None¶
- Country code of the terminal
Type: str
- property terminal_id: str | None¶
- The terminal ID
Type: str
- class worldline.acquiring.sdk.v1.domain.rate_data.RateData[source]¶
Bases:
DataObject
- __annotations__ = {'_RateData__exchange_rate': typing.Optional[float], '_RateData__inverted_exchange_rate': typing.Optional[float], '_RateData__mark_up': typing.Optional[float], '_RateData__mark_up_basis': typing.Optional[str], '_RateData__quotation_date_time': typing.Optional[datetime.datetime]}¶
- property exchange_rate: float | None¶
- The exchange rate
Type: float
- property inverted_exchange_rate: float | None¶
- The inverted exchange rate
Type: float
- property mark_up: float | None¶
- The mark up applied on the rate (in percentage).
Type: float
- property mark_up_basis: str | None¶
- The source of the rate the markup is based upon. If the cardholder and the merchant are based in Europe, the mark up is calculated based on the rates provided by the European Central Bank.
Type: str
- property quotation_date_time: datetime | None¶
- The date and time of the quotation
Type: datetime
- class worldline.acquiring.sdk.v1.domain.sub_operation.SubOperation[source]¶
Bases:
DataObject
- __annotations__ = {'_SubOperation__amount': typing.Optional[worldline.acquiring.sdk.v1.domain.amount_data.AmountData], '_SubOperation__authorization_code': typing.Optional[str], '_SubOperation__operation_id': typing.Optional[str], '_SubOperation__operation_timestamp': typing.Optional[datetime.datetime], '_SubOperation__operation_type': typing.Optional[str], '_SubOperation__response_code': typing.Optional[str], '_SubOperation__response_code_category': typing.Optional[str], '_SubOperation__response_code_description': typing.Optional[str], '_SubOperation__retry_after': typing.Optional[str]}¶
- property amount: AmountData | None¶
- Amount for the operation.
Type:
worldline.acquiring.sdk.v1.domain.amount_data.AmountData
- property authorization_code: str | None¶
- Authorization approval code
Type: str
- from_dictionary(dictionary: dict) SubOperation [source]¶
- property operation_id: str | None¶
- A globally unique identifier of the operation, generated by you.We advise you to submit a UUID or an identifier composed of an arbitrary string and a UUID/URL-safe Base64 UUID (RFC 4648 §5).It’s used to detect duplicate requests or to reference an operation in technical reversals.
Type: str
- property operation_timestamp: datetime | None¶
- Timestamp of the operation in merchant time zone in format yyyy-MM-ddTHH:mm:ssZ
Type: datetime
- property operation_type: str | None¶
- The kind of operation
Type: str
- property response_code: str | None¶
- Numeric response code, e.g. 0000, 0005
Type: str
- property response_code_category: str | None¶
- Category of response code.
Type: str
- property response_code_description: str | None¶
- Description of the response code
Type: str
- property retry_after: str | None¶
- The duration to wait after the initial submission before retrying the operation.Expressed using ISO 8601 duration format, ex: PT2H for 2 hours.This field is only present when the operation can be retried later.PT0 means that the operation can be retried immediately.
Type: str
- class worldline.acquiring.sdk.v1.domain.sub_operation_for_refund.SubOperationForRefund[source]¶
Bases:
DataObject
- __annotations__ = {'_SubOperationForRefund__amount': typing.Optional[worldline.acquiring.sdk.v1.domain.amount_data.AmountData], '_SubOperationForRefund__operation_id': typing.Optional[str], '_SubOperationForRefund__operation_timestamp': typing.Optional[datetime.datetime], '_SubOperationForRefund__operation_type': typing.Optional[str], '_SubOperationForRefund__response_code': typing.Optional[str], '_SubOperationForRefund__response_code_category': typing.Optional[str], '_SubOperationForRefund__response_code_description': typing.Optional[str], '_SubOperationForRefund__retry_after': typing.Optional[str]}¶
- property amount: AmountData | None¶
- Amount for the operation.
Type:
worldline.acquiring.sdk.v1.domain.amount_data.AmountData
- from_dictionary(dictionary: dict) SubOperationForRefund [source]¶
- property operation_id: str | None¶
- A globally unique identifier of the operation, generated by you.We advise you to submit a UUID or an identifier composed of an arbitrary string and a UUID/URL-safe Base64 UUID (RFC 4648 §5).It’s used to detect duplicate requests or to reference an operation in technical reversals.
Type: str
- property operation_timestamp: datetime | None¶
- Timestamp of the operation in merchant time zone in format yyyy-MM-ddTHH:mm:ssZ
Type: datetime
- property operation_type: str | None¶
- The kind of operation
Type: str
- property response_code: str | None¶
- Numeric response code, e.g. 0000, 0005
Type: str
- property response_code_category: str | None¶
- Category of response code.
Type: str
- property response_code_description: str | None¶
- Description of the response code
Type: str
- property retry_after: str | None¶
- The duration to wait after the initial submission before retrying the operation.Expressed using ISO 8601 duration format, ex: PT2H for 2 hours.This field is only present when the operation can be retried later.PT0 means that the operation can be retried immediately.
Type: str
- class worldline.acquiring.sdk.v1.domain.subsequent_card_on_file_data.SubsequentCardOnFileData[source]¶
Bases:
DataObject
- __annotations__ = {'_SubsequentCardOnFileData__card_on_file_initiator': typing.Optional[str], '_SubsequentCardOnFileData__initial_scheme_transaction_id': typing.Optional[str], '_SubsequentCardOnFileData__transaction_type': typing.Optional[str]}¶
- property card_on_file_initiator: str | None¶
- Card on file initiator
Type: str
- from_dictionary(dictionary: dict) SubsequentCardOnFileData [source]¶
- property initial_scheme_transaction_id: str | None¶
- Scheme transaction ID of initial transaction
Type: str
- property transaction_type: str | None¶
- Transaction type
Type: str
- class worldline.acquiring.sdk.v1.domain.three_d_secure.ThreeDSecure[source]¶
Bases:
DataObject
- __annotations__ = {'_ThreeDSecure__authentication_value': typing.Optional[str], '_ThreeDSecure__directory_server_transaction_id': typing.Optional[str], '_ThreeDSecure__eci': typing.Optional[str], '_ThreeDSecure__three_d_secure_type': typing.Optional[str], '_ThreeDSecure__version': typing.Optional[str]}¶
- property authentication_value: str | None¶
- MasterCard AAV in original base64 encoding or Visa, DinersClub, UnionPay or JCB CAVV in either hexadecimal or base64 encoding
Type: str
- property directory_server_transaction_id: str | None¶
- 3D Secure 2.x directory server transaction ID
Type: str
- property eci: str | None¶
- Electronic Commerce IndicatorValue returned by the 3D Secure process that indicates the level of authentication.Contains different values depending on the brand.
Type: str
- from_dictionary(dictionary: dict) ThreeDSecure [source]¶
- property three_d_secure_type: str | None¶
- 3D Secure type used in the transaction
Type: str
- property version: str | None¶
- 3D Secure version
Type: str
- class worldline.acquiring.sdk.v1.domain.transaction_data_for_dcc.TransactionDataForDcc[source]¶
Bases:
DataObject
- __annotations__ = {'_TransactionDataForDcc__amount': typing.Optional[worldline.acquiring.sdk.v1.domain.amount_data.AmountData], '_TransactionDataForDcc__transaction_timestamp': typing.Optional[datetime.datetime], '_TransactionDataForDcc__transaction_type': typing.Optional[str]}¶
- property amount: AmountData | None¶
- Amount for the operation.
Type:
worldline.acquiring.sdk.v1.domain.amount_data.AmountData
- from_dictionary(dictionary: dict) TransactionDataForDcc [source]¶
- property transaction_timestamp: datetime | None¶
- The date and time of the transaction
Type: datetime
- property transaction_type: str | None¶
- The transaction type
Type: str
- class worldline.acquiring.sdk.v1.ping.ping_client.PingClient(parent: ApiResource, path_context: Mapping[str, str] | None)[source]¶
Bases:
ApiResource
Ping client. Thread-safe.
- __annotations__ = {}¶
- __init__(parent: ApiResource, path_context: Mapping[str, str] | None)[source]¶
- Parameters:
path_context – Mapping[str, str]
- ping(context: CallContext | None = None) None [source]¶
Resource /services/v1/ping - Check API connection
See also https://docs.acquiring.worldline-solutions.com/api-reference#tag/Ping/operation/ping
- Parameters:
- Returns:
None
- Raises:
ValidationException – if the request was not correct and couldn’t be processed (HTTP status code 400)
AuthorizationException – if the request was not allowed (HTTP status code 403)
ReferenceException – if an object was attempted to be referenced that doesn’t exist or has been removed, or there was a conflict (HTTP status code 404, 409 or 410)
PlatformException – if something went wrong at the Worldline Acquiring platform, the Worldline Acquiring platform was unable to process a message from a downstream partner/acquirer, or the service that you’re trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
ApiException – if the Worldline Acquiring platform returned any other error