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

# Create Payment

POST https://api.papertracc.com/v1/payments
Content-Type: application/json

Creates a payment and allocates it to one or more bills.

Reference: https://api-docs.papertracc.com/papertracc/payments/create-payment

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /payments:
    post:
      operationId: Create Payment
      summary: Create Payment
      description: Creates a payment and allocates it to one or more bills.
      tags:
        - payments
      parameters:
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payments_Create Payment_Response_201'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                amount:
                  type: string
                staff_id:
                  type: string
                  format: uuid
                vendor_id:
                  type: string
                  format: uuid
                account_id:
                  type: string
                  format: uuid
                allocations:
                  type: array
                  items:
                    $ref: >-
                      #/components/schemas/PaymentsPostRequestBodyContentApplicationJsonSchemaAllocationsItems
                payment_date:
                  type: string
                  format: date-time
                exchange_rate:
                  type: string
                payment_method:
                  type: string
                destination_account:
                  $ref: >-
                    #/components/schemas/PaymentsPostRequestBodyContentApplicationJsonSchemaDestinationAccount
              required:
                - amount
                - staff_id
                - vendor_id
                - account_id
                - allocations
                - payment_date
                - exchange_rate
                - payment_method
                - destination_account
servers:
  - url: https://api.papertracc.com/v1
    description: Production
  - url: https://api.papertracc.com/rc-1
    description: Release Candidate 1
components:
  schemas:
    PaymentsPostRequestBodyContentApplicationJsonSchemaAllocationsItems:
      type: object
      properties:
        amount:
          type: string
        bill_id:
          type: string
          format: uuid
      required:
        - amount
        - bill_id
      title: PaymentsPostRequestBodyContentApplicationJsonSchemaAllocationsItems
    PaymentsPostRequestBodyContentApplicationJsonSchemaDestinationAccount:
      type: object
      properties:
        bank:
          type: string
        account_number:
          type: string
      required:
        - bank
        - account_number
      title: PaymentsPostRequestBodyContentApplicationJsonSchemaDestinationAccount
    PaymentsPostResponsesContentApplicationJsonSchemaDataVendor:
      type: object
      properties:
        id:
          type: string
          format: uuid
        display_name:
          type: string
      required:
        - id
        - display_name
      title: PaymentsPostResponsesContentApplicationJsonSchemaDataVendor
    PaymentsPostResponsesContentApplicationJsonSchemaDataAllocationsItems:
      type: object
      properties:
        id:
          type: string
          format: uuid
        amount:
          type: string
        bill_id:
          type: string
          format: uuid
        payment_id:
          type: string
          format: uuid
        bill_reference:
          type: string
      required:
        - id
        - amount
        - bill_id
        - payment_id
        - bill_reference
      title: PaymentsPostResponsesContentApplicationJsonSchemaDataAllocationsItems
    PaymentsPostResponsesContentApplicationJsonSchemaDataDestinationAccount:
      type: object
      properties:
        bank:
          type: string
        account_number:
          type: string
      required:
        - bank
        - account_number
      title: PaymentsPostResponsesContentApplicationJsonSchemaDataDestinationAccount
    PaymentsPostResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
        staff:
          description: Any type
        amount:
          type: string
        status:
          type: string
        vendor:
          $ref: >-
            #/components/schemas/PaymentsPostResponsesContentApplicationJsonSchemaDataVendor
        staff_id:
          description: Any type
        documents:
          type: array
          items:
            description: Any type
        vendor_id:
          type: string
          format: uuid
        account_id:
          type: string
          format: uuid
        created_at:
          type: string
          format: date-time
        project_id:
          type: string
        allocations:
          type: array
          items:
            $ref: >-
              #/components/schemas/PaymentsPostResponsesContentApplicationJsonSchemaDataAllocationsItems
        payment_date:
          type: string
          format: date-time
        currency_code:
          type: string
        exchange_rate:
          type: string
        journal_status:
          type: string
        payment_method:
          type: string
        journal_entry_id:
          type: string
        payment_reference:
          type: string
        destination_account:
          $ref: >-
            #/components/schemas/PaymentsPostResponsesContentApplicationJsonSchemaDataDestinationAccount
      required:
        - id
        - type
        - amount
        - status
        - vendor
        - documents
        - vendor_id
        - account_id
        - created_at
        - project_id
        - allocations
        - payment_date
        - currency_code
        - exchange_rate
        - journal_status
        - payment_method
        - journal_entry_id
        - payment_reference
        - destination_account
      title: PaymentsPostResponsesContentApplicationJsonSchemaData
    Payments_Create Payment_Response_201:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/PaymentsPostResponsesContentApplicationJsonSchemaData
        status:
          type: boolean
        message:
          type: string
      required:
        - data
        - status
        - message
      title: Payments_Create Payment_Response_201
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    identityAuth:
      type: apiKey
      in: header
      name: identity
      description: The identity for the active project.

