---
title: "Add External Transactions"
method: POST
path: "/api/v1/external-transactions"
tags: ["ExternalTransactions"]
---

# Add External Transactions

`POST /api/v1/external-transactions`

## Request

- Base URL: `https://merchant-api.accruesavings.com`
- URL: `https://merchant-api.accruesavings.com/api/v1/external-transactions`
- Auth: none declared. Required headers: `Client-ID`, `Authorization`
- TypeScript: <https://skmtc.dev/byaccrue/apis/accrue-merchant-api/docs/api/v1/external-transactions/post.ts> (a function with typed inputs; its response is checked against the schema)

## Headers

- `Client-ID` string, uuid, required: The unique identifier of the client making the request. This header is required to retrieve the client-specific configuration and ensure that the response is tailored to the client's settings and permissions.
- `Authorization` string, uuid, required: Secure secret to access privileged endpoints.

## Request body

- object
  - `data` CreateExternalTransaction[], required
    - `type` 'ExternalTransaction', required
    - `attributes` object, required
      - `type` 'Purchase' | 'Void' | 'Refund': Type of the external transactions.
      - `source` object, required
        - `id` string, required: Transaction identifier inside the originating external system.
        - `createdAt` string, date-time, required: Original date of creation for the transaction in the originating external system.
        - `customerId` string: User ID identifying the user inside the originating external system.
      - `channel` string: External system identifier used to identify the payment channel. E.g. Store Address, App Name, Checkout Interface, etc.
      - `payments` object[], required: All external payment methods and amounts charged to execute the transaction. The sum of all amounts is the total amount.
        - `amount` integer, required: The total amount charged with a particular payment method, represented in the smallest currency unit (e.g., cents for USD). To obtain the value in dollars, divide by 100.
        - `method` 'Cash' | 'DebitCard' | 'CreditCard' | 'Wire' | 'GiftCard' | 'Wallet' | 'Other' | 'Unknown': The method used for the split payment.
      - `payload` object: JSON payload with extra details required for future processing and analysis.

## Response `200`

OK

- AddExternalTransactionResponse
  - `data` object[], required
    - `id` string, uuid, required: Unique identifier for the object.
    - `type` 'ExternalTransaction', required
    - `attributes` object, required
      - `id` string, uuid, required: Unique identifier for the object.
      - `sourceId` string, required: Transaction identifier inside the originating external system.
      - `updatedAt` string, date-time, required
      - `createdAt` string, date-time, required
    - `relationships` object, required
      - `linkedExternalTransaction` object
        - `data` object[], required
          - `id` string, uuid, required
          - `type` 'ExternalTransaction', required
      - `user` object
        - `data` object[], required
          - `id` string, uuid, required
          - `type` 'User', required

## Other responses

- `400`: Bad Request
- `500`: Internal Server Error

---

[API](https://skmtc.dev/byaccrue/apis/accrue-merchant-api.md) - [All operations](https://skmtc.dev/byaccrue/apis/accrue-merchant-api/llms.txt) - [OpenAPI document](https://skmtc.dev/byaccrue/apis/accrue-merchant-api/revisions/3e2d97ef2e6e?raw)
