WeChat POS Payment Flow

For WeChat payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

WeChat POS Payment Flow

  1. The customer selects his preferred currency from the list and enters his email address.

    1 Enter email

  2. You can skip this step by sending in the initial POST the following parameters: SkipHPP=1 and CustomerEmail.

  3. The Customer is redirected to WeChat payment page.

    1 WeChat payment page

  4. The Customer opens WeChat application and scans the QR code.

    1 QR code scanning

  5. The payment details are displayed and the customer confirms by using the payment password.

    1 Payment confirmation

  6. The payment is confirmed.

    1 Payment successful

  7. Upon completion of the payment flow, the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is Processing

Alipay POS Payment Flow

For Alipay payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

Alipay POS Payment Flow

  1. The Customer selects his preferred currency from the list and continues the payment.

    1 Select currency

  2. You can skip this step by sending in the initial POST the following parameters: SkipHPP=1 and CustomerEmail.

  3. The Customer is redirected to Alipay payment page. The Customer opens Alipay application and scans the QR code.

    1 Payment version

  4. The payment details are displayed and the customer confirms the payment.

    1 Payment confirmation

  5. Upon completion of the payment flow, the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is Processing

WeChat POS Payment Request

Definition: POST https://paytest.smart2pay.com/v1/payments

Below you will find a full example of a payment request for WeChat POS method (with Success and Bad response). The parameters of the payment are sent in the message body as a JSON object.

For WeChat POS payments the IsOffline parameter set to true is mandatory to be sent in the request:

  • IsOffline – Offline payment method;

A 201 HTTP response (Created) is returned if the payment was correctly initialized.

For more information about status codes, please go to Basic HTTP Status Codes.

Request: 

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

{
  "Payment": {
    "MerchantTransactionID": "s2ptest_k2",
    "Amount": 11,
    "Currency": "CNY",      
    "MethodID": 1066,
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",      
    "TokenLifetime": 10,
    "Customer": {    
      "Email": "youremail@email.com"   
    },
    "BillingAddress": {
      "Country": "CN"
      },
    "Details": {    
        "IsOffline":"true"
    }
  }
}

Response:

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

{
  "Payment": {
    "ID": 4116540,
    "SkinID": null,
    "ClientIP": null,
    "Created": "20181009113622",
    "MerchantTransactionID": "s2ptest_k2",
    "OriginatorTransactionID": null,
    "Amount": 11,
    "Currency": "CNY",
    "CapturedAmount": null,
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "",
    "MethodID": 1066,
    "MethodOptionID": null,
    "IncludeMethodIDs": null,
    "ExcludeMethodIDs": null,
    "PrioritizeMethodIDs": null,
    "SiteID": 30201,
    "NotificationDateTime": null,
    "Customer": {
      "ID": 340,
      "MerchantCustomerID": null,
      "Email": "youremail@email.com",
      "FirstName": null,
      "LastName": null,
      "Gender": null,
      "SocialSecurityNumber": null,
      "SocialSecurityNumber2": null,
      "Phone": null,
      "Company": null,
      "DateOfBirth": null
      },
    "BillingAddress": {
      "ID": 291,
      "City": null,
      "ZipCode": null,
      "State": null,
      "Street": null,
      "StreetNumber": null,
      "HouseNumber": null,
      "HouseExtension": null,
      "Country": "CN"
      },
    "ShippingAddress": null,
    "Articles": null,
    "Details": null,
    "ReferenceDetails": {
      "BankCode": null,
      "BankName": null,
      "EntityID": null,
      "EntityNumber": null,
      "ReferenceID": null,
      "ReferenceNumber": null,
      "SwiftBIC": null,
      "AccountCurrency": null,
      "AccountNumber": null,
      "AccountHolder": null,
      "IBAN": null,
      "QRCodeURL": "weixin://wxpay/bizpayurl?pr=qXY38eE",
      "Instructions": null
      },
    "CustomParameters": null,
    "PreapprovalID": null,
    "Status": {
      "ID": 1,
      "Info": "Open",
      "Reasons": null
      },
    "MethodTransactionID": null,
    "TokenLifetime": 10,
    "Capture": null,
    "PreapprovalDetails": null,
    "RedirectURL": "https://apitest.smart2pay.com/Home?PaymentToken=73EF92D30E6E3D90ED2E9FE4A9238FC3.4116540"
  }
}

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.

Request:

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

{
  "Payment": {
    "MerchantTransactionID": "s2ptest_k4",
    "Amount": 11,
    "Currency": "CN",      
    "MethodID": 1066,
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",      
    "TokenLifetime": 10,
    "Customer": {    
      "Email": "youremail@email.com"   
    },
    "BillingAddress": {
      "Country": "CN",
    "Details": {    
        "IsOffline": true
      }
    }
  }
}

Response:

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

{
  "Payment": {
    "ID": null,
    "SkinID": null,
    "ClientIP": null,
    "Created": null,
    "MerchantTransactionID": "s2ptest_k4",
    "OriginatorTransactionID": null,
    "Amount": 11,
    "Currency": "CN",
    "CapturedAmount": null,
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": null,
    "MethodID": 1066,
    "MethodOptionID": null,
    "IncludeMethodIDs": null,
    "ExcludeMethodIDs": null,
    "PrioritizeMethodIDs": null,
    "SiteID": null,
    "NotificationDateTime": null,
    "Customer": null,
    "BillingAddress": null,
    "ShippingAddress": null,
    "Articles": null,
    "Details": null,
    "ReferenceDetails": null,
    "CustomParameters": null,
    "PreapprovalID": null,
    "Status": {
      "ID": null,
      "Info": null,
      "Reasons": [
      {
        "Code": 2,
        "Info": "Validation failed - Currency (RegEx: ^[A-Z]{3}$)"
        }
      ]
    },
    "MethodTransactionID": null,
    "TokenLifetime": null,
    "Capture": null,
    "PreapprovalDetails": null,
    "RedirectURL": null
  }
}

Alipay POS Payment Request

Definition: POST https://paytest.smart2pay.com/v1/payments

Below you will find a full example of a payment request for Alipay POS method (with Success and Bad response). The parameters of the payment are sent in the message body as a JSON object.

For Alipay POS payments the following Details parameters are mandatory to be sent in the request:

  • IsOffline – Offline payment method;
  • StoreName – Store name. Can be null only when the store information is verified;
  • StoreId – Store ID;
  • TerminalID – Terminal ID.

A 201 HTTP response (Created) is returned if the payment was correctly initialized.

For more information about status codes, please go to Basic HTTP Status Codes.

Request: 

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

{
  "Payment": {
    "MerchantTransactionID": "s2ptest_k3",
    "Amount": 11,
    "Currency": "CNY",      
    "MethodID": 24,
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",      
    "TokenLifetime": 10,
    "Customer": {    
      "Email": "youremail@email.com"   
    },
    "BillingAddress": {
      "Country": "CN"
      },
    "Details": {    
      "IsOffline": true,
      "StoreName": "Zara Palace Mall",
      "StoreId": "ZA2345",
      "TerminalID": "T8999"
    }
  }
}

Response:

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

{
  "Payment": {
    "ID": 4116562,
    "SkinID": null,
    "ClientIP": null,
    "Created": "20181009113914",
    "MerchantTransactionID": "s2ptest_k3",
    "OriginatorTransactionID": null,
    "Amount": 11,
    "Currency": "CNY",
    "CapturedAmount": null,
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "",
    "MethodID": 24,
    "MethodOptionID": null,
    "IncludeMethodIDs": null,
    "ExcludeMethodIDs": null,
    "PrioritizeMethodIDs": null,
    "SiteID": 30201,
    "NotificationDateTime": null,
    "Customer": {
      "ID": 340,
      "MerchantCustomerID": null,
      "Email": "youremail@email.com",
      "FirstName": null,
      "LastName": null,
      "Gender": null,
      "SocialSecurityNumber": null,
      "SocialSecurityNumber2": null,
      "Phone": null,
      "Company": null,
      "DateOfBirth": null
      },
    "BillingAddress": {
      "ID": 291,
      "City": null,
      "ZipCode": null,
      "State": null,
      "Street": null,
      "StreetNumber": null,
      "HouseNumber": null,
      "HouseExtension": null,
      "Country": "CN"
      },
    "ShippingAddress": null,
    "Articles": null,
    "Details": null,
    "ReferenceDetails": {
      "BankCode": null,
      "BankName": null,
      "EntityID": null,
      "EntityNumber": null,
      "ReferenceID": null,
      "ReferenceNumber": null,
      "SwiftBIC": null,
      "AccountCurrency": null,
      "AccountNumber": null,
      "AccountHolder": null,
      "IBAN": null,
      "QRCodeURL": "",
      "Instructions": null
      },
    "CustomParameters": null,
    "PreapprovalID": null,
    "Status": {
      "ID": 1,
      "Info": "Open",
      "Reasons": null
      },
    "MethodTransactionID": null,
    "TokenLifetime": 10,
    "Capture": null,
    "PreapprovalDetails": null,
    "RedirectURL": "https://apitest.smart2pay.com/Home?PaymentToken=16D936ADDF2358BBDB4F4C1A151E3F4C.4116562"
  }
}

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.

Request:

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

{
  "Payment": {
    "MerchantTransactionID": "s2ptest_k5",
    "Amount": 11,
    "Currency": "CNY",      
    "MethodID": 24,
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",      
    "TokenLifetime": 10,
    "Customer": {    
      "Email": "youremail@email.com"   
    },
    "BillingAddress": {
      "Country": "China"
      },
    "Details": {    
      "IsOffline": true,
      "StoreName": "Zara Palace Mall",
      "StoreId": "ZA2345",
      "TerminalID": "T8999"
    }
  }
}

Response:

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

{
  "Payment": {
    "ID": 4117087,
    "SkinID": null,
    "ClientIP": null,
    "Created": "20181009125002",
    "MerchantTransactionID": "s2ptest_k5",
    "OriginatorTransactionID": null,
    "Amount": 11,
    "Currency": "CNY",
    "CapturedAmount": null,
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": null,
    "MethodID": 24,
    "MethodOptionID": null,
    "IncludeMethodIDs": null,
    "ExcludeMethodIDs": null,
    "PrioritizeMethodIDs": null,
    "SiteID": 30201,
    "NotificationDateTime": "20181009125002",
    "Customer": null,
    "BillingAddress": null,
    "ShippingAddress": null,
    "Articles": null,
    "Details": null,
    "ReferenceDetails": null,
    "CustomParameters": null,
    "PreapprovalID": null,
    "Status": {
      "ID": 4,
      "Info": "Failed",
      "Reasons": [
      {
        "Code": 147,
        "Info": "Address details are invalid (BillingAddress)Country - RegEx: ^[a-zA-Z]{2}$;"
        }
      ]
    },
    "MethodTransactionID": null,
    "TokenLifetime": null,
    "Capture": null,
    "PreapprovalDetails": null,
    "RedirectURL": null
  }
}

Airtel Money (Kenya) Test Data

In order for you to test Airtel Money payment method available in Kenya, please use the below test data.

Airtel Money (Kenya) Test Data
Data Value
Phone 254725362916

Airtel Money (Kenya) Payment Flow

  1. The customer fills in the Phone number.

    1 Payment instructions

  2. The customer receives the details needed to complete the payment.

    1 Payment instructions

  3. Upon completion of the payment flow, the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is a success

Alliance Online Test Data

For Alliance Online payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

Alliance Online Payment Flow

  1. The customer enters his email address, name and phone number.

    1 Customer details

  2. The customer is shown the details of his payment and proceeds to pay with Alliance Online.

    1 Payment details

  3. The customer logs in to his account and completes the payment.

    1 Account login

  4. Upon completion of the payment flow, the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is a success

Settlement invoice reports

    The Settlement invoice reports are a great tool that allows you to verify each transaction and activity in detail, including:


  • Any type of fee that applies at transaction level is reported with great granularity;
  • Information about all the payment methods traded are available in only one report;
  • The report is the confirmation that the payout to you has been made and thus can be reconciled with the entry into the bank account.

Settlement invoice reports are available in XLS, PDF and CSV format. The settlement invoices reports are generated depending on the settlement cycle of each payment method.

Examples of our standard weekly and monthly settlement cycles are provided below:

    Weekly settlement cycle

    The settlement invoice follows our standards weekly settlement cycle, which means that all transactions processed from Friday (day 1) – Thursday (day 7) period, and settled to Smart2Pay (before and after day 7) are invoiced and settled to your account on the following Tuesday (day 12):

  • Transactions period: Friday, May 18th, 2018 00:00 UTC (day 1) – Thursday, May 24th, 2018 23:59 UTC (day 7);
  • Invoice date: Tuesday, May 29th (day 12).

    Monthly settlement cycle

    The settlement invoice follows our standards monthly settlement cycle, which means that all transactions processed from July 1st to July 31st period, and settled to Smart2Pay (before and after July 31st) are invoiced and settled to your account between August 20 – 25th:

  • Transactions period: July 1st, 2018 00:00 UTC (day 1) – July 31st, 2018 23:59 UTC (last day of the month);
  • Invoice date: August 20 – 25th.

Below there are examples of Settlement invoice reports in all supported formats:

The XLS and PDF files are sent by e-mail to a group of people in your organization. Please send an e-mail to support@smart2pay.com and inform which people should be receiving this e-mail.

    The XLS file of each settlement invoice contains details about the successful transactions invoiced per payment method and per SiteID, the fees applied per payment method for each SiteID and the general Smart2Pay account fees. The information appears on separate sheets, as follows:

  • SettlementInvoice = a summary of all information listed in the settlement invoice;

  • Payments = total gross amounts (transactions) you processed via different payment methods and total refunds;

  • Transaction Fees = the fees charged for transactions processed  (according to the signed agreement);

  • Different sheets with transactions processed via a specific payment method (one for each). All payment methods sheets contain certain details per transaction to reconcile them with your system (e.g. PaymentID, InputDateTime, Amount, Currency, Status, Exchange rate, Amount in EUR).

  • Enquiries|Refunds|Reversed|CFTs = details about refunds, payment enquiries, chargebacks, etc.

  • Preapprovals|Mandates = details about preapprovals and mandates.

The CSV files are uploaded on an SFTP server where you can download them from and process them automatically. Please request login details from support@smart2pay.com.

1 Settlement invoice report