```

## Examples



**Request**

```json
{
  "amount": "250000.00",
  "staff_id": "7d2c9c72-392c-4f8d-b3f1-c1fef2c2d501",
  "vendor_id": "0cb2d1a5-2f50-43a1-8c3f-df06f998ef51",
  "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
  "allocations": [
    {
      "amount": "250000.00",
      "bill_id": "45c6e26d-e132-4548-8e2e-5bfc467cf94a"
    }
  ],
  "payment_date": "2026-06-18T10:00:00.000Z",
  "exchange_rate": "1.00",
  "payment_method": "BANK_TRANSFER",
  "destination_account": {
    "bank": "Spruce Bank",
    "account_number": "1234567890"
  }
}
```

**Response**

```json
{
  "data": {
    "id": "59ad58e5-1571-4ce5-a140-6e7e33beb47c",
    "type": "BILL_PAYMENT",
    "amount": "250000.00",
    "status": "POSTED",
    "vendor": {
      "id": "0cb2d1a5-2f50-43a1-8c3f-df06f998ef51",
      "display_name": "Global Softworks"
    },
    "documents": [],
    "vendor_id": "0cb2d1a5-2f50-43a1-8c3f-df06f998ef51",
    "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
    "created_at": "2026-06-18T10:00:00Z",
    "project_id": "spruce-demo",
    "allocations": [
      {
        "id": "5c998a23-a6fc-4c2e-8e22-7f90ad81ce0a",
        "amount": "250000.00",
        "bill_id": "45c6e26d-e132-4548-8e2e-5bfc467cf94a",
        "payment_id": "59ad58e5-1571-4ce5-a140-6e7e33beb47c",
        "bill_reference": "BILL-0001"
      }
    ],
    "payment_date": "2026-06-18T10:00:00Z",
    "currency_code": "NGN",
    "exchange_rate": "1.00",
    "journal_status": "POSTED",
    "payment_method": "BANK_TRANSFER",
    "journal_entry_id": "JE-0003",
    "payment_reference": "PAY-0001",
    "destination_account": {
      "bank": "Spruce Bank",
      "account_number": "1234567890"
    }
  },
  "status": true,
  "message": "Successfully created payment"
}
```

**SDK Code**

```python Payments_Create Payment_example
import requests

url = "https://api.papertracc.com/v1/payments"

