Get information on a specific payment

You can get information about a one-off payment or a recurring payment by using a few actions based on GET HTTP request.

The details about a recurring payment can be retrieved in the exact same manner you do for one-off payments.

Definition: GET /v1/payments/{id}

Where:
  • {id} – GlobalPay Payment ID

Request:

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

Response:

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

{
    "Payment": {
        "ID": 4168568,
        "SkinID": null,
        "ClientIP": null,
        "Created": "20181102144444",
        "MerchantTransactionID": "s2ptest_h15",
        "OriginatorTransactionID": null,
        "Amount": "100",
        "Currency": "EUR",
        "CapturedAmount": null,
        "ReturnURL": "http://demo.smart2pay.com/redirect.php",
        "Description": null,
        "MethodID": 2,
        "MethodOptionID": 10,
        "IncludeMethodIDs": null,
        "ExcludeMethodIDs": null,
        "PrioritizeMethodIDs": null,
        "SiteID": 30201,
        "NotificationDateTime": "20181102144530",
        "Customer": null,
        "BillingAddress": {
            "ID": 309,
            "City": null,
            "ZipCode": null,
            "State": null,
            "Street": null,
            "StreetNumber": null,
            "HouseNumber": null,
            "HouseExtension": null,
            "Country": "NL"
        },
        "ShippingAddress": null,
        "Articles": null,
        "Details": {
            "AccountNumber": "NL53INGB0654422370",
            "AccountHolder": "Hr E G H Küppers en/of MW M.J. Küppers-Veeneman",
            "IBAN": null,
            "BIC": null,
            "PrepaidCard": null,
            "PrepaidCardPIN": null,
            "SerialNumbers": null,
            "Wallet": null,
            "ReferenceNumber": null,
            "PayerCountry": null,
            "PayerEmail": null,
            "PayerPhone": null,
            "BankCode": null,
            "BankName": null,
            "BankSortCode": null,
            "SocialSecurityNumber": null,
            "BillingCycleStart": null,
            "BillingCycleEnd": null,
            "UnsubscribeInstructions": null,
            "CustomerLoginID": null,
            "PaidAmount": null,
            "PaidCurrency": null,
            "ProviderExchangeRate": 0,
            "PayerBankAccountID": null
        },
        "ReferenceDetails": null,
        "CustomParameters": null,
        "PreapprovalID": null,
        "Status": {
            "ID": 2,
            "Info": "Success",
            "Reasons": null
        },
        "MethodTransactionID": null,
        "TokenLifetime": 1,
        "Capture": null,
        "PreapprovalDetails": null,
        "RedirectURL": "https://apitest.smart2pay.com/Home?PaymentToken=FD56DAA48DAC61477DA6838CBDFC03D7.4168568"
    }
}

The same action can be used to get information on a specific card payment.

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 payments

This action allows you to get a list of payments. Without specifying any parameter, the default number of transactions that will be returned per page will be the one configured in our system. Please be aware that only a limited amount of details for each payment will be provided.

Definition: GET /v1/payments

In the response you will receive additional information in order to keep track of your transactions, like: TotalPages, PageSize, PageIndex, Count and TotalCount.

Request:

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

Response:

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


