PayOrc
Manage Payment

Capture

Capture an authorized payment to collect funds.

Flow Diagram

Capture

Version: 3.0.0

Prerequisite: Capture only works on a transaction that was authorized with action: "AUTH" and capture_method: "MANUAL" via the Payment Request API. The transaction must still be in an authorizable state (not voided and not already fully captured).

When and Why to Use Capture

Use Capture to collect money from a previously authorized transaction:

  1. Auth + Capture — Hold funds at checkout, capture after shipping or fulfillment.
  2. Manual capture — If the order used capture_method: "MANUAL", you must call this endpoint to settle funds.

Auto-capture vs Manual capture:

  • Auto-capture (AUTOMATIC or SALE): Funds settle at payment time — do not call Capture.
  • Manual capture (MANUAL): You must call Capture before the authorization expires. The deadline is configured per MID as autoCaptureWithinTime (hours from authorization). Card networks may release holds earlier than this window — contact PayOrc support for extended-hold use cases (e.g. hotels, rentals).

Endpoint

Capture, Void, and Refund share the same Manage Payment endpoint — only action changes.

MethodURL
POSThttps://api.payorc.com/orders/v1/transaction

Please use the test credentials for sandbox testing.


Headers

FieldTypeRequiredDescription
merchant-keyStringYesYour merchant API key
merchant-secretStringYesYour merchant API secret
Content-TypeStringYesMust be application/json

Request Body

The request body is flat (not nested under data).

FieldTypeRequiredDescription
actionStringYesMust be CAPTURE
transaction_idStringYesPayOrc transaction ID from the authorization / webhook (transaction_id)
amountObjectYesAmount to capture
amount.currencyCodeStringYesISO currency code (e.g. AED) — must match the original order
amount.valueNumberYesAmount to capture (full or partial)
reasonStringNoMerchant notes for your records

Code Examples

Example 1 — Full Capture

curl --location 'https://api.payorc.com/orders/v1/transaction' \
--header 'merchant-key: {merchant-key}' \
--header 'merchant-secret: {merchant-secret}' \
--header 'Content-Type: application/json' \
--data '{
    "action": "CAPTURE",
    "transaction_id": "1000010118",
    "amount": {
        "currencyCode": "AED",
        "value": 100.00
    },
    "reason": "Order shipped - full capture"
}'

Example 2 — Partial Capture

curl --location 'https://api.payorc.com/orders/v1/transaction' \
--header 'merchant-key: {merchant-key}' \
--header 'merchant-secret: {merchant-secret}' \
--header 'Content-Type: application/json' \
--data '{
    "action": "CAPTURE",
    "transaction_id": "1000010118",
    "amount": {
        "currencyCode": "AED",
        "value": 50.00
    },
    "reason": "Partial shipment - capturing available items only"
}'

Partial capture: You can capture less than the authorized amount when your PSP and MID support it. The order must still be in a capturable state.

Example 3 — Node.js

const axios = require('axios');

const config = {
  method: 'post',
  url: 'https://api.payorc.com/orders/v1/transaction',
  headers: {
    'merchant-key': '{merchant-key}',
    'merchant-secret': '{merchant-secret}',
    'Content-Type': 'application/json'
  },
  data: {
    action: 'CAPTURE',
    transaction_id: '1000010118',
    amount: {
      currencyCode: 'AED',
      value: 100.00
    },
    reason: 'Order fulfilled'
  }
};

axios(config)
  .then(response => console.log(JSON.stringify(response.data)))
  .catch(error => console.log(error.response?.data || error));

Example 4 — Python

import requests
import json

url = 'https://api.payorc.com/orders/v1/transaction'

payload = {
    "action": "CAPTURE",
    "transaction_id": "1000010118",
    "amount": {
        "currencyCode": "AED",
        "value": 30.00
    },
    "reason": "Partial shipment - item 1 of 3"
}

headers = {
    'merchant-key': '{merchant-key}',
    'merchant-secret': '{merchant-secret}',
    'Content-Type': 'application/json'
}

response = requests.post(url, headers=headers, json=payload)
print(json.dumps(response.json(), indent=2))

Response — Success (200)

{
    "data": {
        "status": "CAPTURED",
        "m_order_id": "ORD-2024-001",
        "p_order_id": 1000010228,
        "transaction_id": 1000010223,
        "amount": "100.00",
        "currency": "AED",
        "date": "04/08/2023"
    },
    "message": "Transaction successfully Captured.",
    "status": "success",
    "code": "00"
}

Capture, Void, and Refund share the same data shape: status, m_order_id, p_order_id, transaction_id, amount, currency, date.

Response — Error

{
    "message": "Transaction can't be captured, already voided or not in state of to be captured",
    "status": "fail",
    "code": "E0044"
}

Auth vs Capture — Summary

AspectAuto-Capture / SALEManual Capture
When funds settleAt payment timeAfter you call Capture
Use caseRetail, digital goodsHotels, rentals, marketplaces
Requires this endpoint?NoYes
Authorization expires?N/AYes — per MID autoCaptureWithinTime (hours); card issuer may expire sooner

On this page