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
42 changes: 2 additions & 40 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
},
{
"name": "Sales",
"description": "Read a merchant's fully-paid, closed sales, including item lines, taxes, discounts, and payments.\n\nList sales to retrieve full `Sale` objects, or search by date, payment status, and sales channel\nto retrieve summaries. Use a summary's `id` to get the full sale.\n\nAmounts are expressed in minor units according to each sale's `currency.scale`.\n\nCurrent limitation: In most countries, sales created via the Invoices product are only included when\nthe transaction happened through SumUp payments. This means invoices paid via cash or bank transfer\nwon’t be listed. Sales made in the UK are an exception to this limitation; all sales will be shown there.",
"description": "Read a merchant's fully-paid, closed sales, including item lines, taxes, discounts, and payments.\n\nList sales to retrieve full `Sale` objects, or search by date, payment status, and sales channel\nto retrieve summaries. Use a summary's `id` to get the full sale.\n\nFor integration patterns, authentication, sync, and how the Sales API relates to other SumUp APIs, see the\n[Sales API integrator guide](https://developer.sumup.com/tools/sales-api-guide/).\n\nAmounts are expressed in minor units according to each sale's `currency.scale`.\n\nCurrent limitation: In most countries, sales created via the Invoices product are only included when\nthe transaction happened through SumUp payments. This means invoices paid via cash or bank transfer\nwon’t be listed. Sales made in the UK are an exception to this limitation; all sales will be shown there.",
"x-core-objects": [
{
"$ref": "#/components/schemas/Sale"
Expand Down Expand Up @@ -6400,14 +6400,6 @@
},
"application/problem+json": {
"examples": {
"PaymentMethodNotAllowed": {
"value": {
"detail": "Payment method not allowed for this merchant.",
"status": 422,
"title": "Payment Method Not Allowed",
"type": "https://developer.sumup.com/problem/payment-method-not-allowed"
}
},
"ValidationError": {
"value": {
"detail": "Validation failed",
Expand Down Expand Up @@ -6894,18 +6886,8 @@
}
}
],
"requestBody": {
"content": {
"application/json": {}
},
"description": "A checkout initial attributes",
"required": false
},
"responses": {
"202": {
"content": {
"application/json": {}
},
"description": "The Terminate action was successfully dispatched for the given reader."
},
"400": {
Expand Down Expand Up @@ -12951,15 +12933,6 @@
}
}
},
"PaymentMethodNotAllowed": {
"description": "Error returned when the requested payment method is not supported for the merchant (e.g. pix for non-BR merchants).",
"value": {
"errors": {
"detail": "Payment method not allowed for this merchant.",
"type": "PAYMENT_METHOD_NOT_ALLOWED"
}
}
},
"ReaderBusy": {
"description": "Error returned when a checkout was requested in the last 60 seconds.",
"value": {
Expand Down Expand Up @@ -13092,8 +13065,7 @@
"payment_type": {
"description": "Type of the payment. Required for some countries",
"enum": [
"card",
"pix"
"card"
],
"type": "string"
},
Expand Down Expand Up @@ -13699,16 +13671,6 @@
"null"
]
},
"payment_type": {
"default": "card",
"description": "The payment method type for the transaction. Defaults to `card`.\n\nUse `pix` to initiate a Pix QR-code payment flow on the device.\nPix is only supported for Brazilian merchants; other merchants will receive a 422 error.\n",
"enum": [
"card",
"pix"
],
"example": "card",
"type": "string"
},
"return_url": {
"description": "Webhook URL to which the payment result will be sent.\nIt must be a HTTPS url.\n",
"example": "https://www.example.com",
Expand Down
6 changes: 0 additions & 6 deletions sdk/src/resources/readers/checkouts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export type {
CreateReaderCheckoutResponse,
GetReaderCheckoutResponse,
} from "../../../types";
export type CreateReaderTerminateParams = Record<string, unknown>;

/**
* API resource for the ReaderCheckouts endpoints.
*
Expand Down Expand Up @@ -88,25 +86,21 @@ export class ReaderCheckouts extends APIResource {
terminate(
merchantCode: string,
readerId: string,
body?: CreateReaderTerminateParams,
options?: RequestOptions,
): Promise<void> {
return this._client.post<void>({
path: `/v0.1/merchants/${merchantCode}/readers/${readerId}/terminate`,
body,
...options,
});
}

terminateWithResponse(
merchantCode: string,
readerId: string,
body?: CreateReaderTerminateParams,
options?: RequestOptions,
): Promise<WithResponse<void>> {
return this._client.postWithResponse<void>({
path: `/v0.1/merchants/${merchantCode}/readers/${readerId}/terminate`,
body,
...options,
});
}
Expand Down
3 changes: 3 additions & 0 deletions sdk/src/resources/sales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ export type ListSalesV10QueryParams = {
* List sales to retrieve full `Sale` objects, or search by date, payment status, and sales channel
* to retrieve summaries. Use a summary's `id` to get the full sale.
*
* For integration patterns, authentication, sync, and how the Sales API relates to other SumUp APIs, see the
* [Sales API integrator guide](https://developer.sumup.com/tools/sales-api-guide/).
*
* Amounts are expressed in minor units according to each sale's `currency.scale`.
*
* Current limitation: In most countries, sales created via the Invoices product are only included when
Expand Down
10 changes: 0 additions & 10 deletions sdk/src/types/create-reader-checkout-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,6 @@ export type CreateReaderCheckoutRequest = {
* Min: 1
*/
installments?: number | null;
/**
* The payment method type for the transaction. Defaults to `card`.
*
* Use `pix` to initiate a Pix QR-code payment flow on the device.
* Pix is only supported for Brazilian merchants; other merchants will receive a 422 error.
*
*
* Default: "card"
*/
payment_type?: "card" | "pix";
/**
* Webhook URL to which the payment result will be sent.
* It must be a HTTPS url.
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/types/get-reader-checkout-response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export type GetReaderCheckoutResponse = {
/**
* Type of the payment. Required for some countries
*/
payment_type: "card" | "pix";
payment_type: "card";
/**
* Reader firmware version
*/
Expand Down
Loading