Business - Transactions

The Admin interface handles web service calls from the Admin web gui. The base url for this is at:

/api/business-admin

A JSON file with OpenAPI data about all business-related admin APIs can be downloaded here.

Get transaction

Gets details about a specific transaction:

GET /v1/transactions/{id}

Gets details about a specific transaction

Parameters
  • id (integer) – The transaction to retrieve data for

Status Codes
id: Transaction ID (int)

Returns a plain Json negative message if there was a problem retrieving the data or a Json positive response with the requested details:

{
  ID: 123,                                        // Int
  SaleID: 35,                                     // Int
  ReceiptID: 28,                                  // Int
  PaymentMethod: 2,                               // Int
  Reference: "2001-01-01T01:01:01Z",              // DateTime
  Type: 1,                                        // Int
  Description: "Description",                     // String
  Fees: 1.23,                                     // Decimal (nullable)
  Amount: 1.23,                                   // Decimal
  IsExecuted: true,                               // Boolean
  LastExecutionAttempt: "2001-01-01T01:01:01Z",   // DateTime
  LastExecutionAttemptResult: 3                   // Int
}

Value of the property PaymentMethod can be one of the PaymentMethodTypes enumeration.

Value of the property Type can be one of the TransactionType enumeration.

Value of the property LastExecutionAttemptResult can be one of the PaymentStatuses enumeration; possible values are only Pending, Failed, Expired or Payed.

Request transaction refund

Sends a transaction refund request to the payment broker, and creates a new transaction with the refund data.

POST /v1/transactions/request-refund

Request a refund for a specified transaction

Status Codes

The body of the request is:

{
  Transaction: 5        // Int
}

where Transaction is the ID of the transaction that has to be refunded.

It returns an err_InvalidElement if no Transaction is provided, or a generic error if there has been any problem during the request