Skip to content

CAPTURE

CAPTURE finalizes a previous, successful AUTH transaction. It is generally used for eCommerce transactions upon product shipment.

Successful requests will be indicated with a 2xx HTTP response code and the Approved attribute set to 'true'.

NOTE

It is possible to receive a 2xx HTTP response code and have the Approved attribute set to 'false'.

Available Functions

Perform a 'capture' transaction

POST, /v0/transaction/capture

REQUEST Object Attributes as Table

The following table defines of all possible attributes contained in the Capture request object.

Some attributes are non-required (optional) in the request object. Optional fields are indicated with false in the Required column of the Object Attribute Table.

captureTable
AttributeData TypeDescriptionRequired
Amountobject

Transaction Amount

True
Totaldecimal

Total Transaction Amount


Total is aKey/Value of the "Amount" Object.

True
Feedecimal

Fee associated with the transaction


Fee is aKey/Value of the "Amount" Object.

False
Taxdecimal

Tax associated with the transaction


Tax is aKey/Value of the "Amount" Object.

False
Currencystring

ISO 3-letter currency code


Currency is aKey/Value of the "Amount" Object.

True
TransactionIDksuid

TransactionID from AUTH response

True
Detailobject

Transaction Details

False
MerchantDataobject

Merchant Defined Transaction Data

(supports 1 or more Merchant Defined Keys)


MerchantData is aKey/Value of the "Detail" Object.

False
MerchantDefinedKey1string

Merchant - defined transaction data

(field 1)


MerchantDefinedKey1 is aKey/Value of the "MerchantData" Object.

False
MerchantDefinedKey2string

Merchant - defined transaction data

(field 2)


MerchantDefinedKey2 is aKey/Value of the "MerchantData" Object.

False
Orderobject

Order data details for purchase

(Standard Data and Corporate Data)


Order is aKey/Value of the "Detail" Object.

False
Itemobject array

Item data details for purchase

(Standard Data and Corporate Data)


Item is aKey/Value of the "Detail" Object.

False
ShipToobject

ShipTo receiver data

(Standard Data and Corporate Data)


ShipTo is aKey/Value of the "Detail" Object.

False
ShipFromobject

ShipFrom sender data

(Standard Data and Corporate Data)


ShipFrom is aKey/Value of the "Detail" Object.

False
Shipmentobject array

Shipment details in Detail Shipment Data Section

(Standard Data and Corporate Data)


Shipment is aKey/Value of the "Detail" Object.

False
TransactionEntryobject

See Transaction Entry Section

(Information about transaction entry)

False

REQUEST Object Non-Required Attributes

Non-required attributes should only be included if needed for your use case. If not used, they should be omitted from the request object.

When should I include non-required attributes?
"Fee" attribute:
Include only if adding a fee to the transaction
"Tax" attribute:
Include only if adding tax to a transaction
"Detail" attribute:
Include only if adding the "Merchant Data" attribute
"Merchant Data" attribute:
Include only if adding custom merchant defined transaction data using the "MerchantDefinedKey1" and/or "Merchant DefinedKey2" attribute(s)
"MerchantDefinedKey1" attribute:
Include only for adding custom merchant data (ex. OrderNumber, CustomerID)
"MerchantDefinedKey2" attribute:
Include only for adding custom merchant data (ex. OrderNumber, CustomerID)

The Request examples show example uses of optional fields in practice.

REQUEST Examples

Request Example: Added Tax and Added Custom Merchant Data

Added Tax and Added Custom Merchant Data Code Sample using CURL
sh
URL=https://api.qa.paynetworx.net/v0/transaction/capture
HTTPAUTHTOKEN=1fHfjpw86udrDQHRMKabypEmhY4:1fHfkJrOs7iVBnC07HDxCPZuPsK
curl -sS --user $HTTPAUTHTOKEN -H 'Content-Type: application/json' -H "Request-ID: $(ksuid)" $URL -d '
{
    "Amount": {
        "Total": 5.50,
        "Tax": 0.90,
        "Currency": "USD"
    },
    "TransactionID": "1XSnl0X7GC44qPT2CVV8BCz0bQi",
    "Detail": {
        "MerchantData": {
            "OrderNumber": "22-1111",
            "CustomerID": "991111"
        }
    }
}'

RESPONSE Object Attributes

The following table defines of all possible attributes contained in the Capture response object.

defaultResponseTable
AttributeData TypeDescription
TransactionIDksuid

Unique transaction lifetime system ID

EventIDksuid

Unique transaction event system ID

RequestIDksuid

Unique transaction request system ID

Approvedboolean

Request approval indicator

RESPONSE Example

JSON Response Object
json
{
    "TransactionID": "1XSnl0X7GC44qPT2CVV8BCz0bQi",
    "EventID": "1XSnvq7J5ggxZg70sWuRg4kEBcu",
    "RequestID": "1XSnzEjZ4IBh5Nj0OEVPTWpwYo8",
    "Approved": true
}