Get all payments associated with a preapproval

You can get all payments associated with a Preapproval by using an action based on GET HTTP request.

Definition: GET /v1/preapprovals/{id}/payments

Where:
  • {id} – GlobalPay Preapproval ID

Request:

GET https://paytest.smart2pay.com/v1/preapprovals/4217/payments
Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "Payments": [
  {
    "ID": 3009284,
    "SkinID": null,
    "ClientIP": null,
    "Created": "20170804070219",
    "MerchantTransactionID": "aaaaaaaaaaaaaaa1-_AA",
    "OriginatorTransactionID": null,
    "Amount": "100",
    "Currency": "BRL",
    "CapturedAmount": null,
    "ReturnURL": "",
    "Description": null,
    "MethodID": 46,
    "MethodOptionID": null,
    "IncludeMethodIDs": null,
    "ExcludeMethodIDs": null,
    "PrioritizeMethodIDs": null,
    "SiteID": 30201,
    "NotificationDateTime": "20170804070222",
    "Customer": null,
    "BillingAddress": null,
    "ShippingAddress": null,
    "Articles": null,
    "Details": null,
    "ReferenceDetails": null,
    "CustomParameters": null,
    "PreapprovalID": 4217,
    "Status": {
      "ID": 2,
      "Info": "Success",
      "Reasons": null
      },
    "MethodTransactionID": null,
    "TokenLifetime": null,
    "Capture": null,
    "PreapprovalDetails": null,
    "RedirectURL": null
    },
    {
    "ID": 3009283,
    "SkinID": null,
    "ClientIP": null,
    "Created": "20170804065834",
    "MerchantTransactionID": "s2ptest_fg109",
    "OriginatorTransactionID": null,
    "Amount": "100",
    "Currency": "BRL",
    "CapturedAmount": null,
    "ReturnURL": "",
    "Description": null,
    "MethodID": 46,
    "MethodOptionID": null,
    "IncludeMethodIDs": null,
    "ExcludeMethodIDs": null,
    "PrioritizeMethodIDs": null,
    "SiteID": 30201,
    "NotificationDateTime": "20170804065838",
    "Customer": null,
    "BillingAddress": null,
    "ShippingAddress": null,
    "Articles": null,
    "Details": null,
    "ReferenceDetails": null,
    "CustomParameters": null,
    "PreapprovalID": 4217,
    "Status": {
      "ID": 2,
      "Info": "Success",
      "Reasons": null
      },
    "MethodTransactionID": null,
    "TokenLifetime": null,
    "Capture": null,
    "PreapprovalDetails": null,
    "RedirectURL": null
    },
    {
    "ID": 3009261,
    "SkinID": null,
    "ClientIP": null,
    "Created": "20170804065721",
    "MerchantTransactionID": "s2ptest_g108",
    "OriginatorTransactionID": null,
    "Amount": "100",
    "Currency": "BRL",
    "CapturedAmount": null,
    "ReturnURL": "",
    "Description": null,
    "MethodID": 46,
    "MethodOptionID": null,
    "IncludeMethodIDs": null,
    "ExcludeMethodIDs": null,
    "PrioritizeMethodIDs": null,
    "SiteID": 30201,
    "NotificationDateTime": "20170804070800",
    "Customer": null,
    "BillingAddress": null,
    "ShippingAddress": null,
    "Articles": null,
    "Details": null,
    "ReferenceDetails": null,
    "CustomParameters": null,
    "PreapprovalID": 4217,
    "Status": {
      "ID": 4,
      "Info": "Failed",
      "Reasons": null
      },
    "MethodTransactionID": null,
    "TokenLifetime": null,
    "Capture": null,
    "PreapprovalDetails": null,
    "RedirectURL": null
    }
    ],
    "Count": 3,
    "TotalPages": 1,
    "TotalCount": 3,
    "PageIndex": 1,
    "PageSize": 10
}