Get information on a specific direct payment

You can get information about a one-off direct card payment by using GET HTTP request.

Definition: GET /v1/payments/{id}

Where:
  • {id} – GlobalPay Payment ID

Request:

GET https://securetest.smart2pay.com/v1/payments/202230
Authorization: Basic MTAxMDpnYWJp

Response:

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

{
  "Payment": {
    "ID": 202230,
    "ClientIP": null,
    "SkinID": null,
    "Created": "20161205084103",
    "MerchantTransactionID": "s2ptest_h2",
    "OriginatorTransactionID": null,
    "Amount": 2000,
    "Currency": "EUR",
    "CapturedAmount": 2000,
    "ReturnURL": null,
    "Description": null,
    "StatementDescriptor": null,
    "MethodID": 6,
    "MethodOptionID": null,
    "SiteID": 1010,
    "NotificationDateTime": null,
    "Customer": null,
    "BillingAddress": null,
    "ShippingAddress": null,
    "Articles": null,
    "Card": null,
    "CreditCardToken": null,
    "Status": {
      "ID": 11,
      "Info": "Captured",
      "Reasons": []
    },
    "MethodTransactionID": null,
    "PaymentTokenLifetime": null,
    "Capture": true,
    "Retry": false,
    "RedirectURL": null,
    "3DSecure": null
  }
}

Get a list of direct card payments

Without specifying any parameters a list of direct card payments is returned. Please be aware that only a limited amount of details for each direct card payment will be provided.

Definition: GET /v1/payments

Request:

GET https://securetest.smart2pay.com/v1/payments
Authorization: Basic MTAxMDpnYWJp

Response:

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

