You can get a list of all partial captures for a specific direct card payment by using an action based on GET HTTP request. Please be aware that only a limited amount of details for each capture will be provided.
Definition: GET /v1/payments/{id}/captures
Where:
- {id} – GlobalPay Payment ID
Request:
GET https://securetest.smart2pay.com/v1/payments/202247/captures
Authorization: Basic MTAxMDpnYWJp
Response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"Captures": [
{
"ID": 266,
"SiteID": 1010,
"Created": "20161205095522",
"MerchantTransactionID": "s2ptest_h22",
"OriginatorTransactionID": null,
"PaymentID": 202247,
"Amount": 500,
"Currency": "EUR",
"Status": {
"ID": 2,
"Info": "Success",
"Reasons": []
}
},
{
"ID": 267,
"SiteID": 1010,
"Created": "20161205095522",
"MerchantTransactionID": "s2ptest_h23",
"OriginatorTransactionID": null,
"PaymentID": 202247,
"Amount": 2000,
"Currency": "EUR",
"Status": {
"ID": 4,
"Info": "Failed",
"Reasons": [
{
"Code": "2209",
"Info": "Capture.Amount exceeds authorization amount"
}
]
}
}
]
}
{"Captures":{"hint":"","regexp":"","type":"array of objects","ID":{"hint":"Refund ID","regexp":"^\\d{1,12}$","type":"int"},"SiteID":{"hint":"The ID of the site","regexp":"^\\d{1,12}$","type":"int"},"Created":{"hint":"Refund creation date and time","regexp":"","type":"datetime"},"MerchantTransactionID":{"hint":"Refund merchant assigned transaction ID","regexp":"","type":"string"},"OriginatorTransactionID":{"hint":"Originator transaction ID, a number that uniquely identifies the transaction in the original requester\u2019s system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"PaymentID":{"hint":"Payment ID","regexp":"^\\d{1,12}$","type":"int"},"Amount":{"hint":"Refund amount","regexp":"^\\d{1,12}$","type":"int"},"Currency":{"hint":"The currency in which you sell the services or products. Format is according to ISO 4217, a three-letter code.","regexp":"^[A-Z]{3}$","type":"string"},"Status":{"hint":"","regexp":"","type":"object","ID":{"hint":"Status ID","regexp":"","type":"int"},"Info":{"hint":"The description of the status","regexp":"","type":"string"},"Reasons":{"hint":"The reasons why the payment got to this status.","regexp":"","type":"array of objects","Code":{"hint":"The id of the message type transmitted in the response. See our section GlobalPay Return Codes for a complete description.","regexp":"","type":"int"},"Info":{"hint":"The message body","regexp":"","type":"string"}}}}}
You can also get information for a specific capture of a direct card payment by using an action based on GET HTTP request.
Definition: GET /v1/payments/{id}/capture/{id}
Where:
- payments/{id} – GlobalPay Payment ID
- capture/{id} – The ID of the specific capture
Request:
GET https://securetest.smart2pay.com/v1/payments/202247/captures/266
Authorization: Basic MTAxMDpnYWJp
Response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"Capture": {
"ID": 266,
"SiteID": 1010,
"Created": "20161205095522",
"MerchantTransactionID": "s2ptest_h22",
"OriginatorTransactionID": null,
"PaymentID": 202247,
"Amount": 500,
"Currency": "EUR",
"Status": {
"ID": 2,
"Info": "Success",
"Reasons": []
}
}
}
{"Capture":{"hint":"","regexp":"","type":"object","ID":{"hint":"Refund ID","regexp":"^\\d{1,12}$","type":"int"},"SiteID":{"hint":"The ID of the site","regexp":"^\\d{1,12}$","type":"int"},"Created":{"hint":"Refund creation date and time","regexp":"","type":"datetime"},"MerchantTransactionID":{"hint":"Refund merchant assigned transaction ID","regexp":"","type":"string"},"OriginatorTransactionID":{"hint":"Originator transaction ID, a number that uniquely identifies the transaction in the original requester\u2019s system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"PaymentID":{"hint":"Payment ID","regexp":"^\\d{1,12}$","type":"int"},"Amount":{"hint":"Refund amount","regexp":"^\\d{1,12}$","type":"int"},"Currency":{"hint":"The currency in which you sell the services or products. Format is according to ISO 4217, a three-letter code.","regexp":"^[A-Z]{3}$","type":"string"},"Status":{"hint":"","regexp":"","type":"object","ID":{"hint":"Status ID","regexp":"","type":"int"},"Info":{"hint":"The description of the status","regexp":"","type":"string"},"Reasons":{"hint":"The reasons why the payment got to this status.","regexp":"","type":"array of objects","Code":{"hint":"The id of the message type transmitted in the response. See our section GlobalPay Return Codes for a complete description.","regexp":"","type":"int"},"Info":{"hint":"The message body","regexp":"","type":"string"}}}}}