payload = {
    "amount": "250000.00",
    "staff_id": "7d2c9c72-392c-4f8d-b3f1-c1fef2c2d501",
    "vendor_id": "0cb2d1a5-2f50-43a1-8c3f-df06f998ef51",
    "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
    "allocations": [
        {
            "amount": "250000.00",
            "bill_id": "45c6e26d-e132-4548-8e2e-5bfc467cf94a"
        }
    ],
    "payment_date": "2026-06-18T10:00:00.000Z",
    "exchange_rate": "1.00",
    "payment_method": "BANK_TRANSFER",
    "destination_account": {
        "bank": "Spruce Bank",
        "account_number": "1234567890"
    }
}
headers = {
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Payments_Create Payment_example
const url = 'https://api.papertracc.com/v1/payments';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <apiKey>', 'Content-Type': 'application/json'},
  body: '{"amount":"250000.00","staff_id":"7d2c9c72-392c-4f8d-b3f1-c1fef2c2d501","vendor_id":"0cb2d1a5-2f50-43a1-8c3f-df06f998ef51","account_id":"d037d299-3029-4dc7-8e72-172f80f23c4f","allocations":[{"amount":"250000.00","bill_id":"45c6e26d-e132-4548-8e2e-5bfc467cf94a"}],"payment_date":"2026-06-18T10:00:00.000Z","exchange_rate":"1.00","payment_method":"BANK_TRANSFER","destination_account":{"bank":"Spruce Bank","account_number":"1234567890"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Payments_Create Payment_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.papertracc.com/v1/payments"

	payload := strings.NewReader("{\n  \"amount\": \"250000.00\",\n  \"staff_id\": \"7d2c9c72-392c-4f8d-b3f1-c1fef2c2d501\",\n  \"vendor_id\": \"0cb2d1a5-2f50-43a1-8c3f-df06f998ef51\",\n  \"account_id\": \"d037d299-3029-4dc7-8e72-172f80f23c4f\",\n  \"allocations\": [\n    {\n      \"amount\": \"250000.00\",\n      \"bill_id\": \"45c6e26d-e132-4548-8e2e-5bfc467cf94a\"\n    }\n  ],\n  \"payment_date\": \"2026-06-18T10:00:00.000Z\",\n  \"exchange_rate\": \"1.00\",\n  \"payment_method\": \"BANK_TRANSFER\",\n  \"destination_account\": {\n    \"bank\": \"Spruce Bank\",\n    \"account_number\": \"1234567890\"\n  }\n}")

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

	req.Header.Add("Authorization", "Bearer <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 Payments_Create Payment_example
require 'uri'
require 'net/http'

url = URI("https://api.papertracc.com/v1/payments")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"amount\": \"250000.00\",\n  \"staff_id\": \"7d2c9c72-392c-4f8d-b3f1-c1fef2c2d501\",\n  \"vendor_id\": \"0cb2d1a5-2f50-43a1-8c3f-df06f998ef51\",\n  \"account_id\": \"d037d299-3029-4dc7-8e72-172f80f23c4f\",\n  \"allocations\": [\n    {\n      \"amount\": \"250000.00\",\n      \"bill_id\": \"45c6e26d-e132-4548-8e2e-5bfc467cf94a\"\n    }\n  ],\n  \"payment_date\": \"2026-06-18T10:00:00.000Z\",\n  \"exchange_rate\": \"1.00\",\n  \"payment_method\": \"BANK_TRANSFER\",\n  \"destination_account\": {\n    \"bank\": \"Spruce Bank\",\n    \"account_number\": \"1234567890\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Payments_Create Payment_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.papertracc.com/v1/payments")
  .header("Authorization", "Bearer <apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"amount\": \"250000.00\",\n  \"staff_id\": \"7d2c9c72-392c-4f8d-b3f1-c1fef2c2d501\",\n  \"vendor_id\": \"0cb2d1a5-2f50-43a1-8c3f-df06f998ef51\",\n  \"account_id\": \"d037d299-3029-4dc7-8e72-172f80f23c4f\",\n  \"allocations\": [\n    {\n      \"amount\": \"250000.00\",\n      \"bill_id\": \"45c6e26d-e132-4548-8e2e-5bfc467cf94a\"\n    }\n  ],\n  \"payment_date\": \"2026-06-18T10:00:00.000Z\",\n  \"exchange_rate\": \"1.00\",\n  \"payment_method\": \"BANK_TRANSFER\",\n  \"destination_account\": {\n    \"bank\": \"Spruce Bank\",\n    \"account_number\": \"1234567890\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.papertracc.com/v1/payments', [
  'body' => '{
  "amount": "250000.00",
  "staff_id": "7d2c9c72-392c-4f8d-b3f1-c1fef2c2d501",
  "vendor_id": "0cb2d1a5-2f50-43a1-8c3f-df06f998ef51",
  "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
  "allocations": [
    {
      "amount": "250000.00",
      "bill_id": "45c6e26d-e132-4548-8e2e-5bfc467cf94a"
    }
  ],
  "payment_date": "2026-06-18T10:00:00.000Z",
  "exchange_rate": "1.00",
  "payment_method": "BANK_TRANSFER",
  "destination_account": {
    "bank": "Spruce Bank",
    "account_number": "1234567890"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Payments_Create Payment_example
using RestSharp;

var client = new RestClient("https://api.papertracc.com/v1/payments");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"amount\": \"250000.00\",\n  \"staff_id\": \"7d2c9c72-392c-4f8d-b3f1-c1fef2c2d501\",\n  \"vendor_id\": \"0cb2d1a5-2f50-43a1-8c3f-df06f998ef51\",\n  \"account_id\": \"d037d299-3029-4dc7-8e72-172f80f23c4f\",\n  \"allocations\": [\n    {\n      \"amount\": \"250000.00\",\n      \"bill_id\": \"45c6e26d-e132-4548-8e2e-5bfc467cf94a\"\n    }\n  ],\n  \"payment_date\": \"2026-06-18T10:00:00.000Z\",\n  \"exchange_rate\": \"1.00\",\n  \"payment_method\": \"BANK_TRANSFER\",\n  \"destination_account\": {\n    \"bank\": \"Spruce Bank\",\n    \"account_number\": \"1234567890\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Payments_Create Payment_example
import Foundation

let headers = [
  "Authorization": "Bearer <apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "amount": "250000.00",
  "staff_id": "7d2c9c72-392c-4f8d-b3f1-c1fef2c2d501",
  "vendor_id": "0cb2d1a5-2f50-43a1-8c3f-df06f998ef51",
  "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
  "allocations": [
    [
      "amount": "250000.00",
      "bill_id": "45c6e26d-e132-4548-8e2e-5bfc467cf94a"
    ]
  ],
  "payment_date": "2026-06-18T10:00:00.000Z",
  "exchange_rate": "1.00",
  "payment_method": "BANK_TRANSFER",
  "destination_account": [
    "bank": "Spruce Bank",
    "account_number": "1234567890"
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.papertracc.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()
```