{
  "Payments": [
    {
      "ID": 202245,
      "ClientIP": null,
      "SkinID": null,
      "Created": "20161205094557",
      "MerchantTransactionID": "s2ptest_h17",
      "OriginatorTransactionID": null,
      "Amount": 2000,
      "Currency": "EUR",
      "CapturedAmount": 2000,
      "ReturnURL": null,
      "Description": null,
      "StatementDescriptor": null,
      "MethodID": 6,
      "MethodOptionID": null,
      "SiteID": 1010,
      "NotificationDateTime": null,
      "Customer": null,
      "BillingAddress": null,
      "ShippingAddress": null,
      "Articles": null,
      "Card": null,
      "CreditCardToken": null,
      "Status": {
        "ID": 11,
        "Info": "Captured",
        "Reasons": []
      },
      "MethodTransactionID": null,
      "PaymentTokenLifetime": null,
      "Capture": null,
      "Retry": null,
      "RedirectURL": null,
      "3DSecure": null
    },
    {
      "ID": 202244,
      "ClientIP": null,
      "SkinID": null,
      "Created": "20161205094546",
      "MerchantTransactionID": "s2ptest_h16",
      "OriginatorTransactionID": null,
      "Amount": 2000,
      "Currency": "EUR",
      "CapturedAmount": 0,
      "ReturnURL": null,
      "Description": null,
      "StatementDescriptor": null,
      "MethodID": 6,
      "MethodOptionID": null,
      "SiteID": 1010,
      "NotificationDateTime": null,
      "Customer": null,
      "BillingAddress": null,
      "ShippingAddress": null,
      "Articles": null,
      "Card": null,
      "CreditCardToken": null,
      "Status": {
        "ID": 9,
        "Info": "Authorized",
        "Reasons": []
      },
      "MethodTransactionID": null,
      "PaymentTokenLifetime": null,
      "Capture": null,
      "Retry": null,
      "RedirectURL": null,
      "3DSecure": null
    },
    {
      "ID": 202243,
      "ClientIP": null,
      "SkinID": null,
      "Created": "20161205093245",
      "MerchantTransactionID": "s2ptest_h13",
      "OriginatorTransactionID": null,
      "Amount": 2000,
      "Currency": "EUR",
      "CapturedAmount": 0,
      "ReturnURL": "http://demo.smart2pay.com/redirect.php",
      "Description": "payment product",
      "StatementDescriptor": "bank statement message",
      "MethodID": 6,
      "MethodOptionID": null,
      "SiteID": 1010,
      "NotificationDateTime": null,
      "Customer": {
        "ID": 115,
        "MerchantCustomerID": "null",
        "Email": "customer@test.com",
        "FirstName": "John",
        "LastName": "Doe",
        "Gender": "1",
        "SocialSecurityNumber": "45908-28324",
        "Phone": "0744-783322",
        "Company": "S2P"
      },
      "BillingAddress": {
        "ID": 253,
        "City": "Iasi",
        "ZipCode": "7000-49",
        "State": "Iasi",
        "Street": "Sf Lazar",
        "StreetNumber": "37",
        "HouseNumber": "5A",
        "HouseExtension": "-",
        "Country": "RO"
      },
      "ShippingAddress": {
        "ID": 87,
        "City": "Iasi",
        "ZipCode": "700049",
        "State": "Iasi",
        "Street": "Sf Lazar",
        "StreetNumber": "37",
        "HouseNumber": "-",
        "HouseExtension": "-",
        "Country": "RO"
      },
      "Articles": null,
      "Card": null,
      "CreditCardToken": null,
      "Status": {
        "ID": 1,
        "Info": "Open",
        "Reasons": []
      },
      "MethodTransactionID": null,
      "PaymentTokenLifetime": null,
      "Capture": null,
      "Retry": null,
      "RedirectURL": null,
      "3DSecure": null
    },
    {
      "ID": 202242,
      "ClientIP": null,
      "SkinID": null,
      "Created": "20161205093117",
      "MerchantTransactionID": "s2ptest_h12",
      "OriginatorTransactionID": null,
      "Amount": 2000,
      "Currency": "EUR",
      "CapturedAmount": 2000,
      "ReturnURL": "http://demo.smart2pay.com/redirect.php",
      "Description": "payment product",
      "StatementDescriptor": "bank statement message",
      "MethodID": 6,
      "MethodOptionID": null,
      "SiteID": 1010,
      "NotificationDateTime": null,
      "Customer": {
        "ID": 115,
        "MerchantCustomerID": "null",
        "Email": "customer@test.com",
        "FirstName": "John",
        "LastName": "Doe",
        "Gender": "1",
        "SocialSecurityNumber": "45908-28324",
        "Phone": "0744-783322",
        "Company": "S2P"
      },
      "BillingAddress": {
        "ID": 253,
        "City": "Iasi",
        "ZipCode": "7000-49",
        "State": "Iasi",
        "Street": "Sf Lazar",
        "StreetNumber": "37",
        "HouseNumber": "5A",
        "HouseExtension": "-",
        "Country": "RO"
      },
      "ShippingAddress": {
        "ID": 87,
        "City": "Iasi",
        "ZipCode": "700049",
        "State": "Iasi",
        "Street": "Sf Lazar",
        "StreetNumber": "37",
        "HouseNumber": "-",
        "HouseExtension": "-",
        "Country": "RO"
      },
      "Articles": null,
      "Card": null,
      "CreditCardToken": null,
      "Status": {
        "ID": 11,
        "Info": "Captured",
        "Reasons": []
      },
      "MethodTransactionID": null,
      "PaymentTokenLifetime": null,
      "Capture": null,
      "Retry": null,
      "RedirectURL": null,
      "3DSecure": null
    },
    {
      "ID": 202240,
      "ClientIP": null,
      "SkinID": null,
      "Created": "20161205092303",
      "MerchantTransactionID": "s2ptest_h11",
      "OriginatorTransactionID": null,
      "Amount": 2000,
      "Currency": "EUR",
      "CapturedAmount": 1000,
      "ReturnURL": null,
      "Description": null,
      "StatementDescriptor": null,
      "MethodID": 6,
      "MethodOptionID": null,
      "SiteID": 1010,
      "NotificationDateTime": null,
      "Customer": null,
      "BillingAddress": null,
      "ShippingAddress": null,
      "Articles": null,
      "Card": null,
      "CreditCardToken": null,
      "Status": {
        "ID": 35,
        "Info": "PartiallyCaptured",
        "Reasons": []
      },
      "MethodTransactionID": null,
      "PaymentTokenLifetime": null,
      "Capture": null,
      "Retry": null,
      "RedirectURL": null,
      "3DSecure": null
    }
  ]
}

