Skip to main content
POST
/
v0
/
approvals
Submit a resource for approval
curl --request POST \
  --url https://api.paygentic.io/v0/approvals \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "merchantId": "<string>",
  "resourceId": "<string>",
  "dataSnapshotHash": "<string>",
  "note": "<string>",
  "actorId": "<string>"
}
'
{
  "id": "<string>",
  "object": "approval",
  "merchantId": "<string>",
  "resourceId": "<string>",
  "requester": "<string>",
  "dataSnapshotHash": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "reviewer": "<string>",
  "note": "<string>",
  "decidedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json
merchantId
string
required

The merchant that owns the resource being approved.

resourceType
enum<string>
required
Available options:
order,
invoice
resourceId
string
required
Maximum string length: 255
dataSnapshotHash
string
required

A precomputed hash of the resource state being approved. The resource-owning domain builds this snapshot; approvals stays decoupled from any specific resource shape.

Maximum string length: 128
kind
enum<string>

Defaults to data_review.

Available options:
data_review,
financial_review,
push
note
string | null
Maximum string length: 2000
actorId
string

Optional. The real user id to record as the requester. Used when the request is made via a platform-level key on behalf of a human user (e.g. from the platform Next.js frontend). When supplied and the authenticated principal is 'platform', this value overrides the derived principal as the requester. Ignored when the caller is a non-platform API key.

Maximum string length: 128

Response

Approval created

id
string
required
object
enum<string>
required
Available options:
approval
merchantId
string
required
resourceType
enum<string>
required
Available options:
order,
invoice
resourceId
string
required
kind
enum<string>
required
Available options:
data_review,
financial_review,
push
decision
enum<string>
required
Available options:
pending,
approved,
rejected,
cancelled
requester
string
required
dataSnapshotHash
string
required
createdAt
string<date-time>
required
reviewer
string | null
note
string | null
decidedAt
string<date-time> | null