{
  "Payments": [
    {
      "ID": 3127172,
      "SkinID": null,
      "ClientIP": null,
      "Created": "20170818080941",
      "MerchantTransactionID": "WPD_1503043646_2119_1662",
      "OriginatorTransactionID": null,
      "Amount": "1",
      "Currency": "EUR",
      "CapturedAmount": null,
      "ReturnURL": "https://docs-apm.nuvei.com/wp-content/plugins/smart2pay-api/views/funcs/demo_clean_return.php",
      "Description": null,
      "MethodID": null,
      "MethodOptionID": null,
      "IncludeMethodIDs": null,
      "ExcludeMethodIDs": null,
      "PrioritizeMethodIDs": null,
      "SiteID": 30201,
      "NotificationDateTime": null,
      "Customer": null,
      "BillingAddress": null,
      "ShippingAddress": null,
      "Articles": null,
      "Details": null,
      "ReferenceDetails": null,
      "CustomParameters": null,
      "PreapprovalID": null,
      "Status": {
        "ID": 1,
        "Info": "Open",
        "Reasons": null
      },
      "MethodTransactionID": null,
      "TokenLifetime": null,
      "Capture": null,
      "PreapprovalDetails": null,
      "RedirectURL": null
    },
    {
      "ID": 3121249,
      "SkinID": null,
      "ClientIP": null,
      "Created": "20170817144711",
      "MerchantTransactionID": "cristinatesting125",
      "OriginatorTransactionID": null,
      "Amount": "500",
      "Currency": "EUR",
      "CapturedAmount": null,
      "ReturnURL": "http://demo.smart2pay.com/redirect.php",
      "Description": "TestPayment",
      "MethodID": 9,
      "MethodOptionID": null,
      "IncludeMethodIDs": null,
      "ExcludeMethodIDs": null,
      "PrioritizeMethodIDs": null,
      "SiteID": 30201,
      "NotificationDateTime": null,
      "Customer": null,
      "BillingAddress": null,
      "ShippingAddress": null,
      "Articles": null,
      "Details": null,
      "ReferenceDetails": null,
      "CustomParameters": null,
      "PreapprovalID": null,
      "Status": {
        "ID": 2,
        "Info": "Success",
        "Reasons": null
      },
      "MethodTransactionID": null,
      "TokenLifetime": null,
      "Capture": null,
      "PreapprovalDetails": null,
      "RedirectURL": null
    },
    {
      "ID": 3121248,
      "SkinID": null,
      "ClientIP": null,
      "Created": "20170817144412",
      "MerchantTransactionID": "cristinatesting124",
      "OriginatorTransactionID": null,
      "Amount": "5",
      "Currency": "MXN",
      "CapturedAmount": null,
      "ReturnURL": "http://demo.smart2pay.com/redirect.php",
      "Description": "TestPayment",
      "MethodID": 9,
      "MethodOptionID": null,
      "IncludeMethodIDs": null,
      "ExcludeMethodIDs": null,
      "PrioritizeMethodIDs": null,
      "SiteID": 30201,
      "NotificationDateTime": null,
      "Customer": null,
      "BillingAddress": null,
      "ShippingAddress": null,
      "Articles": null,
      "Details": null,
      "ReferenceDetails": null,
      "CustomParameters": null,
      "PreapprovalID": null,
      "Status": {
        "ID": 4,
        "Info": "Failed",
        "Reasons": null
      },
      "MethodTransactionID": null,
      "TokenLifetime": null,
      "Capture": null,
      "PreapprovalDetails": null,
      "RedirectURL": null
    },
    {
      "ID": 3121247,
      "SkinID": null,
      "ClientIP": null,
      "Created": "20170817144329",
      "MerchantTransactionID": "cristinatesting123",
      "OriginatorTransactionID": null,
      "Amount": "5",
      "Currency": "MXN",
      "CapturedAmount": null,
      "ReturnURL": "http://demo.smart2pay.com/redirect.php",
      "Description": "TestPayment",
      "MethodID": 49,
      "MethodOptionID": null,
      "IncludeMethodIDs": null,
      "ExcludeMethodIDs": null,
      "PrioritizeMethodIDs": null,
      "SiteID": 30201,
      "NotificationDateTime": null,
      "Customer": null,
      "BillingAddress": null,
      "ShippingAddress": null,
      "Articles": null,
      "Details": null,
      "ReferenceDetails": null,
      "CustomParameters": null,
      "PreapprovalID": null,
      "Status": {
        "ID": 2,
        "Info": "Success",
        "Reasons": null
      },
      "MethodTransactionID": null,
      "TokenLifetime": null,
      "Capture": null,
      "PreapprovalDetails": null,
      "RedirectURL": null
    },
    {
      "ID": 3121242,
      "SkinID": null,
      "ClientIP": null,
      "Created": "20170817143541",
      "MerchantTransactionID": "cristinatest16",
      "OriginatorTransactionID": null,
      "Amount": "980",
      "Currency": "EUR",
      "CapturedAmount": null,
      "ReturnURL": "http://demo.smart2pay.com/redirect.php",
      "Description": "smart2pay test",
      "MethodID": 9,
      "MethodOptionID": null,
      "IncludeMethodIDs": null,
      "ExcludeMethodIDs": null,
      "PrioritizeMethodIDs": null,
      "SiteID": 30201,
      "NotificationDateTime": null,
      "Customer": null,
      "BillingAddress": null,
      "ShippingAddress": null,
      "Articles": null,
      "Details": null,
      "ReferenceDetails": null,
      "CustomParameters": null,
      "PreapprovalID": null,
      "Status": {
        "ID": 2,
        "Info": "Success",
        "Reasons": null
      },
      "MethodTransactionID": null,
      "TokenLifetime": null,
      "Capture": null,
      "PreapprovalDetails": null,
      "RedirectURL": null
    },
    {
      "ID": 3121241,
      "SkinID": null,
      "ClientIP": null,
      "Created": "20170817143454",
      "MerchantTransactionID": "cristinatest15",
      "OriginatorTransactionID": null,
      "Amount": "980",
      "Currency": "EUR",
      "CapturedAmount": null,
      "ReturnURL": "http://demo.smart2pay.com/redirect.php",
      "Description": "smart2pay test",
      "MethodID": 75,
      "MethodOptionID": null,
      "IncludeMethodIDs": null,
      "ExcludeMethodIDs": null,
      "PrioritizeMethodIDs": null,
      "SiteID": 30201,
      "NotificationDateTime": null,
      "Customer": null,
      "BillingAddress": null,
      "ShippingAddress": null,
      "Articles": null,
      "Details": null,
      "ReferenceDetails": null,
      "CustomParameters": null,
      "PreapprovalID": null,
      "Status": {
        "ID": 9,
        "Info": "Authorized",
        "Reasons": null
      },
      "MethodTransactionID": null,
      "TokenLifetime": null,
      "Capture": null,
      "PreapprovalDetails": null,
      "RedirectURL": null
    },
    {
      "ID": 3120486,
      "SkinID": null,
      "ClientIP": null,
      "Created": "20170817131458",
      "MerchantTransactionID": "s2psabaassaSadadeedte99xst_g20",
      "OriginatorTransactionID": null,
      "Amount": "1",
      "Currency": "EUR",
      "CapturedAmount": null,
      "ReturnURL": "http://demo.smart2pay.com/redirect.php",
      "Description": null,
      "MethodID": 2,
      "MethodOptionID": 20,
      "IncludeMethodIDs": null,
      "ExcludeMethodIDs": null,
      "PrioritizeMethodIDs": null,
      "SiteID": 30201,
      "NotificationDateTime": null,
      "Customer": null,
      "BillingAddress": null,
      "ShippingAddress": null,
      "Articles": null,
      "Details": null,
      "ReferenceDetails": null,
      "CustomParameters": null,
      "PreapprovalID": null,
      "Status": {
        "ID": 1,
        "Info": "Open",
        "Reasons": null
      },
      "MethodTransactionID": null,
      "TokenLifetime": null,
      "Capture": null,
      "PreapprovalDetails": null,
      "RedirectURL": null
    },
    {
      "ID": 3119625,
      "SkinID": null,
      "ClientIP": null,
      "Created": "20170817121535",
      "MerchantTransactionID": "s2psabaassaSaaedtexst_g20",
      "OriginatorTransactionID": null,
      "Amount": "1",
      "Currency": "EUR",
      "CapturedAmount": null,
      "ReturnURL": "http://demo.smart2pay.com/redirect.php",
      "Description": null,
      "MethodID": 2,
      "MethodOptionID": null,
      "IncludeMethodIDs": null,
      "ExcludeMethodIDs": null,
      "PrioritizeMethodIDs": null,
      "SiteID": 30201,
      "NotificationDateTime": null,
      "Customer": null,
      "BillingAddress": null,
      "ShippingAddress": null,
      "Articles": null,
      "Details": null,
      "ReferenceDetails": null,
      "CustomParameters": null,
      "PreapprovalID": null,
      "Status": {
        "ID": 1,
        "Info": "Open",
        "Reasons": null
      },
      "MethodTransactionID": null,
      "TokenLifetime": null,
      "Capture": null,
      "PreapprovalDetails": null,
      "RedirectURL": null
    },
    {
      "ID": 3119610,
      "SkinID": null,
      "ClientIP": null,
      "Created": "20170817121352",
      "MerchantTransactionID": "s2psabaassaSedtexst_g20",
      "OriginatorTransactionID": null,
      "Amount": "1",
      "Currency": "EUR",
      "CapturedAmount": null,
      "ReturnURL": "http://demo.smart2pay.com/redirect.php",
      "Description": null,
      "MethodID": 2,
      "MethodOptionID": null,
      "IncludeMethodIDs": null,
      "ExcludeMethodIDs": null,
      "PrioritizeMethodIDs": null,
      "SiteID": 30201,
      "NotificationDateTime": null,
      "Customer": null,
      "BillingAddress": null,
      "ShippingAddress": null,
      "Articles": null,
      "Details": null,
      "ReferenceDetails": null,
      "CustomParameters": null,
      "PreapprovalID": null,
      "Status": {
        "ID": 1,
        "Info": "Open",
        "Reasons": null
      },
      "MethodTransactionID": null,
      "TokenLifetime": null,
      "Capture": null,
      "PreapprovalDetails": null,
      "RedirectURL": null
    },
    {
      "ID": 3119557,
      "SkinID": null,
      "ClientIP": null,
      "Created": "20170817121224",
      "MerchantTransactionID": "s2psabaassaSdtexst_g20",
      "OriginatorTransactionID": null,
      "Amount": "11",
      "Currency": "CNY",
      "CapturedAmount": null,
      "ReturnURL": "http://demo.smart2pay.com/redirect.php",
      "Description": null,
      "MethodID": 2,
      "MethodOptionID": null,
      "IncludeMethodIDs": null,
      "ExcludeMethodIDs": null,
      "PrioritizeMethodIDs": null,
      "SiteID": 30201,
      "NotificationDateTime": null,
      "Customer": null,
      "BillingAddress": null,
      "ShippingAddress": null,
      "Articles": null,
      "Details": null,
      "ReferenceDetails": null,
      "CustomParameters": null,
      "PreapprovalID": null,
      "Status": {
        "ID": 1,
        "Info": "Open",
        "Reasons": null
      },
      "MethodTransactionID": null,
      "TokenLifetime": null,
      "Capture": null,
      "PreapprovalDetails": null,
      "RedirectURL": null
    }
  ],
      "Count": 10,
      "TotalPages": 358,
      "TotalCount": 3576,
      "PageIndex": 1,
      "PageSize": 10  
}

