Transaction

Transaction

Service to interact with a customer's transactions

Constructor

new Transaction(options)

Create a new transaction service

Source:
Parameters:
Name Type Description
options Object

configuration parameters

Methods

getTransaction(accessToken, transactionId, sourceopt) → {Promise}

Gets the full details of a single transaction

Source:
Parameters:
Name Type Attributes Description
accessToken string

the oauth bearer token

transactionId string

the unique transaction ID

source string <optional>

the transaction type (e.g. faster payments, mastercard). If not specified, only generic transaction information will be returned.

Returns:
Type:
Promise
  • the http request promise

getTransactions(accessToken, fromDate, toDate, sourceopt) → {Promise}

Gets the customer's transactions over the given period

Source:
Parameters:
Name Type Attributes Description
accessToken string

the oauth bearer token.

fromDate string

filter transactions after this date. Format: YYYY-MM-DD

toDate string

filter transactions before this date. Format: YYYY-MM-DD

source string <optional>

the transaction type (e.g. faster payments, mastercard). If not specified, results are not filtered by source.

Returns:
Type:
Promise
  • the http request promise