VRPlatformVRPlatform
Payments

/transactions/{id}/payments

Create an offline or Ramp payment against an expense or payout. Replaying the same idempotency key returns the existing payment.

Required scope: one of: transactions:mark-paid, transactions:mark-paid:reimbursement

POST
/transactions/{id}/payments
X-API-Key<token>

API key provided in dashboard

In: header

Path Parameters

id*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Query Parameters

dryRun?boolean

Validate this request through the real write path, then roll back all changes. See https://docs.vrplatform.app/api/dry-run-mode.

Request Body

application/json

provider*string|null

null records an offline payment that settles immediately.

method*string

Ramp payments are always ach.

Value in"ach" | "check" | "wire" | "cash" | "other"
amount?integer

Amount to pay in cents. Defaults to the available balance.

Range0 < value <= 2147483647
accountId?string

Bank account the offline payment left. Omit for an expense paid outside a trust account; it settles against the expense reimbursement account. Ramp payments derive it from the funding account connection.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
fundingAccountConnectionId?string

Ramp account connection of the funding bank account; required for Ramp.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
replacesPaymentId?string

Provider payment to replace. The replacement waits until the replaced payment has closed.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
cancelOpenPayments?boolean

Cancels open provider payments on the transaction before recording an offline payment whose amount exceeds the available balance.

