Testing Requirements

Test Amounts

Before going live you will first complete a number of test card transactions on our test environment. We have provided a range of amounts that you can use to check all the transactional statuses. Using the below amounts will produce specific responses in order for you to test different scenarios.

Please be aware that all the possible statuses of the transactions that are returned in responses are based on the values assigned in the Amount field. If you want to obtain a specific status, simply enter a specific amount as the transaction amount. Below you will find different amounts to simulate certain situations and statuses.

The amount’s last two digits represent the decimal part (11.54 will be sent 1154).

Test Amounts
Value Status Description
1 – 10000 Captured / Authorized For this amount range all the actions will be successful: payment authorization, capture action, cancel action, refund action.
10001 Failed All the transactions having this amount will fail.
10002 QueuedForCapturing

If you set capture flag to true it will return status QueuedForCapturing with return code: 5288: “Capture failed but will retry again later”.

If you set capture flag to false it will return status Authorized. Then if you sent a capture request it will receive status QueuedForCapturing with return code: 5288: “Capture failed but will retry again later”.

10003 CaptureRequested

If you set capture flag to true it will return status CaptureRequested.

If you set capture flag to false it will return status Authorized. Then if you sent a capture request it will receive status CaptureRequested.

10004 Transaction: Captured; Refund: Open If this amount will be used for a transaction it will be captured but the refund will remain Open.
10005 Failed Capture failed with timelimit reached. The timelimit for capture action is overdue.
10006 QueuedForCanceling If you set capture flag to false it will return status Authorized. Then if you sent a cancel request it will receive status QueuedForCanceling with return code: 5289: “Cancel failed but will retry again later”.
10201 – 10299 Transaction: Captured; Refund: Failed If any of the amounts in this range limit are used for a transaction it will be Captured but the refund will fail.
20001 – 30000 Failed If any of the amounts in this range limit are used for a transaction it will fail and it will receive status Failed with return code: 5291: “Security code (CVV2/CVC2) is incorrect”.
30001 – 30200 Captured / Authorized For this amount range all the actions will be successful: payment authorization, capture action, cancel action, refund action. For the initial request there is a delay in seconds according to the last 3 digits (from 1 – 200 seconds).

Test Credit Card Numbers

For testing purposes, please use the following credit card numbers:

Test Credit Card Numbers
Credit Card Name Credit Card Number
Visa: 4111111111111111
4024007189870784
Mastercard: 5148196509775860
5443066050671259
Discover: 6011087785272940
6011235328768235
UnionPay: 6226388000000095
6216261000000000018
Visa Electron: 5443066050671259
4917300800000000
American Express: 345364891980314
372986503275489
Diners Club: 30120905411096
38341714925074
Hipercard: 6062825624254001
JCB: 3158178601355868
210076836080396
InstaPayment: 6385756289989351
6390524121376333

For testing purposes, please use only the credit card numbers from the above list! If any other credit card number is used for a test transaction it will fail and it will receive status Failed with return code: 5287: “Invalid card for test transaction”.

Server to Server Card Payment

If you initiate a payment with the GenerateCreditCardToken element set to false, the token element is not sent in the response/notification, so you cannot used it for future payments, but the token is still created and associated with the credit card and the payment.

Request:

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

{
  "Payment": {
    "MerchantTransactionID": "s2ptest_i6",
    "Amount": 2000,
    "Currency": "EUR",
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "payment product",
    "StatementDescriptor": "bank statement message",
    "Card": {
      "HolderName": "John Doe",
      "Number": "4111111111111111",
      "ExpirationMonth": "02",
      "ExpirationYear": "2018",
      "SecurityCode": "312"
    },		
     "Capture": true,
     "Retry": true,
     "GenerateCreditCardToken": false
  }
}

Response:

HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8

{
  "Payment": {
    "ID": 202589,
    "ClientIP": null,
    "SkinID": null,
    "Created": "20170511112434",
    "MerchantTransactionID": "s2ptest_i6",
    "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": null,
    "BillingAddress": null,
    "ShippingAddress": null,
    "Articles": null,
    "Card": {
      "HolderName": "John Doe",
      "Number": "VISA-1111",
      "ExpirationMonth": "02",
      "ExpirationYear": "2018"
    },
    "CreditCardToken": null,
    "Status": {
      "ID": 11,
      "Info": "Captured",
      "Reasons": []
    },
    "MethodTransactionID": null,
    "PaymentTokenLifetime": null,
    "Capture": true,
    "Retry": true,
    "RedirectURL": null,
    "3DSecure": false
  }
}

Hosted Card Form

If you initiate a payment without any card or token details, you will be given in the response a RedirectURL, that will be used to redirect the customer to a form where he will have to fill all the necessary details and continue the payment.

Request:

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

{
  "Payment": {
    "MerchantTransactionID": "s2ptest_h6",
    "Amount": 2000,
    "Currency": "EUR",	
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Capture": true
  }
}

Response:

HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8

{
  "Payment": {
    "ID": 202235,
    "ClientIP": null,
    "SkinID": null,
    "Created": "20161205084804",
    "MerchantTransactionID": "s2ptest_h6",
    "OriginatorTransactionID": null,
    "Amount": 2000,
    "Currency": "EUR",
    "CapturedAmount": 0,
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "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": 1,
      "Info": "Open",
      "Reasons": []
    },
    "MethodTransactionID": null,
    "PaymentTokenLifetime": 10,
    "Capture": true,
    "Retry": false,
    "RedirectURL": "https://securetest.smart2pay.com/v1/Payments/FillCardDetails?PaymentToken=202235.1010.A3F07F81639486814BAF3319CF96A9071",
    "3DSecure": null
  }
}