Get a list of direct card payments (filtered)

You can specify various filters as parameters in the query string in order to get a customized list of direct card payments.

Requests:

GET https://securetest.smart2pay.com/v1/payments?limit=2
Authorization: Basic MTAxMDpnYWJp
GET https://securetest.smart2pay.com/v1/payments?startDate=20160803150000&endDate=20161003140000
Authorization: Basic MTAxMDpnYWJp

The following table describes the possible filters you can use. You can mix the filters so you can obtain the desired results.

FILTERS
Field Description Data type
limit The maximum number of items that will be returned Long
offset A list of payments starting with the value of the offset parameter will be returned. The offset parameter can also be used together with the limit parameter to select specific entries within a list of payments. Long
startDate The date and time after which the payments are returned DateTime (YYYYMMDDHHMMSS)
endDate The date and time until which the payments are returned DateTime (YYYYMMDDHHMMSS)
country Only the transactions having this country code will be returned String (ISO 3166-1-alpha-2)
currency Only the transactions having this currency code will be returned String (ISO 4217)
minimumAmount Only the payments with an amount higher than this will be returned Integer (last 2 digits representing the decimal part)
maximumAmount Only the payments with an amount lower than this will be returned Integer (last 2 digits representing the decimal part)
merchantTransactionID Only the payment having this merchantTransactionID will be returned String

^[0-9a-zA-Z_-]{1,50}$

statusID Only the transactions having this statusID will be returned. Integer

The ID of the payment status can have the following values: 1 – Open, 3 – Cancelled, 4 – Failed, 5 – Expired, 9 – Authorized, 11 – Captured.

methodTransactionID Only the payments having this methodTransactionID will be returned. This transaction ID from the payment method provider can be used for customer support. String

^[0-9a-zA-Z_-]{1,50}$

Here is an example of a request with the currency filter set to EUR. This means that it will return only the transactions with this payment currency.

Request:

GET https://securetest.smart2pay.com/v1/payments?limit=2
Authorization: Basic MTAxMDpnYWJp

Response:

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

{
  "Payments": [
    {
      "ID": 202245,
      "ClientIP": null,
      "SkinID": null,
      "Created": "20161205094557",
      "MerchantTransactionID": "s2ptest_h17",
      "OriginatorTransactionID": null,
      "Amount": 2000,
      "Currency": "EUR",
      "CapturedAmount": 2000,
      "ReturnURL": null,
      "Description": null,
      "StatementDescriptor": null,
      "MethodID": 6,
      "MethodOptionID": null,
      "SiteID": 1010,
      "NotificationDateTime": null,
      "Customer": null,
      "BillingAddress": null,
      "ShippingAddress": null,
      "Articles": null,
      "Card": null,
      "CreditCardToken": null,
      "Status": {
        "ID": 11,
        "Info": "Captured",
        "Reasons": []
      },
      "MethodTransactionID": null,
      "PaymentTokenLifetime": null,
      "Capture": null,
      "Retry": null,
      "RedirectURL": null,
      "3DSecure": null
    },
    {
      "ID": 202244,
      "ClientIP": null,
      "SkinID": null,
      "Created": "20161205094546",
      "MerchantTransactionID": "s2ptest_h16",
      "OriginatorTransactionID": null,
      "Amount": 2000,
      "Currency": "EUR",
      "CapturedAmount": 0,
      "ReturnURL": null,
      "Description": null,
      "StatementDescriptor": null,
      "MethodID": 6,
      "MethodOptionID": null,
      "SiteID": 1010,
      "NotificationDateTime": null,
      "Customer": null,
      "BillingAddress": null,
      "ShippingAddress": null,
      "Articles": null,
      "Card": null,
      "CreditCardToken": null,
      "Status": {
        "ID": 9,
        "Info": "Authorized",
        "Reasons": []
      },
      "MethodTransactionID": null,
      "PaymentTokenLifetime": null,
      "Capture": null,
      "Retry": null,
      "RedirectURL": null,
      "3DSecure": null
    }
  ]
}