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

# Payment Collections

> **Tip**
>
> This feature is available if a PSP integration has been enabled in your Solvimon account and the payment acceptor method has been set to that Stripe account on your billing entity

Invoices can be collected via all sorts of payment methods, but also by connecting a Payment Service Provider (PSP) to your Solvimon account. This integration allows for the generation of an invoice payment link that enables your customer to pay the total amount due of the invoice.

To point that payment link at a system of your own rather than a PSP, use a [custom redirect](/platform-guides/platform-configuration/payment-options/custom-redirect) payment acceptor.

# Payments integration with Stripe

When you configure a Payment Service Provider on your Billing entity, invoices are automatically generated with a payment link directly attached. This feature allows your customers to conveniently pay invoices via the link provided in the invoice.

They can click the link directly from Solvimon Desk, or you can copy it to the clipboard and share it by email

![](/_fern-img/edcca039a9ee4d7b711a0e462eceefc64e3d2b33473fe025acca498569ba1f94.webp)

# Invoice Payment Status

Once payments are completed through the payment integration via Solvimon, the invoice's [`payment_status`](/platform-guides/invoicing/invoices/invoice-payment-status) is also automatically updated to reflect it. If you have an integration with an ERP system, this status can also be synchronized to update the amount receivable.

![](/_fern-img/9ee0fa46b5180422f79fe55d9e38c85dc3a2ba81f8d70c2cf58381fa48f414d0.webp)

### Payment status

Invoices expose a `payment_status` of `UNPAID`, `PARTIALLY_PAID`, `PAID` or `OVERPAID`, shown on final invoices to indicate how much of the invoiced amount has been received. An invoice can be marked `PAID` manually as demonstrated below, and it will also switch automatically once the invoice is paid using the payment service provider link provided. See [invoice payment status](/platform-guides/invoicing/invoices/invoice-payment-status) for details.

![](/_fern-img/b393b99f5e4f0211c9787c9ddbb041cdac329f69c402d8835ddeb3f14aaf61f0.webp)

## How to set it up?

---

## Collecting on an invoice

Beyond the payment link, a payment can be raised against an invoice directly. This is what you use to charge a stored payment method as part of a billing run, rather than waiting for the customer to click a link.

### Request