Also, if you initiate a Card payment using the CreditCardToken value without the SecurityCode parameter and with the RequireSecurityCode parameter set to true, a RedirectURL will be given in the response. Using this URL the customer will be redirected to a form where the card details are already filled, except the SecurityCode (card number is masked and cannot be changed). The customer will have to fill the value for the SecurityCode parameter and continue the payment.

Request:

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

{
  "Payment": {
    "MerchantTransactionID": "s2ptest_i9",
    "Amount": 2000,
    "Currency": "EUR",
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "CreditCardToken": {
      "Value": "F43F90A5CB613D91F704407D4E297EA1",
      "RequireSecurityCode": true
    },		
     "Capture": true,
      "GenerateCreditCardToken": true
   }
}

Response:

HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8

{
  "Payment": {
    "ID": 202592,
    "ClientIP": null,
    "SkinID": null,
    "Created": "20170511112846",
    "MerchantTransactionID": "s2ptest_i9",
    "OriginatorTransactionID": null,
    "Amount": 2000,
    "Currency": "EUR",
    "CapturedAmount": "0",
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": null,
    "StatementDescriptor": null,
    "MethodID": 6,
    "MethodOptionID": null,
    "SiteID": 1010,
    "NotificationDateTime": null,
    "Customer": null,
    "BillingAddress": null,
    "ShippingAddress": null,
    "Articles": null,
    "Card": {
      "HolderName": "John Doe",
      "Number": "Ends with 1111",
      "ExpirationMonth": "02",
      "ExpirationYear": "2018"
    },
    "CreditCardToken": {
      "Value": "F43F90A5CB613D91F704407D4E297EA1"
    },
    "Status": {
      "ID": 1,
      "Info": "Open",
      "Reasons": []
    },
    "MethodTransactionID": null,
    "PaymentTokenLifetime": 10,
    "Capture": true,
    "Retry": false,
    "RedirectURL": "https://securetest.smart2pay.com/v1/Payments/FillCardDetails?PaymentToken=202592.1010.8DBBBF0F45451A5D094F4CDD88E199698",
    "3DSecure": false
  }
}

One Click Payment

If you initiate a Card payment and you set the GenerateCreditCardToken parameter to true, a token element is sent in the response, containing the value of the newly created credit card token, that you can use for future payments.

The token received in the response, together with the Security Code (CVV) parameter or the RequireSecurityCode parameter, can be used to initiate future payments, without having to enter all the necesary card details again.

Request:

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

{
  "Payment": {
    "MerchantTransactionID": "s2ptest_i4",
    "Amount": 2000,
    "Currency": "EUR",
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "payment product",
    "StatementDescriptor": "bank statement message",
    "CreditCardToken": {
      "Value": "F43F90A5CB613D91F704407D4E297EA1",
      "SecurityCode": "312"
    },		
     "Capture": true,
     "Retry": true,
     "GenerateCreditCardToken": true
  }
}

Response:

HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8

{
  "Payment": {
    "ID": 202587,
    "ClientIP": null,
    "SkinID": null,
    "Created": "20170511111702",
    "MerchantTransactionID": "s2ptest_i4",
    "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": null,
    "BillingAddress": null,
    "ShippingAddress": null,
    "Articles": null,
    "Card": {
      "HolderName": "John Doe",
      "Number": "Ends with 1111",
      "ExpirationMonth": "02",
      "ExpirationYear": "2018"
    },
    "CreditCardToken": {
      "Value": "F43F90A5CB613D91F704407D4E297EA1"
    },
    "Status": {
      "ID": 11,
      "Info": "Captured",
      "Reasons": []
    },
    "MethodTransactionID": null,
    "PaymentTokenLifetime": null,
    "Capture": true,
    "Retry": true,
    "RedirectURL": null,
    "3DSecure": false
  }
}

For One Click Payments, you can decide whether the Security Code (CVV) is needed or not for the payments.

If you decide that the security code is not needed, you cand send the RequireSecurityCode parameter set to false. In this case, the client will not be redirected to the form page to fill in the security code, but the payment will be directly sent to the payment provider.

Request:

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

{
  "Payment": {
    "MerchantTransactionID": "s2ptest_i5",
    "Amount": 2000,
    "Currency": "EUR",
    "CreditCardToken": {
      "Value": "F43F90A5CB613D91F704407D4E297EA1",
      "RequireSecurityCode": false 
    },		
     "Capture": true,
     "GenerateCreditCardToken": true
   }
}

Response:

HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8

{
  "Payment": {
    "ID": 202588,
    "ClientIP": null,
    "SkinID": null,
    "Created": "20170511112248",
    "MerchantTransactionID": "s2ptest_i5",
    "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": {
      "HolderName": "John Doe",
      "Number": "Ends with 1111",
      "ExpirationMonth": "02",
      "ExpirationYear": "2018"
    },
    "CreditCardToken": {
      "Value": "F43F90A5CB613D91F704407D4E297EA1"
    },
    "Status": {
      "ID": 11,
      "Info": "Captured",
      "Reasons": []
    },
    "MethodTransactionID": null,
    "PaymentTokenLifetime": null,
    "Capture": true,
    "Retry": false,
    "RedirectURL": null,
    "3DSecure": false
  }
}