The same action can be used to get a list of card payments. Please be aware that only a limited amount of details for each direct card payment will be provided.

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 filtered payments

You can specify various filters as parameters in the query string in order to get a customized list of payments. This type of request allows you to get a list of payments according to your own needs and requirements, simplifying the process of finding transactions.

You can get a list of paginated payments by adding the pageSize and pageIndex parameters to the URL. The pageIndex parameter is recommended to be used together with the pageSize parameter to select the number of transactions on a specific page.

The following table describes all the filters that you can use. Please note that you can mix the filters to get specific results.

FILTERS
Field Description Data type
pageSize The maximum number of transactions that will be returned per page. The pageSize parameter used together with the pageIndex parameter will also represent the number of transactions returned for a specific page. Please note that without specifying any parameter the default number of transactions that will be returned is 50! Long
Request:
GET https://paytest.smart2pay.com/v1/payments?pagesize=20&pageindex=3
pageIndex Using the pageIndex parameter you will be able to receive the transactions paginated. The default number of transactions that will be returned per page is 50. Transactions are ordered by ID descending. The pageIndex parameter is recommended to be used together with the pageSize parameter in order to choose the desired number of transactions returned per page. Long
Request:
GET https://paytest.smart2pay.com/v1/payments?pagesize=20&pageindex=3
sortDirection By default, the transactions are ordered by ID descending. By using the sortDirection parameter, you have the possibility to order the transactions by ID ascending (sortdirection=asc). String
Request:
GET https://paytest.smart2pay.com/v1/payments?pagesize=20&pageindex=3&sortdirection=asc
sortBy By default, the transactions are ordered by ID descending. By using the sortBy parameter you will be able to receive the transactions sorted after merchanttransactionid / inputdatetime / amount in combination with sortDirection (=asc / =desc) parameter. Long
Request:
GET https://paytest.smart2pay.com/v1/payments?pagesize=20&pageindex=3&sortby=amount&sortdirection=asc
startDate The date and time after which the payments are returned. DateTime

