Transaction

Retrieving many transactions

get

Retrieves many payment transactions. A particular transaction contains all transactions' events attached as an entries of the response body.


Required scopes

  • payment-gateway.paymenttransactions_read

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name. Note: The tenant name should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
Query parameters
pageNumberinteger · min: 1Optional

The page number to be retrieved, where the size of the pages is specified by the pageSize parameter. The number of the first page is 1.

Default: 1
pageSizeinteger · min: 1 · max: 50Optional

The number of documents being retrieved on one page.

Default: 50
sortstringOptional

Fields to sort the response data by following the order of the parameters from left to right. Can contain multiple fields in the following format: field name:sort direction, separated by a comma. The colon preceding the sort direction parameter is optional, and the descending order is taken only if it is equal to desc or DESC. The ascending order is assumed in any other case.

Example: sort=name,metadata.createdAt:desc
Header parameters
X-Total-CountbooleanOptional

To get information how many entities meet the filtering requirements, the X-Total-Count header has been introduced. The header is optional and its default value is false. If the header is provided and it is set to true, then the total count is returned in the X-Total-Count response header. In both cases (X-Total-Count true, false or not provided), the response body has the same format (array of entities). This means that the information about the total count is returned only on demand, provided that the X-Total-Count header is present in a request.

Responses
200
Payment transactions response
application/json
get
GET /payment-gateway/{tenant}/transactions HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "id": "d8abfb12-0266-43dc-905e-415158029d45",
    "provider": "SPREEDLY",
    "paymentInformation": {
      "paymentMode": "92d77b2b-9385-43ad-a859-55176fbcbd2f",
      "creditCardToken": "FrHVCFtcshQ8gkOR8t5RlneLy02"
    },
    "entries": [
      {
        "id": "5ab6f875-5414-4845-afe9-8976531a2573",
        "createdDate": "2023-07-02T09:19:42.170Z",
        "type": "AUTHORIZATION",
        "successful": true,
        "amount": {
          "amount": 36.63,
          "currency": "EUR"
        },
        "summary": "Succeeded!",
        "remoteRequest": "{\n  \"transaction\" : {\n    \"amount\" : 3663,\n    \"payment_method_token\" : \"O7z9EVXYwzzxgQO78nobou22ET1\",\n    \"currency_code\" : \"EUR\",\n    \"order_id\" : \"EON1562\",\n    \"retain_on_success\" : false\n  }\n}",
        "remoteResponse": "{\n  \"transaction\" : {\n    \"token\" : \"FrHVCFtcshQ8gkOR8t5RlneLy02\",\n    \"succeeded\" : true,\n    \"message\" : \"Succeeded!\",\n    \"response\" : {\n      \"success\" : true,\n      \"message\" : \"Successful authorize\",\n      \"pending\" : false,\n      \"cancelled\" : false,\n      \"result_unknown\" : false,\n      \"created_at\" : \"2023-07-02T09:19:42Z\",\n      \"updated_at\" : \"2023-07-02T09:19:42Z\"\n    },\n    \"state\" : \"succeeded\",\n    \"retained\" : false,\n    \"amount\" : \"3663\",\n    \"gateway_transaction_id\" : \"48\",\n    \"created_at\" : \"2023-07-02T09:19:42Z\",\n    \"updated_at\" : \"2023-07-02T09:19:42Z\",\n    \"transaction_type\" : \"Authorization\",\n    \"order_id\" : \"EON1562\",\n    \"gateway_token\" : \"5xGx9vcZlMe1AVuHQk00CZTS8YM\",\n    \"currency_code\" : \"EUR\",\n    \"shipping_address\" : {\n      \"name\" : \"John Smith\"\n    },\n    \"payment_method\" : {\n      \"token\" : \"O7z9EVXYwzzxgQO78nobou22ET1\",\n      \"test\" : true,\n      \"month\" : 9,\n      \"year\" : 2023,\n      \"number\" : \"XXXX-XXXX-XXXX-1111\",\n      \"fingerprint\" : \"78250e7a0b53b34f526fbf99be66982e1127\",\n      \"created_at\" : \"2023-07-02T09:19:39Z\",\n      \"updated_at\" : \"2023-07-02T09:19:39Z\",\n      \"storage_state\" : \"cached\",\n      \"last_four_digits\" : \"1111\",\n      \"first_name\" : \"John\",\n      \"last_name\" : \"Smith\",\n      \"full_name\" : \"John Smith\",\n      \"eligible_for_card_updater\" : true,\n      \"issuer_identification_number\" : \"41111111\",\n      \"payment_method_type\" : \"credit_card\",\n      \"verification_value\" : \"XXX\"\n    }\n  }\n}"
      },
      {
        "id": "b5c995f9-0ae8-455d-af0a-68f6995305bd",
        "createdDate": "2023-07-02T09:20:17.333Z",
        "type": "CAPTURE",
        "successful": true,
        "amount": {
          "amount": 36.63,
          "currency": "EUR"
        },
        "summary": "Succeeded!",
        "remoteRequest": "{\n  \"amount\" : 3663,\n  \"currency_code\" : \"EUR\"\n}",
        "remoteResponse": "{\n  \"transaction\" : {\n    \"token\" : \"ReaQQuCxWIhL1h1gyfE0VAuKQlI\",\n    \"succeeded\" : true,\n    \"message\" : \"Succeeded!\",\n    \"response\" : {\n      \"success\" : true,\n      \"message\" : \"Successful capture\",\n      \"pending\" : false,\n      \"cancelled\" : false,\n      \"result_unknown\" : false,\n      \"created_at\" : \"2023-07-02T09:20:17Z\",\n      \"updated_at\" : \"2023-07-02T09:20:17Z\"\n    },\n    \"gateway_transaction_id\" : \"51\"\n  }\n}"
      },
      {
        "id": "a080a8e1-c48f-410d-bd5a-7b921f5ce549",
        "createdDate": "2023-07-02T09:20:28.650Z",
        "type": "REFUND",
        "successful": true,
        "amount": {
          "amount": 1,
          "currency": "EUR"
        },
        "summary": "Succeeded!",
        "remoteRequest": "{\n  \"amount\" : 100,\n  \"currency_code\" : \"EUR\"\n}",
        "remoteResponse": "{\n  \"transaction\" : {\n    \"token\" : \"Xn8g3ZiTFJ1Sbd3AOlvr2aZtdaW\",\n    \"succeeded\" : true,\n    \"message\" : \"Succeeded!\",\n    \"response\" : {\n      \"success\" : true,\n      \"message\" : \"Successful credit\",\n      \"pending\" : false,\n      \"cancelled\" : false,\n      \"result_unknown\" : false,\n      \"created_at\" : \"2023-07-02T09:20:28Z\",\n      \"updated_at\" : \"2023-07-02T09:20:28Z\"\n    },\n    \"gateway_transaction_id\" : \"59\"\n  }\n}"
      },
      {
        "id": "e7d19c09-322b-4596-9206-4b45a532bff1",
        "createdDate": "2023-07-02T09:20:38.441Z",
        "type": "REFUND",
        "successful": true,
        "amount": {
          "amount": 2,
          "currency": "EUR"
        },
        "summary": "Succeeded!",
        "remoteRequest": "{\n  \"amount\" : 200,\n  \"currency_code\" : \"EUR\"\n}",
        "remoteResponse": "{\n  \"transaction\" : {\n    \"token\" : \"CfcdzCUsXFlkNYNrnQsYoAquNAn\",\n    \"succeeded\" : true,\n    \"message\" : \"Succeeded!\",\n    \"response\" : {\n      \"success\" : true,\n      \"message\" : \"Successful credit\",\n      \"pending\" : false,\n      \"cancelled\" : false,\n      \"result_unknown\" : false,\n      \"created_at\" : \"2023-07-02T09:20:38Z\",\n      \"updated_at\" : \"2023-07-02T09:20:38Z\"\n    },\n    \"gateway_transaction_id\" : \"68\"\n  }\n}"
      }
    ]
  }
]

