Create payment resource | Moov Documentation

Create payment resource

Creates a payment resource to represent that an invoice was paid outside of the Moov platform. If a payment link was created for the invoice, the corresponding payment link is canceled, but a receipt is still sent.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/invoices.write scope.

Endpoint

POST

/accounts/{accountID}/invoices/{invoiceID}/payments

Ask

curl -X POST "https://api.moov.io/accounts/{accountID}/invoices/{invoiceID}/payments" \
  -H "Authorization: Bearer {token}" \
  -H "X-Moov-Version: v2026.04.00" \
  -d '{\n  "amount": {\n    "currency": "USD",\n    "valueDecimal": "12.987654321"\n  }\n}'

Ask

mc, _ := moov.NewClient()

accountID := "241bf524-e777-4941-a5e4-d7f3f34d7a00"
invoiceID := "3dfff852-927d-47e8-822c-2fffc57ff6b9"

mc.CreateInvoicePayment(ctx, accountID, invoiceID, moov.CreateInvoicePayment{\n  ForeignID:   moov.PtrOf("EXT-PAY-12345"),\n  Description: moov.PtrOf("Payment received via wire transfer"),\n  Amount:      moov.AmountDecimal{\n    Currency: "USD",\n    ValueDecimal: "500.00",\n  },\n})

Ask

import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.invoices.createInvoicePayment({
    accountID: "e02333e4-a835-46d1-8d02-9af7a405e65f",
    invoiceID: "99e7ebb0-9996-49b2-98f0-304c7332ece6",
    createInvoicePayment: {
      foreignID: "EXT-PAY-12345",
      amount: {
        currency: "USD",
        valueDecimal: "500.00",
      },
      description: "Payment received via wire transfer",
      paymentDate: new Date("2026-01-20T14:45:00Z"),
    },
  });

console.log(result);
}

run();

Ask

declare(strict_types=1);

require 'vendor/autoload.php';

use Moov\