YYYYMMDDHHMMSS

Request:
GET https://paytest.smart2pay.com/v1/payments?startDate=20170803150000
endDate The date and time until which the payments are returned. DateTime

YYYYMMDDHHMMSS

Request:
GET https://paytest.smart2pay.com/v1/payments?startDate=20170803150000&endDate=20171003140000
methodID Only the transactions having this methodID will be returned. Long
Request:
GET https://paytest.smart2pay.com/v1/payments?methodID=2
country Only the transactions having this country code will be returned. String

(ISO 3166-1-alpha-2)

Request:
GET https://paytest.smart2pay.com/v1/payments?country=NL
currency Only the transactions having this currency code will be returned. String

(ISO 4217)

Request:
GET https://paytest.smart2pay.com/v1/payments?currency=EUR
minimumAmount Only the payments with an amount higher than this will be returned. Integer (last 2 digits representing the decimal part)
Request:
GET https://paytest.smart2pay.com/v1/payments?minimumAmount=100
maximumAmount Only the payments with an amount lower than this will be returned. Integer (last 2 digits representing the decimal part)
Request:
GET https://paytest.smart2pay.com/v1/payments?maximumAmount=1000
merchantTransactionID Only the payment having this merchantTransactionID will be returned. String

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

Request:
GET https://paytest.smart2pay.com/v1/payments?merchantTransactionID=123456
statusID Only the transactions having this statusID will be returned. Integer

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

