Skip to main content

Create sandbox card account transactions

POST 

https://psd2.eika.no/api-sandbox/v1/sandbox/card-accounts/:mockCardAccountId/transactions

Create a transaction on a card account which was created using POST /v1/sandbox/card-accounts. Transactions must have booking date and value date before current time and booking date must not be afte value date

Request

Responses

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://psd2.eika.no/api-sandbox/v1/sandbox/card-accounts/:mockCardAccountId/transactions");
request.Headers.Add("Accept", "application/json");
var content = new StringContent("[\n {\n \"cardTransactionId\": \"test\",\n \"terminalId\": \"tid\",\n \"bookingDate\": \"2019-05-08\",\n \"transactionDate\": \"2018-06-07\",\n \"transactionAmount\": {\n \"currency\": \"NOK\",\n \"amount\": 100\n },\n \"originalAmount\": {\n \"currency\": \"NOK\",\n \"amount\": 100\n },\n \"merchantCategoryCode\": \"BOB\",\n \"markupFee\": {\n \"currency\": \"NOK\",\n \"amount\": 10\n },\n \"markupFeePercentage\": \"20\",\n \"cardAcceptorId\": \"\",\n \"cardAcceptorAddress\": {\n \"street\": \"Street\",\n \"buildingNumber\": \"56\",\n \"postalCode\": \"7014\",\n \"city\": \"Trondheim\",\n \"country\": \"NO\"\n },\n \"maskedPan\": \"\",\n \"transactionDetails\": \"\",\n \"invoiced\": \"true\",\n \"proprietaryBankTransactionCode\": \"\"\n }\n]", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://psd2.eika.no/api-sandbox
Parameters
— pathrequired
— headerrequired
— headerrequired
— headerrequired
— headerrequired
— header
— header
— header
— header
— header
— header
Body required
[
  {
    "cardTransactionId": "test",
    "terminalId": "tid",
    "bookingDate": "2019-05-08",
    "transactionDate": "2018-06-07",
    "transactionAmount": {
      "currency": "NOK",
      "amount": 100
    },
    "originalAmount": {
      "currency": "NOK",
      "amount": 100
    },
    "merchantCategoryCode": "BOB",
    "markupFee": {
      "currency": "NOK",
      "amount": 10
    },
    "markupFeePercentage": "20",
    "cardAcceptorId": "",
    "cardAcceptorAddress": {
      "street": "Street",
      "buildingNumber": "56",
      "postalCode": "7014",
      "city": "Trondheim",
      "country": "NO"
    },
    "maskedPan": "",
    "transactionDetails": "",
    "invoiced": "true",
    "proprietaryBankTransactionCode": ""
  }
]