---
title: "Create Payment"
method: POST
path: "/api/v1/payments"
tags: ["Payments"]
---

# Create Payment

`POST /api/v1/payments`

## Request

- Base URL: `https://merchant-api.accruesavings.com`
- URL: `https://merchant-api.accruesavings.com/api/v1/payments`
- Auth: none declared. Required headers: `Client-ID`, `Authorization`
- TypeScript: <https://skmtc.dev/byaccrue/apis/accrue-merchant-api/docs/api/v1/payments/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` CreatePayment, required: CreatePayment
    - `id` string, uuid, required: Unique identifier for the object.
    - `type` 'CreatePayment', required
    - `attributes` object, required
      - `walletId` string, uuid, required: Wallet ID
      - `amount` integer, required: Amount to capture in cents
      - `linkedAccountId` string, uuid: The ID of the linked account to use for funding this payment.
      - `channel` string, nullable: External system identifier used to identify the payment channel. E.g. App Name, Activity ID, Checkout Interface, etc.
      - `reference` string, nullable: Reference to the payment inside an external system. E.g. Cart ID.
      - `externalPayments` object[]
        - `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.
      - `disbursement` object[]
        - `counterpartyId` string, uuid, required: The ID of the counterparty to whom the funds are being disbursed.
        - `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.
        - `remit` boolean: Deprecated. This field is accepted but always treated as `true` regardless of the value provided. All disbursements are remitted directly. Will be removed in a future version.

## Response `200`

OK

- object
  - `data` CreatePaymentResponse, required
    - `id` string, uuid, required: Unique identifier for the object.
    - `type` 'Payment', required
    - `attributes` object, required
      - `id` string, uuid
      - `status` 'Canceled' | 'Created' | 'Failed' | 'Processing' | 'Returned' | 'Sent': The current status of the payment. Each status indicates a specific phase in the payment process, such as waiting for authorization, being processed, or having been successfully completed or canceled.
      - `amount` integer: The total amount of the payment processed, represented in the smallest currency unit (e.g., cents for USD). To obtain the value in dollars, divide by 100. This amount may differ from the initially intended amount due to adjustments, fees, or additional charges.
      - `channel` string, nullable: External system identifier used to identify the payment channel. E.g. App Name, Activity ID, Checkout Interface, etc.
      - `reference` string, nullable: Reference to the data inside an external system.
      - `disbursement` object[]: Array of disbursements associated with this payment, including counterparty IDs, amounts, and fees.
        - `counterpartyId` string, uuid, required: The ID of the counterparty to whom the funds are being disbursed.
        - `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.
        - `fee` integer, required: The fee assigned to this particular disbursement based on the whole payment fee, represented in the smallest currency unit (e.g., cents for USD). To obtain the value in dollars, divide by 100.
        - `remit` boolean, required: Deprecated. Always returns `true`. All disbursements are remitted directly. Will be removed in a future version.
      - `charges` object: Charges applied to this payment.
        - `fee` object: Processing fee details
          - `amount` integer, required: Fee amount in cents
          - `type` string, required: Fee type identifier
        - `rewards` integer: Rewards amount spent from wallet balance, in cents
      - `deductions` object: Legacy charges breakdown. Use `charges` instead.
        - `rewards` integer, required: Rewards amount spent from wallet balance, in cents
        - `fees` integer, required: Processing fees charged, in cents
      - `expiresAt` string, date-time: The field indicates the date and time until which the payment is valid. After this date, the payment will either be automatically cancelled or completed.
      - `updatedAt` string, date-time, required
      - `createdAt` string, date-time, required

## Other responses

- `400`: Bad Request
- `402`: Payment Required. The authorization or capture was declined by the funding source.

---

[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)