requestedDate?string|null
reference?string|null
idempotencyKey*string
Length1 <= length <= 200

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.vrplatform.app/transactions/497f6eca-6276-4993-bfeb-53cbbbba6f08/payments" \  -H "Content-Type: application/json" \  -d '{    "provider": "ramp",    "method": "ach",    "idempotencyKey": "string"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "transactionId": "75906707-8c31-479c-b354-aa805c4cefbc",
  "contactId": "b5ec5d98-4bee-4da1-ad24-dde86346cb1d",
  "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
  "amount": 2147483647,
  "currency": "string",
  "method": "ach",
  "provider": "ramp",
  "connectionId": "84b500d7-71c8-4b1f-adf4-f1eb0000973d",
  "fundingAccountConnectionId": "9d55cb0f-4a3e-4a2b-91f0-3d50e65eaa6d",
  "recipientRef": "string",
  "fundingEntityRef": "string",
  "fundingAccountRef": "string",
  "destinationRef": "string",
  "requestedDate": "string",
  "reference": "string",
  "origin": "vrp",
  "status": "pending",
  "reservedAmount": 9007199254740991,
  "settledAt": "2024-01-15T12:30:00.000+00:00",
  "postingDate": "string",
  "terminalAt": "2024-01-15T12:30:00.000+00:00",
  "providerUpdatedAt": "2024-01-15T12:30:00.000+00:00",
  "observedAt": "2024-01-15T12:30:00.000+00:00",
  "providerStatus": "string",
  "providerMethod": "string",
  "scheduledAt": "2024-01-15T12:30:00.000+00:00",
  "initiatedAt": "2024-01-15T12:30:00.000+00:00",
  "providerFailureCode": "string",
  "issue": "unknownOutcome",
  "funding": {
    "debitedAmount": 9007199254740991,
    "refundedAmount": 9007199254740991,
    "currency": "string"
  },
  "closureRequestedAt": "2024-01-15T12:30:00.000+00:00",
  "closureConfirmedAt": "2024-01-15T12:30:00.000+00:00",
  "replacesPaymentId": "3af2a8ea-cb69-4c21-94e6-45f0cc235f93",
  "providerBillRef": "string",
  "providerPaymentRef": "string",
  "bankRecordId": "e894441d-c102-49bb-bb73-226e8914f1d6",
  "operation": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "status": "queued"
  },
  "isHistoricalCopy": true,
  "createdAt": "2024-01-15T12:30:00.000+00:00",
  "allocations": [
    {
      "transactionLineId": "fd65f0e1-e58a-476a-86fa-780d3071bfee",
      "amount": -9007199254740991
    }
  ],
  "reversal": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "paymentId": "472e651e-5a1e-424d-8098-23858bf03ad7",
    "kind": "providerReturn",
    "effectiveAt": "2024-01-15T12:30:00.000+00:00",
    "postingDate": "string",
    "reason": "string",
    "createdAt": "2024-01-15T12:30:00.000+00:00"
  },
  "balance": {
    "transactionId": "75906707-8c31-479c-b354-aa805c4cefbc",
    "currency": "string",
    "payableAmount": -9007199254740991,
    "netSettledAmount": -9007199254740991,
    "pendingAmount": 9007199254740991,
    "remainingAmount": -9007199254740991,
    "availableAmount": 9007199254740991,
    "overpaidAmount": 9007199254740991,
    "reconciliationRequired": true
  },
  "commands": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "kind": "submit",
      "outcome": "accepted",
      "outcomeAt": "2024-01-15T12:30:00.000+00:00",
      "providerFailureCode": "string",
      "status": "queued",
      "createdAt": "2024-01-15T12:30:00.000+00:00"
    }
  ],
  "actions": {
    "cancel": {
      "available": true,
      "reason": "permissionDenied"
    },
    "replace": {
      "available": true,
      "reason": "permissionDenied"
    },
    "reverse": {
      "available": true,
      "reason": "permissionDenied"
    }
  }
}
{
  "code": "AUDIT_CURSOR_EXPIRED",
  "reason": "accountClassificationLocked",
  "message": "string",
  "links": {
    "docs": "string",
    "schema": "string"
  },
  "issues": [
    {
      "code": "duplicateLast4",
      "message": "string",
      "path": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "retryable": true,
  "context": null
}
{
  "code": "AUDIT_CURSOR_EXPIRED",
  "reason": "accountClassificationLocked",
  "message": "string",
  "links": {
    "docs": "string",
    "schema": "string"
  },
  "issues": [
    {
      "code": "duplicateLast4",
      "message": "string",
      "path": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "retryable": true,
  "context": null
}
{
  "code": "AUDIT_CURSOR_EXPIRED",
  "reason": "accountClassificationLocked",
  "message": "string",
  "links": {
    "docs": "string",
    "schema": "string"
  },
  "issues": [
    {
      "code": "duplicateLast4",
      "message": "string",
      "path": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "retryable": true,
  "context": null
}
{
  "code": "AUDIT_CURSOR_EXPIRED",
  "reason": "accountClassificationLocked",
  "message": "string",
  "links": {
    "docs": "string",
    "schema": "string"
  },
  "issues": [
    {
      "code": "duplicateLast4",
      "message": "string",
      "path": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "retryable": true,
  "context": null
}
{
  "code": "AUDIT_CURSOR_EXPIRED",
  "reason": "accountClassificationLocked",
  "message": "string",
  "links": {
    "docs": "string",
    "schema": "string"
  },
  "issues": [
    {
      "code": "duplicateLast4",
      "message": "string",
      "path": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "retryable": true,
  "context": null
}
{
  "code": "AUDIT_CURSOR_EXPIRED",
  "reason": "accountClassificationLocked",
  "message": "string",
  "links": {
    "docs": "string",
    "schema": "string"
  },
  "issues": [
    {
      "code": "duplicateLast4",
      "message": "string",
      "path": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "retryable": true,
  "context": null
}
{
  "code": "AUDIT_CURSOR_EXPIRED",
  "reason": "accountClassificationLocked",
  "message": "string",
  "links": {
    "docs": "string",
    "schema": "string"
  },
  "issues": [
    {
      "code": "duplicateLast4",
      "message": "string",
      "path": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "retryable": true,
  "context": null
}
{
  "code": "MISDIRECTED_REQUEST",
  "reason": "accountClassificationLocked",
  "message": "string",
  "links": {
    "docs": "string",
    "schema": "string"
  },
  "issues": [
    {
      "code": "duplicateLast4",
      "message": "string",
      "path": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "retryable": true,
  "context": {
    "teamId": "a4ede8ba-7c0a-4485-8763-cbd9b282fbec",
    "dataRegion": "ap",
    "apiBaseUrl": "http://example.com"
  }
}
{
  "code": "AUDIT_CURSOR_EXPIRED",
  "reason": "accountClassificationLocked",
  "message": "string",
  "links": {
    "docs": "string",
    "schema": "string"
  },
  "issues": [
    {
      "code": "duplicateLast4",
      "message": "string",
      "path": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "retryable": true,
  "context": null
}
{
  "code": "LOCKED",
  "reason": "accountClassificationLocked",
  "message": "string",
  "links": {
    "docs": "string",
    "schema": "string"
  },
  "issues": [
    {
      "code": "duplicateLast4",
      "message": "string",
      "path": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "retryable": true,
  "context": null
}
{
  "code": "AUDIT_CURSOR_EXPIRED",
  "reason": "accountClassificationLocked",
  "message": "string",
  "links": {
    "docs": "string",
    "schema": "string"
  },
  "issues": [
    {
      "code": "duplicateLast4",
      "message": "string",
      "path": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "retryable": true,
  "context": null
}
{
  "code": "AUDIT_CURSOR_EXPIRED",
  "reason": "accountClassificationLocked",
  "message": "string",
  "links": {
    "docs": "string",
    "schema": "string"
  },
  "issues": [
    {
      "code": "duplicateLast4",
      "message": "string",
      "path": [
        "string"
      ],
      "schema": "string"
    }
  ],
  "retryable": true,
  "context": null
}