Create sandbox card account transactions
POSThttps://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
- 201
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
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());