> ## Documentation Index
> Fetch the complete documentation index at: https://www.marqeta.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create account payment

> Create a new payment to apply toward a credit account's balance.

POST/credit/accounts/\{account\_token}/payments

Create a new payment to apply toward a credit account's balance.

## URL path parameters

| Fields | Description |
| - | - |
| account\_token string  Required | Unique identifier of the credit account for which to create a payment. Send a `GET` request to `/credit/accounts` to retrieve existing credit account tokens. **Allowable Values:**  Existing account token |

## Request body

| Fields | Description |
| - | - |
| token string  Optional | Unique identifier of the payment. **Allowable Values:**  36 char max |
| method string  Required | Method of payment. **Allowable Values:**  `ACH`, `CHECK`, `DEBIT`, `CASH` |
| payment\_source\_token string  Optional | Unique identifier of the payment source. Required for ACH payments. **Allowable Values:**  36 char max  Existing payment source token |
| amount decimal  Required | Amount of the payment. **Allowable Values:**  0 min |
| currency\_code string  Required | Valid three-digit [ISO 4217 currency code](https://www.iso.org/iso-4217-currency-codes.html). **Allowable Values:**  `USD` |
| impact\_time datetime  Optional | Date and time when the payment impacts the account balance and fee calculations. **Allowable Values:**  Format: yyyy-MM-ddThh:mm:ssZ |
| description string  Required | Description of the payment. **Allowable Values:**  255 char max |
| metadata string  Optional | Customer-defined additional information about the payment (for example, a check number). **Allowable Values:**  255 char max |
| hold\_days integer  Optional | Overrides the configured default number of days for which to hold ACH and check payments. **Allowable Values:**  0–30 |

## Sample request body

```json JSON lines wrap theme={null}
{
  "token": "payment_token_1239",
  "method": "ACH",
  "payment_source_token": "payment_source_token_1112",
  "amount": 2500,
  "currency_code": "USD",
  "description": "Account statement payment"
}
```

## Response body

| Fields | Description |
| - | - |
| token string  Returned | Unique identifier of the payment. If in the `detail_object`, unique identifier of the detail object. **Allowable Values:**  36 char max |
| account\_token string  Returned | Unique identifier of the credit account on which the payment is made. **Allowable Values:**  36 char max  Existing account token |
| method string  Returned | Method of payment. **Allowable Values:**  `ACH`, `CHECK`, `DEBIT`, `CASH` |
| payment\_source\_token string  Conditionally returned | Unique identifier of the payment source. Required for ACH payments. **Allowable Values:**  Existing payment source token |
| payment\_schedule\_token string  Conditionally returned | Unique identifier of the payment schedule. **Allowable Values:**  36 char max |
| amount decimal  Returned | Total amount of the payment. **Allowable Values:**  0 min |
| currency\_code string  Returned | Valid three-digit [ISO 4217 currency code](https://www.iso.org/iso-4217-currency-codes.html). **Allowable Values:**  `USD` |
| status string  Returned | Current status of the payment or refund. **Allowable Values:**  `INITIATED`, `PENDING`, `PROCESSING`, `SUBMITTED`, `CANCELLED`, `COMPLETED`, `RETURNED`, `REFUNDED`, `SYS_ERROR`, `ACH_ERROR` |
| description string  Returned | Description of the payment. **Allowable Values:**  255 char max |
| metadata string  Conditionally returned | Customer-defined additional information about the payment (for example, a check number). **Allowable Values:**  255 char max |
| hold\_days integer  Returned | After a payment completes, the number of days to hold the available credit on the account before increasing it. **Allowable Values:**  Any integer |
| hold\_end\_time datetime  Conditionally returned | Date and time when the available credit hold is released. **Allowable Values:**  Format: yyyy-MM-ddThh:mm:ssZ |
| is\_manually\_released boolean  Conditionally returned | Whether the available credit hold was manually released for this payment. **Allowable Values:**  `true`, `false` **Default value:** `false` |
| on\_hold boolean  Conditionally returned | Whether the available credit is on hold for this payment. **Allowable Values:**  `true`, `false` **Default value:** `false` |
| returned\_details object  Conditionally returned | Contains information on a returned payment. **Allowable Values:**  Existing `returned_details` object |
| returned\_details.**return\_code** string  Returned | Return code for the returned payment. For more, see [NACHA ACH return codes](https://www.marqeta.com/docs/developer-guides/ach-origination.md#_nacha_ach_return_codes). **Allowable Values:**  Valid return code |
| returned\_details.**return\_reason** string  Returned | Reason the payment was returned. For more, see [NACHA ACH return codes](https://www.marqeta.com/docs/developer-guides/ach-origination.md#_nacha_ach_return_codes). **Allowable Values:**  Valid return reason |
| refund\_details object  Conditionally returned | Contains details for a refund. **Allowable Values:**  Existing `refund_details` object |
| refund\_details.**method** string  Returned | Payment instrument used to issue the refund. **Allowable Values:**  `ACH`, `CHECK` |
| refund\_details.**description** string  Returned | Description of the refund. **Allowable Values:**  255 char max |
| refund\_details.**status** string  Returned | Current status of the refund. **Allowable Values:**  `INITIATED`, `PENDING`, `PROCESSING`, `SUBMITTED`, `CANCELLED`, `COMPLETED`, `RETURNED` |
| waive\_returned\_payment\_fee boolean  Conditionally returned | A value of `true` indicates that a returned payment fee should not be applied. The default value of this field is `false`. This field is only considered when transitioning the status of the fee to `REFUNDED`. **Allowable Values:**  `true`, `false` |
| created\_time datetime  Returned | Date and time when the payment was created on Marqeta's credit platform, in UTC. **Allowable Values:**  Format: yyyy-MM-ddThh:mm:ssZ |
| updated\_time datetime  Returned | Date and time when the payment was last updated on Marqeta's credit platform, in UTC. **Allowable Values:**  Format: yyyy-MM-ddThh:mm:ssZ |
| transitions array of objects  Returned | Contains one or more `transitions` objects, which contain information about a payment status transition. **Allowable Values:**  One or more `transitions` objects |
| transitions\[].**token** string  Returned | Unique identifier of the payment status transition. **Allowable Values:**  36 char max |
| transitions\[].**account\_token** string  Returned | Unique identifier of the credit account on which you want to transition a payment status. **Allowable Values:**  Existing account token |
| transitions\[].**payment\_token** string  Returned | Unique identifier of the payment whose status you want to transition. **Allowable Values:**  Existing payment token |
| transitions\[].**status** string  Returned | Current status of the payment or refund. **Allowable Values:**  `INITIATED`, `PENDING`, `PROCESSING`, `SUBMITTED`, `CANCELLED`, `COMPLETED`, `RETURNED`, `REFUNDED`, `SYS_ERROR`, `ACH_ERROR` |
| transitions\[].**created\_time** datetime  Conditionally returned | Date and time when the payment transition was created on Marqeta's credit platform, in UTC. **Allowable Values:**  Format: yyyy-MM-ddThh:mm:ssZ |
| allocations array of objects  Conditionally returned | List of objects that contain information about how a payment is allocated. **Allowable Values:**  List of payment allocations |
| allocations\[].**bucket** undefined  Returned | Category to which a portion of the payment is allocated. **Allowable Values:**  `PRINCIPAL`, `INTEREST`, `FEES`  36 char max |
| allocations\[].**amount** decimal  Returned | Total amount of the payment allocation. **Allowable Values:**  0 min |
| program\_migration\_time datetime  Conditionally returned | Date and time when the statement summary was migrated to Marqeta's credit platform, in UTC. The value of this field is `null` if it has not been migrated. **Allowable Values:**  Format: yyyy-MM-ddThh:mm:ssZ |

## Sample response body

```json JSON expandable lines wrap theme={null}
{
  "token": "4749ab00-fec1-471c-ac5b-b8d31d06d7e4",
  "account_token": "7d68f45b-1232-4283-a0ea-6b0418d37692",
  "method": "ACH",
  "payment_source_token": "4474c16b-7ba7-435b-8854-237d492e3f32",
  "amount": 2500,
  "currency_code": "USD",
  "status": "COMPLETED",
  "description": "Account statement payment",
  "metadata": "\\\"bank_account_last_4_digits\\\":\\\"7234\\\\\"bank_name\\\":\\\"Bank Finance Plus\\\"",
  "hold_days": 1,
  "hold_end_time": "2024-02-03T11:32:24.727Z",
  "is_manually_released": false,
  "on_hold": false,
  "returned_details": null,
  "refund_details": null,
  "created_time": "2024-01-31T15:03:09.717Z",
  "updated_time": "2024-02-03T12:00:30.072Z",
  "transitions": [
    {
      "token": "b62d45d5-4495-4490-a898-3781229b235d",
      "account_token": "7d68f45b-1232-4283-a0ea-6b0418d37692",
      "payment_token": "4749ab00-fec1-471c-ac5b-b8d31d06d7e4",
      "status": "PROCESSING",
      "created_time": "2024-02-01T02:04:11.645Z"
    },
    {
      "token": "82d79178-5c97-41c2-80e5-bd99bb6bb61c",
      "account_token": "7d68f45b-1232-4283-a0ea-6b0418d37692",
      "payment_token": "4749ab00-fec1-471c-ac5b-b8d31d06d7e4",
      "status": "SUBMITTED",
      "created_time": "2024-02-01T03:39:22.505Z"
    },
    {
      "token": "c2a83d12-eeff-460a-b88a-bf7a2e40b251",
      "account_token": "7d68f45b-1232-4283-a0ea-6b0418d37692",
      "payment_token": "4749ab00-fec1-471c-ac5b-b8d31d06d7e4",
      "status": "PENDING",
      "created_time": "2024-01-31T15:30:45.028Z"
    },
    {
      "token": "156b5134-b37d-49cf-89d5-7123b321ba5c",
      "account_token": "7d68f45b-1232-4283-a0ea-6b0418d37692",
      "payment_token": "4749ab00-fec1-471c-ac5b-b8d31d06d7e4",
      "status": "COMPLETED",
      "created_time": "2024-02-02T11:32:24.727Z"
    },
    {
      "token": "64ca6c83-937c-4d37-86ae-14766bf87540",
      "account_token": "7d68f45b-1232-4283-a0ea-6b0418d37692",
      "payment_token": "4749ab00-fec1-471c-ac5b-b8d31d06d7e4",
      "status": "INITIATED",
      "created_time": "2024-01-31T15:03:09.723Z"
    }
  ]
}
```


## Related topics

- [About Credit Account Payments](https://www.marqeta.com/docs/developer-guides/about-credit-account-payments.md)
- [Payments Overview](https://www.marqeta.com/docs/core-api/credit-account-payments.md)
- [Create payment schedule](https://www.marqeta.com/docs/core-api/credit-account-payment-schedules/create-payment-schedule.md)
- [Create payment source](https://www.marqeta.com/docs/core-api/credit-account-payment-sources/create-payment-source.md)
- [Create account](https://www.marqeta.com/docs/core-api/credit-accounts/create-account.md)
