Appearance
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 an HTTP 2xx response code indicating that the request was successfully received, understood, and processed at the HTTP protocol level, but still have the Approved attribute set to false. (A 2xx response code with an Approved attribute set to false means the server successfully handled the request itself; however the actual business or application logic determined that the request was not approved).
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.
View REQUEST Object Attributes as Table
| Attribute | Data Type | Description | Required |
|---|---|---|---|
| Amount | object | True | |
| Total | decimal | Total Transaction Amount Total is aKey/Value of the "Amount" Object | True |
| Fee | decimal | Fee associated with the transaction Fee is aKey/Value of the "Amount" Object | False |
| Tax | decimal | Tax associated with the transaction Tax is aKey/Value of the "Amount" Object | False |
| Currency | string | Currency is aKey/Value of the "Amount" Object | True |
| TransactionID | ksuid | TransactionID from AUTH response | True |
| Detail | object | Transaction Details | False |
| MerchantData | object | Merchant Defined Transaction Data (supports 1 or more Merchant Defined Keys) MerchantData is aKey/Value of the "Detail" Object | False |
| MerchantDefinedKey1 | string | Merchant - defined transaction data (field 1) MerchantDefinedKey1 is aKey/Value of the "Detail" "MerchantData" Object | False |
| MerchantDefinedKey2 | string | Merchant - defined transaction data (field 2) MerchantDefinedKey2 is aKey/Value of the "Detail" "MerchantData" Object | False |
| Order | object | Order data details for purchase (Standard Data and Corporate Data) Order is aKey/Value of the "Detail" Object | False |
| Item | object array | Item data details for purchase (Standard Data and Corporate Data) Item is aKey/Value of the "Detail" Object | False |
| ShipTo | object | (Standard Data and Corporate Data) ShipTo is aKey/Value of the "Detail" Object | False |
| ShipFrom | object | (Standard Data and Corporate Data) ShipFrom is aKey/Value of the "Detail" Object | False |
| Shipment | object array | Shipment details in Detail Shipment Data Section (Standard Data and Corporate Data) Shipment is aKey/Value of the "Detail" Object | False |
| TransactionEntry | object | (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.
View RESPONSE Object Attributes
| Attribute | Data Type | Description |
|---|---|---|
| TransactionID | ksuid | Unique transaction lifetime system ID |
| EventID | ksuid | Unique transaction event system ID |
| RequestID | ksuid | Unique transaction request system ID |
| Approved | boolean | Request approval indicator |
RESPONSE Example
JSON Response Object
json
{
"TransactionID": "1XSnl0X7GC44qPT2CVV8BCz0bQi",
"EventID": "1XSnvq7J5ggxZg70sWuRg4kEBcu",
"RequestID": "1XSnzEjZ4IBh5Nj0OEVPTWpwYo8",
"Approved": true
}