The Settlement invoice report file contains the following fields:

  • GPaymentId
    GPaymentId
    Definition
    The ID of the payment in Europay system (can be empty if you are using GlobalPay).
    Type
    int
    – ID of the payment in Europay system (can be empty if you are using GlobalPay);
  • PaymentId
    PaymentId
    Definition
    GlobalPay transaction ID, a unique number that identifies the transaction in the GlobalPay system.
    Type
    int
    Regex
    ^\d{1,12}$
    – ID of the payment in GlobalPay system;
  • Type
    Type
    Definition
    Describes the entry type:
    - Entries depending on a transaction (row has GPaymentID and/or PaymentID): Payment, Refund, Chargeback, Chargeback Reversal, Enquiry;
    - Generic entries: Monthly fee, Account Setup Fee, Account Opening Fee, Account Closing Fee, Account and Transactions Fee VAT, Repatriation Fee, IOF, etc.;
    Type
    string
    – Describes the entry type:
    1. Entries depending on a transaction (row has GPaymentID and/or PaymentID): Payment, Refund, Chargeback, Chargeback Reversal, Enquiry;
    2. Generic entries: Monthly fee, Account Setup Fee, Account Opening Fee, Account Closing Fee, Account and Transactions Fee VAT, Repatriation Fee, IOF, etc.;
  • PaymentMethodName
    PaymentMethodName
    Definition
    The name of the payment method used for the current transaction.
    Type
    string
    – The name of the payment method used for current transaction;
  • CustomerName
    CustomerName
    Definition
    When available, the Customer Name is being displayed in this field.
    Type
    string
    – When available, the Customer Name is being displayed in this field;
  • MerchantName
    MerchantName
    Definition
    Your merchant alias in our system.
    Type
    string
    – Your merchant alias in our system;
  • MerchantId
    MerchantId
    Definition
    Your Merchant Transaction ID – can be used for reconciliation.
    Type
    string
    – Your Merchant Transaction ID – can be used for reconciliation;
  • GtId
    GtId
    Definition
    Oobsolete ID that is not used anymore
    – obsolete ID that is not used anymore;
  • IssuerName
    IssuerName
    Definition
    When available, this field contains the name of the buyer bank.
    Type
    string
    – When available, this field contains the name of the buyer bank;
  • IdealTrxId
    IdealTrxId
    Definition
    For iDeal transactions only, it contains the ID of the transaction from the provider.
    Type
    int
    – For iDeal transactions only, it contains the ID of the transaction from the provider;
  • Country
    Country
    Definition
    Customer‘s country. Format is according to ISO-3166-1 alpha-2, a two-letter code.
    Type
    string
    Regex
    ^[a-zA-Z]{2}$
    – When available, it containts the customer billing country;
  • InputDateTime
    InputDateTime
    Definition
    The data and time when the transaction was initiated in our system (UTC).
    Type
    datetime
    – The data and time when the transaction was initiated in our system (UTC);
  • Amount
    Amount
    Definition
    The amount of the transaction in the currency in which the transaction was initiated
    Type
    int
    Regex
    ^\d{1,12}$
    – The amount of the transaction in the currency in which the transaction was initiated;
  • Currency
    Currency
    Definition
    The currency in which the transaction was initiated. Format is according to ISO 4217, a three-letter code.
    Type
    string
    Regex
    ^[A-Z]{3}$
    – The currency in which the transaction was initiated;
  • Status
    Status
    Definition
    The status of the transaction. Can be one of: Open, Success, Captured, Paid, Partially Captured, Failed, Cancelled, Expired, Dispute Lost, Dispute Won.
    Type
    string
    – The status of the transaction. Can be one of: Open, Success, Captured, Paid, Partially Captured, Failed, Cancelled, Expired, Dispute Lost, Dispute Won.
  • ExchangeRate
    ExchangeRate
    Definition
    The exchange rate used to convert from Currency to Settlement Currency (Reference Currency).
    – The exchange rate used to convert from Currency to Settlement Currency (Reference Currency);
  • CalculatedAmount
    CalculatedAmount
    Definition
    The amount of the transaction in the Settlement Currency (Reference Currency).
    Type
    int
    Regex
    ^\d{1,12}$
    – The amount of the transaction in the Settlement Currency (Reference Currency);
  • ReferenceCurrency
    ReferenceCurrency
    Definition
    Your settlement currency for the current transaction. Format is according to ISO 4217, a three-letter code.
    Type
    string
    Regex
    ^[A-Z]{3}$
    – Your settlement currency for the current transaction;
  • PaymentMethodFee
    PaymentMethodFee
    Definition
    The payment method fee charged for the current transaction.
    – The payment method fee charged for the current transaction;
  • TransactionFeePerSuccess
    TransactionFeePerSuccess
    Definition
    The transaction fee that is applied for successful transactions (completed).
    – The transaction fee that is applied for successful transactions (completed);
  • TransactionFeePerAttempt
    TransactionFeePerAttempt
    Definition
    The transaction fee that is applied for each successful and unsuccessful transaction processed through Smart2Pay.
    – The transaction fee that is applied for each successful and unsuccessful transaction processed through Smart2Pay;
  • IssuedFee
    IssuedFee
    Definition
    An additional transaction fee used for specific payment methods
    – An additional transaction fee used for specific payment methods;
  • LocalVatFee
    LocalVatFee
    Definition
    The local value-added tax (VAT) applied for Payment Method Fee and/or for transaction’s value for specific countries, depending on the case.
    – The local value-added tax (VAT) applied for Payment Method Fee and/or for transaction’s value for specific countries, depending on the case;
  • VAT
    VAT
    Definition
    Value-added tax (VAT) charged by Smart2Pay for PaymentMethodFee, TransactionFeePerSuccess, TransactionFeePerAttempt and Account Fees according to EU Vat regulations if necessary – field currently not used, but the information is available as additional rows at the bottom of the file.
    – Value-added tax (VAT) charged by Smart2Pay for PaymentMethodFee, TransactionFeePerSuccess, TransactionFeePerAttempt and Account Fees according to EU Vat regulations if necessary – field currently not used, but the information is available as additional rows at the bottom of the file;
  • InvoiceNumber
    InvoiceNumber
    Definition
    The number of the invoice
    – The number of the invoice;
  • InvoiceDate
    InvoiceDate
    Definition
    The date the invoice was issued
    Type
    datetime
    – The date the invoice was issued.
  • SpecificDetails
    SpecificDetails
    Definition
    Specific details provided.
    Type
    string
    – Specific details provided;

Transactional reports

The transactional reports generated can be uploaded periodically on our SFTP server where you can download them from and process them automatically. Please request login details from support@smart2pay.com.

The transactional reports are available in CSV format. By default these reports are generated every Friday (weekly) but upon request the frequency can be changed to daily.

Below there are examples of transactional reports in CSV format:

  • All transactions initiated, no matter the status of the payment: MerchantDemo_ATTEMPTS_2018_07_07;

    The generated transactional report contains transactions with all the statuses we process for your merchant account.

  • The transactions with Success status: MerchantDemo_SUCCESS_2018_07_07;

    In case a transaction was exported with a status (any status except Success), but at a later time the status changed to Success (and only Success), GlobalPay will notify again the payment with the success status and the payment will be exported in a separate report (the format is the same) and the report filename ends in “_success”.

  • The list of refunds: MerchantDemo_REFUNDS_2018_07_07;
  • The list of refunds for SmartCards payment method: MerchantDemo_SMARTCARDS_REFUNDS_2018_07_07.

1 Transactional report

The transactional report file with Success transactions contains the following information:

  • Id
    Id
    Definition
    GlobalPay transaction ID, a unique number that identifies the transaction in the GlobalPay system.
    Type
    int
    Regex
    ^\d{1,12}$
    – GlobalPay transaction ID, a unique number that identifies the transaction in the GlobalPay system;
  • MerchantTransactionID
    MerchantTransactionID
    Definition
    Merchant Transaction ID, a number that uniquely identifies a transaction in your system.
    Type
    string
    Regex
    ^[0-9a-zA-Z_-]{1,50}$
    – Merchant Transaction ID, a number that uniquely identifies a transaction in your system;
  • InputDateTime
    InputDateTime
    Definition
    Date and time when the transaction was created in GlobalPay system.
    Type
    datetime
    – Date and time when the transaction was created in GlobalPay system;
  • Status
    Status
    Definition
    The status of the transaction. It can have the following values: Open, Success, Cancelled, Failed, Expired, Authorized.
    Type
    string
    – The status of the transaction. It can have the following values: Open, Success, Cancelled, Failed, Expired, Authorized;
  • MerchantAmount
    MerchantAmount
    Definition
    The amount of the transaction.
    Type
    int
    Regex
    ^\d{1,12}$
    – The amount of the transaction;
  • MerchantCurrency
    MerchantCurrency
    Definition
    The currency in which the transaction was initiated. Format is according to ISO 4217, a three-letter code.
    Type
    string
    Regex
    ^[A-Z]{3}$
    – The currency in which the transaction was initiated;
  • MethodID
    MethodID
    Definition
    The ID of the payment method.
    Type
    int
    Regex
    ^([0-9]{1,10})$
    – The ID of the payment method;
  • ReportedByBOTOperatorDate
    ReportedByBOTOperatorDate
    Definition
    The date when the transaction was exported in a SFTP/CSV file.
    Type
    datetime
    – The date when the transaction was exported in a SFTP/CSV file;
  • CapturedAmount
    CapturedAmount
    Definition
    The payment‘s captured amount.
    Type
    int
    Regex
    ^\d{1,12}$
    – The payment‘s captured amount;
  • MethodName
    MethodName
    Definition
    The name of the payment method used.
    Type
    string
    – The name of the payment method used;
  • PaymentStateDefID
    PaymentStateDefID
    Definition
    The ID of the payment status. It can have the following values: 1 - Open, 2 - Success, 3 - Cancelled, 4 - Failed, 5 - Expired, 9 - Authorized.
    Type
    int
    – The ID of the payment status;
  • SpecificDetails
    SpecificDetails
    Definition
    Specific details provided.
    Type
    string
    – Specific details provided;
  • ReconciliationProviderID
    ReconciliationProviderID
    Definition
    A payment identification ID used at the provider’s end.
    Type
    int
    – A payment identification ID used at the provider’s end;
  • ProviderTransactionID
    ProviderTransactionID
    Definition
    Internal ID used for payment notification within our system.
    Type
    int
    – Internal ID used for payment notification within our system;
  • MerchantAlias
    MerchantAlias
    Definition
    Your merchant alias in our system.
    Type
    string
    – Your merchant alias in our system;
  • MerchantSiteID
    MerchantSiteID
    Definition
    GlobalPay website ID, a unique number that identifies the website in the GlobalPay system.
    Type
    int
    Regex
    ^\d{1,12}$
    – The ID of your site in our system;
  • MerchantSiteAlias
    MerchantSiteAlias
    Definition
    Site alias, an alternative name that identifies the website in the GlobalPay system.
    Type
    string
    Regex
    ^.{1,255}$
    – Your site alias in our system;
  • RootProviderTransactionID
    RootProviderTransactionID
    Definition
    The transaction ID from the provider.
    Type
    int
    – The transaction ID from the provider;
  • Country
    Country
    Definition
    Customer‘s country. Format is according to ISO-3166-1 alpha-2, a two-letter code.
    Type
    string
    Regex
    ^[a-zA-Z]{2}$
    – When available, it containts the customer billing country.

Dashboard reports

The Dashboard reports contain a complete list of all the transactions made with the payment methods assigned to your merchant account. You have the possibility to search for specific payments using different criteria, to see the details of the payment invoice and fees, and to export your payments into an XLS file. These reports can be exported from GlobalPay Dashboard.

For more information regarding Dashboard reports, please visit our dedicated section: GlobalPay Merchant Dashboard.

MTN (Zambia) Test Data

In order for you to test MTN payment method available in Zambia, please use the below test data.

MTN (Zambia) Test Data
Data Value
Phone 260214002248

MTN (Zambia) Payment Flow

  1. The customer fills in the Phone number.

    1 Payment instructions

  2. The customer receives the details needed to complete the payment.

    1 Payment instructions

  3. The customer dials *303# to access the MTN Mobile Money menu.

    1 Payment instructions

  4. The customer selects Pay Bill option from the menu.

    1 Payment instructions

  5. The customer selects Goods and Services option from the menu.

    1 Payment instructions

  6. The customer enters the merchant ID. For test purposes, please use: 3GDP.

    1 Payment instructions

  7. The customer enters the amount.

    1 Payment instructions

  8. The customer enters the payment reference number. For test purposes, please use: 8417CE8C.

    1 Payment instructions

  9. The customer enters the PIN to complete the payment and receives a message that the payment was successful.

    1 Payment instructions

MTN (Rwanda) Test Data

For MTN payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

MTN (Rwanda) Payment Flow

  1. The customer fills in the Phone number.

    1 Payment instructions

  2. The customer receives the details needed to complete the payment.

    1 Payment instructions

  3. The customer receives a mobile request to complete the payment. He has to select the transaction with the amount in RWF currency.

    1 Payment instructions

  4. The customer accepts or rejects the payment.

    1 Payment instructions

  5. The customer enters the mobile money PIN to complete the payment. He will receive an SMS confirmation of the transaction from MTN.

    1 Payment instructions

M-Pesa (Tanzania) Test Data

In order for you to test M-Pesa payment method available in Tanzania, please use the below test data.

M-Pesa (Tanzania) Test Data
Data Value
Phone 255653560949

M-Pesa (Tanzania) Payment Flow

  1. The customer fills in the Phone number.

    1 Payment instructions

  2. The customer receives the details needed to complete the payment.

    1 Payment instructions

  3. Upon completion of the payment flow, the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is a success

Tigo Test Data

For Tigo payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

Tigo Payment Flow

  1. The customer fills in the Phone number.

    1 Payment instructions

  2. The customer receives the details needed to complete the payment.

    1 Payment instructions

  3. Upon completion of the payment flow, the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is a success

MTN Test Data

In order for you to test MTN payment method available in Uganda, please use the below test data.

MTN Test Data
Data Value
Phone 256387676229

For MTN payment method available in Rwanda and Zambia, you can see how it works with the payment flows given here: MTN (Rwanda) Payment Flow and MTN (Zambia) Payment Flow.

MTN (Unganda) Payment Flow

  1. The customer fills in the Phone number.

    1 Payment instructions

  2. The customer receives the details needed to complete the payment.

    1 Payment instructions

  3. The customer dials *165# and selects from the menu the Payments option.

    1 Payment instructions

  4. The customer enters 3G as the Merchant Code.

    1 Payment instructions

  5. The customer enters the payment reference number. For test purposes, please use: 8412BA96.

    1 Payment instructions

  6. The customer enters the amount.

    1 Payment instructions

  7. The customer sees the payment details and enters the PIN to complete the payment.

    1 Payment instructions

Airtel Money Test Data

In order for you to test Airtel Money payment method available in Tanzania, please use the below test data.

Airtel Money (Tanzania) Test Data
Data Value
Phone 255737306783
For Airtel Money payment method available in Kenya, you can see how it works with the payment flow given here: Airtel Money (Kenya) Payment Flow.

Airtel Money (Tanzania) Payment Flow

  1. The customer fills in his phone number.

    1 Payment instructions

  2. The customer receives the details needed to complete the payment.

    1 Payment instructions

  3. Upon completion of the payment flow, the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is a success

M-Pesa Test Data

In order for you to test M-Pesa payment method, please use the below test data.

M-Pesa Test Data
Data Value
Phone 254716737623

For M-Pesa payment method available in Tanzania, you can see how it works with the payment flow given here: M-Pesa (Tanzania) Payment Flow.

M-Pesa (Kenya) Payment Flow

  1. The customer fills in the Phone number.

    1 Payment instructions

  2. The customer receives the details needed to complete the payment.

    1 Payment instructions

  3. The customer receives a push notification to his mobile and confirms the payment.

    1 Payment instructions

  • In case the customer has not received the M-Pesa prompt on his phone, there is another possibility to complete a M-Pesa payment flow by following the instructions:
  1. The customer opens the SIM Tool Kit and selects “M-Pesa” menu.

    1 Payment instructions

  2. The customer selects “Lipa na M-Pesa”.

    1 Payment instructions

  3. The customer selects the “Pay Bill” option.

    1 Payment instructions

  4. The customer enters his business number.

    1 Payment instructions

  5. The customer enters his account number.

    1 Payment instructions

  6. The customer needs to enter the amount.

    1 Payment instructions

  7. The customer needs to enter his M-Pesa PIN number and press “OK” button to complete the payment.

    1 Payment instructions

  8. The customer receives the payment details. If the details are correct he needs to press “OK” button to confirm the payment.

    1 Payment instructions

Ininal Test Data

For Ininal payment method test data is available on demand. Please contact our support department at support@smart2pay.com for more information.

Ininal Payment Flow

  1. The customer enters his phone number and his email address.

    1 Enter customer details

  2. The customer receives a 6-digit verification code at the phone number that he previously added. He needs to enter the 6-digit code and click the Confirm button.

    1 SMS Verification

  3. The Customer enters his Ininal card information and confirms the payment.

    1 Payment confirmation

  4. Upon completion of the payment flow, the customer is redirected to your ReturnUrl.

    1 Return page when the redirection status is a success

Cards Turkey Test Data

For Cards Turkey payment method test data is available on demand. Please contact our support department at support@smart2pay.com for more information.

Cards Turkey Payment Flow

  1. The customer enters his phone number and his email address.

    1 Enter customer details

  2. The customer receives a 6-digit verification code at the phone number that he previously added. He needs to enter the 6-digit code and click the Confirm button.

    1 SMS Verification

  3. The Customer enters his credit card details and confirms the payment.

    1 Payment confirmation

  4. Upon completion of the payment flow, the customer is redirected to your ReturnUrl.

    1 Return page when the redirection status is a success