POST [https://test.api.solvimon.com/v\{version}/payments](https://test.api.solvimon.com/v\{version}/payments)

```curl
curl -X POST https://test.api.solvimon.com/v1/payments \
     -H "X-API-KEY: <apiKey>" \
     -H "Content-Type: application/json" \
     -d '{
  "external_reference": "bank-transfer-2026-0042",
  "result": "AUTHORIZED",
  "customer_id": "cust_AbD3DqausjOYiMNDZY11F",
  "invoice_id": "invo_LwFkp9AvbstgH5ZZ1Qd4",
  "amount": {
    "quantity": "150.00",
    "currency": "EUR"
  },
  "context": {
    "type": "PAY_INVOICE",
    "pay_invoice": {
      "invoice_id": "invo_LwFkp9AvbstgH5ZZ1Qd4"
    }
  }
}'
```

```python
import requests

url = "https://test.api.solvimon.com/v1/payments"

payload = {
    "external_reference": "bank-transfer-2026-0042",
    "result": "AUTHORIZED",
    "customer_id": "cust_AbD3DqausjOYiMNDZY11F",
    "invoice_id": "invo_LwFkp9AvbstgH5ZZ1Qd4",
    "amount": {
        "quantity": "150.00",
        "currency": "EUR"
    },
    "context": {
        "type": "PAY_INVOICE",
        "pay_invoice": { "invoice_id": "invo_LwFkp9AvbstgH5ZZ1Qd4" }
    }
}
headers = {
    "X-API-KEY": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://test.api.solvimon.com/v1/payments';
const options = {
  method: 'POST',
  headers: {'X-API-KEY': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"external_reference":"bank-transfer-2026-0042","result":"AUTHORIZED","customer_id":"cust_AbD3DqausjOYiMNDZY11F","invoice_id":"invo_LwFkp9AvbstgH5ZZ1Qd4","amount":{"quantity":"150.00","currency":"EUR"},"context":{"type":"PAY_INVOICE","pay_invoice":{"invoice_id":"invo_LwFkp9AvbstgH5ZZ1Qd4"}}}'
};

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://test.api.solvimon.com/v1/payments"

	payload := strings.NewReader("{\n  \"external_reference\": \"bank-transfer-2026-0042\",\n  \"result\": \"AUTHORIZED\",\n  \"customer_id\": \"cust_AbD3DqausjOYiMNDZY11F\",\n  \"invoice_id\": \"invo_LwFkp9AvbstgH5ZZ1Qd4\",\n  \"amount\": {\n    \"quantity\": \"150.00\",\n    \"currency\": \"EUR\"\n  },\n  \"context\": {\n    \"type\": \"PAY_INVOICE\",\n    \"pay_invoice\": {\n      \"invoice_id\": \"invo_LwFkp9AvbstgH5ZZ1Qd4\"\n    }\n  }\n}")

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

	req.Header.Add("X-API-KEY", "<apiKey>")
	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://test.api.solvimon.com/v1/payments")

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

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"external_reference\": \"bank-transfer-2026-0042\",\n  \"result\": \"AUTHORIZED\",\n  \"customer_id\": \"cust_AbD3DqausjOYiMNDZY11F\",\n  \"invoice_id\": \"invo_LwFkp9AvbstgH5ZZ1Qd4\",\n  \"amount\": {\n    \"quantity\": \"150.00\",\n    \"currency\": \"EUR\"\n  },\n  \"context\": {\n    \"type\": \"PAY_INVOICE\",\n    \"pay_invoice\": {\n      \"invoice_id\": \"invo_LwFkp9AvbstgH5ZZ1Qd4\"\n    }\n  }\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://test.api.solvimon.com/v1/payments")
  .header("X-API-KEY", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"external_reference\": \"bank-transfer-2026-0042\",\n  \"result\": \"AUTHORIZED\",\n  \"customer_id\": \"cust_AbD3DqausjOYiMNDZY11F\",\n  \"invoice_id\": \"invo_LwFkp9AvbstgH5ZZ1Qd4\",\n  \"amount\": {\n    \"quantity\": \"150.00\",\n    \"currency\": \"EUR\"\n  },\n  \"context\": {\n    \"type\": \"PAY_INVOICE\",\n    \"pay_invoice\": {\n      \"invoice_id\": \"invo_LwFkp9AvbstgH5ZZ1Qd4\"\n    }\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://test.api.solvimon.com/v1/payments', [
  'body' => '{
  "external_reference": "bank-transfer-2026-0042",
  "result": "AUTHORIZED",
  "customer_id": "cust_AbD3DqausjOYiMNDZY11F",
  "invoice_id": "invo_LwFkp9AvbstgH5ZZ1Qd4",
  "amount": {
    "quantity": "150.00",
    "currency": "EUR"
  },
  "context": {
    "type": "PAY_INVOICE",
    "pay_invoice": {
      "invoice_id": "invo_LwFkp9AvbstgH5ZZ1Qd4"
    }
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-KEY' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://test.api.solvimon.com/v1/payments");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-KEY", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"external_reference\": \"bank-transfer-2026-0042\",\n  \"result\": \"AUTHORIZED\",\n  \"customer_id\": \"cust_AbD3DqausjOYiMNDZY11F\",\n  \"invoice_id\": \"invo_LwFkp9AvbstgH5ZZ1Qd4\",\n  \"amount\": {\n    \"quantity\": \"150.00\",\n    \"currency\": \"EUR\"\n  },\n  \"context\": {\n    \"type\": \"PAY_INVOICE\",\n    \"pay_invoice\": {\n      \"invoice_id\": \"invo_LwFkp9AvbstgH5ZZ1Qd4\"\n    }\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-API-KEY": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "external_reference": "bank-transfer-2026-0042",
  "result": "AUTHORIZED",
  "customer_id": "cust_AbD3DqausjOYiMNDZY11F",
  "invoice_id": "invo_LwFkp9AvbstgH5ZZ1Qd4",
  "amount": [
    "quantity": "150.00",
    "currency": "EUR"
  ],
  "context": [
    "type": "PAY_INVOICE",
    "pay_invoice": ["invoice_id": "invo_LwFkp9AvbstgH5ZZ1Qd4"]
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://test.api.solvimon.com/v1/payments")! 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()
```

### Response (200)

```json
{
  "object_type": "PAYMENT",
  "id": "paym_UwFkp9AvbstgH5ZZ1Re7",
  "created_at": "2026-10-08T10:15:00Z",
  "timestamp": "2026-10-08T10:15:00Z",
  "customer_id": "cust_AbD3DqausjOYiMNDZY11F",
  "invoice_id": "invo_LwFkp9AvbstgH5ZZ1Qd4",
  "external_reference": "bank-transfer-2026-0042",
  "result": "AUTHORIZED",
  "context": {
    "type": "PAY_INVOICE",
    "pay_invoice": {
      "invoice_id": "invo_LwFkp9AvbstgH5ZZ1Qd4"
    }
  }
}
```

The payment's `context` says what the payment is for: paying a specific invoice, a direct payment, an on-demand charge, or a payment request. The `result` reports the outcome, using `AUTHORIZED`, `PENDING`, `REFUSED`, `CANCELLED`, `ERROR`, `REFUNDED`, or `CHARGED_BACK`, with the provider's detail in `result_details`.

To see what has already been collected or attempted on an invoice, read `GET /v{version}/invoices/{resourceId}/payments` for the payments and `GET /v{version}/invoices/{resourceId}/payment-attempts` for the attempt chain behind them.

## The rest of collections

| Topic                                                              | Where                                                                                                             |
| ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
| Which instruments a customer can pay with, and how they are stored | [Payment options](/platform-guides/platform-configuration/payment-options)                                        |
| Bank accounts debited under a mandate                              | [Direct debit](/platform-guides/platform-configuration/payment-options/direct-debit)                              |
| What happens when a payment fails, and how invoices are chased     | [Dunning & payment retries](/platform-guides/invoicing/dunning-and-payment-retries)                               |
| Instalments and recurring collection outside the invoice cycle     | Payment schedules, covered in [Dunning & payment retries](/platform-guides/invoicing/dunning-and-payment-retries) |
| Sending the customer somewhere you control to pay                  | [Custom redirect](/platform-guides/platform-configuration/payment-options/custom-redirect)                        |
| Adyen setup, including automatic retries                           | [Adyen](/integrations/paymentserviceproviders/adyen)                                                              |

### Refunds and reversals

Two different operations, easily confused:

* **Refund** returns funds for a payment that was captured. Use `POST /v{version}/payments/{resourceId}/refund`. The payment result becomes `REFUNDED`.
* **Reverse** cancels a payment that has not settled, so the funds are never taken. Use `POST /v{version}/payments/{resourceId}/reverse`.

Neither changes the invoice itself. To correct what was invoiced, issue a credit note; see [Correcting invoices](/platform-guides/invoicing/invoice-corrections).

---