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

# Mark a payment record as succeeded

POST https://api.sandbox.monite.com/v1/payment_records/{payment_record_id}/mark_as_succeeded
Content-Type: application/json

Reference: https://docs.monite.com/api/payment-records/post-payment-records-id-mark-as-succeeded

## Authentication

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

## Servers

- `https://api.sandbox.monite.com/v1` (sandbox, default)
- `https://api.monite.com/v1` (eu_production)
- `https://us.api.monite.com/v1` (na_production)

## Request

### Path parameters

- `payment_record_id` (string, required)

### Headers

- `x-monite-version` (string, required)
- `x-monite-entity-id` (string, required) — The ID of the entity that owns the requested resource.

### Body (application/json)

This endpoint expects an object.

- `paid_at` (datetime, required) — Timestamp marking when the payment was executed.
- `payment_intent_status` (string, optional) — Raw status string of the external payment intent.

## Response

### 200

Successful Response

- `id` (string, required)
- `amount` (integer, required) — Positive amount in case of successful payment, negative amount in case of payment failure or refund, represented in minor currency units (e.g., cents).
- `currency` (enum, required) — Currency code (ISO 4217) indicating the currency in which the payment was made.
  - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SEK`, `SGD`, `SHP`, `SLE`, `SOS`, `SRD`, `SSP`, `SVC`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`
- `history` (list of PaymentRecordHistoryResponse, required) — History of the payment record.
- `is_external` (boolean, required)
- `object` (PaymentRecordObjectResponse, required)
- `entity_user_id` (string, optional) — ID of the user associated with the payment, if applicable.
- `overpaid_amount` (integer, optional, default: 0) — Filled in a case, if payment amount is more, than total_amount
- `paid_at` (datetime, optional) — Timestamp marking when the payment was executed. Null if payment hasn't occurred yet.
- `payment_intent_id` (string, optional) — Identifier for an payment intent.
- `payment_intent_status` (string, optional) — Raw status string of the external payment intent.
- `payment_method` (string, optional) — Payment method used or planned for the transaction.
- `planned_payment_date` (string, optional) — Scheduled date for future payments, required when the payment is planned but not yet executed.
- `status` (string, optional, default: succeeded) — The current status of the payment record. Possible values: `created`, `processing`, `succeeded`, `canceled`.

## Errors

### 422 Post Payment Records ID Mark as Succeeded Request Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

### 500 Post Payment Records ID Mark as Succeeded Request Internal Server Error

Internal Server Error

- `error` (ErrorSchema, required)

## Types

### PaymentRecordHistoryResponse

- `status` (enum, required)
  - Allowed values: `created`, `processing`, `succeeded`, `canceled`
- `timestamp` (datetime, required) — Timestamp of the change in a history
- `entity_user_id` (string, optional)

### PaymentRecordObjectResponse

- `id` (string, required) — ID of the invoice
- `new_status` (string, required) — Status, in which object has been moved
- `old_status` (string, required) — Status, in which object was before payment
- `type` (enum, required)
  - Allowed values: `receivable`, `payable`

### ValidationError

- `loc` (list of ValidationErrorLocItem, required)
- `msg` (string, required)
- `type` (string, required)

### ErrorSchema

- `message` (string, required)

### ValidationErrorLocItem

## Examples

**Request**

```json
{
  "paid_at": "2024-01-15T09:30:00Z"
}
```

**Response**

```json
{
  "id": "id",
  "amount": 1,
  "currency": "AED",
  "history": [
    {
      "status": "created",
      "timestamp": "2024-01-15T09:30:00Z",
      "entity_user_id": "entity_user_id"
    }
  ],
  "is_external": true,
  "object": {
    "id": "id",
    "new_status": "new_status",
    "old_status": "old_status",
    "type": "receivable"
  },
  "entity_user_id": "entity_user_id",
  "overpaid_amount": 1,
  "paid_at": "2024-01-15T09:30:00Z",
  "payment_intent_id": "payment_intent_id",
  "payment_intent_status": "payment_intent_status",
  "payment_method": "payment_method",
  "planned_payment_date": "planned_payment_date",
  "status": "status"
}
```

**SDK Code**

```python
import requests

url = "https://api.sandbox.monite.com/v1/payment_records/payment_record_id/mark_as_succeeded"

payload = { "paid_at": "2024-01-15T09:30:00Z" }
headers = {
    "x-monite-version": "2024-01-31",
    "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.sandbox.monite.com/v1/payment_records/payment_record_id/mark_as_succeeded';
const options = {
  method: 'POST',
  headers: {
    'x-monite-version': '2024-01-31',
    'x-monite-entity-id': '9d2b4c8f-2087-4738-ba91-7359683c49a4',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"paid_at":"2024-01-15T09:30:00Z"}'
};

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://api.sandbox.monite.com/v1/payment_records/payment_record_id/mark_as_succeeded"

	payload := strings.NewReader("{\n  \"paid_at\": \"2024-01-15T09:30:00Z\"\n}")

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

	req.Header.Add("x-monite-version", "2024-01-31")
	req.Header.Add("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4")
	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://api.sandbox.monite.com/v1/payment_records/payment_record_id/mark_as_succeeded")

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

request = Net::HTTP::Post.new(url)
request["x-monite-version"] = '2024-01-31'
request["x-monite-entity-id"] = '9d2b4c8f-2087-4738-ba91-7359683c49a4'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"paid_at\": \"2024-01-15T09:30:00Z\"\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://api.sandbox.monite.com/v1/payment_records/payment_record_id/mark_as_succeeded")
  .header("x-monite-version", "2024-01-31")
  .header("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"paid_at\": \"2024-01-15T09:30:00Z\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.sandbox.monite.com/v1/payment_records/payment_record_id/mark_as_succeeded', [
  'body' => '{
  "paid_at": "2024-01-15T09:30:00Z"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'x-monite-entity-id' => '9d2b4c8f-2087-4738-ba91-7359683c49a4',
    'x-monite-version' => '2024-01-31',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.sandbox.monite.com/v1/payment_records/payment_record_id/mark_as_succeeded");
var request = new RestRequest(Method.POST);
request.AddHeader("x-monite-version", "2024-01-31");
request.AddHeader("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"paid_at\": \"2024-01-15T09:30:00Z\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-monite-version": "2024-01-31",
  "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["paid_at": "2024-01-15T09:30:00Z"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sandbox.monite.com/v1/payment_records/payment_record_id/mark_as_succeeded")! 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()
```