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.
Method
POST
Endpoint
/accounts/{accountID}/invoices/{invoiceID}/payments
Example Requests
Curl
curl -X POST "https://api.moov.io/accounts/{accountID}/invoices/{invoiceID}/payments" \
-H "Authorization: Bearer {token}" \
-H "X-Moov-Version: v2026.07.00" \
-d '{
"amount": {
"currency": "USD",
"valueDecimal": "12.987654321"
}
}'
Go
mc, _ := moov.NewClient()
accountID := "241bf524-e777-4941-a5e4-d7f3f34d7a00"
invoiceID := "3dfff852-927d-47e8-822c-2fffc57ff6b9"
mc.CreateInvoicePayment(ctx, accountID, invoiceID, moov.CreateInvoicePayment{
ForeignID: moov.PtrOf("EXT-PAY-12345"),
Description: moov.PtrOf("Payment received via wire transfer"),
Amount: moov.AmountDecimal{
Currency: "USD",
ValueDecimal: "500.00",
},
})
TypeScript
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();
PHP
declare(strict_types=1);
require 'vendor/autoload.php';
use Moov\