Home

OPE External API

This page documents the OPE External API (TransendPay).

Base path: /api/v1/ope Content-Type: application/json

Base Path and Authentication

All routes under /api/v1/ope/** are protected by HTTP Basic auth (stateless). Encode clientId:clientSecret in the Authorization: Basic header. The server uses the Basic username as the company id for authorization.

Authorization: Basic BASE64(your-client-id:your-client-secret)

Errors and response shapes

The primary error body for business failures is a simple map:

{ "error": "message_string" }

HTTP status and typical error values

Status Meaning Example error values
401 Not authenticated / bad credentials unauthorized
400 Bad request invalid session id, invalid capture amount, invalid transaction id, etc.
500 Server error unexpected server error

Some cases (malformed JSON, invalid endpoint path, etc) return more details instead. The return object contains:

Field Type Description
timestamp string ISO-8601 instant
status number HTTP status echoed
error string Short reason (e.g. Bad Request)
message string Human-readable detail
path string Request path
fieldErrors array Optional; entries with field and message

POST /api/v1/ope/getModal

Creates a session and returns the modal URL for your company.

Request Body

Field Type Notes
amount decimal Session's cart amount. Required when onlyShowApplication is false or omitted
invoiceNumber string Optional invoice number for internal tracking
planId long Session's credit plan. Required when onlyShowApplication is false or omitted
onlyShowApplication boolean If true, the modal will open on the Apply screen. Defaults to false if omitted
callbackUrl string Optional webhook to receive event when session status changes; if set, must match https?://.+

Example Request Body

{
  "amount": 100.00,
  "planId": 1,
  "invoiceNumber": "INV-1001",
  "onlyShowApplication": false,
  "callbackUrl": "https://example.com/webhook/ope"
}

Response Cases

HTTP When Example body
200 Session created
{
  "sessionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "url": "https://modal.transend.com/1"
}
400 Invalid amount (null/zero/negative/precision)
{
  "error": "invalid amount"
}
400 Invalid credit plan (missing/unknown/not owned)
{
  "error": "invalid credit plan"
}
401 Not authenticated
{
  "error": "unauthorized"
}
500 Unexpected server error
{
  "error": "unexpected server error"
}

GET /api/v1/ope/requests/supplier

Lists sessions for the authenticated supplier. Sessions with onlyShowApplication == true are omitted.

Response Body (List of)

Field Type Notes
txRequestId string Session GUID
amount decimal Session cart amount
status string PENDING, ACCEPTED, or CLOSED
invoiceNumber string Invoice number provided to getModal call
createdAt date-time
expiresAt date-time

Response Cases

HTTP When Example body
200 OK — array of sessions (application-only omitted)
[
  {
    "txRequestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "amount": 100.00,
    "status": "PENDING",
    "invoiceNumber": "INV-1001",
    "createdAt": "2025-10-28T15:30:59.776538300",
    "expiresAt": "2025-10-28T16:30:59.776538300"
  }
]
401 Not authenticated
{
  "error": "unauthorized"
}
500 Unexpected server error
{
  "error": "unexpected server error"
}

POST /api/v1/ope/status

Session status by id. If a session is accepted, the created accepted transaction id is returned.

Request Body

Field Type Notes
sessionId string Session GUID

Response Body

Field Type Notes
sessionId string Session GUID
status string PENDING, ACCEPTED, or CLOSED
acceptedTxid string or null Authorization GUID when status is ACCEPTED; otherwise null

Example Request Body

{
  "sessionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

Response cases

HTTP When Example body
200 Session PENDING
{
  "sessionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "PENDING",
  "acceptedTxid": null
}
200 Session ACCEPTED
{
  "sessionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "ACCEPTED",
  "acceptedTxid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
200 Session CLOSED
{
  "sessionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "CLOSED",
  "acceptedTxid": null
}
400 Blank/null session id, not found, or not owned by supplier
{
  "error": "invalid session id"
}
401 Not authenticated
{
  "error": "unauthorized"
}
500 Unexpected server error
{
  "error": "unexpected server error"
}

GET /api/v1/ope/preauths/supplier

Lists accepted transactions (authorizations) for the supplier.

Response Body (List of)

Field Type Notes
id string Authorization GUID
txRequestId string Session GUID
capturedAmount decimal Sum of capture amounts on the accepted transaction
voidedAmount decimal Sum of voided amounts on the accepted transaction
totalAmount decimal Total amount of the authorization (set to the session amount on creation)
createdAt date-time
lastUpdatedAt date-time

Response Cases

HTTP When Example body
200 OK — list of authorizations
[
  {
    "id": "auth-guid-here",
    "txRequestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "capturedAmount": 20.00,
    "voidedAmount": 0.00,
    "totalAmount": 100.00,
    "createdAt": "2025-10-28T15:10:03.748819500",
    "lastUpdatedAt": "2025-10-28T15:10:03.748819500"
  }
]
401 Not authenticated
{
  "error": "unauthorized"
}
500 Unexpected server error
{
  "error": "unexpected server error"
}

POST /api/v1/ope/capture/{acceptedTransactionId}

Capture part of an accepted transaction and create a new transaction entry. Path parameter acceptedTransactionId is the accepted transaction (authorization) GUID.

Request Body

Field Type Notes
amount decimal Capture amount
memo string Serialized as empty string when null

Response Body

Field Type Notes
id string Event GUID
acceptedTxId string Authorization GUID
txRequestId string Session GUID
amount decimal
status string CAPTURED
createdAt date-time
lastUpdatedAt date-time

Example Request Body

{
  "amount": 50.00,
  "memo": "Partial shipment"
}

Response Cases

HTTP When Example body
200 Capture event created
{
  "id": "event-guid",
  "acceptedTxId": "auth-guid-here",
  "txRequestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "amount": 50.00,
  "status": "CAPTURED",
  "createdAt": "2025-10-28T15:07:31.054817600Z",
  "lastUpdatedAt": "2025-10-28T15:07:31.054817600Z"
}
400 Accepted transaction not found or does not belong to caller
{
  "error": "invalid accepted transaction id"
}
400 Invalid amount (null/non-positive/precision)
{
  "error": "invalid capture amount"
}
401 Not authenticated
{
  "error": "unauthorized"
}
500 Unexpected server error
{
  "error": "unexpected server error"
}

POST /api/v1/ope/void/{acceptedTransactionId}

Void part of an accepted transaction. Path parameter acceptedTransactionId is the accepted transaction (authorization) GUID.

Request Body

Field Type Notes
amount decimal Void amount
memo string Serialized as empty string when null

Response Body

Field Type Notes
id string Event GUID
acceptedTxId string Authorization GUID
txRequestId string Session GUID
amount decimal
status string VOIDED
createdAt date-time
lastUpdatedAt date-time

Example Request Body

{
  "amount": 25.00,
  "memo": "Cancel partial hold"
}

Response Cases

HTTP When Example body
200 Void event created
{
  "id": "event-guid",
  "acceptedTxId": "auth-guid-here",
  "txRequestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "amount": 25.00,
  "status": "VOIDED",
  "createdAt": "2025-10-28T15:31:28.035102500Z",
  "lastUpdatedAt": "2025-10-28T15:31:28.035102500Z"
}
400 Accepted transaction not found or does not belong to caller
{
  "error": "invalid accepted transaction id"
}
400 Invalid amount (null/non-positive/precision)
{
  "error": "invalid void amount"
}
401 Not authenticated
{
  "error": "unauthorized"
}
500 Unexpected server error
{
  "error": "unexpected server error"
}

POST /api/v1/ope/refund/{transactionId}

Refunds against a capture transaction event. Path transactionId is the GUID for a CAPTURED event.

Request Body

Field Type Notes
amount decimal Refund amount
memo string Serialized as empty string when null

Response Body

Field Type Notes
id string Event GUID
acceptedTxId string Authorization GUID
txRequestId string Session GUID
amount decimal
status string REFUNDED
createdAt date-time
lastUpdatedAt date-time

Example Request Body

{
  "amount": 10.00,
  "memo": "Return merchandise"
}

Example response (200)

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "acceptedTxId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "txRequestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "amount": 10.00,
  "status": "REFUNDED",
  "createdAt": "2025-10-28T15:40:00.000000000Z",
  "lastUpdatedAt": "2025-10-28T15:40:00.000000000Z"
}

Response Cases

HTTP When Example body
200 Refund event created
{
  "id": "refund-event-guid",
  "acceptedTxId": "auth-guid-here",
  "txRequestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "amount": 10.00,
  "status": "REFUNDED",
  "createdAt": "2025-10-28T15:40:00.000000000Z",
  "lastUpdatedAt": "2025-10-28T15:40:00.000000000Z"
}
400 Blank path id, unknown event, wrong supplier, or event not CAPTURED
{
  "error": "invalid transaction id"
}
400 Invalid amount (null/non-positive/precision) or exceeds refundable balance
{
  "error": "invalid refund amount"
}
401 Not authenticated
{
  "error": "unauthorized"
}
500 Unexpected server error
{
  "error": "unexpected server error"
}

GET /api/v1/ope/transactions/supplier

Lists capture-backed transactions for reporting.

Response Body (List of)

Field Type Notes
transactionId string GUID
amount decimal
lastUpdateDate date-time
status string Default "0" in DTO
loanNumber string May be null
currentBalance decimal Remaining after refunds

Example response (200)

[
  {
    "transactionId": "capture-event-guid",
    "amount": 1500.00,
    "lastUpdateDate": "2025-10-28T12:00:00",
    "status": "0",
    "loanNumber": "LN-1000",
    "currentBalance": 1000.00
  }
]

Response cases

HTTP When Example body
200 OK — capture-backed transactions
[
  {
    "transactionId": "capture-event-guid",
    "amount": 1500.00,
    "lastUpdateDate": "2025-10-28T12:00:00",
    "status": "0",
    "loanNumber": "LN-1000",
    "currentBalance": 1000.00
  }
]
401 Not authenticated
{
  "error": "unauthorized"
}
500 Unexpected server error
{
  "error": "unexpected server error"
}