Request:
GET https://paytest.smart2pay.com/v1/payments?statusID=2
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}$

Request:
GET https://paytest.smart2pay.com/v1/payments?methodTransactionID=100200
typeID Only the transactions having this typeID will be returned. Integer

The typeID filter can have the following values: 1 – Payments, 2 – Recurring payments.

Request:
GET https://paytest.smart2pay.com/v1/payments?typeID=1

Here is an example request where the transactions are divided in pages (groups of transactions) of 2 transactions and the third group of transactions is returned.

Request:

GET https://paytest.smart2pay.com/v1/payments?pagesize=2&pageindex=3

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"Payments": [
  {
   "ID": 2459122,
   "SkinID": null, 
   "Created": "20160411140447",
   "MerchantTransactionID": "WPD_1460383484_8795_5000",
   "Amount": "100",
   "Currency": "BAM",
   "CapturedAmount": null,
   "ReturnURL": "https://docs-apm.nuvei.com/wp-content/plugins/smart2pay-api/views/funcs/demo_clean_return.php",
   "Description": null,
   "MethodID": 79,
   "MethodOptionID": null,
   "IncludeMethodIDs": null,
   "ExcludeMethodIDs": null,
   "PrioritizeMethodIDs": null,
   "SiteID": 30201,
   "NotificationDateTime": "20160411140522",
   "Customer": null,
   "BillingAddress": null,
   "ShippingAddress": null,
   "Articles": null,
   "Details": null,
   "ReferenceDetails": null,
   "CustomParameters": null,
   "PreapprovalID": null,
   "Status": {
     "ID": 1,
     "Info": "Open",
     "Reasons": null
   },
   "MethodTransactionID": null,
   "TokenLifetime": null,
   "Capture": null,
   "RedirectURL": null
   },
   {
   "ID": 2459118,
   "SkinID": null,
   "Created": "20160411125607",
   "MerchantTransactionID": "WPD_1460379365_1783_6355",
   "Amount": "1100",
   "Currency": "NGN",
   "CapturedAmount": null,
   "ReturnURL": "https://docs-apm.nuvei.com/wp-content/plugins/smart2pay-api/views/funcs/demo_clean_return.php",
   "Description": null,
   "MethodID": null,
   "MethodOptionID": null,
   "IncludeMethodIDs": null,
   "ExcludeMethodIDs": null,
   "PrioritizeMethodIDs": null,
   "SiteID": 30201,
   "NotificationDateTime": "20160411125629",
   "Customer": null,
   "BillingAddress": null,
   "ShippingAddress": null,
   "Articles": null,
   "Details": null,
   "ReferenceDetails": null,
   "CustomParameters": null,
   "PreapprovalID": null,
   "Status": {
     "ID": 3,
     "Info": "Cancelled",
     "Reasons": null
       },
   "MethodTransactionID": null,
   "TokenLifetime": null,
   "Capture": null,
   "PreapprovalDetails": null,
   "RedirectURL": null
    }
  ],
   "TotalPages": 50,
   "PageSize": 2,
   "PageIndex": 3,
   "Count": 2,
   "TotalCount": 100
}

In the response you will receive additional information in order to keep track of your transactions, like: TotalPages, PageSize, PageIndex, Count and TotalCount.

Here is the example of the request where the transactions are divided in pages (groups of transactions) of 3 transactions and the last group of transactions is returned. In this case the Count parameter will refer to the number of the remaining transactions on the last page.

Request:

GET https://paytest.smart2pay.com/v1/payments?pagesize=3&pageindex=50

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "Payments": [
    {
      "ID": 3037285,
      "SkinID": null,
      "ClientIP": null,
      "Created": "20170808100902",
      "MerchantTransactionID": "WPD_1502186809_5528_8717",
      "OriginatorTransactionID": null,
      "Amount": "1",
      "Currency": "PHP",
      "CapturedAmount": null,
      "ReturnURL": "https://docs-apm.nuvei.com/wp-content/plugins/smart2pay-api/views/funcs/demo_clean_return.php",
      "Description": null,
      "MethodID": 1029,
      "MethodOptionID": null,
      "IncludeMethodIDs": null,
      "ExcludeMethodIDs": null,
      "PrioritizeMethodIDs": null,
      "SiteID": 30201,
      "NotificationDateTime": "20170808100927",
      "Customer": null,
      "BillingAddress": null,
      "ShippingAddress": null,
      "Articles": null,
      "Details": null,
      "ReferenceDetails": null,
      "CustomParameters": null,
      "PreapprovalID": null,
      "Status": {
        "ID": 3,
        "Info": "Cancelled",
        "Reasons": null
      },
      "MethodTransactionID": null,
      "TokenLifetime": null,
      "Capture": null,
      "PreapprovalDetails": null,
      "RedirectURL": null
    },
    {
      "ID": 3037282,
      "SkinID": null,
      "ClientIP": null,
      "Created": "20170808100848",
      "MerchantTransactionID": "WPD_1502186795_5903_4452",
      "OriginatorTransactionID": null,
      "Amount": "1",
      "Currency": "PHP",
      "CapturedAmount": null,
      "ReturnURL": "https://docs-apm.nuvei.com/wp-content/plugins/smart2pay-api/views/funcs/demo_clean_return.php",
      "Description": null,
      "MethodID": 1051,
      "MethodOptionID": null,
      "IncludeMethodIDs": null,
      "ExcludeMethodIDs": null,
      "PrioritizeMethodIDs": null,
      "SiteID": 30201,
      "NotificationDateTime": null,
      "Customer": null,
      "BillingAddress": null,
      "ShippingAddress": null,
      "Articles": null,
      "Details": null,
      "ReferenceDetails": null,
      "CustomParameters": null,
      "PreapprovalID": null,
      "Status": {
        "ID": 4,
        "Info": "Failed",
        "Reasons": null
      },
      "MethodTransactionID": null,
      "TokenLifetime": null,
      "Capture": null,
      "PreapprovalDetails": null,
      "RedirectURL": null      
        }
     ],
      "TotalPages": 50,
      "PageSize": 3,
      "PageIndex": 50,
      "Count": 2,
      "TotalCount": 149
}

In case of an API error, an HTTP 4xx (you did something wrong) or HTTP 5xx (we did something wrong) response is returned.

For more information about the reasons of a wrong request response see our section GlobalPay Return Codes.

Please note that when a request is initiated with PageIndex filter greater than the TotalPages, an HTTP 4xx status is returned with return code 184: PageIndex Out of Range!

Request:

GET https://paytest.smart2pay.com/v1/payments?pagesize=20&pageindex=500

Response:

HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8

{
  "Payments": [],
  "Count": 0,
  "TotalPages": 178,
  "TotalCount": 3552,
  "PageIndex": 500,
  "PageSize": 20,
  "Error": "PageIndex Out of Range"
}

Get the status of a card payment

You can get the status of a Card payment by using the following GET HTTP request.

Please note that this method sends only the status information about the payment. To receive more information about the payment go to Get information on a specific payment section.

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

Where:
  • {id} – GlobalPay Payment ID

Request:

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

Response:

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

{
  "Payment": {
    "ID": 202230,
    "MerchantTransactionID": "s2ptest_h2",
    "Status": {
      "ID": "11",
      "Info": "Captured",
      "Reasons": []
    }
  }
}

Get Exchange Rates

You can get information about exchange rates for all our supported currencies (200 + transaction currencies) by using the following GET HTTP request. The parameters are sent in the message body as a JSON object.

This action can be exploited when DCC (Dynamic Currency Conversion) is being used. DCC means Dynamic currency conversion which allows you to initiate transactions in any currency you want, even if specific payment method doesn’t support that currency. Our system will take care of converting the transaction currency in a currency supported by the payment method.

Just replace the fields From and To in the request below with the currency codes you want exchange rate for and make a GET request.

Definition: GET /v1/exchangerates/{FromCurrency}/{ToCurrency}

Where:
  • {FromCurrency} – The three letter currency code (Alphabetic code of ISO 4217) I want exchage rate from;
  • {ToCurrency} – The three letter currency code (Alphabetic code of ISO 4217) I want exchage rate to.

Request:

GET https://paytest.smart2pay.com/v1/exchangerates/EUR/USD
Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=

Response:

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

{
  "ExchangeRate": {
    "From": "EUR",
    "To": "USD",
    "DateTime": "20181022130450",
    "Rate": 1.05
  }
}