BKM Express Test Data

For BKM Express payment method test data is available on demand. Please contact our support department at support@smart2pay.com for more information.

BKM Express Payment Flow

  1. The customer enters his phone number and his email address.

    1 Enter customer details

  2. The customer receives a 6-digit verification code at the phone number that he previously added. He needs to enter the 6-digit code and click the Confirm button.

    1 SMS Verification

  3. The Customer logs in to his BKM Express account with his email address and password.

    1 Account login

  4. The customer verifies the payment information and the user details and completes the transaction by clicking on the Perform Payment button.

    1 Perform payment

  5. Upon completion of the payment flow, the customer is redirected to your ReturnUrl.

    1 Return page when the redirection status is a success

Bank Transfer Turkey Test Data

For Bank Transfer Turkey payment method test data is available on demand. Please contact our support department at support@smart2pay.com for more information.

Bank Transfer Turkey Payment Flow

  1. The customer enters his phone number and his email address.

    1 Enter customer details

  2. The customer chooses the desired bank from the list provided.

    1 SMS Verification

  3. The customer enters his phone number and the verification code and clicks on the Approve button.

    1 SMS Verification

  4. The customer will receive a message that the bank information were sent to his mobile phone via sms. He just needs to write his GPM registered mobile phone to explain his payment.

    1 Perform payment

Yandex.Money Refund Request (Fiscalization)

This setup is required for the Merchants that decide to setup the interaction with their online sales register via Yandex.Checkout.

For Yandex.Money the refunds can be full and/or partial depending if you have to return all the money to customer or not. A particular case is for Partial refund as you will need to provide additional parameters.

Below there are two examples of a refund request: one for a full refund, where no additional parameters are needed and one for a partial refund, where additional parameters are needed.

Definition: POST /v1/payments/{id}/refunds

Where:
  • {id} – GlobalPay Payment ID

A 201 HTTP response (Created) is returned if the refund was correctly initialized.

Full refund means you can only refund the entire paid amount for the initial transaction. For full refund you only need to send the Amount parameter, like in the below example:

Request:

POST https://paytest.smart2pay.com/v1/payments/3005389123/refunds
Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=

{
  "Refund": {
    "MerchantTransactionID": "s2ptest_g28_b",
    "Amount": 100
   }
}

Response:

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

{
  "Refund": {
    "ID": 1640512,
    "Created": "20170803095139",
    "MerchantTransactionID": "s2ptest_g28_b",
    "OriginatorTransactionID": null,
    "InitialPaymentID": 3005389123,
    "Amount": 100,
    "Currency": "EUR",
    "Description": null,
    "TypeID": 5,
    "SiteID": 30201,
    "Details": null,
    "Customer": null,
    "BillingAddress": null,
    "BankAddress": null,
    "Articles": null,
    "Status": {
      "ID": 1,
      "Info": "Open",
      "Reasons": null
    }
  }
}

For Yandex.Money a particular case is for Partial refund as you will need to provide the below additional parameters in request: Merchant Article ID and Quantity, like in the below example:

Request:

POST https://paytest.smart2pay.com/v1/payments/3006154123/refunds
Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=

{
  "Refund": {
    "MerchantTransactionID": "YandexPartialRefund",
    "Amount": 980,
    "Articles": [
      {
        "MerchantArticleID": "1231",
        "Quantity": 1
      }
    ]
  }
}

Response:

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

{
  "Refund": {
    "ID": 0,
    "Created": null,
    "MerchantTransactionID": "YandexPartialRefund",
    "OriginatorTransactionID": null,
    "InitialPaymentID": 3006154123,
    "Amount": 980,
    "Currency": null,
    "Description": null,
    "TypeID": 0,
    "SiteID": 30201,
    "Details": null,
    "Customer": null,
    "BillingAddress": null,
    "BankAddress": null,
    "Articles": [
      {
        "MerchantArticleID": "1231",
        "Name": null,
        "Quantity": 1,
        "Price": 0,
        "VAT": 0,
        "Discount": 0,
        "Type": null,
        "DiscountValue": 0
      }
    ],
    "Status": {
      "ID": 1,
      "Info": "Open",
      "Reasons": null
    }
  }
}

Cards Russia Refund Request (Fiscalization)

This setup is required for the Merchants that decide to setup the interaction with their online sales register via Yandex.Checkout.

For Cards Russia the refunds can be full and/or partial depending if you have to return all the money to customer or not. A particular case is for Partial refund as you will need to provide additional parameters.

Below there are two examples of a refund request: one for a full refund, where no additional parameters are needed and one for a partial refund, where additional parameters are needed.

Definition: POST /v1/payments/{id}/refunds

Where:
  • {id} – GlobalPay Payment ID

A 201 HTTP response (Created) is returned if the refund was correctly initialized.

Full refund means you can only refund the entire paid amount for the initial transaction. For full refund you only need to send the Amount parameter, like in the below example:

Request:

POST https://paytest.smart2pay.com/v1/payments/300538912/refunds
Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=

{
  "Refund": {
    "MerchantTransactionID": "s2ptest_g28_a",
    "Amount": 100
   }
}

Response:

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

{
  "Refund": {
    "ID": 16405,
    "Created": "20170803095139",
    "MerchantTransactionID": "s2ptest_g28_a",
    "OriginatorTransactionID": null,
    "InitialPaymentID": 300538912,
    "Amount": 100,
    "Currency": "EUR",
    "Description": null,
    "TypeID": 5,
    "SiteID": 30201,
    "Details": null,
    "Customer": null,
    "BillingAddress": null,
    "BankAddress": null,
    "Articles": null,
    "Status": {
      "ID": 1,
      "Info": "Open",
      "Reasons": null
    }
  }
}

For Cards Russia a particular case is for Partial refund as you will need to provide the below additional parameters in request: Merchant Article ID and Quantity, like in the below example:

Request:

POST https://paytest.smart2pay.com/v1/payments/3006154/refunds
Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=

{
  "Refund": {
    "MerchantTransactionID": "YandexPartialRefund",
    "Amount": 980,
    "Articles": [
      {
        "MerchantArticleID": "1231",
        "Quantity": 1
      }
    ]
  }
}

Response:

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

{
  "Refund": {
    "ID": 0,
    "Created": null,
    "MerchantTransactionID": "YandexPartialRefund",
    "OriginatorTransactionID": null,
    "InitialPaymentID": 3006154,
    "Amount": 980,
    "Currency": null,
    "Description": null,
    "TypeID": 0,
    "SiteID": 30201,
    "Details": null,
    "Customer": null,
    "BillingAddress": null,
    "BankAddress": null,
    "Articles": [
      {
        "MerchantArticleID": "1231",
        "Name": null,
        "Quantity": 1,
        "Price": 0,
        "VAT": 0,
        "Discount": 0,
        "Type": null,
        "DiscountValue": 0
      }
    ],
    "Status": {
      "ID": 1,
      "Info": "Open",
      "Reasons": null
    }
  }
}

Online Banking Vietnam Test Data

For Online Banking Vietnam payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

Online Banking Vietnam Payment Flow

  1. The customer enters his Email Address (the below page can be skipped by sending the parameter in the payment request).

    1 Enter Email Address

  2. The customer has to choose his preferred payment option from the given list.

    1 Choose payment option

  3. The customer needs to enter the necessary credit card information: Name of the Cardholder, Card Number and Expiration Date. Then he needs to confirm the payment.

    1 Code via text message

  4. The customer receives a message that the payment was successfully processed.

    1 Payment successfully processed

  5. Upon completion of the payment flow, the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is a success

Cards Vietnam Test Data

For Cards Vietnam payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

Cards Vietnam Payment Flow

  1. The customer enters his Email Address (the below page can be skipped by sending the parameter in the payment request).

    1 Enter Email Address

  2. The customer has to choose his preferred payment option from the given list.

    1 Choose card

  3. The customer needs to enter the necessary credit card information and billing information. Then he needs to confirm the payment.

    1 Code via text message

  4. The customer receives a message that the payment was successfully processed.

    1 Payment successfully processed

  5. Upon completion of the payment flow, the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is a success

VTC Pay Wallet Test Data

For VTC Pay Wallet payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

VTC Pay Wallet Payment Flow

  1. The customer enters his Email Address (the below page can be skipped by sending the parameter in the payment request).

    1 Enter Email Address

  2. The customer logs in to his VTC Pay Wallet account by using his account number and password.

    1 Account login

  3. The customer will receive a a code via text message to his phone number which he needs to enter to confirm the payment.

    1 Code via text message

  4. The customer receives a message that the payment was successfully processed.

    1 Payment successfully processed

  5. Upon completion of the payment flow, the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is a success

VTC Pay Test Data

For VTC Pay payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

VTC Pay Payment Flow

  1. The customer enters his Email Address (the below page can be skipped by sending the parameter in the payment request).

    1 Enter Email Address

  2. The customer has to choose his preferred payment method from the list.

    1 Choose payment method

  3. After choosing the payment method the customer logs in to his VTC Pay account by using his account number and password.

    1 Account login

  4. The customer will receive a a code via text message to his phone number which he needs to enter to confirm the payment.

    1 Code via text message

  5. The customer receives a message that the payment was successfully processed.

    1 Payment successfully processed

  6. Upon completion of the payment flow, the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is a success

Local Bank Transfer 2 API – refund flow

Full or partials Local Bank Transfer 2 API refunds are made by using Initiate Refund button from Payments tab.

The Initiate Refund button is displayed only for transactions with status Success.

50

A pop-up window with the transaction details will be displayed. The Refund Merchant Transaction ID is automatically generated. You can change this ID by introducing your ID value.

If you want to perform a full refund you will have to fill Refund Amount with the same Amount as Payment Amount.

In the case you want to perform a partial refund you have to fill the Refund Amount with a smaller amount than the Payment Amount. You can perform more than one refund for a transaction with the limitation that the sum of partial refunds to be smaller or equal than the initial paid amount.

The refunds for most LATAM payment methods are made by our local provider. In order for the refund to be processed the customer bank details are required.

There are 2 possibilities: one where the Customer bank details are sent in full in the request. In this case the refund should be processed within 48 hours.

The other one is when the Customer bank details are not sent in request. However in this case, the local provider will contact the customer in order to obtain the bank details so the refund can be performed.

51

A confirmation message will be displayed:

52

In a few moments the refund will be processed.

If the refund is still processing and you perform another refund for the same successful transaction the following message will be displayed:

53

You can see the complete list of all of your refunds in the Refunds tab.

54

Get the number of installments per country

You can get information about the number of installments available per country and BIN (Bank Identification Number) by using the following GET HTTP request.

Definition: GET /v1/installments?country={countryCode}&bin={bin}

Where:
  • {bin} – The Bank’s Identification Number

Request:

GET https://securetest.smart2pay.com/v1/installments?country=AR&bin=512345
Authorization: Basic MTAxMDpnYWJp

Response:

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

{
  "Country": "AR",
    "BIN": "512345",
    "CardBrand": "MasterCard",
    "CardSubBrand": "MasterCard",
    "Installments": [
    {
      "Number": "3",
      "Rate": "1097"
    },
    {
      "Number": "6",
      "Rate": "1951"
    },
    {
      "Number": "9",
      "Rate": "3146"
    },
    {
      "Number": "12",
      "Rate": "4211"
    }
  ]
}

Cancel a Credit Card Token

Definition: POST /v1/card/token/{value}/cancel

Where:
  • {value} – the value of the credit card token used for Recurring Payments

You have the possibility to cancel a credit card token by using the above action.

A 200 HTTP response (OK) is returned if the request was completed successfully.

Request:

POST https://securetest.smart2pay.com/v1/card/token/B531AFAC800FD51A9CCF67D0CC7B24A4/cancel
Authorization: Basic MTAxMDpnYWJp

Response:

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

{
  "CardAuthentication": { 
    "Card": {
      "HolderName": "John Doe",
      "Number": "VISA-1111",
      "ExpirationMonth": "02",
      "ExpirationYear": "2019"
    },
    "CreditCardToken": {
      "Value": "B531AFAC800FD51A9CCF67D0CC7B24A4",
      "Active": "false"
    },
    "Status": {
      "ID": 3,
      "Info": "Canceled",
      "Reasons": []
    }
  }
}

Get information on a specific card token

Definition: GET /v1/card/token/{value}

Where:
  • {value} – the value of the credit card token used for Recurring Payments

You can get more information about a specific credit card token by using an action based on GET HTTP request. Please be aware that only a limited amount of details for each token will be provided.

A 200 HTTP response (OK) is returned if the request was completed successfully.

Request:

GET https://securetest.smart2pay.com/v1/card/token/B531AFAC800FD51A9CCF67D0CC7B24A4
Authorization: Basic MTAxMDpnYWJp

Response:

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

{
  "CardAuthentication": {                 
    "Card": {
      "HolderName": "John Doe",
      "Number": "VISA-1111",
      "ExpirationMonth": "02",
      "ExpirationYear": "2019"
    },
    "CreditCardToken": {
      "Value": "B531AFAC800FD51A9CCF67D0CC7B24A4",
      "Active": "true"
    }                            
  }
}

Generate a Credit Card Token

To initiate Recurring Card Payments, you must generate first a credit card token. The credit card token can be obtained in two ways:

  • by initiating a payment request with GenerateCreditCardToken parameter set to true. For more detailed information, please go to our section Recurring Card Payments;
  • by using the following action for Card Authentication based on POST HTTP request:

Definition: POST /v1/card/authenticate

By using the Card Authentication request with all the necessary details for customer and for credit card, a token element will be sent in the response, containing the value of the newly created credit card token. The token received in the response can be used to initiate future Recurring Payments.

Request:

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

{
  "CardAuthentication": {
    "Customer": {
      "FirstName": "John",
      "LastName": "Doe",
      "Email": "testing2@test.com",
      "SocialSecurityNumber": "00003456789"
      },
    "BillingAddress": {
      "Country": "BR"
      },
    "Card": {
      "HolderName": "John Doe",
      "Number": "4111111111111111",
      "ExpirationMonth": "02",
      "ExpirationYear": "2019",
      "SecurityCode": "312"
    }
  }
}

Response:

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

{
  "CardAuthentication": {
    "Customer": {
      "ID": 0,
      "MerchantCustomerID": null,
      "Email": "testing2@test.com",
      "FirstName": "John",
      "LastName": "Doe",
      "Gender": null,
      "SocialSecurityNumber": "00003456789",
      "Phone": null,
      "Company": null
      },
    "BillingAddress": {
      "ID": 0,
      "City": null,
      "ZipCode": null,
      "State": null,
      "Street": null,
      "StreetNumber": null,
      "HouseNumber": null,
      "HouseExtension": null,
      "Country": "BR"
      },
    "Card": {
      "HolderName": "John Doe",
      "Number": "VISA-1111",
      "ExpirationMonth": "02",
      "ExpirationYear": "2019"
      },
    "CreditCardToken": {
      "Value": "B531AFAC800FD51A9CCF67D0CC7B24A4",
      "Active": "true"
    },
    "Status": {
      "ID": 2,
      "Info": "Success",
      "Reasons": []
    }
  }
}

Resilience

By default the SDK supports Automatic Retries with Exponential Delay and Circuit Breaker.

The default configuration values for Retry and Circuit Breaker are the following:

Retry Configuration
Retry Count 3 Retries 3 times
DelayExponentialFactor 2 Wait time between retries is Math.Pow(2, retryAttempt)
Circuit Breaker Configuration
CircuitBreaker FailureThreshold 0.7 Break on >=70% actions result in handled exception
SamplingDuration TimeSpan.FromSeconds(60) Over any 60 seconds period
MinimumThroughput 16 Provided at least 16 actions in the 60 seconds period
DurationOfBreak TimeSpan.FromSeconds(60) Break for 60 seconds

If you want to change these values you will have to create your own Resilience configuration reference:

var configuration = new ResilienceConfiguration
        {
            Retry = new RetryConfiguration
            {
                Count = 5, // Retries 3 times
                DelayExponentialFactor = 5 // Wait time between retries is Math.Pow(2, retryAttempt)
            },
            CircuitBreaker = new CircuitBreakerConfiguration
            {
                FailureThreshold = 0.5, // Break on >=50% actions result in handled exceptions
                SamplingDuration = TimeSpan.FromSeconds(30), // over any 30 seconds period
                MinimumThroughput = 10, // provided at least 10 actions in the 30 seconds period.
                DurationOfBreak = TimeSpan.FromSeconds(90) // Break for 90 seconds.
            }
        };
        };


var httpClientBuilder = new HttpClientBuilder(() => AuthenticationConfiguration).WithResilienceConfiguration(configuration);

Idempotence

Our API supports idempotence for safely retrying requests and guarantees that the operation is performed only once. For example, if you create a card payment that fails due to a network connection error, you can retry the request with the same idempotence key to guarantee that only a single card payment is created.

The SDK by default uses Guid.NewGuid().ToString() to generate Unique Keys. We strongly recommend to generate your own Unique Keys using V4 UUIDs or another appropriately random string.

For card payments we’ll always send back the same response for requests made with the same key, and keys can’t be reused with different request parameters. Keys expire after 24 hours.This is how you can plug in your Unique Key Generator:

var uniqueKeyGenerator = new Func<string>(() => {/* write your custom unique key generator logic and return a string */});
var httpClientBuilder = new HttpClientBuilder(() => AuthenticationConfiguration).WithIdempotencyKeyGenerator(uniqueKeyGenerator);

After you perform a Create Payment this is how you can obtain the Unique Key:

var createPaymentResult = await paymentService.InitiatePaymentAsync(paymentRequest);
var uniquKey = createPaymentResult.HttpRequest.Headers.GetIdempotencyToken();

INotificationCallback Interface

Notification Callback Interface
Documentation Method
Alternative Payment Notification Task<bool> AlternativePaymentNotificationCallbackAsync(ApiAlternativePaymentResponse alternativePaymentNotification);
Card Payment Notification Task<bool> CardPaymentNotificationCallbackAsync(ApiCardPaymentResponse cardPaymentNotification);
Refund Notification Task<bool> RefundNotificationCallbackAsync(ApiRefundResponse refundNotification);
Preapproval Notification Task<bool> PreapprovalNotificationCallbackAsync(ApiPreapprovalResponse preapprovalNotification);
Card Payout Notification Task<bool> CardPayoutNotificationCallbackAsync(ApiCardPayoutResponse cardPayoutNotification);
Chargebacks API Task<bool> DisputeNotificationCallbackAsync(ApiDisputeResponse disputeNotification);
Task<bool> InvalidFormatNotificationCallbackAsync(InvalidFormatNotification invalidFormatNotification);
This callback will be raised if the notification body is not in a correct Json format. You will be able to see the Exception and the Notification Body. We just recommend you to log them and not to implement any logic in this callback.
Task<bool> UnknownTypeNotificationCallbackAsync(UnknownTypeNotification unknownTypeNotification);
This callback will be raised if the notification body is in a correct Json format, but we cannot determine the type of notification. We just recommend you to log it and not to implement any logic in this callback.

Smart2Pay SDK .NET Notification

We offer you the possibility to receive notifications for every type of service used. We will notify you about the status changes to the Notification URL you setup in the Merchant Dashboard.

In order to receive notifications you need to expose REST – endpoint which accepts POSTs.

You need to implement the INotificationCallback Interface. The interface exposes asynchronous methods that return Task<bool> and uses true/false values to indicate success/failure.

Please make sure to handle your exceptions; if the SDK catches an exception it will consider that the callback has failed. The SDK will return Http 204 (No content) if the callback succeeds or it will return Http 500 (Internal Server Error) if the callback returns false or if an exception is caught.

In your POST action handler you will need an reference of INotificationProcessor type, you will need to read the Notification Body as a string and pass that string as an argument to ProcessNotificationBodyAsync method.

For more information, please visit our sections on GitHub: ASP.NET Core 1.1 and ASP.NET WebApi. Please note that examples do not implement security, but you will have to do it in your application.

To ensure that a notification has been securely processed you will need to validate the authorization header using your SiteID and API Key in the same manner you compute the authorization header for a request. For more details, please go to Authentication section.

Also, you will have to whitelist Smart2Pay’s IPs for Test and Live Environment.
Here you will find the complete list of GlobalPay’s Environments and IPs.

Refund Service

