Skip to content

Latest commit

 

History

History
133 lines (102 loc) · 8.65 KB

TransactionsApi.md

File metadata and controls

133 lines (102 loc) · 8.65 KB

SumUpRestApi.TransactionsApi

All URIs are relative to https://api.sumup.com/{version}

Method HTTP request Description
meTransactionsGet GET /me/transactions Retrieve a transaction
meTransactionsHistoryGet GET /me/transactions/history List transactions

meTransactionsGet

TransactionFull meTransactionsGet(opts)

Retrieve a transaction

Retrieves the full details of an identified transaction. The transaction resource is identified by a query parameter and one of following parameters is required: * `id` * `internal_id` * `transaction_code` * `foreign_transaction_id` * `client_transaction_id`

Example

import {SumUpRestApi} from 'sumup-rest-api';
let defaultClient = SumUpRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: accessToken
let accessToken = defaultClient.authentications['accessToken'];
accessToken.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new SumUpRestApi.TransactionsApi();
let opts = { 
  'id': "id_example", // String | Retrieves the transaction resource with the specified transaction ID (the `id` parameter in the transaction resource).
  'internalId': "internalId_example", // String | Retrieves the transaction resource with the specified internal transaction ID (the `internal_id` parameter in the transaction resource).
  'transactionCode': "transactionCode_example" // String | Retrieves the transaction resource with the specified transaction code.
};
apiInstance.meTransactionsGet(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
id String Retrieves the transaction resource with the specified transaction ID (the `id` parameter in the transaction resource). [optional]
internalId String Retrieves the transaction resource with the specified internal transaction ID (the `internal_id` parameter in the transaction resource). [optional]
transactionCode String Retrieves the transaction resource with the specified transaction code. [optional]

Return type

TransactionFull

Authorization

accessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

meTransactionsHistoryGet

InlineResponse2002 meTransactionsHistoryGet(opts)

List transactions

Lists detailed history of all transactions associated with the merchant account.

Example

import {SumUpRestApi} from 'sumup-rest-api';
let defaultClient = SumUpRestApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: accessToken
let accessToken = defaultClient.authentications['accessToken'];
accessToken.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new SumUpRestApi.TransactionsApi();
let opts = { 
  'transactionCode': "transactionCode_example", // String | Retrieves the transaction resource with the specified transaction code.
  'order': "order_example", // String | Specifies the order in which the returned results are displayed.
  'limit': 56, // Number | Specifies the maximum number of results per page. Value must be a positive integer and if not specified, will return 10 results.
  'users': ["users_example"], // [String] | Filters the returned results by user email.
  'statuses': ["statuses_example"], // [String] | Filters the returned results by the specified list of final statuses of the transactions.
  'paymentTypes': ["paymentTypes_example"], // [String] | Filters the returned results by the specified list of payment types used for the transactions.
  'types': ["types_example"], // [String] | Filters the returned results by the specified list of transaction types.
  'changesSince': new Date("2013-10-20T19:20:30+01:00"), // Date | Filters the results by the latest modification time of resources and returns only transactions that are modified *at or after* the specified timestamp (in <a href=\"https://en.wikipedia.org/wiki/ISO_8601\" target=\"_blank\" rel=\"noopener\">ISO8601</a> format).
  'newestTime': new Date("2013-10-20T19:20:30+01:00"), // Date | Filters the results by the creation time of resources and returns only transactions that are created *before* the specified timestamp (in <a href=\"https://en.wikipedia.org/wiki/ISO_8601\" target=\"_blank\" rel=\"noopener\">ISO8601</a> format).
  'newestRef': "newestRef_example", // String | Filters the results by the reference ID of transaciton events and returns only transactions with events whose IDs are *smaller* than the specified value. This parameters supersedes the `newest_time` parameter (if both are provided in the request).
  'oldestTime': new Date("2013-10-20T19:20:30+01:00"), // Date | Filters the results by the creation time of resources and returns only transactions that are created *at or after* the specified timestamp (in <a href=\"https://en.wikipedia.org/wiki/ISO_8601\" target=\"_blank\" rel=\"noopener\">ISO8601</a> format).
  'oldestRef': "oldestRef_example" // String | Filters the results by the reference ID of transaciton events and returns only transactions with events whose IDs are *greater* than the specified value. This parameters supersedes the `oldest_time` parameter (if both are provided in the request).
};
apiInstance.meTransactionsHistoryGet(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
transactionCode String Retrieves the transaction resource with the specified transaction code. [optional]
order String Specifies the order in which the returned results are displayed. [optional]
limit Number Specifies the maximum number of results per page. Value must be a positive integer and if not specified, will return 10 results. [optional]
users [String] Filters the returned results by user email. [optional]
statuses [String] Filters the returned results by the specified list of final statuses of the transactions. [optional]
paymentTypes [String] Filters the returned results by the specified list of payment types used for the transactions. [optional]
types [String] Filters the returned results by the specified list of transaction types. [optional]
changesSince Date Filters the results by the latest modification time of resources and returns only transactions that are modified at or after the specified timestamp (in <a href=&quot;https://en.wikipedia.org/wiki/ISO_8601\" target=&quot;_blank&quot; rel=&quot;noopener&quot;>ISO8601</a> format). [optional]
newestTime Date Filters the results by the creation time of resources and returns only transactions that are created before the specified timestamp (in <a href=&quot;https://en.wikipedia.org/wiki/ISO_8601\" target=&quot;_blank&quot; rel=&quot;noopener&quot;>ISO8601</a> format). [optional]
newestRef String Filters the results by the reference ID of transaciton events and returns only transactions with events whose IDs are smaller than the specified value. This parameters supersedes the `newest_time` parameter (if both are provided in the request). [optional]
oldestTime Date Filters the results by the creation time of resources and returns only transactions that are created at or after the specified timestamp (in <a href=&quot;https://en.wikipedia.org/wiki/ISO_8601\" target=&quot;_blank&quot; rel=&quot;noopener&quot;>ISO8601</a> format). [optional]
oldestRef String Filters the results by the reference ID of transaciton events and returns only transactions with events whose IDs are greater than the specified value. This parameters supersedes the `oldest_time` parameter (if both are provided in the request). [optional]

Return type

InlineResponse2002

Authorization

accessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json