Retrieving a single transaction

get

Retrieves a single payment transaction. The transaction contains all the transaction's events attached as an entries of the response body.


Required scopes

  • payment-gateway.paymenttransactions_read

Authorizations
Path parameters
tenantstring · min: 3 · max: 16Required

Your Emporix tenant's name. Note: The tenant name should always be written in lowercase.

Pattern: ^[a-z][a-z0-9]+$
transactionIdstringRequired

Unique identifier of a payment transaction.

Responses
200
Payment transaction response
application/json
get
GET /payment-gateway/{tenant}/transactions/{transactionId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "id": "d8abfb12-0266-43dc-905e-415158029d45",
  "provider": "SPREEDLY",
  "paymentInformation": {
    "paymentMode": "92d77b2b-9385-43ad-a859-55176fbcbd2f",
    "creditCardToken": "FrHVCFtcshQ8gkOR8t5RlneLy02"
  },
  "entries": [
    {
      "id": "5ab6f875-5414-4845-afe9-8976531a2573",
      "createdDate": "2023-07-02T09:19:42.170Z",
      "type": "AUTHORIZATION",
      "successful": true,
      "amount": {
        "amount": 36.63,
        "currency": "EUR"
      },
      "summary": "Succeeded!",
      "remoteRequest": "{\n  \"transaction\" : {\n    \"amount\" : 3663,\n    \"payment_method_token\" : \"O7z9EVXYwzzxgQO78nobou22ET1\",\n    \"currency_code\" : \"EUR\",\n    \"order_id\" : \"EON1562\",\n    \"retain_on_success\" : false\n  }\n}",
      "remoteResponse": "{\n  \"transaction\" : {\n    \"token\" : \"FrHVCFtcshQ8gkOR8t5RlneLy02\",\n    \"succeeded\" : true,\n    \"message\" : \"Succeeded!\",\n    \"response\" : {\n      \"success\" : true,\n      \"message\" : \"Successful authorize\",\n      \"pending\" : false,\n      \"cancelled\" : false,\n      \"result_unknown\" : false,\n      \"created_at\" : \"2023-07-02T09:19:42Z\",\n      \"updated_at\" : \"2023-07-02T09:19:42Z\"\n    },\n    \"state\" : \"succeeded\",\n    \"retained\" : false,\n    \"amount\" : \"3663\",\n    \"gateway_transaction_id\" : \"48\",\n    \"created_at\" : \"2023-07-02T09:19:42Z\",\n    \"updated_at\" : \"2023-07-02T09:19:42Z\",\n    \"transaction_type\" : \"Authorization\",\n    \"order_id\" : \"EON1562\",\n    \"gateway_token\" : \"5xGx9vcZlMe1AVuHQk00CZTS8YM\",\n    \"currency_code\" : \"EUR\",\n    \"shipping_address\" : {\n      \"name\" : \"John Smith\"\n    },\n    \"payment_method\" : {\n      \"token\" : \"O7z9EVXYwzzxgQO78nobou22ET1\",\n      \"test\" : true,\n      \"month\" : 9,\n      \"year\" : 2023,\n      \"number\" : \"XXXX-XXXX-XXXX-1111\",\n      \"fingerprint\" : \"78250e7a0b53b34f526fbf99be66982e1127\",\n      \"created_at\" : \"2023-07-02T09:19:39Z\",\n      \"updated_at\" : \"2023-07-02T09:19:39Z\",\n      \"storage_state\" : \"cached\",\n      \"last_four_digits\" : \"1111\",\n      \"first_name\" : \"John\",\n      \"last_name\" : \"Smith\",\n      \"full_name\" : \"John Smith\",\n      \"eligible_for_card_updater\" : true,\n      \"issuer_identification_number\" : \"41111111\",\n      \"payment_method_type\" : \"credit_card\",\n      \"verification_value\" : \"XXX\"\n    }\n  }\n}"
    },
    {
      "id": "b5c995f9-0ae8-455d-af0a-68f6995305bd",
      "createdDate": "2023-07-02T09:20:17.333Z",
      "type": "CAPTURE",
      "successful": true,
      "amount": {
        "amount": 36.63,
        "currency": "EUR"
      },
      "summary": "Succeeded!",
      "remoteRequest": "{\n  \"amount\" : 3663,\n  \"currency_code\" : \"EUR\"\n}",
      "remoteResponse": "{\n  \"transaction\" : {\n    \"token\" : \"ReaQQuCxWIhL1h1gyfE0VAuKQlI\",\n    \"succeeded\" : true,\n    \"message\" : \"Succeeded!\",\n    \"response\" : {\n      \"success\" : true,\n      \"message\" : \"Successful capture\",\n      \"pending\" : false,\n      \"cancelled\" : false,\n      \"result_unknown\" : false,\n      \"created_at\" : \"2023-07-02T09:20:17Z\",\n      \"updated_at\" : \"2023-07-02T09:20:17Z\"\n    },\n    \"gateway_transaction_id\" : \"51\"\n  }\n}"
    },
    {
      "id": "a080a8e1-c48f-410d-bd5a-7b921f5ce549",
      "createdDate": "2023-07-02T09:20:28.650Z",
      "type": "REFUND",
      "successful": true,
      "amount": {
        "amount": 1,
        "currency": "EUR"
      },
      "summary": "Succeeded!",
      "remoteRequest": "{\n  \"amount\" : 100,\n  \"currency_code\" : \"EUR\"\n}",
      "remoteResponse": "{\n  \"transaction\" : {\n    \"token\" : \"Xn8g3ZiTFJ1Sbd3AOlvr2aZtdaW\",\n    \"succeeded\" : true,\n    \"message\" : \"Succeeded!\",\n    \"response\" : {\n      \"success\" : true,\n      \"message\" : \"Successful credit\",\n      \"pending\" : false,\n      \"cancelled\" : false,\n      \"result_unknown\" : false,\n      \"created_at\" : \"2023-07-02T09:20:28Z\",\n      \"updated_at\" : \"2023-07-02T09:20:28Z\"\n    },\n    \"gateway_transaction_id\" : \"59\"\n  }\n}"
    },
    {
      "id": "e7d19c09-322b-4596-9206-4b45a532bff1",
      "createdDate": "2023-07-02T09:20:38.441Z",
      "type": "REFUND",
      "successful": true,
      "amount": {
        "amount": 2,
        "currency": "EUR"
      },
      "summary": "Succeeded!",
      "remoteRequest": "{\n  \"amount\" : 200,\n  \"currency_code\" : \"EUR\"\n}",
      "remoteResponse": "{\n  \"transaction\" : {\n    \"token\" : \"CfcdzCUsXFlkNYNrnQsYoAquNAn\",\n    \"succeeded\" : true,\n    \"message\" : \"Succeeded!\",\n    \"response\" : {\n      \"success\" : true,\n      \"message\" : \"Successful credit\",\n      \"pending\" : false,\n      \"cancelled\" : false,\n      \"result_unknown\" : false,\n      \"created_at\" : \"2023-07-02T09:20:38Z\",\n      \"updated_at\" : \"2023-07-02T09:20:38Z\"\n    },\n    \"gateway_transaction_id\" : \"68\"\n  }\n}"
    }
  ]
}

Was this helpful?