Refund Service
Documentation Method Supports cancellation Supports idempotency
Get information on a specific refund Task<ApiResult<ApiRefundResponse>> GetRefundAsync(long paymentId, int refundId, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiRefundResponse>> GetRefundAsync(long paymentId, int refundId); No No
Get a list of refunds of a specific payment Task<ApiResult<ApiRefundListResponse>> GetRefundListAsync(long paymentId, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiRefundListResponse>> GetRefundListAsync(long paymentId); No No
Get the status of a refund for a card payment Task<ApiResult<ApiCardRefundStatusResponse>> GetRefundStatusAsync(long paymentId, int refundId, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiCardRefundStatusResponse>> GetRefundStatusAsync(long paymentId, int refundId); No No
Create a Refund Task<ApiResult<ApiRefundResponse>> CreateRefundAsync(long paymentId, ApiRefundRequest refundRequest, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiRefundResponse>> CreateRefundAsync(long paymentId, ApiRefundRequest refundRequest); No No
Task<ApiResult<ApiRefundResponse>> CreateRefundAsync(long paymentId, ApiRefundRequest refundRequest, string idempotencyToken, CancellationToken cancellationToken); Yes Yes
Task<ApiResult<ApiRefundResponse>> CreateRefundAsync(long paymentId, ApiRefundRequest refundRequest, string idempotencyToken); No Yes
Get refund types for a certain payment Task<ApiResult<ApiRefundTypeListResponse>> GetRefundTypesAsync(long paymentId, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiRefundTypeListResponse>> GetRefundTypesAsync(long paymentId); No No
Get refund types (filtered) Task<ApiResult<ApiRefundTypeListResponse>> GetRefundTypesAsync(short paymentMethodId, string countryCode, string currency, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiRefundTypeListResponse>> GetRefundTypesAsync(short paymentMethodId, string countryCode, string currency); No No

Preapproval Service

Preapproval Service
Documentation Method Supports cancellation Supports idempotency
Get information on a specific Preapproval Task<ApiResult<ApiPreapprovalResponse>> GetPreapprovalAsync(int preapprovalId, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiPreapprovalResponse>> GetPreapprovalAsync(int preapprovalId); No No
Get a list of preapprovals Task<ApiResult<ApiPreapprovalListResponse>> GetPreapprovalListAsync(CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiPreapprovalListResponse>> GetPreapprovalListAsync(); No No
Get all payments associated with a preapproval Task<ApiResult<ApiPaymentListResponse>> GetPreapprovalPaymentsAsync(int preapprovalId, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiPaymentListResponse>> GetPreapprovalPaymentsAsync(int preapprovalId); No No
Create a Preapproval Task<ApiResult<ApiPreapprovalResponse>> CreatePreapprovalAsync(ApiPreapprovalRequest preapprovalRequest, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiPreapprovalResponse>> CreatePreapprovalAsync(ApiPreapprovalRequest preapprovalRequest); No No
Task<ApiResult<ApiPreapprovalResponse>> CreatePreapprovalAsync(ApiPreapprovalRequest preapprovalRequest, string idempotencyToken, CancellationToken cancellationToken); Yes Yes
Task<ApiResult<ApiPreapprovalResponse>> CreatePreapprovalAsync(ApiPreapprovalRequest preapprovalRequest, string idempotencyToken); No Yes
Change a Preapproval Task<ApiResult<ApiPreapprovalResponse>> ChangePreapprovalAsync(int preapprovalId, ApiPreapprovalRequest preapprovalRequest, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiPreapprovalResponse>> ChangePreapprovalAsync(int preapprovalId, ApiPreapprovalRequest preapprovalRequest); No No
Task<ApiResult<ApiPreapprovalResponse>> ChangePreapprovalAsync(int preapprovalId, ApiPreapprovalRequest preapprovalRequest, string idempotencyToken, CancellationToken cancellationToken); Yes Yes
Task<ApiResult<ApiPreapprovalResponse>> ChangePreapprovalAsync(int preapprovalId, ApiPreapprovalRequest preapprovalRequest, string idempotencyToken); No Yes
Close a Preapproval Task<ApiResult<ApiPreapprovalResponse>> ClosePreapprovalAsync(int preapprovalId, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiPreapprovalResponse>> ClosePreapprovalAsync(int preapprovalId); No No

Card Payout Service

Card Payout Service
Documentation Method Supports cancellation Supports idempotency
Get a list of Payouts Task<ApiResult<ApiCardPayoutListResponse>> GetPayoutListAsync(CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiCardPayoutListResponse>> GetPayoutListAsync(); No No
Get a list of payouts (filtered) Task<ApiResult<ApiCardPayoutListResponse>> GetPayoutListAsync(CardPayoutFilter filter, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiCardPayoutListResponse>> GetPayoutListAsync(CardPayoutFilter filter); No No
Get the status of a Payout Task<ApiResult<ApiCardPayoutStatusResponse>> GetPayoutStatusAsync(long payoutId, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiCardPayoutStatusResponse>> GetPayoutStatusAsync(long payoutId); No No
Get information on a specific Payout Task<ApiResult<ApiCardPayoutResponse>> GetPayoutAsync(long payoutId, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiCardPayoutResponse>> GetPayoutAsync(long payoutId); No No
Create a Payout Task<ApiResult<ApiCardPayoutResponse>> CreatePayoutAsync(ApiCardPayoutRequest payoutRequest, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiCardPayoutResponse>> CreatePayoutAsync(ApiCardPayoutRequest payoutRequest); No No
Task<ApiResult<ApiCardPayoutResponse>> CreatePayoutAsync(ApiCardPayoutRequest payoutRequest, string idempotencyToken, CancellationToken cancellationToken); Yes Yes
Task<ApiResult<ApiCardPayoutResponse>> CreatePayoutAsync(ApiCardPayoutRequest payoutRequest, string idempotencyToken); No Yes

Alternative Payment Service

Alternative Payment Service
Documentation Method Supports cancellation Supports idempotency
Get information on a specific payment Task<ApiResult<ApiAlternativePaymentResponse>> GetPaymentAsync(long paymentId, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiAlternativePaymentResponse>> GetPaymentAsync(long paymentId); No No
Get a list of payments Task<ApiResult<ApiAlternativePaymentListResponse>> GetPaymentListAsync(CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiAlternativePaymentListResponse>> GetPaymentListAsync(); No No
Get a list of filtered payments Task<ApiResult<ApiAlternativePaymentListResponse>> GetPaymentListAsync(AlternativePaymentsFilter filter, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiAlternativePaymentListResponse>> GetPaymentListAsync(AlternativePaymentsFilter filter); No No
Create a Payment Task<ApiResult<ApiAlternativePaymentResponse>> CreatePaymentAsync(ApiAlternativePaymentRequest paymentRequest, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiAlternativePaymentResponse>> CreatePaymentAsync(ApiAlternativePaymentRequest paymentRequest); No No
Task<ApiResult<ApiAlternativePaymentResponse>> CreatePaymentAsync(ApiAlternativePaymentRequest paymentRequest, string idempotencyToken, CancellationToken cancellationToken); Yes Yes
Task<ApiResult<ApiAlternativePaymentResponse>> CreatePaymentAsync(ApiAlternativePaymentRequest paymentRequest, string idempotencyToken); No Yes
Capture a Payment Task<ApiResult<ApiAlternativePaymentResponse>> CapturePaymentAsync(long paymentId, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiAlternativePaymentResponse>> CapturePaymentAsync(long paymentId); No No
Task<ApiResult<ApiAlternativePaymentResponse>> CapturePaymentAsync(long paymentId, string idempotencyToken, CancellationToken cancellationToken); Yes Yes
Task<ApiResult<ApiAlternativePaymentResponse>> CapturePaymentAsync(long paymentId, string idempotencyToken); No Yes
Cancel a Payment Task<ApiResult<ApiAlternativePaymentResponse>> CancelPaymentAsync(long paymentId, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiAlternativePaymentResponse>> CancelPaymentAsync(long paymentId); No No
Task<ApiResult<ApiAlternativePaymentResponse>> CancelPaymentAsync(long paymentId, string idempotencyToken, CancellationToken cancellationToken); Yes Yes
Task<ApiResult<ApiAlternativePaymentResponse>> CancelPaymentAsync(long paymentId, string idempotencyToken); No Yes
Create a Recurring Payment Task<ApiResult<ApiAlternativePaymentResponse>> CreateRecurrentPaymentAsync(ApiAlternativePaymentRequest paymentRequest, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiAlternativePaymentResponse>> CreateRecurrentPaymentAsync(ApiAlternativePaymentRequest paymentRequest); No No
Task<ApiResult<ApiAlternativePaymentResponse>> CreateRecurrentPaymentAsync(ApiAlternativePaymentRequest paymentRequest, string idempotencyToken, CancellationToken cancellationToken); Yes Yes
Task<ApiResult<ApiAlternativePaymentResponse>> CreateRecurrentPaymentAsync(ApiAlternativePaymentRequest paymentRequest, string idempotencyToken); No Yes

Payment Method Service

Payment Method Service
Documentation Method Supports cancellation Supports idempotency
Payment Methods API Task<ApiResult<ApiPaymentMethodResponse>> GetPaymentMethodAsync(short paymentMethodId, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiPaymentMethodResponse>> GetPaymentMethodAsync(short paymentMethodId); No No
Task<ApiResult<ApiPaymentMethodListResponse>> GetPaymentMethodsListAsync(CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiPaymentMethodListResponse>> GetPaymentMethodsListAsync(); No No
Task<ApiResult<ApiPaymentMethodListResponse>> GetPaymentMethodsListAsync(string countryCode, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiPaymentMethodListResponse>> GetPaymentMethodsListAsync(string countryCode); No No
Task<ApiResult<ApiPaymentMethodListResponse>> GetAssignedPaymentMethodsListAsync(CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiPaymentMethodListResponse>> GetAssignedPaymentMethodsListAsync(); No No
Task<ApiResult<ApiPaymentMethodListResponse>> GetAssignedPaymentMethodsListAsync(string countryCode, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiPaymentMethodListResponse>> GetAssignedPaymentMethodsListAsync(string countryCode); No No

Exchange Rate Service

Exchange Rate Service
Documentation Method Supports cancellation Supports idempotency
Get Exchange Rates Task<ApiResult<ApiExchangeRateResponse>> GetExchangeRateAsync(string fromCurrency, string toCurrency, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiExchangeRateResponse>> GetExchangeRateAsync(string fromCurrency, string toCurrency); No No

Card Payment Service

Card Payment Service
Documentation Method Supports cancellation Supports idempotency
Get the status of a card payment Task<ApiResult<ApiCardPaymentStatusResponse>> GetPaymentStatusAsync(long paymentId, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiCardPaymentStatusResponse>> GetPaymentStatusAsync(long paymentId); Yes No
Get information on a specific payment Task<ApiResult<ApiCardPaymentResponse>> GetPaymentAsync(long paymentId, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiCardPaymentStatusResponse>> GetPaymentAsync(long paymentId); Yes No
Get a list of payments Task<ApiResult<ApiCardPaymentListResponse>> GetPaymentListAsync(CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiCardPaymentListResponse>> GetPaymentListAsync(); Yes No
Get a list of direct card payments (filtered) Task<ApiResult<ApiCardPaymentListResponse>> GetPaymentListAsync(CardPaymentsFilter filter, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiCardPaymentListResponse>> GetPaymentListAsync(CardPaymentsFilter filter); Yes No
Create a Payment Task<ApiResult<ApiCardPaymentResponse>> CreatePaymentAsync(ApiCardPaymentRequest paymentRequest, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiCardPaymentResponse>> CreatePaymentAsync(ApiCardPaymentRequest paymentRequest); No No
Task<ApiResult<ApiCardPaymentResponse>> CreatePaymentAsync(ApiCardPaymentRequest paymentRequest, string idempotencyToken, CancellationToken cancellationToken); Yes Yes
Task<ApiResult<ApiCardPaymentResponse>> CreatePaymentAsync(ApiCardPaymentRequest paymentRequest, string idempotencyToken); No Yes
Capture a Payment Task<ApiResult<ApiCardPaymentResponse>> CapturePaymentAsync(long paymentId, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiCardPaymentResponse>> CapturePaymentAsync(long paymentId); No No
Task<ApiResult<ApiCardPaymentResponse>> CapturePaymentAsync(long paymentId, string idempotencyToken, CancellationToken cancellationToken); Yes Yes
Task<ApiResult<ApiCardPaymentResponse>> CapturePaymentAsync(long paymentId, string idempotencyToken); No Yes
Task<ApiResult<ApiCardPaymentResponse>> CapturePaymentAsync(long paymentId, long amount, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiCardPaymentResponse>> CapturePaymentAsync(long paymentId, long amount); No No
Task<ApiResult<ApiCardPaymentResponse>> CapturePaymentAsync(long paymentId, long amount, string idempotencyToken, CancellationToken cancellationToken); Yes Yes
Task<ApiResult<ApiCardPaymentResponse>> CapturePaymentAsync(long paymentId, long amount, string idempotencyToken); No Yes
Cancel a Payment Task<ApiResult<ApiCardPaymentResponse>> CancelPaymentAsync(long paymentId, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiCardPaymentResponse>> CancelPaymentAsync(long paymentId); No No
Task<ApiResult<ApiCardPaymentResponse>> CancelPaymentAsync(long paymentId, string idempotencyToken, CancellationToken cancellationToken); Yes Yes
Task<ApiResult<ApiCardPaymentResponse>> CancelPaymentAsync(long paymentId, string idempotencyToken); No Yes
Fraud Check – Payment Challenged Task<ApiResult<ApiCardPaymentResponse>> AcceptChallengeAsync(long paymentId, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiCardPaymentResponse>> AcceptChallengeAsync(long paymentId); No No
Task<ApiResult<ApiCardPaymentResponse>> AcceptChallengeAsync(long paymentId, string idempotencyToken, CancellationToken cancellationToken); Yes Yes
Task<ApiResult<ApiCardPaymentResponse>> AcceptChallengeAsync(long paymentId, string idempotencyToken); No Yes
Fraud Check – Payment Challenged Task<ApiResult<ApiCardPaymentResponse>> RejectChallengeAsync(long paymentId, CancellationToken cancellationToken); Yes No
Task<ApiResult<ApiCardPaymentResponse>> RejectChallengeAsync(long paymentId); No No
Task<ApiResult<ApiCardPaymentResponse>> RejectChallengeAsync(long paymentId, string idempotencyToken, CancellationToken cancellationToken); Yes Yes
Task<ApiResult<ApiCardPaymentResponse>> RejectChallengeAsync(long paymentId, string idempotencyToken); No Yes

Multiple Websites Management

If you have multiple websites from where you initiate payments to our system, there are two posibilities for managing your websites.

First one, is to manage your websites via the API and this is described next!

Second one, is to manage your websites via Merchant Dashboard. You can define more sites with distinct API Keys from the Merchant Dashboard, Configuration tab, Add a New Site. This allows you to manage multiple websites under the same merchant account.

MerchantTransactionID must be unique for each website!

Smart2Pay SDK .NET Services

Use HttpClient Builder to obtain a HttpClient Object, which you can use to initialize the services. With the HttpClient already created and the BaseAddress you can create a service instance.

Smart2Pay offers 2 environments you can use to interact with our payment platform: Test and Live.

Alternative Payment Methods Test Entry Point: https://paytest.smart2pay.com
Alternative Payment Methods Live Entry Point: https://pay.smart2pay.com

Credit Cards Test Entry Point: https://securetest.smart2pay.com
Credit Cards Live Entry Point: https://secure.smart2pay.com

See below examples on how to create a credit card payment request and a payment request for an alternative payment method of your choice.

  • You can create a credit card payment request by calling a function with the appropriate parameters given below:

    
    var baseAddress = new Uri("https://securetest.smart2pay.com");
    IHttpClientBuilder httpClientBuilder = new HttpClientBuilder(() => new AuthenticationConfiguration
    {
    	SiteId = 33258,
    	ApiKey = "JOPxYQftN9xICry9koMuER6L4SrszVHI8SLh9Q83n964tFa2GK"
    });
    var httpClient = httpClientBuilder.Build();
    var paymentService = new Sdk.Services.CardPaymentService(httpClient, baseAddress);
    
    var paymentRequest = new CardPaymentRequest
    {
    	MerchantTransactionID = MerchantTransactionID,
    	Amount = 9000,
    	Currency = "USD",
    	ReturnURL = "http://demo.smart2pay.com/redirect.php",
    	Description = DescriptionText,
    	StatementDescriptor = "bank statement message",
    	Card = new CardDetailsRequest
    	{
    		HolderName = "John Doe",
    		Number = "4111111111111111",
    		ExpirationMonth = "02",
    		ExpirationYear = "2022",
    		RequireSecurityCode = false
    	},
    	BillingAddress = new Address
    	{
    		City = "Iasi",
    		ZipCode = "7000-49",
    		State = "Iasi",
    		Street = "Sf Lazar",
    		StreetNumber = "37",
    		HouseNumber = "5A",
    		HouseExtension = "-",
    		Country = "BR"
    	},
    	Capture = false,
    	Retry = false,
    	GenerateCreditCardToken = false,
    	PaymentTokenLifetime = 5
    }.ToApiCardPaymentRequest();
    
    var createPaymentResult = await paymentService.InitiatePaymentAsync(paymentRequest);
    var createPaymentResponse = createPaymentResult.Value.Payment;
    
  • You can create a payment request for an alternative payment method by calling a function with the appropriate parameters given below:

    
    var baseAddress = new Uri("https://paytest.smart2pay.com");
    IHttpClientBuilder httpClientBuilder = new HttpClientBuilder(() => new AuthenticationConfiguration
    {
    	SiteId = 45614,
            ApiKey = "rAwLLh3rQk3uNTOPHpqydrEOdAGsRzZChCd4uyXsXoGE2tkoYA"
    });
    var httpClient = httpClientBuilder.Build();
    var paymentService = new Sdk.Services.CardPaymentService(httpClient, baseAddress);
    
    var paymentRequest = new PaymentRequest
    {
    	MerchantTransactionID = MerchantTransactionID,
    	Amount = 11,
    	Currency = "CNY",
    	MethodID = 1066,
    	ReturnURL = "http://demo.smart2pay.com/redirect.php",
    	TokenLifetime = 10,
    	Customer = new Customer
    	{
    		Email = "john@doe.com"
    	},
    	BillingAddress = new Address
    	{
    		Country = "CN"
    	}
    }.ToApiPaymentRequest();
    
    var createPaymentResult = await paymentService.InitiatePaymentAsync(paymentRequest);
    var createPaymentResponse = createPaymentResult.Value.Payment;
    

For a complete list of Integration Tests examples, please go to our section on Github: SDK .NET Integration Tests.

Full Smart2Pay SDK .NET Reference

By using the HttpClient Builder you can obtain an HttpClient which is ready to send Http Request across the network.

With the HttpClient already created and the BaseAddress you can create a service instance.

The library exposes the following services: Card Payment Service, Card Payout Service, Exchange Rate Service, Payment Method Service, Alternative Payment Service, Preapproval Service, Refund Service, INotificationCallback.

Smart2Pay offers 2 environments you can use to interact with our payment platform: Test and Live.

Alternative Payment Methods Test Entry Point: https://paytest.smart2pay.com
Alternative Payment Methods Live Entry Point: https://pay.smart2pay.com

Credit Cards Test Entry Point: https://securetest.smart2pay.com
Credit Cards Live Entry Point: https://secure.smart2pay.com

Smart2Pay SDK .NET Logging

Smart2pay’s SDK provide support for logging using LoggerProvider which enables you to use the logging framework of your choice as a provider.

You need to implement ILogger interface and supply a Logging factory. A Logging factory is just a Func which should return the same Logger for a given stringKey.

See the below example of how to register the Logger Factory:

LoggingDefault.Provider.RegisterLoggerFactory(key => {/* please add your custom logger factory code here */ })

Please register the factory only once in the start method of your application!

Smart2Pay SDK .NET Configuration

First you need to create and initialize a HttpClient configured to accept JSON responses and also an Authentication Provider (using the Site ID and API Key obtained for your test merchant account).

The HttpClient Builder enables the below mandatory and optional configuration points. The only mandatory configuration point is AuthenticationProvider, the next configuration points are optional and let you have more control over the services.

Use HttpClient Builder to obtain a HttpClient Object, which you can use to initialize the services.

Please create only one HttpClient and use it for the entire life of your apllication. For more information, please visit: https://docs.microsoft.com/en-us/aspnet/web-api/overview/advanced/calling-a-web-api-from-a-net-client.

Smart2Pay SDK .NET Installation

Supporting .NET Standard 1.3+, .NET Core 1.1+, and .NET Framework 4.6.1+. If you need other versions, please contact us via support@smart2pay.com.

Install Smart2pay.RestClient.SDK.NET via NuGet. Run the following command line in the Package Manager Console:

PM> Install-Package S2p.RestClient.SDK

If you do not have NuGet, you can download the package from here: https://www.nuget.org/.

Depencies used:

Smart2Pay SDK .NET

Start integration with GlobalPay payment platform using Smart2Pay SDK .NET.

Download Smart2Pay SDK .NET available now on NuGet.org. Source code available on GitHub.

Please note that in order to test a full end-to-end transaction you will require a valid Smart2Pay test account which you can obtain at: https://docs.smart2pay.com/s2p-register/. After you registered a test account at docs.smart2pay.com, use the API Key and the Site ID found at Getting Started > Integration Roadmap > Integration Site and configure your SDK.

Creating your test merchant account

Go to https://docs.smart2pay.com/s2p-register/ and complete the form. You will receive an email which will setup a password for your account.

Log into your account and go to Getting Started > Integration Roadmap > Integration Site.

Use the Site ID and the API Key found on that page to configure your test SDK environment.

In order to test a full end-to-end transaction you need to configure your SDK. For more information, please go to: Smart2Pay SDK .NET Installation.

3D Secure

3D Secure is a security protocol used as an additional layer of security for online credit card transactions prior to authorization in order to prevent fraud. 3D Secure comes from the three-domain model used to provide the additional layer of secure authentication between the financial authorization process and online authentication process. The service is provided by Visa and MasterCard under the name Verified by Visa and MasterCard SecureCode.

3D Secure enables customers to validate transactions they make over the internet by requesting an authentication method (usually a a password-based method sent over mobile or email address is used), thus reducing the risk of fraudulent use by unauthorized individuals.

3D Secure Payment Notification

We will notify you about the new status of the payment to the Notification URL you setup in the Merchant Dashboard. The format of the received notification has the same structure as the response of the initial request.

  • For a payment with Success 3D Secure Authentication, you will receive the below notification:

    You need to respond with HTTP code 204 (No Content)!

    Payment notification format:

    Authorization: Basic MTAxMDpnYWJp
    
    {
      "Payment": {
        "ID": 203771,
        "ClientIP": null,
        "SkinID": null,
        "Created": "20180509114444",
        "MerchantTransactionID": "s2ptest_1002",
        "OriginatorTransactionID": null,
        "Amount": 100,
        "Currency": "EUR",
        "CapturedAmount": "0",
        "ReturnURL": "http://demo.smart2pay.com/redirect.php",
        "Description": "S2P 3Dsecure test",
        "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 0004",
          "ExpirationMonth": "5",
          "ExpirationYear": "2021"
        },
        "CreditCardToken": null,
        "Status": {
          "ID": 9,
          "Info": "Authorized",
          "Reasons": []
        },
        "MethodTransactionID": null,
        "PaymentTokenLifetime": null,
        "Capture": false,
        "Retry": false,
        "RedirectURL": null,
        "3DSecure": true,
        "Fraud": null
      }
    }
    

    Response:

    204 No Content
  • For a Failed 3D Secure Authentication, you will receive the below notification:

    You need to respond with HTTP code 204 (No Content)!

    Payment notification format:

    Authorization: Basic MTAxMDpnYWJp
    
    {
      "Payment": {
        "ID": 203772,
        "ClientIP": null,
        "SkinID": null,
        "Created": "20180509114626",
        "MerchantTransactionID": "s2ptest_1003",
        "OriginatorTransactionID": null,
        "Amount": 100,
        "Currency": "EUR",
        "CapturedAmount": "0",
        "ReturnURL": "http://demo.smart2pay.com/redirect.php",
        "Description": "S2P 3Dsecure test",
        "StatementDescriptor": null,
        "MethodID": 6,
        "MethodOptionID": null,
        "SiteID": 10101,
        "NotificationDateTime": null,
        "Customer": null,
        "BillingAddress": null,
        "ShippingAddress": null,
        "Articles": null,
        "Card": {
          "HolderName": "John Doe",
          "Number": "Ends with 0004",
          "ExpirationMonth": "5",
          "ExpirationYear": "2021"
        },
        "CreditCardToken": null,
        "Status": {
          "ID": 4,
          "Info": "Failed",
          "Reasons": [
            {
              "Code": "5073",
              "Info": "Error in holder authentication"
            }
          ]
        },
        "MethodTransactionID": null,
        "PaymentTokenLifetime": null,
        "Capture": false,
        "Retry": false,
        "RedirectURL": null,
        "3DSecure": true,
        "Fraud": null
      }
    }

    Response:

    204 No Content

3D Secure Payments

For enabling and using 3D Secure service, there are two options:

  • statically, in which we can enable for you the 3D Secure service at SiteID level;
  • dynamically, in which you send the 3DSecure parameter in the payment request.

If you set the 3DSecure parameter to true, the customer will be required to authenticate the card used for that transaction:

Request:

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

{
  "Payment": {
    "MerchantTransactionID": "s2ptest_1002",
    "Amount": "100",
    "Currency": "EUR",
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "S2P 3Dsecure test",    
    "Card": {
      "HolderName": "John Doe",
      "Number": "4548812049400004",
      "ExpirationMonth": "05",
      "ExpirationYear": "2021",
      "SecurityCode": "123"
      },
    "3DSecure": true
  }
}

Response:

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

{
  "Payment": {
    "ID": 203771,
    "ClientIP": null,
    "SkinID": null,
    "Created": "20180509114444",
    "MerchantTransactionID": "s2ptest_1002",
    "OriginatorTransactionID": null,
    "Amount": 100,
    "Currency": "EUR",
    "CapturedAmount": "0",
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "S2P 3Dsecure test",
    "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 0004",
      "ExpirationMonth": "05",
      "ExpirationYear": "2021"
      },
    "CreditCardToken": null,
    "Status": {
      "ID": 1,
      "Info": "Open",
      "Reasons": []
      },
    "MethodTransactionID": null,
    "PaymentTokenLifetime": 10,
    "Capture": false,
    "Retry": false,
    "RedirectURL": "https://securetest.smart2pay.com/v1/Payments/FillCardDetails?PaymentToken=203771.1010.05D9FE3FD0AF7FD3D1C848A82F5F54985&SkipLandingPage=true",
    "3DSecure": true,
    "Fraud": null
  }
}

Access the RedirectURL received in the payment response and enter an identification code. Please note that the landing page will be different depending on the card issuer.

For test purposes, please enter the identification test code received on the page (123456). For a Success 3D Secure Authentication click on the Acceptar button and for a Failed 3D Secure Authentication click on the Cancelar button.

1 Enter Identification Code

You will receive a payment notification to the Notification URL you setup in the Merchant Dashboard containing the new payment status. For more information on Payment Notifications with Success or Failed 3D Secure Authentication, go to our section 3D Secure Payment Notification.

Uruguay

Rates per number of installments and issuer bank
Brand Installments
6 12 18
Visa 0%
Oca 0%
Mastercard 0%
Diners Club 0%
Lider 0%
Scotiabank 0%

Peru

Rates per number of installments and issuer bank
Brand Installments
3 6 9 12
AMEX 0% 0% 0% 0%
Visa BBVA 0% 0% 0% 0%
Visa 0% 0% 0% 0%
Mastercard 0% 0% 0% 0%

Chile

Rates per number of installments and issuer bank
Brand Installments
1 2 3 4 6 9 12
Diners 0% 0% 0% 0% 0% 0% 0%
CMR 0% 0% 0% 0% 0% 0% 0%
AMEX 0% 0% 0% 0% 0% 0% 0%
Mastercard 0% 0% 0% 0% 0% 0% 0%
Visa 0% 0% 0% 0% 0% 0% 0%
Presto 0% 0% 0% 0% 0% 0% 0%
Magna 0% 0% 0% 0% 0% 0% 0%

Argentina

Rates per number of installments and issuer bank
Brand SubBrand Installment
3 6 9 12 24 50
Visa Visa Argentina SA 10,97% 19,51% 31,46% 42,11%
Tarjeta Shopping 10,97% 19,51% 31,46% 42,11%
Mastercard Mastercard 10,97% 19,51% 31,46% 42,11%
Nativa Mastercard 10,97% 19,51% 14,34% 30,86% 75,5%
Cencosud 10,97% 19,51% 31,46% 42,11%
AMEX AMEX 8,47% 15,13% 21,18% 29,04%
Mercado Pago + Banco Patagonia Mercado Pago + Banco Patagonia 0% 0% 31,46% 42,11%
Naranja Naranja 10,97% 19,51% 42,11%
Cabal Cabal 0% 15,13% 21,18% 29,04%
Diners Diners 10,97% 19,51% 31,46% 42,11%

Mexico

Rates per number of installments and issuer bank
Brand SubBrand Installments
3 6 9 12
Mastercard Mastercard 5,99% 9,74% 13,92% 18,55%
Banamex 5,99% 9,74% 13,92% 18,55%
Bancomer 5,99% 9,74% 13,92% 18,55%
Santander 5,99% 9,74% 13,92% 18,55%
AMEX AMEX 5,99% 9,74% 13,92% 18,55%
Visa Visa 5,99% 9,74% 13,92% 18,55%
Banamex 5,99% 9,74% 13,92% 18,55%
Bancomer 5,99% 9,74% 13,92% 18,55%
Santander 5,99% 9,74% 13,92% 18,55%

Colombia

Rates per number of installments and issuer bank
Brand SubBrand Installments
1 2 3 4 5 6 12 18 24 36
Mastercard Mastercard 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%
Banco Colombia 0% 0% 0% 0% 0% 0% 0%
Banco BBVA 0% 0% 0% 0% 0% 0% 0%
AV. Villas 0% 0% 0% 0% 0% 0% 0%
Colpatria Porpias 0% 0% 0% 0% 0% 0% 0%
Banco de Bogota 0% 0% 0% 0% 0% 0% 0%
AMEX AMEX 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%
Banco de Colombia 0% 0% 0% 0% 0% 0% 0%
Colpatria Propias 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%
Visa Visa 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%
Banco Colombia 0% 0% 0% 0% 0% 0% 0%
Banco BBVA 0% 0% 0% 0% 0% 0% 0%
AV. Villas 0% 0% 0% 0% 0% 0% 0%
Colpatria Porpias 0% 0% 0% 0% 0% 0% 0%
Banco de Bogota 0% 0% 0% 0% 0% 0% 0%
Crédito Facil Codensa Crédito Facil Codensa 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%
Diners Diners 0% 0% 0% 0% 0% 0% 0% 0% 0% 0%

Brazil

Rates per number of installments and issuer bank
Brand Installments
2 3 4 5 6 7 8 9 10 11 12 15 18 24
Cartao mercado livre 2,39% 4,78% 7,17% 8,99% 10,49% 11,83% 12,49% 13,21% 14,59% 16,00% 17,41% 21,73% 26,15% 28,04%
ELO 2,39% 4,78% 7,17% 8,99% 10,49% 11,83% 12,49% 13,21% 14,59% 16,00% 17,41%
Diners 2,39% 4,78% 7,17% 8,99% 10,49% 11,83% 12,49% 13,21% 14,59% 16,00% 17,41%
AMEX 2,39% 4,78% 7,17% 8,99% 10,49% 11,83% 12,49% 13,21% 14,59% 16,00% 17,41%
Hipercard 2,39% 4,78% 7,17% 8,99% 10,49% 11,83% 12,49% 13,21% 14,59% 16,00% 17,41%
Mastercard 2,39% 4,78% 7,17% 8,99% 10,49% 11,83% 12,49% 13,21% 14,59% 16,00% 17,41%
Visa 2,39% 4,78% 7,17% 8,99% 10,49% 11,83% 12,49% 13,21% 14,59% 16,00% 17,41%

Payout Notification

We will notify you about the new status of the payout to the Notification URL you setup in the Merchant Dashboard. The format of the received notification has the same structure as the response of the initial request.

You need to respond with HTTP code 204 (No Content)!

Payout notification format:

Authorization: Basic MTAxMDpnYWJp

{
  "Payout": {
    "ID": 214,
    "SiteID": 1010,
    "Created": "20181016133234",
    "MerchantTransactionID": "test_h4",
    "OriginatorTransactionID": null,
    "Amount": "1000",
    "Currency": "EUR",
    "Description": "payment product",
    "StatementDescriptor": null,
    "Status": {
      "ID": 2,
      "Info": "Success",
      "Reasons": []
    }
  }
}

Response:

204 No Content

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
  }
}

Secure Communication

Web security is an important responsibility that is constantly changing and evolving. We are always keeping up with the latest changes in securing internet communication.

Using TLS 1.2, the most current version of the protocol that encrypts internet traffic of all types, enables secure internet communication, helping you protect your customers and your business.

If you are not already communicating over TLS 1.2, we are strongly recommend you to upgrade your operating systems and environments to communicate to Smart2Pay over TLS 1.2.

TLS 1.2 protocol is mandatory to be used in order to access our Credit Card Payments.

Switching to TLS 1.2 protocol is a change that will sooner or later going to happen, so switch now to secure – proof your website.

Please note that you must use HTTPS (Hyper Text Transfer Protocol Secure) in order to make your website more secure and trustworthy.

HTTPS protocol allows communication between different systems or for transferring data from a web server to a browser to view web pages in a secure and reliable manner.

Recurring Card Payments

For Recurring Card Payments you will need to generate a credit card token by sending the GenerateCreditCardToken parameter to true in the initial payment request. Recurring Card Payments will be initiated by sending the new generated token instead of the card details.

Please note that the credit card token has a usage limit that we can set. If the token is sent more times than our set limit the payment will fail.

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

    See below an example of an initial card payment with no other mandatory parameters to be send, except for the card details and the GenerateCreditCardToken parameter to true:

    Request:

    POST https://securetest.smart2pay.com/v1/payments
    Authorization: Basic MTAxMDpnYWJp
    
    {
      "Payment": {
        "MerchantTransactionID": "s2ptest_m20",
        "Amount": "1000",
        "Currency": "EUR",
        "ReturnURL": "http://demo.smart2pay.com/redirect.php",   
        "Card": {
          "HolderName": "John Doe",
          "Number": "4548812049400004",
          "ExpirationMonth": "05",
          "ExpirationYear": "2021",
          "SecurityCode": "123",
          "RequireSecurityCode": true
          },
        "GenerateCreditCardToken": true
      }
    }

    Response:

    HTTP/1.1 201 Created
    Content-Type: application/json; charset=utf-8
    
    {
      "Payment": {
        "ID": 203747,
        "ClientIP": null,
        "SkinID": null,
        "Created": "20180502085305",
        "MerchantTransactionID": "s2ptest_m20",
        "OriginatorTransactionID": null,
        "Amount": 1000,
        "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 0004",
          "ExpirationMonth": "05",
          "ExpirationYear": "2021"
          },
        "CreditCardToken": {
          "Value": "C0D510746B513D66093609AA92BDA295"
          },
        "Status": {
          "ID": 9,
          "Info": "Authorized",
          "Reasons": []
          },
        "MethodTransactionID": null,
        "PaymentTokenLifetime": null,
        "Capture": false,
        "Retry": false,
        "RedirectURL": null,
        "3DSecure": false,
        "Fraud": {
          "Status": "Accept",
          "CheckMode": "CheckOnPreAuthorisation",
          "Score": 31,
          "Reason": "No decision provided"
        }
      }
    }

    The token received in the response of the initial payment, together with the RequireSecurityCode parameter set to false, can be used to initiate future Recurring Payments.

    For Recurring Payments, the security code is not needed, you only need to 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 upstream processor.

    See below an example of a Recurring Card Payment:

    Request:

    POST https://securetest.smart2pay.com/v1/payments
    Authorization: Basic MTAxMDpnYWJp
    
    {
      "Payment": {
        "MerchantTransactionID": "s2ptest_m23",
        "Amount": 1000,
        "Currency": "EUR",
        "ReturnURL": "http://demo.smart2pay.com/redirect.php",
        "CreditCardToken": {
          "Value": "C0D510746B513D66093609AA92BDA295",
          "RequireSecurityCode": false 
        }
      }
    }

    Response:

    HTTP/1.1 201 Created
    Content-Type: application/json; charset=utf-8
    
    {
      "Payment": {
        "ID": 203751,
        "ClientIP": null,
        "SkinID": null,
        "Created": "20180502090314",
        "MerchantTransactionID": "s2ptest_m23",
        "OriginatorTransactionID": null,
        "Amount": 1000,
        "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 0004",
          "ExpirationMonth": "05",
          "ExpirationYear": "2021"
          },
        "CreditCardToken": {
          "Value": "C0D510746B513D66093609AA92BDA295"
          },
        "Status": {
          "ID": 9,
          "Info": "Authorized",
          "Reasons": []
          },
        "MethodTransactionID": null,
        "PaymentTokenLifetime": null,
        "Capture": false,
        "Retry": false,
        "RedirectURL": null,
        "3DSecure": false,
        "Fraud": {
          "Status": "Accept",
          "CheckMode": "CheckOnPreAuthorisation",
          "Score": 31,
          "Reason": "No decision provided"
        }
      }
    }
  • For LATAM region it is mandatory to send in the initial Card payment the Country parameter for the Billing Address together with the Email parameter and the SocialSecurityNumber parameter of the Customer. You also need to set the GenerateCreditCardToken parameter to true and a token element is sent in the response, containing the value of the newly created credit card token.

    See below an example of an initial card payment with all the mandatory parameters to be sent for LATAM region:

    Request:

    POST https://securetest.smart2pay.com/v1/payments
    Authorization: Basic MTAxMDpnYWJp
    
    {
      "Payment": {
        "MerchantTransactionID": "s2p_m5",
        "Amount": 10000,
        "Currency": "BRL",
        "ReturnURL": "http://demo.smart2pay.com/redirect.php",
        "BillingAddress": {
          "Country": "BR"
         },
        "Customer" : {
        "Email": "test@test.com",
          "SocialSecurityNumber": "00003456789"
          },
        "Card": {
          "HolderName": "John Doe",
          "Number": "4111111111111111",
          "ExpirationMonth": "05",
          "ExpirationYear": "2021",
          "SecurityCode": "123"
          },
        "GenerateCreditCardToken": true
      }
    }

    Response:

    HTTP/1.1 201 Created
    Content-Type: application/json; charset=utf-8
    
    {
      "Payment": {
        "ID": 203753,
        "ClientIP": null,
        "SkinID": null,
        "Created": "20180502114632",
        "MerchantTransactionID": "s2p_m5",
        "OriginatorTransactionID": null,
        "Amount": 10000,
        "Currency": "BRL",
        "CapturedAmount": "0",
        "ReturnURL": "http://demo.smart2pay.com/redirect.php",
        "Description": null,
        "StatementDescriptor": null,
        "MethodID": 6,
        "MethodOptionID": null,
        "SiteID": 1010,
        "NotificationDateTime": null,
        "Customer": {
          "ID": 327,
          "MerchantCustomerID": null,
          "Email": "test@test.com",
          "FirstName": null,
          "LastName": null,
          "Gender": null,
          "SocialSecurityNumber": "00003456789",
          "Phone": null,
          "Company": null
          },
        "BillingAddress": {
          "ID": 9635,
          "City": null,
          "ZipCode": null,
          "State": null,
          "Street": null,
          "StreetNumber": null,
          "HouseNumber": null,
          "HouseExtension": null,
          "Country": "BR"
          },
        "ShippingAddress": null,
        "Articles": null,
        "Card": {
          "HolderName": "John Doe",
          "Number": "VISA-1111",
          "ExpirationMonth": "05",
          "ExpirationYear": "2021"
          },
        "CreditCardToken": {
          "Value": "F43F90A5CB613D91F704407D4E297EA1"
          },
        "Status": {
          "ID": 9,
          "Info": "Authorized",
          "Reasons": []
          },
        "MethodTransactionID": null,
        "PaymentTokenLifetime": null,
        "Capture": false,
        "Retry": false,
        "RedirectURL": null,
        "3DSecure": false,
        "Fraud": {
          "Status": "Accept",
          "CheckMode": "CheckOnPreAuthorisation",
          "Score": 31,
          "Reason": "No decision provided"
        }
      }
    }

    The token received in the response of the initial payment, can be used to initiate future Recurring Payments.

    See below an example of a Recurring Card Payment for LATAM region:

    Request:

    POST https://securetest.smart2pay.com/v1/payments
    Authorization: Basic MTAxMDpnYWJp
    
    {
      "Payment": {
        "MerchantTransactionID": "s2p_m6",
        "Amount": 10000,
        "Currency": "BRL",
        "ReturnURL": "http://demo.smart2pay.com/redirect.php",
        "CreditCardToken": {
          "Value": "F43F90A5CB613D91F704407D4E297EA1"
          },
        "GenerateCreditCardToken": true
      }
    }

    Response:

    HTTP/1.1 201 Created
    Content-Type: application/json; charset=utf-8
    
    {
      "Payment": {
        "ID": 203754,
        "ClientIP": null,
        "SkinID": null,
        "Created": "20180430092243",
        "MerchantTransactionID": "s2p_m6",
        "OriginatorTransactionID": null,
        "Amount": 10000,
        "Currency": "BRL",
        "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": "",
          "ExpirationMonth": "05",
          "ExpirationYear": "2021"
          },
        "CreditCardToken": {
          "Value": "F43F90A5CB613D91F704407D4E297EA1"
          },
        "Status": {
          "ID": 9,
          "Info": "Authorized",
          "Reasons": []
          },
        "MethodTransactionID": null,
        "PaymentTokenLifetime": null,
        "Capture": false,
        "Retry": false,
        "RedirectURL": null,
        "3DSecure": false,
        "Fraud": {
          "Status": "Accept",
          "CheckMode": "CheckOnPreAuthorisation",
          "Score": 31,
          "Reason": "No decision provided"
        }
      }
    }

Chargebacks API

A chargeback is the reversal of a credit card payment, forcibly initiated by the cardholder through the issuing bank of the instrument used to settle a debt. After the bank verifies the claim and an investigation occurs, the bank validates the cardholders request, and removes money from the merchant’s account back to the customer.

Any chargeback request received, it will be verified conform to the regulations of the relevant card issuer. In some cases, you may need to provide via email additional documentation in order to resolve the chargeback.

Reasons for a chargeback

Typically, a cardholder might file a chargeback for any of the following reasons:

    • duplicate billing;
    • incorrect amount billed;
    • refund never issued;
    • the customer claims he did not authorize the charge or that his identity was stolen;
    • the customer claims he has never received the products or services.

We strongly recommend you to avoid such situations where the customer initiates a chargeback process. Refunds are always preferable than chargebacks because no negative chargeback score is related to your account and they increase customer satisfaction. The chargeback process can be very costly while it includes chargeback fees and it can be time-consuming while gathering required documentation. Also, there are situations where chargebacks can be non-disputable, meaning the dispute is always lost and you have no control over the chargeback process.

Notification Types:

We will notify you in real time of any chargebacks requests received (the payment is disputed by the customer) or when the status of the payment changes (the cardholder has won the dispute and has received the money back). You will receive two types of notifications:

  • Notification Type Dispute, in which we will notify you about the status of the Dispute, it can be either Open – 1 / DisputeWon – 23 / DisputeLost – 24;
  • Notification type Payment, in which according to the status of the Dispute we will notify you about the new status of the Payment, it can be either Success – 2 / Captured – 11 / PartiallyCaptured – 35 / Disputed – 19 / Chargedback – 26.
  • Notification type Dispute

    When a payment is disputed by the customer, it will also change its status to Disputed. If the customer wins the dispute, the dispute changes its status in DisputeLost – 24 and we will notify of the event:

    Dispute notification format:

    {
    "Dispute": {
        "ID": 15,
        "SiteID": 1000,
        "Created": "20180405120358",
        "PaymentID": 169144,
        "MethodID": 6,
        "Amount": "100",
        "Currency": "EUR",
        "Status": {
          "ID": 24,
          "Info": "DisputeLost",
          "Reasons": null
        }
      }
    }
    
    
  • Notification type Payment

    When a payment with Success status is disputed by the customer and you lose the dispute, the payment changes its status in Chargedback – 26 and we will notify you about the new status of the payment:

    Payment notification format:

    Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=
    
    {
      "Payment": {
        "ID": 169144,
        "SkinID": null,
        "ClientIP": null,
        "Created": "20180215151027",
        "MerchantTransactionID": "609374486387",
        "OriginatorTransactionID": null,
        "Amount": "100",
        "Currency": "EUR",
        "ReturnURL": "http://demo.smart2pay.com/redirect.php",
        "Description": "",
        "MethodID": 32,
        "MethodOptionID": null,
        "IncludeMethodIDs": null,
        "ExcludeMethodIDs": null,
        "PrioritizeMethodIDs": null,
        "SiteID": 1000,
        "NotificationDateTime": null,
        "Customer": null,
        "BillingAddress": null,
        "ShippingAddress": null,
        "Articles": null,
        "Details": null,
        "ReferenceDetails": null,
        "CustomParameters": null,
        "PreapprovalID": null,
        "Status": {
          "ID": 26,
          "Info": "Chargedback",
          "Reasons": null
        },
        "MethodTransactionID": null,
        "TokenLifetime": null,
        "Capture": null,
        "PreapprovalDetails": null,
        "RedirectURL": null
      }
    }

    Response:

    204 No Content

    When a card payment with Captured or PartiallyCaptured status is disputed by the customer and you lose the dispute, the payment changes its status in Chargedback – 26 and we will notify you about the new status of the payment:

    Payment notification format:

    Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=
    
    {
      "Payment": {
        "ID": 202242,
        "ClientIP": null,
        "SkinID": null,
        "Created": "20161205093117",
        "MerchantTransactionID": "s2ptest_h12",
        "OriginatorTransactionID": "100_a",
        "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": {
          "HolderName": "John Doe",
          "Number": "VISA-1111",
          "ExpirationMonth": "02",
          "ExpirationYear": "2018"
        },
        "CreditCardToken": {
          "Value": "6BEBF42B0E43D3BFD360DFB5EFF9D96D"
        },
        "Status": {
          "ID": 26,
          "Info": "Chargedback",
          "Reasons": []
        },
        "MethodTransactionID": null,
        "PaymentTokenLifetime": null,
        "Capture": true,
        "Retry": true,
        "RedirectURL": null,
        "3DSecure": null
      }
    }
    

    Response:

    204 No Content

Fraud Check – Payment Challenged

If the system detects a possible malicious transaction, that transaction will be challenged by the fraud check provider. There are 2 possible outcomes after running your own processes and procedures for fraud management: you can reject or accept the challenge.

The card payment is initiated and the Fraud Check system detects a possible suspicious behavior or rule. The payment is challenged by the fraud check provider. You can reject or accept the challenge.

Request:

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

{
  "Payment": {
    "MerchantTransactionID": "s2ptest_j10",
    "Amount": 100,
    "Currency": "BRL",
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "test payment",
    "StatementDescriptor": "card payment",
    "BillingAddress": {
      "City": "Iasi",
      "ZipCode": "7000-49",
      "State": "Iasi",
      "Street": "Sf Lazar",
      "StreetNumber": "37",
      "HouseNumber": "5A",
      "HouseExtension": "-",
      "Country": "BR"
    },
    "ShippingAddress": null,
    "Customer": {
      "FirstName":"John",
      "LastName":"Doe",
      "Email": "challenge@challenge.com",
      "SocialSecurityNumber": "00003456789"
    },
    "Card": {
      "HolderName": "John Doe",
      "Number": "4111111111111111",
      "ExpirationMonth": "02",
      "ExpirationYear": "2019",
      "SecurityCode": "312"
    },
    "Installments": 3,
    "Capture": false,
    "Retry": false,
    "GenerateCreditCardToken": false,
    "PaymentTokenLifetime": 100,
    "3DSecure": false,
    "Language": "ro-RO",
    "SkinID": 200
  }
}

Response:

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

{
  "Payment": {
    "ID": 203373,
    "ClientIP": null,
    "SkinID": 200,
    "Created": "20180209082529",
    "MerchantTransactionID": "s2ptest_j10",
    "OriginatorTransactionID": null,
    "Amount": 100,
    "Currency": "BRL",
    "CapturedAmount": "0",
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "test payment",
    "StatementDescriptor": "card payment",
    "MethodID": 6,
    "MethodOptionID": null,
    "SiteID": 1010,
    "NotificationDateTime": null,
    "Customer": {
      "ID": 298,
      "MerchantCustomerID": null,
      "Email": "challenge@challenge.com",
      "FirstName": "John",
      "LastName": "Doe",
      "Gender": null,
      "SocialSecurityNumber": "00003456789",
      "Phone": null,
      "Company": null
      },
    "BillingAddress": {
      "ID": 9590,
      "City": "Iasi",
      "ZipCode": "7000-49",
      "State": "Iasi",
      "Street": "Sf Lazar",
      "StreetNumber": "37",
      "HouseNumber": "5A",
      "HouseExtension": "-",
      "Country": "BR"
      },
    "ShippingAddress": null,
    "Articles": null,
    "Card": {
      "HolderName": "John Doe",
      "Number": "Ends with 1111",
      "ExpirationMonth": "02",
      "ExpirationYear": "2019"
      },
    "CreditCardToken": null,
    "Status": {
      "ID": 30,
      "Info": "PendingChallengeConfirmation",
      "Reasons": []
      },
    "MethodTransactionID": null,
    "PaymentTokenLifetime": null,
    "Capture": false,
    "Retry": false,
    "RedirectURL": null,
    "3DSecure": false,
    "Fraud": {
      "Status": "Challenge",
      "Score": 55,
      "Reason": "Transaction hit a velocity or rule threshold"
      },
    "Installments": 3
    }
}

Accept the Challenge:

Request:

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

Response:

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

{
  "Payment": {
    "ID": 203373,
    "ClientIP": null,
    "SkinID": null,
    "Created": "20180209082529",
    "MerchantTransactionID": "s2ptest_j10",
    "OriginatorTransactionID": null,
    "Amount": 100,
    "Currency": "BRL",
    "CapturedAmount": "0",
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "test payment",
    "StatementDescriptor": "card payment",
    "MethodID": 6,
    "MethodOptionID": null,
    "SiteID": 1010,
    "NotificationDateTime": null,
    "Customer": null,
    "BillingAddress": null,
    "ShippingAddress": null,
    "Articles": null,
    "Card": {
      "HolderName": "John Doe",
      "Number": "411111******1111",
      "ExpirationMonth": "2",
      "ExpirationYear": "2019"
      },
    "CreditCardToken": null,
    "Status": {
      "ID": 9,
      "Info": "Authorized",
      "Reasons": []
      },
    "MethodTransactionID": null,
    "PaymentTokenLifetime": null,
    "Capture": false,
    "Retry": false,
    "RedirectURL": null,
    "3DSecure": false,
    "Fraud": {
      "Status": "Challenge",
      "Score": 55,
      "Reason": "Transaction hit a velocity or rule threshold"
      },
    "Installments": 3
    }
}

Reject the Challenge:

Request:

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

Response:

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

{
  "Payment": {
    "ID": 203374,
    "ClientIP": null,
    "SkinID": null,
    "Created": "20180209082726",
    "MerchantTransactionID": "s2ptest_j11",
    "OriginatorTransactionID": null,
    "Amount": 100,
    "Currency": "BRL",
    "CapturedAmount": "0",
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "test payment",
    "StatementDescriptor": "card payment",
    "MethodID": 6,
    "MethodOptionID": null,
    "SiteID": 1010,
    "NotificationDateTime": null,
    "Customer": {
      "ID": 298,
      "MerchantCustomerID": null,
      "Email": "challenge@challenge.com",
      "FirstName": "John",
      "LastName": "Doe",
      "Gender": null,
      "SocialSecurityNumber": "00003456789",
      "Phone": null,
      "Company": null
      },
    "BillingAddress": {
      "ID": 9590,
      "City": "Iasi",
      "ZipCode": "7000-49",
      "State": "Iasi",
      "Street": "Sf Lazar",
      "StreetNumber": "37",
      "HouseNumber": "5A",
      "HouseExtension": "-",
      "Country": "BR"
      },
    "ShippingAddress": null,
    "Articles": null,
    "Card": {
      "HolderName": "John Doe",
      "Number": "411111******1111",
      "ExpirationMonth": "2",
      "ExpirationYear": "2019"
      },
    "CreditCardToken": null,
    "Status": {
      "ID": 3,
      "Info": "Cancelled",
      "Reasons": [
      {
        "Code": 118,
        "Info": "Transaction rejected by merchant"
        }
      ]
    },
    "MethodTransactionID": null,
    "PaymentTokenLifetime": null,
    "Capture": false,
    "Retry": false,
    "RedirectURL": null,
    "3DSecure": false,
    "Fraud": {
      "Status": "Challenge",
      "Score": 55,
      "Reason": "Transaction hit a velocity or rule threshold"
      },
    "Installments": 3
    }
}

Fraud Check – Payment Denied

If the system detects a malicious transaction, that transaction will be rejected by the fraud check provider. You will be given in the response the reason of why the transaction has Failed in the Reason field in the Fraud object.

The card payment is initiated and the Fraud Check system detects a suspicious behavior or rule. The payment is denied.

Request:

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

{
  "Payment": {
    "MerchantTransactionID": "s2ptest_j8",
    "Amount": 100,
    "Currency": "BRL",
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "test payment",
    "StatementDescriptor": "card payment",
    "BillingAddress": {
      "City": "Iasi",
      "ZipCode": "7000-49",
      "State": "Iasi",
      "Street": "Sf Lazar",
      "StreetNumber": "37",
      "HouseNumber": "5A",
      "HouseExtension": "-",
      "Country": "BR"
    },
    "ShippingAddress": null,
    "Customer": {
      "FirstName":"John",
      "LastName":"Doe",
      "Email": "deny@deny.com",
      "SocialSecurityNumber": "00003456789"
    },
    "Card": {
      "HolderName": "John Doe",
      "Number": "4111111111111111",
      "ExpirationMonth": "02",
      "ExpirationYear": "2019",
      "SecurityCode": "312"
    },
    "Installments": 3,
    "Capture": false,
    "Retry": false,
    "GenerateCreditCardToken": false,
    "PaymentTokenLifetime": 100,
    "3DSecure": false,
    "Language": "ro-RO",
    "SkinID": 200
  }
}

Response:

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

{
  "Payment": {
    "ID": 203371,
    "ClientIP": null,
    "SkinID": 200,
    "Created": "20180209082141",
    "MerchantTransactionID": "s2ptest_j8",
    "OriginatorTransactionID": null,
    "Amount": 100,
    "Currency": "BRL",
    "CapturedAmount": "0",
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "test payment",
    "StatementDescriptor": "card payment",
    "MethodID": 6,
    "MethodOptionID": null,
    "SiteID": 1010,
    "NotificationDateTime": null,
    "Customer": {
      "ID": 296,
      "MerchantCustomerID": null,
      "Email": "deny@deny.com",
      "FirstName": "John",
      "LastName": "Doe",
      "Gender": null,
      "SocialSecurityNumber": "00003456789",
      "Phone": null,
      "Company": null
      },
    "BillingAddress": {
      "ID": 9590,
      "City": "Iasi",
      "ZipCode": "7000-49",
      "State": "Iasi",
      "Street": "Sf Lazar",
      "StreetNumber": "37",
      "HouseNumber": "5A",
      "HouseExtension": "-",
      "Country": "BR"
      },
    "ShippingAddress": null,
    "Articles": null,
    "Card": {
      "HolderName": "John Doe",
      "Number": "Ends with 1111",
      "ExpirationMonth": "02",
      "ExpirationYear": "2019"
      },
    "CreditCardToken": null,
    "Status": {
      "ID": 4,
      "Info": "Failed",
      "Reasons": [
        {
          "Code": 116,
          "Info": "Transaction rejected by fraud provider"
          }
        ]
      },
    "MethodTransactionID": null,
    "PaymentTokenLifetime": null,
    "Capture": false,
    "Retry": false,
    "RedirectURL": null,
    "3DSecure": false,
    "Fraud": {
      "Status": "Reject",
      "Score": 74,
      "Reason": "Transaction hit a velocity or rule threshold"
      },
    "Installments": 3
    }
}

Fraud Check – Payment Accepted

Any credit card transaction will undergo a Fraud Check based on the provided parameters. The more parameters are provided, a more accurate precision the fraud check will have.

The card payment is initiated and the Fraud Check system doesn’t detect any suspicious behavior or rule. The payment is accepted.

Request:

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

{
  "Payment": {
    "MerchantTransactionID": "s2ptest_j9",
    "Amount": 100,
    "Currency": "BRL",
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "test payment",
    "StatementDescriptor": "card payment",
    "BillingAddress": {
      "City": "Iasi",
      "ZipCode": "7000-49",
      "State": "Iasi",
      "Street": "Sf Lazar",
      "StreetNumber": "37",
      "HouseNumber": "5A",
      "HouseExtension": "-",
      "Country": "BR"
    },
    "ShippingAddress": null,
    "Customer": {
      "FirstName":"John",
      "LastName":"Doe",
      "Email": "accept@accept.com",
      "SocialSecurityNumber": "00003456789"
    },
    "Card": {
      "HolderName": "John Doe",
      "Number": "4111111111111111",
      "ExpirationMonth": "02",
      "ExpirationYear": "2019",
      "SecurityCode": "312"
    },
    "Installments": 3,
    "Capture": false,
    "Retry": false,
    "GenerateCreditCardToken": false,
    "PaymentTokenLifetime": 100,
    "3DSecure": false,
    "Language": "ro-RO",
    "SkinID": 200
  }
}

Response:

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

{
  "Payment": {
    "ID": 203372,
    "ClientIP": null,
    "SkinID": 200,
    "Created": "20180209082328",
    "MerchantTransactionID": "s2ptest_j9",
    "OriginatorTransactionID": null,
    "Amount": 100,
    "Currency": "BRL",
    "CapturedAmount": "0",
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "test payment",
    "StatementDescriptor": "card payment",
    "MethodID": 6,
    "MethodOptionID": null,
    "SiteID": 1010,
    "NotificationDateTime": null,
    "Customer": {
      "ID": 297,
      "MerchantCustomerID": null,
      "Email": "accept@accept.com",
      "FirstName": "John",
      "LastName": "Doe",
      "Gender": null,
      "SocialSecurityNumber": "00003456789",
      "Phone": null,
      "Company": null
      },
    "BillingAddress": {
      "ID": 9590,
      "City": "Iasi",
      "ZipCode": "7000-49",
      "State": "Iasi",
      "Street": "Sf Lazar",
      "StreetNumber": "37",
      "HouseNumber": "5A",
      "HouseExtension": "-",
      "Country": "BR"
      },
    "ShippingAddress": null,
    "Articles": null,
    "Card": {
      "HolderName": "John Doe",
      "Number": "Ends with 1111",
      "ExpirationMonth": "02",
      "ExpirationYear": "2019"
      },
    "CreditCardToken": null,
    "Status": {
      "ID": 9,
      "Info": "Authorized",
      "Reasons": []
      },
    "MethodTransactionID": null,
    "PaymentTokenLifetime": null,
    "Capture": false,
    "Retry": false,
    "RedirectURL": null,
    "3DSecure": false,
    "Fraud": {
      "Status": "Accept",
      "CheckMode": "CheckOnPreAuthorisation",
      "Score": 0,
      "Reason": "Always accept rule"
      },
    "Installments": 3
    }
}   

Fraud Management

We are providing you with a secure and reliable Fraud Management solution that will protect you from any fraudulent activity and keep you and your customers happy and safe. The Fraud Check system will verify and validate your transactions in order to detect any suspicious transactions and therefore reduce the risk of chargebacks.

There are 3 possible scenarios when initiating a card payment with Fraud Check system on:

  • The card payment is initiated and the Fraud Check system doesn’t detect any suspicious behavior or rule. The payment is accepted. For more details checkout our section: Fraud Check – Payment Accepted.

  • The card payment is initiated and the Fraud Check system detects a suspicious behavior or rule. The payment is denied. For more details checkout our section: Fraud Check – Payment Denied.

  • The card payment is initiated and the Fraud Check system detects a possible suspicious behavior or rule. The payment is challenged by the fraud check provider. You can reject or accept the challenge. For more details checkout our section: Fraud Check – Payment Challenged.

GPay Test Data

For GPay payment method test data is available on demand. Please contact our support department at support@smart2pay.com for more information.

GPay Payment Flow

  1. The customer enters his phone number and his email address.

    1 Enter customer details

  2. The customer receives a 6-digit verification code at the phone number that he previously added. He needs to enter the 6-digit code and click the Confirm button.

    1 SMS Verification

  3. The customer sees the payment details and he needs to choose the payment option in order to complete the payment.

    1 SMS Verification

  4. The customer verifies the payment information and the user details and completes the transaction by clicking on the Perform Payment button.

    1 Perform payment

  5. The customer receives a message that the payment has been completed correctly.

    1 Payment confirmation

  6. Upon completion of the payment flow, the customer is redirected to your ReturnUrl.

    1 Return page when the redirection status is a success

Cards Peru Test Data

For Cards Peru payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

Cards Peru Payment Flow

  1. The customer enters his Email Address, Name and DNI. Please note that for Peru the Customer Social Security Number parameter consists of DNI. For more information about the DNI please click here.

    1 Enter customer details

  2. The customer enters his email address, name and card details: Card Number, CVC (CSC) and Expiration Date. He finalizes the payment by using the Pay button.

    1 Enter card details

  3. The customer receives a message that the payment has been completed correctly.

    1 Payment confirmation

  4. Upon completion of the payment flow the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is Processing

Cards Colombia Test Data

For Cards Colombia payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

Cards Colombia Payment Flow

  1. The customer enters his Email Address, Name and CC. Please note that for Colombia the CustomerSocialSecurityNumber parameter consists of CC. For more information about the CC please click here.

    1 Enter customer details

  2. The customer enters his email address, name and card details: Card Number, CVC (CSC) and Expiration Date. He finalizes the payment by using the Pay button.

    1 Enter card details

  3. The customer receives a message that the payment has been completed correctly.

    1 Payment confirmation

  4. Upon completion of the payment flow the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is Processing

Credit Cards Chile Test Data

For Credit Cards Chile payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

Credit Cards Chile Payment Flow

  1. The customer enters his Email Address, Name and RUT. Please note that for Chile the CustomerSocialSecurityNumber parameter consists of RUT. For more information about the RUT please click here.

    1 Enter customer details

  2. The customer enters his email address, name and card details: Card Number, CVC (CSC) and Expiration Date. He finalizes the payment by using the Pay button.

    1 Enter card details

  3. The customer receives a message that the payment has been completed correctly.

    1 Payment confirmation

  4. Upon completion of the payment flow the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is Processing

WebPay Test Data

For WebPay payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

WebPay Payment Flow

  1. The customer enters his Email Address, Name and RUT. Please note that for Chile the CustomerSocialSecurityNumber parameter consists of RUT. For more information about the RUT please click here.

    1 Enter customer details

  2. The customer needs to choose the preferred payment option and enter the necessary details in order to complete the payment.

    1 Payment details

Servipag Test Data

For Servipag payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

Servipag Payment Flow

  1. The customer enters his Email Address, Name and RUT. Please note that for Chile the CustomerSocialSecurityNumber parameter consists of RUT. For more information about the RUT please click here.

    1 Enter customer details

  2. The customer receives the printable payment details. He needs to pay the exact amount at any Servipag branch in his area.

    1 Payment details

  3. Upon completion of the payment flow the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is Processing

Cash Payment Colombia Test Data

For Cash Payment Colombia payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

Cash Payment Colombia Payment Flow

  1. The customer enters his Email Address, Name and CC, and chooses his preferred payment option from the given list. Please note that for Colombia the CustomerSocialSecurityNumber parameter consists of CC. For more information about the CC please click here.

    1 Enter customer details

  2. The customer sees the payment summary and chooses the payment option.

    1 Payment summary

  3. The customer needs to enter the necessary details in order to complete the transaction.

    1 Payment details

  4. The customer receives the voucher number and payment details. He needs to pay the exact amount at any Efecty, Davivienda, Baloto, Boleto Bancolombia branch.

    1 Payment details

  5. Upon completion of the payment flow the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is Processing

PSE Colombia Test Data

For PSE Colombia payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

PSE Colombia Payment Flow

  1. The customer enters his Email Address, Name and CC. Please note that for Colombia the CustomerSocialSecurityNumber parameter consists of CC. For more information about the CC please click here.

    1 Enter customer details

  2. The customer sees the payment summary and chooses the payment option.

    1 Payment summary

  3. The customer needs to enter the necessary details in order to complete the transaction.

    1 Payment details

  4. Upon completion of the payment flow the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is Processing

Installment Payments

Installment Payments are an easy and reliable way for the customer to pay in monthly installments. You only need to choose the number of installments in order for the customer to pay for the products / services.

For installments number and availability per route and country please check with our support department at support@smart2pay.com.

Request:

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

{
  "Payment": {
    "MerchantTransactionID": "s2ptest_j4",
    "Amount": "100",
    "Currency": "BRL",
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "test payment",
    "StatementDescriptor": "card payment",
    "BillingAddress": {
      "City": "Iasi",
      "ZipCode": "7000-49",
      "State": "Iasi",
      "Street": "Sf Lazar",
      "StreetNumber": "37",
      "HouseNumber": "5A",
      "HouseExtension": "-",
      "Country": "BR"
    },
    "ShippingAddress": null,
    "Customer": {
            "FirstName":"John",
            "LastName":"Doe",
            "Email": "testing2@test.com",
            "SocialSecurityNumber": "00003456789"
    },
    "Card": {
      "HolderName": "John Doe",
      "Number": "4111111111111111",
      "ExpirationMonth": "02",
      "ExpirationYear": "2019",
      "SecurityCode": "312"
    },
    "Installments": 3,
    "Capture": false,
    "Retry": false,
    "GenerateCreditCardToken": false,
    "PaymentTokenLifetime": 100,
    "3DSecure": false,
    "SkinID": 200
  }
}

Response:

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

{
  "Payment": {
    "ID": 203313,
    "ClientIP": null,
    "SkinID": 200,
    "Created": "20180125152757",
    "MerchantTransactionID": "s2ptest_j4",
    "OriginatorTransactionID": null,
    "Amount": "100",
    "Currency": "BRL",
    "CapturedAmount": "0",
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "test payment",
    "StatementDescriptor": "card payment",
    "MethodID": 6,
    "MethodOptionID": null,
    "SiteID": 1010,
    "NotificationDateTime": null,
    "Customer": {
      "ID": 294,
      "MerchantCustomerID": null,
      "Email": "testing2@test.com",
      "FirstName": "John",
      "LastName": "Doe",
      "Gender": null,
      "SocialSecurityNumber": "00003456789",
      "Phone": null,
      "Company": null
      },
    "BillingAddress": {
      "ID": 9590,
      "City": "Iasi",
      "ZipCode": "7000-49",
      "State": "Iasi",
      "Street": "Sf Lazar",
      "StreetNumber": "37",
      "HouseNumber": "5A",
      "HouseExtension": "-",
      "Country": "BR"
      },
    "ShippingAddress": null,
    "Articles": null,
    "Card": {
      "HolderName": "John Doe",
      "Number": "Ends with 1111",
      "ExpirationMonth": "02",
      "ExpirationYear": "2019"
      },
    "CreditCardToken": null,
    "Status": {
      "ID": 9,
      "Info": "Authorized",
      "Reasons": []
      },
    "MethodTransactionID": null,
    "PaymentTokenLifetime": null,
    "Capture": false,
    "Retry": false,
    "RedirectURL": null,
    "3DSecure": false,
    "Fraud": null,
    "Installments": 3
    }
}

Cards Mexico Test Data

For Cards Mexico payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

Cards Mexico Payment Flow

  1. The customer enters his Email Address, Name and CURP/RFC/IFE. Please note that for Mexico the Customer Social Security Number parameter consists of CURP/RFC/IFE. For more information about the CURP/RFC/IFE please click here.

    1 Enter customer details

  2. The customer enters his email address, name and card details: Card Number, CVC (CSC) and Expiration Date. He finalizes the payment by using the Pay button.

    1 Enter card details

  3. The customer receives a message that the payment has been completed correctly.

    1 Payment confirmation

  4. Upon completion of the payment flow the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is Processing

Bank Transfer Peru Test Data

For Bank Transfer Peru payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

Bank Transfer Peru Payment Flow

  1. The customer enters his Email Address, Name and DNI. Please note that for Peru the Customer Social Security Number parameter consists of DNI. For more information about the DNI please click here.

    1 Enter customer details

  2. The customer receives the printable payment details in order to complete the payment.

    1 Payment details

  3. Upon completion of the payment flow the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is Processing

Cash Payment Peru Test Data

For Cash Payment Peru payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

Cash Payment Peru Payment Flow

  1. The customer enters his Email Address, Name and DNI. Please note that for Peru the Customer Social Security Number parameter consists of DNI. For more information about the DNI please click here.

    1 Enter customer details

  2. The customer receives the printable payment details in order to complete the payment.

    1 Payment details

  3. Upon completion of the payment flow the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is Processing

SPEI Test Data

For SPEI payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

SPEI Payment Flow

  1. The customer enters his Email Address, Name and CURP/RFC/IFE. Please note that for Mexico the Customer Social Security Number parameter consists of CURP/RFC/IFE. For more information about the CURP/RFC/IFE please click here.

    1 Enter customer details

  2. The customer receives the printable payment details in order to complete the payment.

    1 Enter account details

  3. Upon completion of the payment flow the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is Processing

Oxxo Test Data

For Oxxo payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

Oxxo Payment Flow

  1. The customer enters his Email Address, Name and CURP/RFC/IFE. Please note that for Mexico the Customer Social Security Number parameter consists of CURP/RFC/IFE. For more information about the CURP/RFC/IFE please click here.

    1 Enter customer details

  2. The customer receives the printable voucher. In order to complete the payment, he needs to print the voucher and present it to any Oxxo store in his area to make the payment.

    1 Enter account details

  3. Upon completion of the payment flow the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is Processing

Bank Transfer Mexico Test Data

For Bank Transfer Mexico payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

Bank Transfer Mexico Payment Flow

  1. The customer enters his Email Address, Name and CURP/RFC/IFE, and chooses his preferred payment option from the given list. Please note that for Mexico the Customer Social Security Number parameter consists of CURP/RFC/IFE. For more information about the CURP/RFC/IFE please click here.

    1 Enter customer details

  2. The customer can print the payment details and complete the payment in the next 48 hours at the corresponding bank. Payment confirmation may take between 24 and 48 business hours.

    1 Payment details

  3. Upon completion of the payment flow the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is Processing

Online Bank Transfer Brazil Test Data

For Online Bank Transfer Brazil payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

Online Bank Transfer Brazil Payment Flow

  1. The customer enters his Email Address, Name and CPF/CNPJ, and chooses his preferred payment option from the given list. Please note that for Brazil the Customer Social Security Number parameter consists of CPF/CNPJ. For more information about the CPF/CNPJ please click here.

    1 Enter customer details

  2. The customer logs in to his account by entering his login details in order to make the payment.

    1 Voucher

  3. Upon completion of the payment flow the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is Processing

Boleto Brazil Test Data

For Boleto Brazil payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

Boleto Brazil Payment Flow

  1. The customer enters his Email Address, Name and CPF/CNPJ. Please note that for Brazil the Customer Social Security Number parameter consists of CPF/CNPJ. For more information about the CPF/CNPJ please click here.

    1 Enter customer details

  2. The customer receives the Boleto with all the necessary payment details. In order to complete the payment, he needs to print the Boleto and go to a physical bank branch in his area and pay with cash, use online banking, or simply go to an ATM machine.

    1 Print Boleto

  3. Upon completion of the payment flow the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is Processing

Credit Cards Brazil Test Data

For Credit Cards Brazil payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

Credit Cards Brazil Payment Flow

  1. The customer enters his Email Address, Name and CPF / CNPJ. Please note that for Brazil the Customer Social Security Number parameter consists of CPF / CNPJ. For more information about the CPF / CNPJ please click here.

    1 Enter customer details

  2. The customer enters his name and card details: Card Number, CVC (CSC) and Expiration Date. He finalizes the payment by using the Pay button.

    1 Enter card details

  3. Upon completion of the payment flow the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is Processing

Cards LATAM Test Data

For Cards LATAM payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

Cards LATAM Payment Flow

  1. The customer enters his Email Address, Name and his Customer Social Security Number, and chooses his preferred payment option from the given list. See below of what the CustomerSocialSecurityNumber parameter consists of depending on the selected country.

    Country Customer Social Security Number
    Argentina For Argentina the CustomerSocialSecurityNumber parameter consists of DNI. For more information about the DNI please click here.
    Brazil For Brazil the CustomerSocialSecurityNumber parameter consists of CPF/CNPJ. For more information about the CPF/CNPJ please click here.
    Chile For Chile the CustomerSocialSecurityNumber parameter consists of RUT. For more information about the RUT please click here.
    Colombia For Colombia the CustomerSocialSecurityNumber parameter consists of CC. For more information about the CC please click here.
    Mexico For Mexico the CustomerSocialSecurityNumber parameter consists of CURP/RFC/IFE. For more information about the CURP/RFC/IFE please click here.
    Uruguay For Uruguay the CustomerSocialSecurityNumber parameter consists of CI. For more information about the CI please click here.
    Peru For Peru the CustomerSocialSecurityNumber parameter consists of DNI. For more information about the DNI please click here.

    1 Enter customer details

  2. The customer receives the printable voucher. In order to complete the payment, he needs to print the voucher and present it to any Rapi Pago or Pago Fácil store in his area to make the payment.

    1 Voucher

  3. Upon completion of the payment flow the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is Processing

Pago Fácil Test Data

For Pago Fácil payment method there aren’t any test data available, but you can see how it works with the payment flow given below.

Pago Fácil Payment Flow

  1. The customer enters his Email Address, Name and National Identity Document (DNI), and chooses his preferred payment option from the given list. Please note that for Argentina the Customer Social Security Number parameter consists of DNI. For more information about the DNI please click here.

    1 Enter customer details

  2. The customer receives the printable voucher. In order to complete the payment, he needs to print the voucher and present it to any Pago Fácil store in his area to make the payment.

    1 Enter account details

  3. Upon completion of the payment flow the customer is redirected back to your ReturnURL.

    1 Return page when the redirection status is Processing