---
title: "Process a subscription payment"
method: POST
path: "/procedures/process-payment"
tags: ["Procedures"]
---

# Process a subscription payment

`POST /procedures/process-payment`

Manually process an outstanding subscription payment. The target payment must be declined.

## Headers

- `api-token` string, required
- `idempotency-key` string, required

## Request body

- ProcessPaymentReq
  - `subscriptionId` integer, required — The id of the subscription to process the declined payment for.
  - `paymentNumber` integer, required — The recurring payment number quantifying when the subscription was billed. For example a subscription's third billing has payment number `3`.

## Response `200`

Successful payment processing. The response body contains the data representation of the subscription and its processed payment. If data querying after processing failed an error message will  instead be returned.

- union
  - ProcessPaymentSuccessRes
    - `id` integer
    - `dateCreated` string, date-time
    - `dateUpdated` string, date-time
    - `dateActivated` string, date
    - `dateBilling` string, date
    - `status` string
    - `paymentPlanId` integer
    - `customerCode` string
    - `timesBilled` integer
    - `recurringAmount` number, float
    - `freeTrialPeriod` integer
    - `maxCycles` integer
    - `hasFailedPayments` string
    - `addOnIds` integer[]
    - `payments` BasePayment
      - `id` integer
      - `setupAmount` number, float
      - `recurringAmount` number, float
      - `addOnAmount` number, float
      - `amount` number, float
      - `taxAmount` number, float
      - `dateDue` string, date-time
      - `dateProcessed` string, date-time
      - `status` string
      - `paymentNumber` integer
      - `numberOfRetries` integer
  - ProcessPaymentWarningRes
    - `status` 'ok' | 'warning' | 'error'
    - `timestamp` string, date-time — Timestamp representing when the Subscriptions API sends the reply to the client.
    - `errors` object — A key-value object where the key is an error code and the value is either a single error message or an array of error messages

## Other responses

- `400` — You are initiating a request with invalid parameter and/or body values.
- `401` — You are not authorized to access this resource. Please ensure that you are authenticated, and that you are using the `api-token` header
- `403` — You do not have permission to access this resource. Please ensure you are both authenticated and that you have the required roles/permissions active.
- `500` — Helcim internal server error encountered.

---

[API](https://skmtc.net/helcim/apis/the-helcim-api.md) · [All operations](https://skmtc.net/helcim/apis/the-helcim-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/helcim/the-helcim-api/versions/345052ca6578/schema)
