Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -5859,7 +5859,7 @@
"post": {
"operationId": "CreateReaderCheckout",
"summary": "Create a Reader Checkout",
"description": "Create a Checkout for a Reader.\n\nThis process is asynchronous and the actual transaction may take some time to be stared on the device.\n\n\nThere are some caveats when using this endpoint:\n* The target device must be online, otherwise checkout won't be accepted\n* After the checkout is accepted, the system has 60 seconds to start the payment on the target device. During this time, any other checkout for the same device will be rejected.\n\n\n**Note**: If the target device is a Solo, it must be in version 3.3.24.3 or higher.\n",
"description": "Creates a Checkout for a Reader.\n\nThis process is asynchronous and the actual transaction may take some time to be stared on the device.\n\n\nThere are some caveats when using this endpoint:\n* The target device must be online, otherwise checkout won't be accepted\n* After the checkout is accepted, the system has 60 seconds to start the payment on the target device. During this time, any other checkout for the same device will be rejected.\n\n\n**Note**: If the target device is a Solo, it must be in version 3.3.24.3 or higher.\n",
"parameters": [
{
"name": "merchant_code",
Expand Down Expand Up @@ -6005,6 +6005,9 @@
"tags": [
"Readers"
],
"x-codegen": {
"method_name": "create_checkout"
},
"x-permissions": [
"readers_checkout_create"
],
Expand All @@ -6016,8 +6019,8 @@
"/v0.1/merchants/{merchant_code}/readers/{reader_id}/terminate": {
"post": {
"operationId": "CreateReaderTerminate",
"summary": "Create a Reader Terminate action",
"description": "Create a Terminate action for a Reader.\n\nIt stops the current transaction on the target device.\n\nThis process is asynchronous and the actual termination may take some time to be performed on the device.\n\n\nThere are some caveats when using this endpoint:\n* The target device must be online, otherwise terminate won't be accepted\n* The action will succeed only if the device is waiting for cardholder action: e.g: waiting for card, waiting for PIN, etc.\n* There is no confirmation of the termination.\n\nIf a transaction is successfully terminated and `return_url` was provided on Checkout, the transaction status will be sent as `failed` to the provided URL.\n\n\n**Note**: If the target device is a Solo, it must be in version 3.3.28.0 or higher.\n",
"summary": "Terminate a Reader Checkout",
"description": "Terminate a Reader Checkout stops the current transaction on the target device.\n\nThis process is asynchronous and the actual termination may take some time to be performed on the device.\n\n\nThere are some caveats when using this endpoint:\n* The target device must be online, otherwise terminate won't be accepted\n* The action will succeed only if the device is waiting for cardholder action: e.g: waiting for card, waiting for PIN, etc.\n* There is no confirmation of the termination.\n\nIf a transaction is successfully terminated and `return_url` was provided on Checkout, the transaction status will be sent as `failed` to the provided URL.\n\n\n**Note**: If the target device is a Solo, it must be in version 3.3.28.0 or higher.\n",
"parameters": [
{
"name": "merchant_code",
Expand Down Expand Up @@ -6132,6 +6135,9 @@
"tags": [
"Readers"
],
"x-codegen": {
"method_name": "terminate_checkout"
},
"x-permissions": [
"readers_checkout_create"
],
Expand Down
12 changes: 7 additions & 5 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3855,7 +3855,7 @@ paths:
operationId: CreateReaderCheckout
summary: Create a Reader Checkout
description: |
Create a Checkout for a Reader.
Creates a Checkout for a Reader.

This process is asynchronous and the actual transaction may take some time to be stared on the device.

Expand Down Expand Up @@ -3956,18 +3956,18 @@ paths:
- readers.write
tags:
- Readers
x-codegen:
method_name: create_checkout
x-permissions:
- readers_checkout_create
x-scopes:
- readers.write
'/v0.1/merchants/{merchant_code}/readers/{reader_id}/terminate':
post:
operationId: CreateReaderTerminate
summary: Create a Reader Terminate action
summary: Terminate a Reader Checkout
description: |
Create a Terminate action for a Reader.

It stops the current transaction on the target device.
Terminate a Reader Checkout stops the current transaction on the target device.

This process is asynchronous and the actual termination may take some time to be performed on the device.

Expand Down Expand Up @@ -4052,6 +4052,8 @@ paths:
- readers.write
tags:
- Readers
x-codegen:
method_name: terminate_checkout
x-permissions:
- readers_checkout_create
x-scopes:
Expand Down
24 changes: 10 additions & 14 deletions sumup/readers/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def update(
else:
raise APIError("Unexpected response", status=resp.status_code, body=resp.text)

def create_reader_checkout(
def create_checkout(
self,
merchant_code: str,
reader_id: str,
Expand All @@ -322,7 +322,7 @@ def create_reader_checkout(
"""
Create a Reader Checkout

Create a Checkout for a Reader.
Creates a Checkout for a Reader.

This process is asynchronous and the actual transaction may take some time to be stared on the device.

Expand Down Expand Up @@ -364,15 +364,13 @@ def create_reader_checkout(
else:
raise APIError("Unexpected response", status=resp.status_code, body=resp.text)

def create_reader_terminate(
def terminate_checkout(
self, merchant_code: str, reader_id: str, headers: typing.Optional[HeaderTypes] = None
):
"""
Create a Reader Terminate action
Terminate a Reader Checkout

Create a Terminate action for a Reader.

It stops the current transaction on the target device.
Terminate a Reader Checkout stops the current transaction on the target device.

This process is asynchronous and the actual termination may take some time to be performed on the device.

Expand Down Expand Up @@ -527,7 +525,7 @@ async def update(
else:
raise APIError("Unexpected response", status=resp.status_code, body=resp.text)

async def create_reader_checkout(
async def create_checkout(
self,
merchant_code: str,
reader_id: str,
Expand All @@ -537,7 +535,7 @@ async def create_reader_checkout(
"""
Create a Reader Checkout

Create a Checkout for a Reader.
Creates a Checkout for a Reader.

This process is asynchronous and the actual transaction may take some time to be stared on the device.

Expand Down Expand Up @@ -579,15 +577,13 @@ async def create_reader_checkout(
else:
raise APIError("Unexpected response", status=resp.status_code, body=resp.text)

async def create_reader_terminate(
async def terminate_checkout(
self, merchant_code: str, reader_id: str, headers: typing.Optional[HeaderTypes] = None
):
"""
Create a Reader Terminate action

Create a Terminate action for a Reader.
Terminate a Reader Checkout

It stops the current transaction on the target device.
Terminate a Reader Checkout stops the current transaction on the target device.

This process is asynchronous and the actual termination may take some time to be performed on the device.

Expand Down
Loading