> This page is for version 2024-10-01 (default).
> For other versions, use one of these documentation indexes:
> - 2024-10-01 (default): https://docs.getkard.com/2024-10-01/llms.txt
> - Legacy: https://docs.getkard.com/legacy/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getkard.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getkard.com/_mcp/server.

# Create Incoming Transactions

POST https://rewards-api.getkard.com/v2/issuers/{organizationId}/transactions
Content-Type: application/json

Call this endpoint to send all transactions made by all your enrolled users in your rewards program. The request body will depend on the transaction type.
Please use the correct type when calling the endpoint:

* `transaction`: These incoming transactions will be processed and matched by the Kard system. Learn more about the [Transaction CLO Matching](https://github.com/kard-financial/kard-postman#c-transaction-clo-matching) flow here.
* `coreTransaction`: For transactions from core banking systems with limited card-level data.

Required scopes: `transaction:write`
Note: `Maximum of 500 transactions can be created per request`.

Reference: https://docs.getkard.com/api/transactions/create

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://rewards-api.getkard.com` (Production, default)
- `https://test-rewards-api.getkard.com` (Sandbox)

## Request

### Path parameters

- `organizationId` (string, required) — Your issuer organization ID, provided by Kard

### Body (application/json)

This endpoint expects a TransactionsRequestBody.

- `data` (list of Transactions, required) — Discriminated union representing the request body for submitting a transaction. Use `type` to distinguish between the two: - `transaction`: For transactions requiring processing and matching by the Kard system. - `coreTransaction`: For transactions from core banking systems with limited card-level data.

## Response

### 202

- `data` (TransactionsResponseData, required)

## Errors

### 207 Create Incoming Transactions Multi Status

- `data` (TransactionsResponseData, required)
- `errors` (list of ErrorObject, required)

### 401 Unauthorized Error

- `errors` (list of ErrorObject, required)

### 500 Internal Server Error

- `errors` (list of ErrorObject, required)

### 400 Invalid Request

- `errors` (list of ErrorObject, required)

### 409 Conflict Error

- `errors` (list of ErrorObject, required)

## Types

### Transactions

- `type`: `transaction`
  - `attributes` (TransactionsAttributes, required)
  - `id` (string, required) — Unique identifier for the transaction event. This must be unique for each distinct event sent to the API.
- `type`: `coreTransaction`
  - `attributes` (CoreTransactionAttributes, required)
  - `id` (string, required) — Unique identifier for the transaction event. This must be unique for each distinct event sent to the API.

### TransactionsResponseData

- `type` (string, required) — Type of document returned
- `id` (string, required) — The request id of the pending job
- `attributes` (Job, required)

### ErrorObject

- `status` (string, required) — Status code returned from the request
- `title` (string, required) — Name of error
- `detail` (string, required) — Description of the specific occurance of the error
- `source` (ErrorSource, optional) — An object containing a reference to the primary source of the error
- `id` (string, optional) — The id of the resource which caused the error. Always returned for multi-status errors.

### TransactionsAttributes

- `userId` (string, required) — The ID of the user as defined on the issuers system
- `amount` (integer, required) — Transaction amount in cents
- `status` (enum, required) — Transaction status
  - Allowed values: `APPROVED`, `SETTLED`, `REVERSED`, `RETURNED`, `DECLINED`
- `currency` (string, required) — Currency of transaction
- `description` (string, required) — Description of transaction - usually includes merchant and other key details on transaction
- `cardBIN` (string, required) — Bank identification number (BIN). Must be a valid BIN of 6 digits. If over 6 digits, please send first 6.
- `cardLastFour` (string, required) — Card last four digits.
- `direction` (enum, required) — The direction in which the funds flow - DEBIT or CREDIT
  - Allowed values: `DEBIT`, `CREDIT`
- `paymentType` (enum, required) — The type of payment involved in the transaction.
  - Allowed values: `CARD`
- `transactionId` (string, required) — The transaction ID
- `subtotal` (integer, optional) — The base amount in cents excluding additional charges (such as tips, taxes, and other fees).
- `description2` (string, optional) — Description2 of transaction — usually includes other merchant identifying information
- `mcc` (string, optional) — Merchant Category Code (usually a 4-digit numerical number). Note, this field is REQUIRED for SOME national offers. We HIGHLY RECOMMEND sending this field as it will be required in the near future.
- `coreProviderId` (string, optional) — Name of processor associated with transaction
- `transactionDate` (datetime, optional) — Timestamp for REVERSED, RETURNED, DECLINED transaction events; REQUIRED for transactions with REVERSED, RETURNED, DECLINED status. Date string should be in ISO 8601 format i.e.`'YYYY-MM-DDThh:mm:ss.sTZD'` where TZD = time zone designator (Z or +hh:mm or -hh:mm) i.e. `1994-11-05T08:15:30-05:00` OR `1994-11-05T08:15:30Z`
- `authorizationDate` (datetime, optional) — Timestamp for APPROVED transaction event; REQUIRED for transactions with APPROVED status, and HIGHLY RECOMMENDED to include for transactions with a SETTLED status. Date string should be in ISO 8601 format i.e.`'YYYY-MM-DDThh:mm:ss.sTZD'` where TZD = time zone designator (Z or +hh:mm or -hh:mm) i.e. `1994-11-05T08:15:30-05:00 OR 1994-11-05T08:15:30Z`
- `settledDate` (datetime, optional) — Timestamp for SETTLED transaction event, REQUIRED for transactions with SETTLED status. Date string should be in ISO 8601 format i.e.`'YYYY-MM-DDThh:mm:ss.sTZD'` where TZD = time zone designator (Z or +hh:mm or -hh:mm) i.e. `1994-11-05T08:15:30-05:00` OR `1994-11-05T08:15:30Z`
- `merchant` (Merchant, optional) — Merchant details
- `cardPresence` (string, optional) — Whether card was present at time of transaction
- `panEntryMode` (string, optional) — PAN entry mode
- `authorizationCode` (string, optional) — Transaction approval code
- `retrievalReferenceNumber` (string, optional) — Retrieval Reference Number
- `systemTraceAuditNumber` (string, optional) — System Trace Audit Number
- `acquirerReferenceNumber` (string, optional) — Acquirer Reference Number
- `cardNetwork` (enum, optional) — The card network associated with the transaction
  - Allowed values: `VISA`, `MASTERCARD`, `AMERICANEXPRESS`, `DISCOVER`
- `cardProductId` (string, optional) — The card product ID associated with the transaction
- `userZipCode` (string, optional) — The zip code of the user who made the transaction
- `processorMids` (ProcessorMid, optional) — Network specific merchant IDs (MIDs) associated with the transaction
- `accountId` (string, optional) — An account identifier associated to transaction

### CoreTransactionAttributes

- `userId` (string, required) — The ID of the user as defined on the issuers system
- `transactionId` (string, required) — The transaction ID from the core banking system
- `amount` (integer, required) — Transaction amount in cents
- `currency` (string, required) — Currency of transaction in ISO 4217 alpha-3 format
- `description` (string, required) — Description of transaction - usually includes merchant and other key details on transaction
- `direction` (enum, required) — The direction in which the funds flow - DEBIT or CREDIT
  - Allowed values: `DEBIT`, `CREDIT`
- `status` ("SETTLED", required) — Transaction status (always SETTLED for core transactions)
- `settledDate` (datetime, required) — Timestamp when transaction was settled. Date string should be in ISO 8601 format i.e.'YYYY-MM-DDThh:mm:ss.sTZD' where TZD = time zone designator (Z or +hh:mm or -hh:mm) i.e. 1994-11-05T08:15:30-05:00 OR 1994-11-05T08:15:30Z
- `authorizationDate` (datetime, required) — Timestamp for transaction authorization. Date string should be in ISO 8601 format i.e.'YYYY-MM-DDThh:mm:ss.sTZD' where TZD = time zone designator (Z or +hh:mm or -hh:mm) i.e. 1994-11-05T08:15:30-05:00 OR 1994-11-05T08:15:30Z
- `financialInstitutionId` (string, optional) — Unique identifier of the financial institution
- `cardLastFours` (list of string, optional) — Last four digits of the card(s) that may have been used for the transaction. When the issuer cannot determine which specific card was used, multiple values are provided as candidates.
- `financialInstitutionName` (string, optional, deprecated) — Deprecated. Use `financialInstitutionId` instead. Name of the financial institution.

### Job

- `status` (enum, required) — Status of the job
  - Allowed values: `queued`
- `message` (string, required) — Message regarding the status of the job request

### ErrorSource

- `pointer` (string, optional) — A JSON pointer to the value in the request document that caused the error
- `parameter` (string, optional) — A string indicating which URI query parameter caused the error
- `header` (string, optional) — A string indicating the name of a single request header which caused the error

### Merchant

- `name` (string, required) — Merchant name associated with transaction
- `id` (string, optional) — Acquirer Merchant Identification Number (MID) — usually a 15 digit numerical identifier code. Note, this field is REQUIRED for local offers. We HIGHLY RECOMMEND sending this field as it will be required in the near future.
- `addrStreet` (string, optional) — Merchant street address associated with transaction.
- `addrCity` (string, optional) — Merchant address city associated with transaction.
- `addrState` (enum, optional) — Merchant address state associated with transaction.
  - Allowed values: `AL`, `AK`, `AS`, `AZ`, `AR`, `CA`, `CO`, `CT`, `DE`, `DC`, `FM`, `FL`, `GA`, `GU`, `HI`, `ID`, `IL`, `IN`, `IA`, `KS`, `KY`, `LA`, `ME`, `MH`, `MD`, `MA`, `MI`, `MN`, `MS`, `MO`, `MT`, `NE`, `NV`, `NH`, `NJ`, `NM`, `NY`, `NC`, `ND`, `MP`, `OH`, `OK`, `OR`, `PW`, `PA`, `PR`, `RI`, `SC`, `SD`, `TN`, `TX`, `UT`, `VT`, `VI`, `VA`, `WA`, `WV`, `WI`, `WY`
- `addrZipcode` (string, optional) — Merchant address zip code associated with transaction.
- `addrCountry` (string, optional) — Merchant address country associated with transaction.
- `latitude` (string, optional) — Merchant latitude geocoordinate associated with transaction.
- `longitude` (string, optional) — Merchant longitude geocoordinate associated with transaction.
- `storeId` (string, optional) — Merchant store ID where transaction originated from

### ProcessorMid

- `processor`: `VISA`
  - `mids` (VisaMidDetails, required) — Merchant ID (MID) associated with the processor

### VisaMidDetails

- `vmid` (string, required) — Visa Merchant ID (VMID) associated with the transaction
- `vsid` (string, required) — Visa Store ID (VSID) associated with the transaction

## Examples

### Transaction

**Request**

```json
{
  "data": [
    {
      "type": "transaction",
      "attributes": {
        "userId": "6FHt5b6Fnp0qdomMEy5AN6PXcSJIeX69",
        "amount": 1000,
        "status": "APPROVED",
        "currency": "USD",
        "description": "ADVANCEAUTO",
        "cardBIN": "123456",
        "cardLastFour": "4321",
        "direction": "DEBIT",
        "paymentType": "CARD",
        "transactionId": "2467de37-cbdc-416d-a359-75de87bfffb0",
        "subtotal": 800,
        "description2": "ADVANCEAUTO",
        "mcc": "1234",
        "authorizationDate": "2021-07-02T17:47:06Z",
        "merchant": {
          "name": "ADVANCEAUTO",
          "id": "12345678901234567",
          "addrStreet": "125 Main St",
          "addrCity": "Philadelphia",
          "addrState": "PA",
          "addrZipcode": "19147",
          "addrCountry": "United States",
          "latitude": "37.9419429",
          "longitude": "-73.1446869",
          "storeId": "12345"
        },
        "authorizationCode": "123456",
        "retrievalReferenceNumber": "100804333919",
        "systemTraceAuditNumber": "333828",
        "acquirerReferenceNumber": "1234567890123456789012345678",
        "cardProductId": "1234567890123456789012345678",
        "processorMids": {
          "processor": "VISA",
          "mids": {
            "vmid": "12345678901",
            "vsid": "12345678"
          }
        }
      },
      "id": "309rjfoincor3icno3rind093cdow3jciwjdwcm"
    }
  ]
}
```

**Response**

```json
{
  "data": {
    "type": "job",
    "id": "c94a93a7-beb9-4e58-960c-2c812f849398",
    "attributes": {
      "status": "queued",
      "message": "Incoming Transactions event successfully queued for processing"
    }
  }
}
```

**SDK Code**

```python Transaction
import requests

url = "https://rewards-api.getkard.com/v2/issuers/organization-123/transactions"

payload = { "data": [
        {
            "type": "transaction",
            "attributes": {
                "userId": "6FHt5b6Fnp0qdomMEy5AN6PXcSJIeX69",
                "amount": 1000,
                "status": "APPROVED",
                "currency": "USD",
                "description": "ADVANCEAUTO",
                "cardBIN": "123456",
                "cardLastFour": "4321",
                "direction": "DEBIT",
                "paymentType": "CARD",
                "transactionId": "2467de37-cbdc-416d-a359-75de87bfffb0",
                "subtotal": 800,
                "description2": "ADVANCEAUTO",
                "mcc": "1234",
                "authorizationDate": "2021-07-02T17:47:06Z",
                "merchant": {
                    "name": "ADVANCEAUTO",
                    "id": "12345678901234567",
                    "addrStreet": "125 Main St",
                    "addrCity": "Philadelphia",
                    "addrState": "PA",
                    "addrZipcode": "19147",
                    "addrCountry": "United States",
                    "latitude": "37.9419429",
                    "longitude": "-73.1446869",
                    "storeId": "12345"
                },
                "authorizationCode": "123456",
                "retrievalReferenceNumber": "100804333919",
                "systemTraceAuditNumber": "333828",
                "acquirerReferenceNumber": "1234567890123456789012345678",
                "cardProductId": "1234567890123456789012345678",
                "processorMids": {
                    "processor": "VISA",
                    "mids": {
                        "vmid": "12345678901",
                        "vsid": "12345678"
                    }
                }
            },
            "id": "309rjfoincor3icno3rind093cdow3jciwjdwcm"
        }
    ] }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Transaction
const url = 'https://rewards-api.getkard.com/v2/issuers/organization-123/transactions';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"data":[{"type":"transaction","attributes":{"userId":"6FHt5b6Fnp0qdomMEy5AN6PXcSJIeX69","amount":1000,"status":"APPROVED","currency":"USD","description":"ADVANCEAUTO","cardBIN":"123456","cardLastFour":"4321","direction":"DEBIT","paymentType":"CARD","transactionId":"2467de37-cbdc-416d-a359-75de87bfffb0","subtotal":800,"description2":"ADVANCEAUTO","mcc":"1234","authorizationDate":"2021-07-02T17:47:06Z","merchant":{"name":"ADVANCEAUTO","id":"12345678901234567","addrStreet":"125 Main St","addrCity":"Philadelphia","addrState":"PA","addrZipcode":"19147","addrCountry":"United States","latitude":"37.9419429","longitude":"-73.1446869","storeId":"12345"},"authorizationCode":"123456","retrievalReferenceNumber":"100804333919","systemTraceAuditNumber":"333828","acquirerReferenceNumber":"1234567890123456789012345678","cardProductId":"1234567890123456789012345678","processorMids":{"processor":"VISA","mids":{"vmid":"12345678901","vsid":"12345678"}}},"id":"309rjfoincor3icno3rind093cdow3jciwjdwcm"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Transaction
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://rewards-api.getkard.com/v2/issuers/organization-123/transactions"

	payload := strings.NewReader("{\n  \"data\": [\n    {\n      \"type\": \"transaction\",\n      \"attributes\": {\n        \"userId\": \"6FHt5b6Fnp0qdomMEy5AN6PXcSJIeX69\",\n        \"amount\": 1000,\n        \"status\": \"APPROVED\",\n        \"currency\": \"USD\",\n        \"description\": \"ADVANCEAUTO\",\n        \"cardBIN\": \"123456\",\n        \"cardLastFour\": \"4321\",\n        \"direction\": \"DEBIT\",\n        \"paymentType\": \"CARD\",\n        \"transactionId\": \"2467de37-cbdc-416d-a359-75de87bfffb0\",\n        \"subtotal\": 800,\n        \"description2\": \"ADVANCEAUTO\",\n        \"mcc\": \"1234\",\n        \"authorizationDate\": \"2021-07-02T17:47:06Z\",\n        \"merchant\": {\n          \"name\": \"ADVANCEAUTO\",\n          \"id\": \"12345678901234567\",\n          \"addrStreet\": \"125 Main St\",\n          \"addrCity\": \"Philadelphia\",\n          \"addrState\": \"PA\",\n          \"addrZipcode\": \"19147\",\n          \"addrCountry\": \"United States\",\n          \"latitude\": \"37.9419429\",\n          \"longitude\": \"-73.1446869\",\n          \"storeId\": \"12345\"\n        },\n        \"authorizationCode\": \"123456\",\n        \"retrievalReferenceNumber\": \"100804333919\",\n        \"systemTraceAuditNumber\": \"333828\",\n        \"acquirerReferenceNumber\": \"1234567890123456789012345678\",\n        \"cardProductId\": \"1234567890123456789012345678\",\n        \"processorMids\": {\n          \"processor\": \"VISA\",\n          \"mids\": {\n            \"vmid\": \"12345678901\",\n            \"vsid\": \"12345678\"\n          }\n        }\n      },\n      \"id\": \"309rjfoincor3icno3rind093cdow3jciwjdwcm\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Transaction
require 'uri'
require 'net/http'

url = URI("https://rewards-api.getkard.com/v2/issuers/organization-123/transactions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"data\": [\n    {\n      \"type\": \"transaction\",\n      \"attributes\": {\n        \"userId\": \"6FHt5b6Fnp0qdomMEy5AN6PXcSJIeX69\",\n        \"amount\": 1000,\n        \"status\": \"APPROVED\",\n        \"currency\": \"USD\",\n        \"description\": \"ADVANCEAUTO\",\n        \"cardBIN\": \"123456\",\n        \"cardLastFour\": \"4321\",\n        \"direction\": \"DEBIT\",\n        \"paymentType\": \"CARD\",\n        \"transactionId\": \"2467de37-cbdc-416d-a359-75de87bfffb0\",\n        \"subtotal\": 800,\n        \"description2\": \"ADVANCEAUTO\",\n        \"mcc\": \"1234\",\n        \"authorizationDate\": \"2021-07-02T17:47:06Z\",\n        \"merchant\": {\n          \"name\": \"ADVANCEAUTO\",\n          \"id\": \"12345678901234567\",\n          \"addrStreet\": \"125 Main St\",\n          \"addrCity\": \"Philadelphia\",\n          \"addrState\": \"PA\",\n          \"addrZipcode\": \"19147\",\n          \"addrCountry\": \"United States\",\n          \"latitude\": \"37.9419429\",\n          \"longitude\": \"-73.1446869\",\n          \"storeId\": \"12345\"\n        },\n        \"authorizationCode\": \"123456\",\n        \"retrievalReferenceNumber\": \"100804333919\",\n        \"systemTraceAuditNumber\": \"333828\",\n        \"acquirerReferenceNumber\": \"1234567890123456789012345678\",\n        \"cardProductId\": \"1234567890123456789012345678\",\n        \"processorMids\": {\n          \"processor\": \"VISA\",\n          \"mids\": {\n            \"vmid\": \"12345678901\",\n            \"vsid\": \"12345678\"\n          }\n        }\n      },\n      \"id\": \"309rjfoincor3icno3rind093cdow3jciwjdwcm\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Transaction
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://rewards-api.getkard.com/v2/issuers/organization-123/transactions")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"data\": [\n    {\n      \"type\": \"transaction\",\n      \"attributes\": {\n        \"userId\": \"6FHt5b6Fnp0qdomMEy5AN6PXcSJIeX69\",\n        \"amount\": 1000,\n        \"status\": \"APPROVED\",\n        \"currency\": \"USD\",\n        \"description\": \"ADVANCEAUTO\",\n        \"cardBIN\": \"123456\",\n        \"cardLastFour\": \"4321\",\n        \"direction\": \"DEBIT\",\n        \"paymentType\": \"CARD\",\n        \"transactionId\": \"2467de37-cbdc-416d-a359-75de87bfffb0\",\n        \"subtotal\": 800,\n        \"description2\": \"ADVANCEAUTO\",\n        \"mcc\": \"1234\",\n        \"authorizationDate\": \"2021-07-02T17:47:06Z\",\n        \"merchant\": {\n          \"name\": \"ADVANCEAUTO\",\n          \"id\": \"12345678901234567\",\n          \"addrStreet\": \"125 Main St\",\n          \"addrCity\": \"Philadelphia\",\n          \"addrState\": \"PA\",\n          \"addrZipcode\": \"19147\",\n          \"addrCountry\": \"United States\",\n          \"latitude\": \"37.9419429\",\n          \"longitude\": \"-73.1446869\",\n          \"storeId\": \"12345\"\n        },\n        \"authorizationCode\": \"123456\",\n        \"retrievalReferenceNumber\": \"100804333919\",\n        \"systemTraceAuditNumber\": \"333828\",\n        \"acquirerReferenceNumber\": \"1234567890123456789012345678\",\n        \"cardProductId\": \"1234567890123456789012345678\",\n        \"processorMids\": {\n          \"processor\": \"VISA\",\n          \"mids\": {\n            \"vmid\": \"12345678901\",\n            \"vsid\": \"12345678\"\n          }\n        }\n      },\n      \"id\": \"309rjfoincor3icno3rind093cdow3jciwjdwcm\"\n    }\n  ]\n}")
  .asString();
```

```php Transaction
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://rewards-api.getkard.com/v2/issuers/organization-123/transactions', [
  'body' => '{
  "data": [
    {
      "type": "transaction",
      "attributes": {
        "userId": "6FHt5b6Fnp0qdomMEy5AN6PXcSJIeX69",
        "amount": 1000,
        "status": "APPROVED",
        "currency": "USD",
        "description": "ADVANCEAUTO",
        "cardBIN": "123456",
        "cardLastFour": "4321",
        "direction": "DEBIT",
        "paymentType": "CARD",
        "transactionId": "2467de37-cbdc-416d-a359-75de87bfffb0",
        "subtotal": 800,
        "description2": "ADVANCEAUTO",
        "mcc": "1234",
        "authorizationDate": "2021-07-02T17:47:06Z",
        "merchant": {
          "name": "ADVANCEAUTO",
          "id": "12345678901234567",
          "addrStreet": "125 Main St",
          "addrCity": "Philadelphia",
          "addrState": "PA",
          "addrZipcode": "19147",
          "addrCountry": "United States",
          "latitude": "37.9419429",
          "longitude": "-73.1446869",
          "storeId": "12345"
        },
        "authorizationCode": "123456",
        "retrievalReferenceNumber": "100804333919",
        "systemTraceAuditNumber": "333828",
        "acquirerReferenceNumber": "1234567890123456789012345678",
        "cardProductId": "1234567890123456789012345678",
        "processorMids": {
          "processor": "VISA",
          "mids": {
            "vmid": "12345678901",
            "vsid": "12345678"
          }
        }
      },
      "id": "309rjfoincor3icno3rind093cdow3jciwjdwcm"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Transaction
using RestSharp;

var client = new RestClient("https://rewards-api.getkard.com/v2/issuers/organization-123/transactions");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"data\": [\n    {\n      \"type\": \"transaction\",\n      \"attributes\": {\n        \"userId\": \"6FHt5b6Fnp0qdomMEy5AN6PXcSJIeX69\",\n        \"amount\": 1000,\n        \"status\": \"APPROVED\",\n        \"currency\": \"USD\",\n        \"description\": \"ADVANCEAUTO\",\n        \"cardBIN\": \"123456\",\n        \"cardLastFour\": \"4321\",\n        \"direction\": \"DEBIT\",\n        \"paymentType\": \"CARD\",\n        \"transactionId\": \"2467de37-cbdc-416d-a359-75de87bfffb0\",\n        \"subtotal\": 800,\n        \"description2\": \"ADVANCEAUTO\",\n        \"mcc\": \"1234\",\n        \"authorizationDate\": \"2021-07-02T17:47:06Z\",\n        \"merchant\": {\n          \"name\": \"ADVANCEAUTO\",\n          \"id\": \"12345678901234567\",\n          \"addrStreet\": \"125 Main St\",\n          \"addrCity\": \"Philadelphia\",\n          \"addrState\": \"PA\",\n          \"addrZipcode\": \"19147\",\n          \"addrCountry\": \"United States\",\n          \"latitude\": \"37.9419429\",\n          \"longitude\": \"-73.1446869\",\n          \"storeId\": \"12345\"\n        },\n        \"authorizationCode\": \"123456\",\n        \"retrievalReferenceNumber\": \"100804333919\",\n        \"systemTraceAuditNumber\": \"333828\",\n        \"acquirerReferenceNumber\": \"1234567890123456789012345678\",\n        \"cardProductId\": \"1234567890123456789012345678\",\n        \"processorMids\": {\n          \"processor\": \"VISA\",\n          \"mids\": {\n            \"vmid\": \"12345678901\",\n            \"vsid\": \"12345678\"\n          }\n        }\n      },\n      \"id\": \"309rjfoincor3icno3rind093cdow3jciwjdwcm\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Transaction
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["data": [
    [
      "type": "transaction",
      "attributes": [
        "userId": "6FHt5b6Fnp0qdomMEy5AN6PXcSJIeX69",
        "amount": 1000,
        "status": "APPROVED",
        "currency": "USD",
        "description": "ADVANCEAUTO",
        "cardBIN": "123456",
        "cardLastFour": "4321",
        "direction": "DEBIT",
        "paymentType": "CARD",
        "transactionId": "2467de37-cbdc-416d-a359-75de87bfffb0",
        "subtotal": 800,
        "description2": "ADVANCEAUTO",
        "mcc": "1234",
        "authorizationDate": "2021-07-02T17:47:06Z",
        "merchant": [
          "name": "ADVANCEAUTO",
          "id": "12345678901234567",
          "addrStreet": "125 Main St",
          "addrCity": "Philadelphia",
          "addrState": "PA",
          "addrZipcode": "19147",
          "addrCountry": "United States",
          "latitude": "37.9419429",
          "longitude": "-73.1446869",
          "storeId": "12345"
        ],
        "authorizationCode": "123456",
        "retrievalReferenceNumber": "100804333919",
        "systemTraceAuditNumber": "333828",
        "acquirerReferenceNumber": "1234567890123456789012345678",
        "cardProductId": "1234567890123456789012345678",
        "processorMids": [
          "processor": "VISA",
          "mids": [
            "vmid": "12345678901",
            "vsid": "12345678"
          ]
        ]
      ],
      "id": "309rjfoincor3icno3rind093cdow3jciwjdwcm"
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://rewards-api.getkard.com/v2/issuers/organization-123/transactions")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Core Transaction

**Request**

```json
{
  "data": [
    {
      "type": "coreTransaction",
      "attributes": {
        "userId": "6FHt5b6Fnp0qdomMEy5AN6PXcSJIeX69",
        "transactionId": "CORE-TXN-2024-001234",
        "amount": 4599,
        "currency": "USD",
        "description": "WALMART SUPERCENTER",
        "direction": "DEBIT",
        "status": "SETTLED",
        "settledDate": "2024-10-15T14:30:00Z",
        "authorizationDate": "2024-10-15T14:25:00Z",
        "financialInstitutionId": "fin-inst-001",
        "cardLastFours": [
          "4321"
        ]
      },
      "id": "core_txn_98765432109876543210"
    }
  ]
}
```

**Response**

```json
{
  "data": {
    "type": "job",
    "id": "c94a93a7-beb9-4e58-960c-2c812f849398",
    "attributes": {
      "status": "queued",
      "message": "Incoming Transactions event successfully queued for processing"
    }
  }
}
```

**SDK Code**

```python Core Transaction
import requests

url = "https://rewards-api.getkard.com/v2/issuers/organization-123/transactions"

payload = { "data": [
        {
            "type": "coreTransaction",
            "attributes": {
                "userId": "6FHt5b6Fnp0qdomMEy5AN6PXcSJIeX69",
                "transactionId": "CORE-TXN-2024-001234",
                "amount": 4599,
                "currency": "USD",
                "description": "WALMART SUPERCENTER",
                "direction": "DEBIT",
                "status": "SETTLED",
                "settledDate": "2024-10-15T14:30:00Z",
                "authorizationDate": "2024-10-15T14:25:00Z",
                "financialInstitutionId": "fin-inst-001",
                "cardLastFours": ["4321"]
            },
            "id": "core_txn_98765432109876543210"
        }
    ] }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Core Transaction
const url = 'https://rewards-api.getkard.com/v2/issuers/organization-123/transactions';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"data":[{"type":"coreTransaction","attributes":{"userId":"6FHt5b6Fnp0qdomMEy5AN6PXcSJIeX69","transactionId":"CORE-TXN-2024-001234","amount":4599,"currency":"USD","description":"WALMART SUPERCENTER","direction":"DEBIT","status":"SETTLED","settledDate":"2024-10-15T14:30:00Z","authorizationDate":"2024-10-15T14:25:00Z","financialInstitutionId":"fin-inst-001","cardLastFours":["4321"]},"id":"core_txn_98765432109876543210"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Core Transaction
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://rewards-api.getkard.com/v2/issuers/organization-123/transactions"

	payload := strings.NewReader("{\n  \"data\": [\n    {\n      \"type\": \"coreTransaction\",\n      \"attributes\": {\n        \"userId\": \"6FHt5b6Fnp0qdomMEy5AN6PXcSJIeX69\",\n        \"transactionId\": \"CORE-TXN-2024-001234\",\n        \"amount\": 4599,\n        \"currency\": \"USD\",\n        \"description\": \"WALMART SUPERCENTER\",\n        \"direction\": \"DEBIT\",\n        \"status\": \"SETTLED\",\n        \"settledDate\": \"2024-10-15T14:30:00Z\",\n        \"authorizationDate\": \"2024-10-15T14:25:00Z\",\n        \"financialInstitutionId\": \"fin-inst-001\",\n        \"cardLastFours\": [\n          \"4321\"\n        ]\n      },\n      \"id\": \"core_txn_98765432109876543210\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Core Transaction
require 'uri'
require 'net/http'

url = URI("https://rewards-api.getkard.com/v2/issuers/organization-123/transactions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"data\": [\n    {\n      \"type\": \"coreTransaction\",\n      \"attributes\": {\n        \"userId\": \"6FHt5b6Fnp0qdomMEy5AN6PXcSJIeX69\",\n        \"transactionId\": \"CORE-TXN-2024-001234\",\n        \"amount\": 4599,\n        \"currency\": \"USD\",\n        \"description\": \"WALMART SUPERCENTER\",\n        \"direction\": \"DEBIT\",\n        \"status\": \"SETTLED\",\n        \"settledDate\": \"2024-10-15T14:30:00Z\",\n        \"authorizationDate\": \"2024-10-15T14:25:00Z\",\n        \"financialInstitutionId\": \"fin-inst-001\",\n        \"cardLastFours\": [\n          \"4321\"\n        ]\n      },\n      \"id\": \"core_txn_98765432109876543210\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Core Transaction
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://rewards-api.getkard.com/v2/issuers/organization-123/transactions")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"data\": [\n    {\n      \"type\": \"coreTransaction\",\n      \"attributes\": {\n        \"userId\": \"6FHt5b6Fnp0qdomMEy5AN6PXcSJIeX69\",\n        \"transactionId\": \"CORE-TXN-2024-001234\",\n        \"amount\": 4599,\n        \"currency\": \"USD\",\n        \"description\": \"WALMART SUPERCENTER\",\n        \"direction\": \"DEBIT\",\n        \"status\": \"SETTLED\",\n        \"settledDate\": \"2024-10-15T14:30:00Z\",\n        \"authorizationDate\": \"2024-10-15T14:25:00Z\",\n        \"financialInstitutionId\": \"fin-inst-001\",\n        \"cardLastFours\": [\n          \"4321\"\n        ]\n      },\n      \"id\": \"core_txn_98765432109876543210\"\n    }\n  ]\n}")
  .asString();
```

```php Core Transaction
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://rewards-api.getkard.com/v2/issuers/organization-123/transactions', [
  'body' => '{
  "data": [
    {
      "type": "coreTransaction",
      "attributes": {
        "userId": "6FHt5b6Fnp0qdomMEy5AN6PXcSJIeX69",
        "transactionId": "CORE-TXN-2024-001234",
        "amount": 4599,
        "currency": "USD",
        "description": "WALMART SUPERCENTER",
        "direction": "DEBIT",
        "status": "SETTLED",
        "settledDate": "2024-10-15T14:30:00Z",
        "authorizationDate": "2024-10-15T14:25:00Z",
        "financialInstitutionId": "fin-inst-001",
        "cardLastFours": [
          "4321"
        ]
      },
      "id": "core_txn_98765432109876543210"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Core Transaction
using RestSharp;

var client = new RestClient("https://rewards-api.getkard.com/v2/issuers/organization-123/transactions");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"data\": [\n    {\n      \"type\": \"coreTransaction\",\n      \"attributes\": {\n        \"userId\": \"6FHt5b6Fnp0qdomMEy5AN6PXcSJIeX69\",\n        \"transactionId\": \"CORE-TXN-2024-001234\",\n        \"amount\": 4599,\n        \"currency\": \"USD\",\n        \"description\": \"WALMART SUPERCENTER\",\n        \"direction\": \"DEBIT\",\n        \"status\": \"SETTLED\",\n        \"settledDate\": \"2024-10-15T14:30:00Z\",\n        \"authorizationDate\": \"2024-10-15T14:25:00Z\",\n        \"financialInstitutionId\": \"fin-inst-001\",\n        \"cardLastFours\": [\n          \"4321\"\n        ]\n      },\n      \"id\": \"core_txn_98765432109876543210\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Core Transaction
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["data": [
    [
      "type": "coreTransaction",
      "attributes": [
        "userId": "6FHt5b6Fnp0qdomMEy5AN6PXcSJIeX69",
        "transactionId": "CORE-TXN-2024-001234",
        "amount": 4599,
        "currency": "USD",
        "description": "WALMART SUPERCENTER",
        "direction": "DEBIT",
        "status": "SETTLED",
        "settledDate": "2024-10-15T14:30:00Z",
        "authorizationDate": "2024-10-15T14:25:00Z",
        "financialInstitutionId": "fin-inst-001",
        "cardLastFours": ["4321"]
      ],
      "id": "core_txn_98765432109876543210"
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://rewards-api.getkard.com/v2/issuers/organization-123/transactions")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Example 3

**Request**

```json
{
  "data": [
    {
      "type": "transaction",
      "attributes": {
        "userId": "string",
        "amount": 0,
        "status": "APPROVED",
        "currency": "string",
        "description": "string",
        "cardBIN": "string",
        "cardLastFour": "string",
        "direction": "DEBIT",
        "paymentType": "CARD",
        "transactionId": "string"
      },
      "id": "string"
    }
  ]
}
```

**Response**

```json
{
  "data": {
    "type": "string",
    "id": "string",
    "attributes": {
      "status": "queued",
      "message": "string"
    }
  },
  "errors": [
    {
      "status": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string",
        "header": "string"
      },
      "id": "string"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://rewards-api.getkard.com/v2/issuers/%3AorganizationId/transactions"

payload = { "data": [
        {
            "type": "transaction",
            "attributes": {
                "userId": "string",
                "amount": 0,
                "status": "APPROVED",
                "currency": "string",
                "description": "string",
                "cardBIN": "string",
                "cardLastFour": "string",
                "direction": "DEBIT",
                "paymentType": "CARD",
                "transactionId": "string"
            },
            "id": "string"
        }
    ] }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://rewards-api.getkard.com/v2/issuers/%3AorganizationId/transactions';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"data":[{"type":"transaction","attributes":{"userId":"string","amount":0,"status":"APPROVED","currency":"string","description":"string","cardBIN":"string","cardLastFour":"string","direction":"DEBIT","paymentType":"CARD","transactionId":"string"},"id":"string"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://rewards-api.getkard.com/v2/issuers/%3AorganizationId/transactions"

	payload := strings.NewReader("{\n  \"data\": [\n    {\n      \"type\": \"transaction\",\n      \"attributes\": {\n        \"userId\": \"string\",\n        \"amount\": 0,\n        \"status\": \"APPROVED\",\n        \"currency\": \"string\",\n        \"description\": \"string\",\n        \"cardBIN\": \"string\",\n        \"cardLastFour\": \"string\",\n        \"direction\": \"DEBIT\",\n        \"paymentType\": \"CARD\",\n        \"transactionId\": \"string\"\n      },\n      \"id\": \"string\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://rewards-api.getkard.com/v2/issuers/%3AorganizationId/transactions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"data\": [\n    {\n      \"type\": \"transaction\",\n      \"attributes\": {\n        \"userId\": \"string\",\n        \"amount\": 0,\n        \"status\": \"APPROVED\",\n        \"currency\": \"string\",\n        \"description\": \"string\",\n        \"cardBIN\": \"string\",\n        \"cardLastFour\": \"string\",\n        \"direction\": \"DEBIT\",\n        \"paymentType\": \"CARD\",\n        \"transactionId\": \"string\"\n      },\n      \"id\": \"string\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://rewards-api.getkard.com/v2/issuers/%3AorganizationId/transactions")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"data\": [\n    {\n      \"type\": \"transaction\",\n      \"attributes\": {\n        \"userId\": \"string\",\n        \"amount\": 0,\n        \"status\": \"APPROVED\",\n        \"currency\": \"string\",\n        \"description\": \"string\",\n        \"cardBIN\": \"string\",\n        \"cardLastFour\": \"string\",\n        \"direction\": \"DEBIT\",\n        \"paymentType\": \"CARD\",\n        \"transactionId\": \"string\"\n      },\n      \"id\": \"string\"\n    }\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://rewards-api.getkard.com/v2/issuers/%3AorganizationId/transactions', [
  'body' => '{
  "data": [
    {
      "type": "transaction",
      "attributes": {
        "userId": "string",
        "amount": 0,
        "status": "APPROVED",
        "currency": "string",
        "description": "string",
        "cardBIN": "string",
        "cardLastFour": "string",
        "direction": "DEBIT",
        "paymentType": "CARD",
        "transactionId": "string"
      },
      "id": "string"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://rewards-api.getkard.com/v2/issuers/%3AorganizationId/transactions");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"data\": [\n    {\n      \"type\": \"transaction\",\n      \"attributes\": {\n        \"userId\": \"string\",\n        \"amount\": 0,\n        \"status\": \"APPROVED\",\n        \"currency\": \"string\",\n        \"description\": \"string\",\n        \"cardBIN\": \"string\",\n        \"cardLastFour\": \"string\",\n        \"direction\": \"DEBIT\",\n        \"paymentType\": \"CARD\",\n        \"transactionId\": \"string\"\n      },\n      \"id\": \"string\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["data": [
    [
      "type": "transaction",
      "attributes": [
        "userId": "string",
        "amount": 0,
        "status": "APPROVED",
        "currency": "string",
        "description": "string",
        "cardBIN": "string",
        "cardLastFour": "string",
        "direction": "DEBIT",
        "paymentType": "CARD",
        "transactionId": "string"
      ],
      "id": "string"
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://rewards-api.getkard.com/v2/issuers/%3AorganizationId/transactions")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```