Skip to main content
POST
/
v1
/
intents
/
{intentId}
/
approve
Approve intent
curl --request POST \
  --url https://api.ledger.so/v1/intents/{intentId}/approve \
  --header 'Api-Key: <api-key>'
{
  "id": "<string>",
  "cardId": "<string>",
  "intentId": "<string>",
  "summary": "<string>",
  "status": "pending",
  "expiresAt": 123,
  "createdAt": 123,
  "expectedAmount": 123,
  "expectedCurrency": "<string>",
  "expectedMerchant": "<string>",
  "tolerance": 123,
  "approvalRequired": true,
  "approvedAt": 123,
  "approvedBy": "<string>",
  "rejectedAt": 123,
  "rejectedBy": "<string>",
  "rejectionReason": "<string>",
  "transactionId": "<string>",
  "matchResult": {
    "amountMatch": true,
    "merchantMatch": true,
    "actualAmount": 123,
    "actualMerchant": "<string>"
  },
  "matchedAt": 123
}

Authorizations

Api-Key
string
header
required

API key for authentication. Get your key from the Dashboard.

Path Parameters

intentId
string
required

The intent ID to approve

Response

Intent approved

id
string
required

Internal intent ID

cardId
string
required
intentId
string
required

Customer-provided intent ID

summary
string
required
status
enum<string>
required

pending=approved and awaiting transaction, pending_approval=awaiting human approval, rejected=rejected by human, matched=transaction matched within tolerance, mismatched=transaction outside tolerance, expired=TTL reached, canceled=manually canceled

Available options:
pending,
pending_approval,
rejected,
matched,
mismatched,
expired,
canceled
expiresAt
integer
required

Unix timestamp when intent expires

createdAt
integer
required
expectedAmount
integer
expectedCurrency
string
expectedMerchant
string
tolerance
integer
approvalRequired
boolean

Whether this intent required human approval

approvedAt
integer

Unix timestamp when intent was approved

approvedBy
string

API key prefix of approver

rejectedAt
integer

Unix timestamp when intent was rejected

rejectedBy
string

API key prefix of rejector

rejectionReason
string

Reason provided for rejection

transactionId
string

ID of matched transaction (if status is matched or mismatched)

matchResult
object

Match details (populated after transaction)

matchedAt
integer

Unix timestamp when transaction was matched