Invoices
View as Markdown

Record a bank-transfer (or other offline) payment

Needs the invoices:write scope, or a full-access key. About scopes

POST
/api/v1/invoices/{id}/record-payment

Authorization

Authorization
Required
Bearer <token>

An API key: gpy_test_… or gpy_live_… (or an agent key, agk_…).

In: header

Request Body

application/jsonOptional

methodstring

Default: "bank_transfer"Value in: "bank_transfer" | "cash" | "cheque" | "other"

reference
Required
string

The bank reference (or receipt / cheque number). Repeating it is a no-op.

Minimum length: 1Maximum length: 200

amount_centsinteger

A JSON integer in minor units (not a string). Defaults to the amount due; anything else is refused.

received_onstring

Format: "date"

Path Parameters

id
Required
string

Format: "uuid"

Header Parameters

Idempotency-Key
Required
string

Required. A unique value for this operation, chosen by you. A retry with the same key and the same body returns the first response instead of running again. The same key with a different body answers 409 idempotency_key_reused; a key whose first request is still running answers 409 idempotency_in_progress.

curl -X POST "https://globalymint.com/api/v1/invoices/3fa85f64-5717-4562-b3fc-2c963f66afa6/record-payment" \
  -H "Idempotency-Key: order-8842-charge" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "bank_transfer",
    "reference": "string",
    "amount_cents": 1,
    "received_on": "2019-08-24"
  }'

The invoice is paid. Emits invoice.paid and payment.succeeded (method = the recorded method) once per invoice; a repeat with the same reference changes nothing and returns the recorded payment.

{
  "data": {
    "invoice_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "status": "paid",
    "manual_payment": {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "method": "bank_transfer",
      "reference": "string",
      "amount_cents": "1999",
      "received_on": "2019-08-24"
    }
  },
  "_agent": {
    "summary": "string",
    "status": "ok",
    "next_actions": [
      "string"
    ],
    "warnings": [
      "string"
    ]
  },
  "api_version": "2026-07-01"
}