Momo Test Data

In order for you to test the Momo payment method successfully, please use the below test data. You can also see how it works with the payment flows given below for Desktop and for Mobile devices. For testing purposes, you need to have installed the Momo application on your mobile device.

Momo Test Data
Data Value
Phone Number: 01228038440
Verification code: 000000
Payment password: 000000

Momo Desktop Payment Flow

  1. The customer enters his email address.

    1 Enter email

  2. The customer is redirected to the Momo payment page where he scans the QR Code using the Momo application already installed on his mobile phone. He has 10 minutes in order to successfully scan the QR Code.

    1 QR Code page

  3. After the customer confirms the payment via his mobile phone application, the payment is successful and the user is redirected to the Momo payment confirmation page.

    1 Payment confirmation page.

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

    1 Return page when the redirection status is a success

Momo Mobile Payment Flow

  1. The customer enters his email address.

    1 Enter email

  2. The customer is redirected to the Momo application already installed on his mobile phone where he logs into the Momo application using his phone number.

    1 Momo application

  3. The customer enters the verification code received via his mobile phone.

    1 Verification code

  4. The customer logs into Momo application by entering his password.

    1 Account password

  5. The customer is redirected to the payment details form where he confirms the payment by clicking on the Confirm button.

     1=

  6. The customer enters his account password in order to complete the payment.

    1 Payment confirmation page

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

    1 Return page when the redirection status is a success

AlipayHK Recurring Payment

Definition: POST /v1/payments/recurrent

A recurring payment is created in the same manner a one-off payment is created. In addition, you need to send the PreapprovalID (the PreapprovalID received when you created/opened a preapproval) and the information specific to each payment method.

For AlipayHK (1145), you need to send the PreapprovalID (the PreapprovalID received when you created/opened a preapproval) and the Amount to be captured.

Checkout the below example of a recurring payment request for AlipayHK (1145) that is based on the PreapprovalID. Please send in the payment request the Description parameter and Country parameter that should be the same with the one sent in the Preapproval request.

Request:

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

{
  "Payment": {
    "PreapprovalID": 28082,
    "MerchantTransactionID": "s2ptest_alipayhk2",
    "Amount": 100,
    "Currency": "HKD",
    "MethodID": 1145,
    "Description": "Recurring payment",
    "BillingAddress": {
    "Country": "HK"
    } 
  }
}

Response:

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

{
    "Payment": {
        "ID": 5879765,
        "SkinID": null,
        "ClientIP": null,
        "Created": "20210202171203",
        "MerchantTransactionID": "s2ptest_alipayhk2",
        "OriginatorTransactionID": null,
        "Amount": "100",
        "Currency": "HKD",
        "CapturedAmount": null,
        "ReturnURL": null,
        "Description": "Recurring payment",
        "MethodID": 1145,
        "MethodOptionID": null,
        "IncludeMethodIDs": null,
        "ExcludeMethodIDs": null,
        "PrioritizeMethodIDs": null,
        "SiteID": 30201,
        "NotificationDateTime": null,
        "Customer": null,
        "BillingAddress": {
            "ID": 986,
            "City": null,
            "ZipCode": null,
            "State": null,
            "Street": null,
            "StreetNumber": null,
            "HouseNumber": null,
            "HouseExtension": null,
            "Country": "HK"
        },
        "ShippingAddress": null,
        "Articles": null,
        "Details": null,
        "ReferenceDetails": null,
        "CustomParameters": null,
        "PreapprovalID": 28082,
        "Status": {
            "ID": 1,
            "Info": "Open",
            "Reasons": null
        },
        "Fraud": null,
        "MethodTransactionID": null,
        "TokenLifetime": null,
        "Capture": null,
        "PreapprovalDetails": null,
        "RedirectURL": null,
        "Splits": null
    }
}

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.

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

Payment notification format:

Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=

{
  "Payment": {
    "ID": 5879765,
    "SkinID": null,
    "ClientIP": null,
    "Created": "20210202171203",
    "MerchantTransactionID": "s2ptest_alipayhk2",
    "OriginatorTransactionID": null,
    "Amount": "100",
    "Currency": "HKD",
    "CapturedAmount": null,
    "ReturnURL": "",
    "Description": "Recurring payment",
    "MethodID": 1145,
    "MethodOptionID": null,
    "IncludeMethodIDs": null,
    "ExcludeMethodIDs": null,
    "PrioritizeMethodIDs": null,
    "SiteID": 30201,
    "NotificationDateTime": null,
    "Customer": null,
    "BillingAddress": {
      "ID": 986,
      "City": null,
      "ZipCode": null,
      "State": null,
      "Street": null,
      "StreetNumber": null,
      "HouseNumber": null,
      "HouseExtension": null,
      "Country": "HK"
    },
    "ShippingAddress": null,
    "Articles": null,
    "Details": null,
    "ReferenceDetails": null,
    "CustomParameters": null,
    "PreapprovalID": 28082,
    "Status": {
      "ID": 2,
      "Info": "Success",
      "Reasons": null
    },
    "Fraud": null,
    "MethodTransactionID": null,
    "TokenLifetime": null,
    "Capture": null,
    "PreapprovalDetails": null,
    "RedirectURL": null,
    "Splits": null
  }
}

AlipayHK Preapproval Notification

We will notify you about the new status of the preapproval 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)!

Preapproval notification format:

Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=



{
  "Preapproval": {
    "ID": 28082,
    "Created": "20210202165209",
    "MethodID": 1145,
    "SiteID": 30201,
    "MerchantPreapprovalID": "s2ptest_alipayhk1",
    "RecurringPeriod": null,
    "PreapprovedMaximumAmount": null,
    "Currency": null,
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "1 year subscription",
    "Customer": {
      "ID": 2625948,
      "MerchantCustomerID": null,
      "Email": "jdoe@gmail.com",
      "FirstName": "John",
      "LastName": "Doe",
      "Gender": null,
      "SocialSecurityNumber": null,
      "Phone": null,
      "Company": null,
      "DateOfBirth": null
    },
    "BillingAddress": {
      "ID": 986,
      "City": null,
      "ZipCode": null,
      "State": null,
      "Street": null,
      "StreetNumber": null,
      "HouseNumber": null,
      "HouseExtension": null,
      "Country": "HK"
    },
    "Status": {
      "ID": 2,
      "Info": null,
      "Reasons": null
    },
    "RedirectURL": null,
    "MethodOptionID": null,
    "PreapprovedFrequency": null,
    "MandateReference": null,
    "Details": null
  }
}

AlipayHK Preapproval Request

Definition: POST /v1/preapprovals

To initiate a preapproval, you must create a preapproval object. The parameters of the preapproval are sent in the message body as a JSON object. See below an example of a preapproval request for AlipayHK (1143).

Request:

POST https://paytest.smart2pay.com/v1/preapprovals
Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=

{
 "Preapproval": {
   "MerchantPreapprovalID": "s2ptest_alipayhk1",
   "Currency": "HKD",
   "Description": "1 year subscription",
   "ReturnURL": "http://demo.smart2pay.com/redirect.php",
   "MethodID": 1145,
   "Customer": {
      "FirstName": "John",
      "LastName": "Doe",
      "Email": "jdoe@gmail.com"
     },
   "BillingAddress": {
      "Country": "HK"
      }
   }
}

Response:

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

{
    "Preapproval": {
        "ID": 28082,
        "Created": "20210202165209",
        "MethodID": 1145,
        "SiteID": 30201,
        "MerchantPreapprovalID": "s2ptest_alipayhk1",
        "RecurringPeriod": 0,
        "PreapprovedMaximumAmount": null,
        "Currency": "HKD",
        "ReturnURL": "http://demo.smart2pay.com/redirect.php",
        "Description": "1 year subscription",
        "Customer": {
            "ID": 2625948,
            "MerchantCustomerID": null,
            "Email": "jdoe@gmail.com",
            "FirstName": "John",
            "LastName": "Doe",
            "Gender": null,
            "SocialSecurityNumber": null,
            "Phone": null,
            "Company": null,
            "DateOfBirth": null
        },
        "BillingAddress": {
            "ID": 986,
            "City": null,
            "ZipCode": null,
            "State": null,
            "Street": null,
            "StreetNumber": null,
            "HouseNumber": null,
            "HouseExtension": null,
            "Country": "HK"
        },
        "Status": {
            "ID": 1,
            "Info": "Pending",
            "Reasons": null
        },
        "RedirectURL": "https://europaytest.smart2pay.com/AlipayOSP/Preapproval/PreapprovalLanding.aspx?ID=23265&Hash=030CBF27F3759B369266CCBC5D84C98A",
        "MethodOptionID": 0,
        "PreapprovedFrequency": null,
        "MandateReference": null,
        "Details": null
    }
}

AlipayHK Preapproval Flow

  1. The customer is redirected to AlipayHK page. The customer needs to add their phone number attached to the AlipayHK wallet.
    1 Add phone number
  2. The customer enters the SMS verification code received via mobile phone.
    1 Verification Code
  3. The customer sees the preapproval details, agrees with the AlipayHK Terms and Conditions and confirms the auto-debit user agreement.
    1 Confirm agreement
  4. The customer enters the payment password. For testing purposes, enter any 6 digit number eg. 123456.
    1 Confirm agreement
  5. The customer is redirected to the AlipayHK confirmation page.
    1 Confirmation page
  6. Upon completion of the payment flow, the customer is redirected to your ReturnUrl.1 Return page when the redirection status is processing

TouchnGo Recurring Payment

Definition: POST /v1/payments/recurrent

A recurring payment is created in the same manner a one-off payment is created. In addition, you need to send the PreapprovalID (the PreapprovalID received when you created/opened a preapproval) and the information specific to each payment method.

For TouchnGo (1144), you need to send the PreapprovalID (the PreapprovalID received when you created/opened a preapproval) and the Amount to be captured.

Checkout the below example of a recurring payment request for TouchnGo (1144) that is based on the PreapprovalID. Please send in the payment request the Description parameter and Country parameter that should be the same with the ones sent in the Preapproval request.

Request:

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

{
  "Payment": {
    "PreapprovalID": 28080,
    "MerchantTransactionID": "s2ptest_tng2",
    "Amount": 100,
    "Currency": "MYR",
    "MethodID": 1144,
    "Description": "Recurring payment",
    "BillingAddress": {
    "Country": "MY"
    } 
  }
}

Response:

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

{
    "Payment": {
        "ID": 5879762,
        "SkinID": null,
        "ClientIP": null,
        "Created": "20210202162904",
        "MerchantTransactionID": "s2ptest_tng2",
        "OriginatorTransactionID": null,
        "Amount": "100",
        "Currency": "MYR",
        "CapturedAmount": null,
        "ReturnURL": null,
        "Description": "Recurring payment",
        "MethodID": 1144,
        "MethodOptionID": null,
        "IncludeMethodIDs": null,
        "ExcludeMethodIDs": null,
        "PrioritizeMethodIDs": null,
        "SiteID": 30201,
        "NotificationDateTime": null,
        "Customer": null,
        "BillingAddress": {
            "ID": 701,
            "City": null,
            "ZipCode": null,
            "State": null,
            "Street": null,
            "StreetNumber": null,
            "HouseNumber": null,
            "HouseExtension": null,
            "Country": "MY"
        },
        "ShippingAddress": null,
        "Articles": null,
        "Details": null,
        "ReferenceDetails": null,
        "CustomParameters": null,
        "PreapprovalID": 28080,
        "Status": {
            "ID": 1,
            "Info": "Open",
            "Reasons": null
        },
        "Fraud": null,
        "MethodTransactionID": null,
        "TokenLifetime": null,
        "Capture": null,
        "PreapprovalDetails": null,
        "RedirectURL": null,
        "Splits": null
    }
}

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.

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

Payment notification format:

Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=

{
  "Payment": {
    "ID": 5879762,
    "SkinID": null,
    "ClientIP": null,
    "Created": "20210202162904",
    "MerchantTransactionID": "s2ptest_tng2",
    "OriginatorTransactionID": null,
    "Amount": "100",
    "Currency": "MYR",
    "CapturedAmount": null,
    "ReturnURL": "",
    "Description": "Recurring payment",
    "MethodID": 1144,
    "MethodOptionID": null,
    "IncludeMethodIDs": null,
    "ExcludeMethodIDs": null,
    "PrioritizeMethodIDs": null,
    "SiteID": 30201,
    "NotificationDateTime": null,
    "Customer": null,
    "BillingAddress": {
      "ID": 701,
      "City": null,
      "ZipCode": null,
      "State": null,
      "Street": null,
      "StreetNumber": null,
      "HouseNumber": null,
      "HouseExtension": null,
      "Country": "MY"
    },
    "ShippingAddress": null,
    "Articles": null,
    "Details": null,
    "ReferenceDetails": null,
    "CustomParameters": null,
    "PreapprovalID": 28080,
    "Status": {
      "ID": 2,
      "Info": "Success",
      "Reasons": null
    },
    "Fraud": null,
    "MethodTransactionID": null,
    "TokenLifetime": null,
    "Capture": null,
    "PreapprovalDetails": null,
    "RedirectURL": null,
    "Splits": null
  }
}

TouchnGo Preapproval Notification

We will notify you about the new status of the preapproval 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)!

Preapproval notification format:

Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=



{
  "Preapproval": {
    "ID": 28080,
    "Created": "20210202161103",
    "MethodID": 1144,
    "SiteID": 30201,
    "MerchantPreapprovalID": "s2ptest_tng1",
    "RecurringPeriod": null,
    "PreapprovedMaximumAmount": null,
    "Currency": null,
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "1 year subscription",
    "Customer": {
      "ID": 2625948,
      "MerchantCustomerID": null,
      "Email": "jdoe@gmail.com",
      "FirstName": "John",
      "LastName": "Doe",
      "Gender": null,
      "SocialSecurityNumber": null,
      "Phone": null,
      "Company": null,
      "DateOfBirth": null
    },
    "BillingAddress": {
      "ID": 701,
      "City": null,
      "ZipCode": null,
      "State": null,
      "Street": null,
      "StreetNumber": null,
      "HouseNumber": null,
      "HouseExtension": null,
      "Country": "MY"
    },
    "Status": {
      "ID": 2,
      "Info": null,
      "Reasons": null
    },
    "RedirectURL": null,
    "MethodOptionID": null,
    "PreapprovedFrequency": null,
    "MandateReference": null,
    "Details": null
  }
}

TouchnGo Preapproval Request

Definition: POST /v1/preapprovals

To initiate a preapproval, you must create a preapproval object. The parameters of the preapproval are sent in the message body as a JSON object. See below an example of a preapproval request for TouchnGo (1144).

Request:

POST https://paytest.smart2pay.com/v1/preapprovals
Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=

{
 "Preapproval": {
   "MerchantPreapprovalID": "s2ptest_tng1",
   "Currency": "MYR",
   "Description": "1 year subscription",
   "ReturnURL": "http://demo.smart2pay.com/redirect.php",
   "MethodID": 1144,
   "Customer": {
      "FirstName": "John",
      "LastName": "Doe",
      "Email": "jdoe@gmail.com"
     },
   "BillingAddress": {
      "Country": "MY"
      }
   }
}

Response:

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

{
    "Preapproval": {
        "ID": 28080,
        "Created": "20210202161103",
        "MethodID": 1144,
        "SiteID": 30201,
        "MerchantPreapprovalID": "s2ptest_tng1",
        "RecurringPeriod": 0,
        "PreapprovedMaximumAmount": null,
        "Currency": "MYR",
        "ReturnURL": "http://demo.smart2pay.com/redirect.php",
        "Description": "1 year subscription",
        "Customer": {
            "ID": 2625948,
            "MerchantCustomerID": null,
            "Email": "jdoe@gmail.com",
            "FirstName": "John",
            "LastName": "Doe",
            "Gender": null,
            "SocialSecurityNumber": null,
            "Phone": null,
            "Company": null,
            "DateOfBirth": null
        },
        "BillingAddress": {
            "ID": 701,
            "City": null,
            "ZipCode": null,
            "State": null,
            "Street": null,
            "StreetNumber": null,
            "HouseNumber": null,
            "HouseExtension": null,
            "Country": "MY"
        },
        "Status": {
            "ID": 1,
            "Info": "Pending",
            "Reasons": null
        },
        "RedirectURL": "https://europaytest.smart2pay.com/AlipayOSP/Preapproval/PreapprovalLanding.aspx?ID=23263&Hash=DE44DA5FA939A8B396DDE346A66835D6",
        "MethodOptionID": 0,
        "PreapprovedFrequency": null,
        "MandateReference": null,
        "Details": null
    }
}

TouchnGo Preapproval Flow

  1. The customer is redirected to TouchnGo page. The customer needs to add their phone number attached to the TouchnGo wallet and the 6 digit PIN. For testing purposes, please enter any 6 digit number eg. 123456.
    1 Add phone number
  2. The customer confirms the auto-debit user agreement.
    1 Confirm agreement
  3. The customer is redirected to the TouchnGo confirmation page.
    1 Add phone number
  4. Upon completion of the payment flow, the customer is redirected to your ReturnUrl.1 Return page when the redirection status is processing

Truemoney Recurring Payment

Definition: POST /v1/payments/recurrent

A recurring payment is created in the same manner a one-off payment is created. In addition, you need to send the PreapprovalID (the PreapprovalID received when you created/opened a preapproval) and the information specific to each payment method.

For Truemoney (1143), you need to send the PreapprovalID (the PreapprovalID received when you created/opened a preapproval) and the Amount to be captured.

Checkout the below example of a recurring payment request for Truemoney (1143) that is based on the PreapprovalID. Please send in the payment request the Description parameter and Country parameter that should be the same with the ones sent in the Preapproval request.

Request:

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

{
  "Payment": {
    "PreapprovalID": 28076,
    "MerchantTransactionID": "s2ptest_truemoney1",
    "Amount": 100,
    "Currency": "THB",
    "MethodID": 1143,
    "Description": "recurring payment",
    "BillingAddress": {
    "Country": "TH"
    } 
  }
}

Response:

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

{
    "Payment": {
        "ID": 5879743,
        "SkinID": null,
        "ClientIP": null,
        "Created": "20210202154700",
        "MerchantTransactionID": "s2ptest_truemoney1",
        "OriginatorTransactionID": null,
        "Amount": "100",
        "Currency": "THB",
        "CapturedAmount": null,
        "ReturnURL": null,
        "Description": "recurring payment",
        "MethodID": 1143,
        "MethodOptionID": null,
        "IncludeMethodIDs": null,
        "ExcludeMethodIDs": null,
        "PrioritizeMethodIDs": null,
        "SiteID": 30201,
        "NotificationDateTime": null,
        "Customer": null,
        "BillingAddress": {
            "ID": 1540,
            "City": null,
            "ZipCode": null,
            "State": null,
            "Street": null,
            "StreetNumber": null,
            "HouseNumber": null,
            "HouseExtension": null,
            "Country": "TH"
        },
        "ShippingAddress": null,
        "Articles": null,
        "Details": null,
        "ReferenceDetails": null,
        "CustomParameters": null,
        "PreapprovalID": 28076,
        "Status": {
            "ID": 1,
            "Info": "Open",
            "Reasons": null
        },
        "Fraud": null,
        "MethodTransactionID": null,
        "TokenLifetime": null,
        "Capture": null,
        "PreapprovalDetails": null,
        "RedirectURL": null,
        "Splits": null
    }
}

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.

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

Payment notification format:

Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=

{
  "Payment": {
    "ID": 5879743,
    "SkinID": null,
    "ClientIP": null,
    "Created": "20210202154700",
    "MerchantTransactionID": "s2ptest_truemoney1",
    "OriginatorTransactionID": null,
    "Amount": "100",
    "Currency": "THB",
    "CapturedAmount": null,
    "ReturnURL": "",
    "Description": "recurring payment",
    "MethodID": 1143,
    "MethodOptionID": null,
    "IncludeMethodIDs": null,
    "ExcludeMethodIDs": null,
    "PrioritizeMethodIDs": null,
    "SiteID": 30201,
    "NotificationDateTime": null,
    "Customer": null,
    "BillingAddress": {
      "ID": 1540,
      "City": null,
      "ZipCode": null,
      "State": null,
      "Street": null,
      "StreetNumber": null,
      "HouseNumber": null,
      "HouseExtension": null,
      "Country": "TH"
    },
    "ShippingAddress": null,
    "Articles": null,
    "Details": null,
    "ReferenceDetails": null,
    "CustomParameters": null,
    "PreapprovalID": 28076,
    "Status": {
      "ID": 2,
      "Info": "Success",
      "Reasons": null
    },
    "Fraud": null,
    "MethodTransactionID": null,
    "TokenLifetime": null,
    "Capture": null,
    "PreapprovalDetails": null,
    "RedirectURL": null,
    "Splits": null
  }
}

Truemoney Preapproval Notification

We will notify you about the new status of the preapproval 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)!

Preapproval notification format:

Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=



{
  "Preapproval": {
    "ID": 28076,
    "Created": "20210202153841",
    "MethodID": 1143,
    "SiteID": 30201,
    "MerchantPreapprovalID": "s2ptest_truemoney3",
    "RecurringPeriod": null,
    "PreapprovedMaximumAmount": null,
    "Currency": null,
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "1 year subscription",
    "Customer": {
      "ID": 2625948,
      "MerchantCustomerID": null,
      "Email": "jdoe@gmail.com",
      "FirstName": "John",
      "LastName": "Doe",
      "Gender": null,
      "SocialSecurityNumber": null,
      "Phone": null,
      "Company": null,
      "DateOfBirth": null
    },
    "BillingAddress": {
      "ID": 1540,
      "City": null,
      "ZipCode": null,
      "State": null,
      "Street": null,
      "StreetNumber": null,
      "HouseNumber": null,
      "HouseExtension": null,
      "Country": "TH"
    },
    "Status": {
      "ID": 2,
      "Info": null,
      "Reasons": null
    },
    "RedirectURL": null,
    "MethodOptionID": null,
    "PreapprovedFrequency": null,
    "MandateReference": null,
    "Details": null
  }
}

Truemoney Preapproval Request

Definition: POST /v1/preapprovals

To initiate a preapproval, you must create a preapproval object. The parameters of the preapproval are sent in the message body as a JSON object. See below an example of a preapproval request for Truemoney (1143).

Request:

POST https://paytest.smart2pay.com/v1/preapprovals
Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=

{
 "Preapproval": {
   "MerchantPreapprovalID": "s2ptest_truemoney3",
   "Currency": "THB",
   "Description": "1 year subscription",
   "ReturnURL": "http://demo.smart2pay.com/redirect.php",
   "MethodID": 1143,
   "Customer": {
      "FirstName": "John",
      "LastName": "Doe",
      "Email": "jdoe@gmail.com"
     },
   "BillingAddress": {
      "Country": "TH"
      }
   }
}

Response:

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

{
    "Preapproval": {
        "ID": 28076,
        "Created": "20210202153841",
        "MethodID": 1143,
        "SiteID": 30201,
        "MerchantPreapprovalID": "s2ptest_truemoney3",
        "RecurringPeriod": 0,
        "PreapprovedMaximumAmount": null,
        "Currency": "THB",
        "ReturnURL": "http://demo.smart2pay.com/redirect.php",
        "Description": "1 year subscription",
        "Customer": {
            "ID": 2625948,
            "MerchantCustomerID": null,
            "Email": "jdoe@gmail.com",
            "FirstName": "John",
            "LastName": "Doe",
            "Gender": null,
            "SocialSecurityNumber": null,
            "Phone": null,
            "Company": null,
            "DateOfBirth": null
        },
        "BillingAddress": {
            "ID": 1540,
            "City": null,
            "ZipCode": null,
            "State": null,
            "Street": null,
            "StreetNumber": null,
            "HouseNumber": null,
            "HouseExtension": null,
            "Country": "TH"
        },
        "Status": {
            "ID": 1,
            "Info": "Pending",
            "Reasons": null
        },
        "RedirectURL": "https://europaytest.smart2pay.com/AlipayOSP/Preapproval/PreapprovalLanding.aspx?ID=23259&Hash=50143980E584E7DEE54CBA48BA1EC543",
        "MethodOptionID": 0,
        "PreapprovedFrequency": null,
        "MandateReference": null,
        "Details": null
    }
}

Truemoney Preapproval Flow

  1. The customer is redirected to Truemoney page. The customer needs to add their phone number attached to the Truemoney wallet and the password.1 Add phone number
  2. The customer confirms the auto-debit user agreement1 Confirm agreement
  3. Upon completion of the payment flow, the customer is redirected to your ReturnUrl.1 Return page when the redirection status is processing

Truemoney Test Data

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

Truemoney Payment Flow

  1. The customer is redirected to the Truemoney website where they are prompted to scan a QR code using the Truemoney app.

    1 Type of payment

  2. The user confirms the payment and it is redirected to the Result page.

    1 Payment confirmation

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

    1 Return page when the redirection status is a success

Touch and Go Test Data

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

Touch and Go Payment Flow

  1. The customer is redirected to the Touch and Go website where they are prompted to scan a QR code using the Touch and Go app.

    1 Type of payment

  2. The user confirms the payment and it is redirected to the Result page.

    1 Payment confirmation

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

    1 Return page when the redirection status is a success

AlipayHK Test Data

In order for you to test the AlipayHK payment method successfully, please use the below test data.

AlipayHK Test Data
Data Value
Phone Number: Enter any 10 digit number. Example: 1234567812
Authentication code: Enter any 6 digit number. Example: 123456
Payment password: Enter any 6 digit number. Example: 123456

AlipayHK Payment Flow

  1. The customer is redirected to the AlipayHK website where they are prompted to scan a QR code using the AlipayHK app.

    1 Enter phone

  2. The customer is redirected to AlipayHK page. The user needs to add their phone number attached to the AlipayHK wallet and request a verification code.

    1 Enter Authentication Code

  3. The customer needs to enter the verification code received via SMS on the phone number linked to the AlipayHK wallet.

    1 Account login

  4. The user confirms the payment and the Amount to be charged.

    1 Payment password

  5. The user needs to enter the payment password.

    1 Payment password

  6. The user is redirected to the payment confirmation page where he can see the payment amount details.

    1 Payment password

  7. The payment is successful and the user is redirected to the AlipayHK payment confirmation page.

    1 Payment password

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

    1 Return page when the redirection status is a success

KakaoPay Test Data

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

Kakaopay Payment Flow

  1. The customer is redirected to the KakaoPay website where they are prompted to scan a QR code using the KakaoPay app. For testing purposes the minimum payment amount is 50 KRW.

    1 Type of payment

  2. The customer confirms the payment using biometric verification or their 6-digit PIN.

    1 Payment confirmation

  3. The customer sees the payment details and a message confirmation of 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

Marketplace Split Payments API

Split Payments is a unique feature that allows you to split a payment to several SiteIDs previously linked to your merchant account.
You can initiate a payment with one or more Splits objects depending on the SiteID. The Split object must contain the following parameters: SiteID, Amount, MerchantTransactionID and the OriginatorTransactionID (optional).

Also MethodID is required to be sent for Payments with Splits.

The Authorization header of the request must contain the SiteID and APIKey of the Marketplace.

One-Step Split Payments

Definition: POST /v1/payments

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

Request:

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

{
  "Payment": {
    "MerchantTransactionID": "s2ptest_split1",
    "Amount": "100",
    "Currency": "EUR",      
    "MethodID": 9,
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",      
    "TokenLifetime": 10,
    "Customer": {    
      "Email": "youremail@email.com",
      "FirstName": "test",
      "LastName": "demo"      
    },    
    "BillingAddress":  {
    "Country": "RO"
    },
    "Splits": [
     {
      "SiteID": 33513,  
      "Amount": "60",
      "MerchantTransactionID": "s2p_test1ad", 
      "OriginatorTransactionID": "4324322e"
   },
    {
      "SiteID":33512,  
      "Amount": "20",
      "MerchantTransactionID": "s2p_test1ad", 
      "OriginatorTransactionID": "421432s"
   },
    {
      "SiteID": 33511,  
      "Amount": "20",
      "MerchantTransactionID": "s2p_test1ad", 
      "OriginatorTransactionID": "2241412e"
      }
    ]
  }
}

Response:

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

{
  "Payment": {
    "ID": 5581804,
    "SkinID": null,
    "ClientIP": null,
    "Created": "20201202122951",
    "MerchantTransactionID": "s2ptest_split1",
    "OriginatorTransactionID": null,
    "Amount": "100",
    "Currency": "EUR",
    "CapturedAmount": null,
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "",
    "MethodID": 9,
    "MethodOptionID": null,
    "IncludeMethodIDs": null,
    "ExcludeMethodIDs": null,
    "PrioritizeMethodIDs": null,
    "SiteID": 33513,
    "NotificationDateTime": null,
    "Customer": {
      "MerchantCustomerID": null,
      "Email": "youremail@email.com",
      "FirstName": "test",
      "LastName": "demo",
      "Gender": null,
      "SocialSecurityNumber": null,
      "Phone": null,
      "Company": null,
      "DateOfBirth": null
    },
    "BillingAddress": {
      "City": null,
      "ZipCode": null,
      "State": null,
      "Street": null,
      "StreetNumber": null,
      "HouseNumber": null,
      "HouseExtension": null,
      "Country": "RO"
    },
    "ShippingAddress": null,
    "Articles": null,
    "Details": null,
    "ReferenceDetails": null,
    "CustomParameters": null,
    "PreapprovalID": null,
    "Status": {
      "ID": 1,
      "Info": "Open",
      "Reasons": null
    },
    "Fraud": null,
    "MethodTransactionID": null,
    "TokenLifetime": 10,
    "Capture": null,
    "PreapprovalDetails": null,
    "RedirectURL": "https://apitest.smart2pay.com/Home?PaymentToken=17CBE5EE17ADF6C3A52EC29B3B1E26B8.5581804",
    "Splits": [
      {
        "ID": 488,
        "PaymentID": 5581804,
        "SiteID": 33513,
        "MerchantTransactionID": "s2p_test1ad",
        "OriginatorTransactionID": "4324322e",
        "Created": "20201202122951",
        "Amount": "60",
        "Currency": "EUR",
        "CapturedAmount": "",
        "StateDetails": {
          "ID": 1,
          "Info": "Open",
          "Reasons": null
        }
      },
      {
        "ID": 489,
        "PaymentID": 5581804,
        "SiteID": 33512,
        "MerchantTransactionID": "s2p_test1ad",
        "OriginatorTransactionID": "421432s",
        "Created": "20201202122951",
        "Amount": "20",
        "Currency": "EUR",
        "CapturedAmount": "",
        "StateDetails": {
          "ID": 1,
          "Info": "Open",
          "Reasons": null
        }
      },
      {
        "ID": 490,
        "PaymentID": 5581804,
        "SiteID": 33511,
        "MerchantTransactionID": "s2p_test1ad",
        "OriginatorTransactionID": "2241412e",
        "Created": "20201202122951",
        "Amount": "20",
        "Currency": "EUR",
        "CapturedAmount": "",
        "StateDetails": {
          "ID": 1,
          "Info": "Open",
          "Reasons": null
        }
      }
    ]
  }
}

When the main payment is updated to success, also all the Splits are updated to success (splits will always have the status of the main payment for One-Step Payments). We will notify you about the Success status 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)!

Payment notification format:

Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=

{
  "Payment": {
    "ID": 5581804,
    "SkinID": null,
    "ClientIP": null,
    "Created": "20201202122951",
    "MerchantTransactionID": "test1606912191",
    "OriginatorTransactionID": null,
    "Amount": "100",
    "Currency": "EUR",
    "CapturedAmount": null,
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "",
    "MethodID": 9,
    "MethodOptionID": null,
    "IncludeMethodIDs": null,
    "ExcludeMethodIDs": null,
    "PrioritizeMethodIDs": null,
    "SiteID": 33513,
    "NotificationDateTime": null,
    "Customer": null,
    "BillingAddress": null,
    "ShippingAddress": null,
    "Articles": null,
    "Details": {
      "AccountNumber": null,
      "AccountHolder": "Max Mustermann",
      "IBAN": "DE06000000000023456789",
      "BIC": "SFRTDE20XXX",
      "PrepaidCard": null,
      "PrepaidCardPIN": null,
      "SerialNumbers": null,
      "Wallet": null,
      "ReferenceNumber": null,
      "PayerCountry": "DE",
      "PayerEmail": null,
      "PayerPhone": null,
      "BankCode": null,
      "BankName": null,
      "BankSortCode": null,
      "SocialSecurityNumber": null,
      "BillingCycleStart": null,
      "BillingCycleEnd": null,
      "UnsubscribeInstructions": null,
      "CustomerLoginID": null,
      "PaidAmount": null,
      "PaidCurrency": null,
      "ProviderExchangeRate": 0.0,
      "PayerBankAccountID": null,
      "PayerID": null
    },
    "ReferenceDetails": null,
    "CustomParameters": null,
    "PreapprovalID": null,
    "Status": {
      "ID": 2,
      "Info": "Success",
      "Reasons": null
    },
    "Fraud": null,
    "MethodTransactionID": null,
    "TokenLifetime": 10,
    "Capture": null,
    "PreapprovalDetails": null,
    "RedirectURL": "https://apitest.smart2pay.com/Home?PaymentToken=17CBE5EE17ADF6C3A52EC29B3B1E26B8.5581804",
    "Splits": [
      {
        "ID": 488,
        "PaymentID": 5581804,
        "SiteID": 33513,
        "MerchantTransactionID": "s2p_test1ad",
        "OriginatorTransactionID": "4324322e",
        "Created": "20201202122951",
        "Amount": "60",
        "Currency": "EUR",
        "CapturedAmount": "",
        "StateDetails": {
          "ID": 2,
          "Info": "Success",
          "Reasons": null
        }
      },
      {
        "ID": 489,
        "PaymentID": 5581804,
        "SiteID": 33512,
        "MerchantTransactionID": "s2p_test1ad",
        "OriginatorTransactionID": "421432s",
        "Created": "20201202122951",
        "Amount": "23",
        "Currency": "EUR",
        "CapturedAmount": "",
        "StateDetails": {
          "ID": 2,
          "Info": "Success",
          "Reasons": null
        }
      },
      {
        "ID": 490,
        "PaymentID": 5581804,
        "SiteID": 33511,
        "MerchantTransactionID": "s2p_test1ad",
        "OriginatorTransactionID": "2241412e",
        "Created": "20201202122951",
        "Amount": "20",
        "Currency": "EUR",
        "CapturedAmount": "",
        "StateDetails": {
          "ID": 2,
          "Info": "Success",
          "Reasons": null
        }
      }
    ]
  }
}

Adding splits after transaction has received final status

A new call for Split Payments allows adding splits after the transaction is Success. This behavior is valid also for other statuses, like if the transaction is failed and we make the call for splits, the splits inserted will be set to failed, same as the transaction’s status. Refunds are only allowed for splits. If a refund is made for a transaction before the split call is made, the split call is rejected.
Checkout the below example for adding splits after the transaction is success.

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

Where:
  • {id} – GlobalPay Payment ID

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

Request:

POST https://paytest.smart2pay.com/v1/payments/5891650/splits
Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=

{
"Splits":[
    {
      "SiteID":33513,  
      "Amount":"50",
      "MerchantTransactionID":"s2p_test1ad", 
      "OriginatorTransactionID":"4324322e"
    },
    {
      "SiteID":33512,  
      "Amount":"20",
      "MerchantTransactionID":"s2p_test1ad", 
      "OriginatorTransactionID":"421432s"
    },
    {
      "SiteID":33511,  
      "Amount":"30",
      "MerchantTransactionID":"s2p_test1ad", 
      "OriginatorTransactionID":"2241412e"
    }
  ]
}

Response:

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

{
  "Splits": [
    {
      "ID": 1161,
      "PaymentID": 5891650,
      "SiteID": 33513,
      "MerchantTransactionID": "s2p_test1ad",
      "OriginatorTransactionID": "4324322e",
      "Created": "20210217063428",
      "Amount": "50",
      "Currency": "EUR",
      "CapturedAmount": "",
      "StateDetails": {
        "ID": 2,
        "Info": "Success",
        "Reasons": null
      }
    },
    {
      "ID": 1162,
      "PaymentID": 5891650,
      "SiteID": 33512,
      "MerchantTransactionID": "s2p_test1ad",
      "OriginatorTransactionID": "421432s",
      "Created": "20210217063428",
      "Amount": "20",
      "Currency": "EUR",
      "CapturedAmount": "",
      "StateDetails": {
        "ID": 2,
        "Info": "Success",
        "Reasons": null
      }
    },
    {
      "ID": 1163,
      "PaymentID": 5891650,
      "SiteID": 33511,
      "MerchantTransactionID": "s2p_test1ad",
      "OriginatorTransactionID": "2241412e",
      "Created": "20210217063428",
      "Amount": "30",
      "Currency": "EUR",
      "CapturedAmount": "",
      "StateDetails": {
        "ID": 2,
        "Info": "Success",
        "Reasons": null
      }
    }
  ]
}

Two-Steps Split Payments

There are methods for which the successful state is done in 2 steps: Authorization + Capture.

  • Authorize a payment with Splits

    Request:

    POST https://paytest.smart2pay.com/v1/payments
    Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=
    
    {
      "Payment": {
        "MerchantTransactionID": "SplitPaymentsAuthorized1",
        "Amount": "30",
        "Currency": "EUR",      
        "MethodID": 40,
        "ReturnURL": "http://demo.smart2pay.com/redirect.php",      
        "TokenLifetime": 10,
        "Customer": {    
          "Email": "youremail@email.com",
          "FirstName": "test",
          "LastName": "person"
              },
        "BillingAddress":
        {
        "Country": "RO"
        },  
        "Splits": [
         {
          "SiteID": 30025,  
          "Amount": "5",
          "MerchantTransactionID": "s2p_test1ad", 
          "OriginatorTransactionID": "4324322e"
       },
        {
          "SiteID": 30122,  
          "Amount": "5",
          "MerchantTransactionID": "s2p_test1ad", 
          "OriginatorTransactionID": "421432s"
       },
        {
          "SiteID": 30126,  
          "Amount": "20",
          "MerchantTransactionID": "s2p_test1ad", 
          "OriginatorTransactionID": "2241412e"
          }
        ]
      }
    }

    Response:

    HTTP/1.1 201 Created
    Content-Type: application/json; charset=utf-8
    
    {
      "Payment": {
        "ID": 401946443,
        "SkinID": null,
        "ClientIP": null,
        "Created": "20201217115710",
        "MerchantTransactionID": "SplitPaymentsAuthorized1",
        "OriginatorTransactionID": null,
        "Amount": "30",
        "Currency": "EUR",
        "CapturedAmount": null,
        "ReturnURL": "http://demo.smart2pay.com/redirect.php",
        "Description": "",
        "MethodID": 40,
        "MethodOptionID": null,
        "IncludeMethodIDs": null,
        "ExcludeMethodIDs": null,
        "PrioritizeMethodIDs": null,
        "SiteID": 30025,
        "NotificationDateTime": null,
        "Customer": {
          "ID": 3173720,
          "MerchantCustomerID": null,
          "Email": "youremail@email.com",
          "FirstName": "test",
          "LastName": "carmen",
          "Gender": null,
          "SocialSecurityNumber": null,
          "Phone": null,
          "Company": null,
          "DateOfBirth": null
        },
        "BillingAddress": {
          "City": null,
          "ZipCode": null,
          "State": null,
          "Street": null,
          "StreetNumber": null,
          "HouseNumber": null,
          "HouseExtension": null,
          "Country": "RO"
        },
        "ShippingAddress": null,
        "Articles": null,
        "Details": null,
        "ReferenceDetails": null,
        "CustomParameters": null,
        "PreapprovalID": null,
        "Status": {
          "ID": 1,
          "Info": "Open",
          "Reasons": []
          },
        "Fraud": null,
        "MethodTransactionID": null,
        "TokenLifetime": 10,
        "Capture": null,
        "PreapprovalDetails": null,
        "RedirectURL": "https://globalapi.smart2pay.com/Home?PaymentToken=370526947BE17A8A1DBBF5FDB065B809.401946443",
        "Splits": [
          {
            "ID": 22,
            "PaymentID": 401946443,
            "SiteID": 30025,
            "MerchantTransactionID": "s2p_test1ad",
            "OriginatorTransactionID": "4324322e",
            "Created": "20201217115710",
            "Amount": "5",
            "Currency": "EUR",
            "CapturedAmount": "",
            "StateDetails": {
              "ID": 1,
              "Info": "Open",
              "Reasons": []
            }
          },
          {
            "ID": 23,
            "PaymentID": 401946443,
            "SiteID": 30122,
            "MerchantTransactionID": "s2p_test1ad",
            "OriginatorTransactionID": "421432s",
            "Created": "20201217115710",
            "Amount": "5",
            "Currency": "EUR",
            "CapturedAmount": "",
            "StateDetails": {
              "ID": 1,
              "Info": "Open",
              "Reasons": []
            }
          },
          {
            "ID": 24,
            "PaymentID": 401946443,
            "SiteID": 30126,
            "MerchantTransactionID": "s2p_test1ad",
            "OriginatorTransactionID": "2241412e",
            "Created": "20201217115710",
            "Amount": "20",
            "Currency": "EUR",
            "CapturedAmount": "",
            "StateDetails": {
              "ID": 1,
              "Info": "Open",
              "Reasons": []
            }
          }
        ]
      }
    }

We will notify you about the Authorize status 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)!

Payment notification format:

Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=

{
  "Payment": {
    "ID": 401946443,
    "SkinID": null,
    "ClientIP": null,
    "Created": "20201217115710",
    "MerchantTransactionID": "SplitPaymentsAuthorized1",
    "OriginatorTransactionID": null,
    "Amount": "30",
    "Currency": "EUR",
    "CapturedAmount": null,
    "ReturnURL": "http://demo.smart2pay.com/redirect.php",
    "Description": "",
    "MethodID": 40,
    "MethodOptionID": null,
    "IncludeMethodIDs": null,
    "ExcludeMethodIDs": null,
    "PrioritizeMethodIDs": null,
    "SiteID": 30025,
    "NotificationDateTime": null,
    "Customer": {
      "ID": 3173720,
      "MerchantCustomerID": null,
      "Email": "youremail@email.com",
      "FirstName": "test",
      "LastName": "carmen",
      "Gender": null,
      "SocialSecurityNumber": null,
      "Phone": null,
      "Company": null,
      "DateOfBirth": null
    },
    "BillingAddress": {
      "City": null,
      "ZipCode": null,
      "State": null,
      "Street": null,
      "StreetNumber": null,
      "HouseNumber": null,
      "HouseExtension": null,
      "Country": "RO"
    },
    "ShippingAddress": null,
    "Articles": null,
    "Details": null,
    "ReferenceDetails": null,
    "CustomParameters": null,
    "PreapprovalID": null,
    "Status": {
      "ID": 9,
      "Info": "Authorized",
      "Reasons": []
      },
    "Fraud": null,
    "MethodTransactionID": null,
    "TokenLifetime": 10,
    "Capture": null,
    "PreapprovalDetails": null,
    "RedirectURL": "https://globalapi.smart2pay.com/Home?PaymentToken=370526947BE17A8A1DBBF5FDB065B809.401946443",
    "Splits": [
      {
        "ID": 22,
        "PaymentID": 401946443,
        "SiteID": 30025,
        "MerchantTransactionID": "s2p_test1ad",
        "OriginatorTransactionID": "4324322e",
        "Created": "20201217115710",
        "Amount": "5",
        "Currency": "EUR",
        "CapturedAmount": "",
        "StateDetails": {
          "ID": 9,
          "Info": "Authorized",
          "Reasons": []
        }
      },
      {
        "ID": 23,
        "PaymentID": 401946443,
        "SiteID": 30122,
        "MerchantTransactionID": "s2p_test1ad",
        "OriginatorTransactionID": "421432s",
        "Created": "20201217115710",
        "Amount": "5",
        "Currency": "EUR",
        "CapturedAmount": "",
        "StateDetails": {
          "ID": 9,
          "Info": "Authorized",
          "Reasons": []
        }
      },
      {
        "ID": 24,
        "PaymentID": 401946443,
        "SiteID": 30126,
        "MerchantTransactionID": "s2p_test1ad",
        "OriginatorTransactionID": "2241412e",
        "Created": "20201217115710",
        "Amount": "20",
        "Currency": "EUR",
        "CapturedAmount": "",
        "StateDetails": {
          "ID": 9,
          "Info": "Authorized",
          "Reasons": []
        }
      }
    ]
  }
}

  • Capture a Split Payment

    Definition: Full Capture – POST /v1/payments/{id}/capture
    Partial Capture – POST /v1/payments/{id}/splits/{id}/capture?{amount}

    Where:
    • payments {id} – GlobalPay Payment ID
    • {amount} – The amount to be captured smaller or equal than the initial authorized amount
    • splits {id} – GlobalPay Split ID

    Once the payment has an Authorized status, you can capture either the full amount or a partial amount of the initial authorized amount for the transaction depending on the Split ID provided and the amount.

    Keep in mind that at the moment GlobalPay accepts only one capture per payment!

  • For a Full Capture of a payment the statuses of splits are the same as of the main payment. Checkout the below example of a full captured split payment:
    POST https://paytest.smart2pay.com/v1/payments/5577675/capture
    Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=

    Response:

    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    
    {
      "Payment": {
        "ID": 5577675,
        "SkinID": null,
        "ClientIP": null,
        "Created": "20201126114150",
        "MerchantTransactionID": "carmen1606390911",
        "OriginatorTransactionID": null,
        "Amount": "100",
        "Currency": "EUR",
        "CapturedAmount": "100",
        "ReturnURL": "http://demo.smart2pay.com/redirect.php",
        "Description": null,
        "MethodID": 94,
        "MethodOptionID": null,
        "IncludeMethodIDs": null,
        "ExcludeMethodIDs": null,
        "PrioritizeMethodIDs": null,
        "SiteID": 33513,
        "NotificationDateTime": "20201126114316",
        "Customer": null,
        "BillingAddress": null,
        "ShippingAddress": null,
        "Articles": null,
        "Details": null,
        "ReferenceDetails": null,
        "CustomParameters": null,
        "PreapprovalID": null,
        "Status": {
          "ID": 2,
          "Info": "Success",
          "Reasons": null
        },
        "Fraud": null,
        "MethodTransactionID": null,
        "TokenLifetime": 10,
        "Capture": null,
        "PreapprovalDetails": null,
        "RedirectURL": "https://apitest.smart2pay.com/Home?PaymentToken=BBCA1F4A583A3AE6639E97C0589B1FF3.5577675",
        "Splits": [
          {
            "ID": 367,
            "PaymentID": 5577675,
            "SiteID": 33513,
            "MerchantTransactionID": "s2p_test1ad",
            "OriginatorTransactionID": "4324322e",
            "Created": "20201126114150",
            "Amount": "60",
            "Currency": "EUR",
            "CapturedAmount": "",
            "StateDetails": {
              "ID": 2,
              "Info": "Success",
              "Reasons": null
            }
          },
          {
            "ID": 368,
            "PaymentID": 5577675,
            "SiteID": 33512,
            "MerchantTransactionID": "s2p_test1ad",
            "OriginatorTransactionID": "421432s",
            "Created": "20201126114150",
            "Amount": "20",
            "Currency": "EUR",
            "CapturedAmount": "",
            "StateDetails": {
              "ID": 2,
              "Info": "Success",
              "Reasons": null
            }
          },
          {
            "ID": 369,
            "PaymentID": 5577675,
            "SiteID": 33511,
            "MerchantTransactionID": "s2p_test1ad",
            "OriginatorTransactionID": "2241412e",
            "Created": "20201126114150",
            "Amount": "20",
            "Currency": "EUR",
            "CapturedAmount": "",
            "StateDetails": {
              "ID": 2,
              "Info": "Success",
              "Reasons": null
            }
          }
        ]
      }
    }
    

  • We will notify you about the Success status 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. There are methods, such as Post Finance, for which you will receive in the response an intermediate CaptureRequested status (ID = 13), followed by the notification containing the final Success status (ID = 2).

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

    Payment notification format:

    Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=
    
    {
      "Payment": {
        "ID": 5577639,
        "SkinID": null,
        "ClientIP": null,
        "Created": "20201126093222",
        "MerchantTransactionID": "carmen1606383142",
        "OriginatorTransactionID": null,
        "Amount": "100",
        "Currency": "EUR",
        "CapturedAmount": "100",
        "ReturnURL": "http://demo.smart2pay.com/redirect.php",
        "Description": "",
        "MethodID": 1130,
        "MethodOptionID": null,
        "IncludeMethodIDs": null,
        "ExcludeMethodIDs": null,
        "PrioritizeMethodIDs": null,
        "SiteID": 33513,
        "NotificationDateTime": null,
        "Customer": null,
        "BillingAddress": null,
        "ShippingAddress": null,
        "Articles": null,
        "Details": null,
        "ReferenceDetails": null,
        "CustomParameters": null,
        "PreapprovalID": null,
        "Status": {
          "ID": 2,
          "Info": "Success",
          "Reasons": null
        },
        "Fraud": null,
        "MethodTransactionID": null,
        "TokenLifetime": 10,
        "Capture": null,
        "PreapprovalDetails": null,
        "RedirectURL": "https://apitest.smart2pay.com/Home?PaymentToken=8C8518387DAC0D71DC7AB9E3909AD21D.5577639",
        "Splits": [
          {
            "ID": 337,
            "PaymentID": 5577639,
            "SiteID": 33513,
            "MerchantTransactionID": "s2p_test1ad",
            "OriginatorTransactionID": "4324322e",
            "Created": "20201126093222",
            "Amount": "60",
            "Currency": "EUR",
            "CapturedAmount": "",
            "StateDetails": {
              "ID": 2,
              "Info": "Success",
              "Reasons": null
            }
          },
          {
            "ID": 338,
            "PaymentID": 5577639,
            "SiteID": 33512,
            "MerchantTransactionID": "s2p_test1ad",
            "OriginatorTransactionID": "421432s",
            "Created": "20201126093222",
            "Amount": "20",
            "Currency": "EUR",
            "CapturedAmount": "",
            "StateDetails": {
              "ID": 2,
              "Info": "Success",
              "Reasons": null
            }
          },
          {
            "ID": 339,
            "PaymentID": 5577639,
            "SiteID": 33511,
            "MerchantTransactionID": "s2p_test1ad",
            "OriginatorTransactionID": "2241412e",
            "Created": "20201126093222",
            "Amount": "20",
            "Currency": "EUR",
            "CapturedAmount": "",
            "StateDetails": {
              "ID": 2,
              "Info": "Success",
              "Reasons": null
            }
          }
        ]
      }
    }
    

  • Partial Capture with Splits: each split has CapturedAmount sent in the request, the main payment has CapturedAmount = Sum of CapturedAmount of all the splits sent in request:

    Request:

    POST https://paytest.smart2pay.com/v1/payments/5845686/capture
    Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ={
        "Payment": {
            "Splits": [
            {
                "ID": 797,
                "Amount": 10
            },
            {
                "ID": 798,
                "Amount": 10
            },
            
            {
                "ID": 799,
                "Amount": 20
            }
          ]
        }
    }
    

    Response:

    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    
    {
      "Payment": {
        "ID": 5845686,
        "SkinID": null,
        "ClientIP": null,
        "Created": "20201214142216",
        "MerchantTransactionID": "carmen1607955727",
        "OriginatorTransactionID": null,
        "Amount": "100",
        "Currency": "EUR",
        "CapturedAmount": "40",
        "ReturnURL": "http://demo.smart2pay.com/redirect.php",
        "Description": null,
        "MethodID": 94,
        "MethodOptionID": null,
        "IncludeMethodIDs": null,
        "ExcludeMethodIDs": null,
        "PrioritizeMethodIDs": null,
        "SiteID": 33513,
        "NotificationDateTime": "20201214142459",
        "Customer": null,
        "BillingAddress": null,
        "ShippingAddress": null,
        "Articles": null,
        "Details": null,
        "ReferenceDetails": null,
        "CustomParameters": null,
        "PreapprovalID": null,
        "Status": {
          "ID": 35,
          "Info": "PartiallyCaptured",
          "Reasons": null
        },
        "Fraud": null,
        "MethodTransactionID": null,
        "TokenLifetime": 10,
        "Capture": null,
        "PreapprovalDetails": null,
        "RedirectURL": "https://apitest.smart2pay.com/Home?PaymentToken=082F51365E403515CE1A77CB6668F954.5845686",
        "Splits": [
          {
            "ID": 797,
            "PaymentID": 5845686,
            "SiteID": 33513,
            "MerchantTransactionID": "s2p_test1ad",
            "OriginatorTransactionID": "4324322e",
            "Created": "20201214142218",
            "Amount": "30",
            "Currency": "EUR",
            "CapturedAmount": "10",
            "StateDetails": {
              "ID": 35,
              "Info": "PartiallyCaptured",
              "Reasons": null
            }
          },
          {
            "ID": 798,
            "PaymentID": 5845686,
            "SiteID": 33512,
            "MerchantTransactionID": "s2p_test1ad",
            "OriginatorTransactionID": "421432s",
            "Created": "20201214142218",
            "Amount": "30",
            "Currency": "EUR",
            "CapturedAmount": "10",
            "StateDetails": {
              "ID": 35,
              "Info": "PartiallyCaptured",
              "Reasons": null
            }
          },
          {
            "ID": 799,
            "PaymentID": 5845686,
            "SiteID": 33511,
            "MerchantTransactionID": "s2p_test1ad",
            "OriginatorTransactionID": "2241412e",
            "Created": "20201214142218",
            "Amount": "40",
            "Currency": "EUR",
            "CapturedAmount": "20",
            "StateDetails": {
              "ID": 35,
              "Info": "PartiallyCaptured",
              "Reasons": null
            }
          }
        ]
      }
    }
    

  • Partial Capture per Splits: the captured Split is set to status PartiallyCaptured but the other Splits remain with status Authorized:
    POST https://paytest.smart2pay.com/v1/payments/5581839/splits/504/capture?amount=10
    Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=

    Response:

    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    
    {
      "Payment": {
        "ID": 5581839,
        "SkinID": null,
        "ClientIP": null,
        "Created": "20201202132638",
        "MerchantTransactionID": "carmen1606915598",
        "OriginatorTransactionID": null,
        "Amount": "100",
        "Currency": "EUR",
        "CapturedAmount": "10",
        "ReturnURL": "http://demo.smart2pay.com/redirect.php",
        "Description": null,
        "MethodID": 94,
        "MethodOptionID": null,
        "IncludeMethodIDs": null,
        "ExcludeMethodIDs": null,
        "PrioritizeMethodIDs": null,
        "SiteID": 33513,
        "NotificationDateTime": "20201202132859",
        "Customer": null,
        "BillingAddress": null,
        "ShippingAddress": null,
        "Articles": null,
        "Details": null,
        "ReferenceDetails": null,
        "CustomParameters": null,
        "PreapprovalID": null,
        "Status": {
          "ID": 35,
          "Info": "PartiallyCaptured",
          "Reasons": null
        },
        "Fraud": null,
        "MethodTransactionID": null,
        "TokenLifetime": 10,
        "Capture": null,
        "PreapprovalDetails": null,
        "RedirectURL": "https://apitest.smart2pay.com/Home?PaymentToken=0ABF968F50818372857AEDC9031BF437.5581839",
        "Splits": [
          {
            "ID": 504,
            "PaymentID": 5581839,
            "SiteID": 33512,
            "MerchantTransactionID": "s2p_test1ad",
            "OriginatorTransactionID": "421432s",
            "Created": "20201202132638",
            "Amount": "30",
            "Currency": "EUR",
            "CapturedAmount": "10",
            "StateDetails": {
              "ID": 35,
              "Info": "PartiallyCaptured",
              "Reasons": null
            }
          }
        ]
      }
    }
    

  • Cancel a full payment

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

    Where:
    • {id} – GlobalPay Payment ID

    A payment can be cancelled if it has an Authorized or an Open status. Only the full payment with an Authorized status will support cancellation. If one of its splits payments has been previously captured, the payment changed its status in PartiallyCaptured so it will no longer support cancellation.

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

    POST https://paytest.smart2pay.com/v1/payments/5583382/cancel
    Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=

    Response:

    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    
    {
      "Payment": {
        "ID": 5583382,
        "SkinID": null,
        "ClientIP": null,
        "Created": "20201204132034",
        "MerchantTransactionID": "carmen1607088034",
        "OriginatorTransactionID": null,
        "Amount": "100",
        "Currency": "EUR",
        "CapturedAmount": null,
        "ReturnURL": "http://demo.smart2pay.com/redirect.php",
        "Description": null,
        "MethodID": 94,
        "MethodOptionID": null,
        "IncludeMethodIDs": null,
        "ExcludeMethodIDs": null,
        "PrioritizeMethodIDs": null,
        "SiteID": 33513,
        "NotificationDateTime": "20201204132126",
        "Customer": null,
        "BillingAddress": null,
        "ShippingAddress": null,
        "Articles": null,
        "Details": null,
        "ReferenceDetails": null,
        "CustomParameters": null,
        "PreapprovalID": null,
        "Status": {
          "ID": 3,
          "Info": "Cancelled",
          "Reasons": null
        },
        "Fraud": null,
        "MethodTransactionID": null,
        "TokenLifetime": null,
        "Capture": null,
        "PreapprovalDetails": null,
        "RedirectURL": null,
        "Splits": [
          {
            "ID": 524,
            "PaymentID": 5583382,
            "SiteID": 33513,
            "MerchantTransactionID": "s2p_test1ad",
            "OriginatorTransactionID": "4324322e",
            "Created": "20201204132034",
            "Amount": "60",
            "Currency": "EUR",
            "CapturedAmount": "",
            "StateDetails": {
              "ID": 3,
              "Info": "Cancelled",
              "Reasons": null
            }
          },
          {
            "ID": 525,
            "PaymentID": 5583382,
            "SiteID": 33512,
            "MerchantTransactionID": "s2p_test1ad",
            "OriginatorTransactionID": "421432s",
            "Created": "20201204132034",
            "Amount": "20",
            "Currency": "EUR",
            "CapturedAmount": "",
            "StateDetails": {
              "ID": 3,
              "Info": "Cancelled",
              "Reasons": null
            }
          },
          {
            "ID": 526,
            "PaymentID": 5583382,
            "SiteID": 33511,
            "MerchantTransactionID": "s2p_test1ad",
            "OriginatorTransactionID": "2241412e",
            "Created": "20201204132034",
            "Amount": "20",
            "Currency": "EUR",
            "CapturedAmount": "",
            "StateDetails": {
              "ID": 3,
              "Info": "Cancelled",
              "Reasons": null
            }
          }
        ]
      }
    }
    

  • Refund a Split

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

    Where:
    • payments/{id} – GlobalPay Payment ID
    • splits/{id} – The ID of the split payment

    At the moment only refunds per splits are allowed. When you are initiating a refund you need to provide the Refund Amount and the Merchant Transaction ID, that is automatically generated. You can change this ID by introducing your ID value.

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

    Request:

    POST https://paytest.smart2pay.com/v1/payments/5611633/splits/737/refunds
    Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ={
      "Refund": {
          "MerchantTransactionID": "carmen1607607300",
          "Amount": 60,   
          "Description": "test refund" 
      }
    }
    

    Response:

    HTTP/1.1 201 Created
    Content-Type: application/json; charset=utf-8
    
    {
      "Refund": {
        "ID": 55745,
        "Created": "20201210133500",
        "MerchantTransactionID": "carmen1607607300",
        "OriginatorTransactionID": null,
        "InitialPaymentID": 5611633,
        "Amount": "60",
        "Currency": "EUR",
        "Description": "test refund",
        "TypeID": 1,
        "SiteID": 33513,
        "Details": null,
        "Customer": null,
        "BillingAddress": null,
        "BankAddress": null,
        "Articles": null,
        "Status": {
          "ID": 1,
          "Info": "Open",
          "Reasons": null
        },
        "SplitID": 737
      }
    }
    

Alfa-Click Test Data

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

Alfa-Click Payment Flow

  1. The Customer enters his email address.

    1 Enter email

  2. The Customer reviews the payment details and logins to his Alfa-Click account in order to complete the transaction.

    1 Payment instructions

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

    1 Return page when the redirection status is Processing

Cash-in CIS Test Data

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

Cash-in CISPayment Flow

  1. The Customer enters his email address.

    1 Enter email

  2. The Customer receives the payment details and the order number with which he can complete the payment at any ATM or office and clicks Pay in order to complete the transaction.

    1 Payment instructions

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

    1 Return page when the redirection status is Processing

Boleto Bancario Brazil Test Data

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

Boleto Bancario 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 verifies the transaction details and confirms the payment. He also has the possibility to change the payment method if needed.1 Print Boleto
  3. The customer is redirected to the payment confirmation page where he can choose to complete the payment by using the payment code received (payment through internet banking) or by printing the Boleto (payment at any bank agency).1 Print Boleto
  4. 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. 1 Print Boleto

Get information on Payouts Balance

You can get information about your merchant balance by using a few actions based on GET HTTP request. You can specify various filters as parameters in the query string in order to get a customized list of your available balances per MethodID and/or CurrencyCode.

Definition: GET /v1/payoutsbalance/methodID/currencyCode

Where:
  • {methodID} – The ID of the payment method: SEPA Payouts (MethodID = 1), Trustly (MethodID = 29).
  • {currencyCode} – The currency in which you sell the services or products. Format is according to ISO 4217, a three-letter code.
  • The below request allows you to get all the balances that are active per SiteID without specifying any parameter.

    Request:

    GET https://paytest.smart2pay.com/v1/payoutsbalance/
    Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=

    Response:

    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    
    {
      "Balances": [
        {
          "MerchantID": 1045,
          "SiteID": 30201,
          "MethodID": 1,
          "CurrencyCode": "EUR",
          "AvailableAmount": 10000.00,
          "LastBalanceUpdateDateTime": "2020-10-29T15:36:10.807"
        },
        {
          "MerchantID": 1045,
          "SiteID": 30201,
          "MethodID": 1,
          "CurrencyCode": "RON",
          "AvailableAmount": 500000.00,
          "LastBalanceUpdateDateTime": "2020-10-29T15:36:34.733"
        },
        {
          "MerchantID": 1045,
          "SiteID": 30201,
          "MethodID": 29,
          "CurrencyCode": "EUR",
          "AvailableAmount": 20000.00,
          "LastBalanceUpdateDateTime": "2020-10-29T15:36:21.047"
        }
      ]
    }

  • The below request allows you to get all the balances that are active for your SiteID for a specific payment method.

    Request:

    GET https://paytest.smart2pay.com/v1/payoutsbalance/1
    Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=

    Response:

    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    
    {
      "Balances": [
        {
          "MerchantID": 1045,
          "SiteID": 30201,
          "MethodID": 1,
          "CurrencyCode": "EUR",
          "AvailableAmount": 10000.00,
          "LastBalanceUpdateDateTime": "2020-10-29T15:36:10.807"
        },
        {
          "MerchantID": 1045,
          "SiteID": 30201,
          "MethodID": 1,
          "CurrencyCode": "RON",
          "AvailableAmount": 500000.00,
          "LastBalanceUpdateDateTime": "2020-10-29T15:36:34.733"
        }
      ]
    }

  • The below request allows you to get all the balances that are active for your SiteID for a specific currency.

    Request:

    GET https://paytest.smart2pay.com/v1/payoutsbalance/EUR
    Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=

    Response:

    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    
    
    
    {
      "Balances": [
        {
          "MerchantID": 1045,
          "SiteID": 30201,
          "MethodID": 1,
          "CurrencyCode": "EUR",
          "AvailableAmount": 10000.00,
          "LastBalanceUpdateDateTime": "2020-10-29T15:36:10.807"
        },
        {
          "MerchantID": 1045,
          "SiteID": 30201,
          "MethodID": 29,
          "CurrencyCode": "EUR",
          "AvailableAmount": 20000.00,
          "LastBalanceUpdateDateTime": "2020-10-29T15:36:21.047"
        }
      ]
    }

  • The below request allows you to get all the balances that are active for your SiteID for a specific payment method and currency.

    Request:

    GET https://paytest.smart2pay.com/v1/payoutsbalance/1/EUR
    Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=

    Response:

    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    
    {
      "Balances": [
        {
          "MerchantID": 1045,
          "SiteID": 30201,
          "MethodID": 1,
          "CurrencyCode": "EUR",
          "AvailableAmount": 10000.00,
          "LastBalanceUpdateDateTime": "2020-10-29T15:36:10.807"
        }
      ]
    }

Touch’n Go Test Data

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

Touch’n Go Payment Flow

  1. The customer enters his Email Address, Name and Phone Number.

    1 Enter customer details

  2. The customer confirms the payment after reviewing all the details of the payment.

    1 Print Boleto

  3. The customer can pay now with his Touch’n Go Wallet. Download and register for the Touch ‘n Go eWallet app, tap on the “Scan” icon and scan the QR code here to complete the payment.

    1 Print Boleto

Fawry Wallet Test Data

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

Fawry Payment Flow

  1. The customer enters his Email Address and his Social Security Number (SSN).

    1 Enter customer details

  2. The customer receives the necessary information to make the payment, including a reference number. The customer will use the reference number to pay through Fawry channels and outlets within the specified time.

    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

Loterica Test Data

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

Loterica 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 confirms the payment after reviewing all the details of the payment.

    1 Print Boleto

  3. The customer receives the code necessary to make the payment. He will also receive via email all the payment data. In order to complete the payment, he needs to go to a physical bank branch in his area in 3 days time. The payment will be approved in less than one hour..

    1 Print Boleto

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

    1 Return page when the redirection status is Processing

Marketplace Split Card Payments API – (preview)

  1. Authorize a payment with Splits

    Definition: POST /v1/payments

    Split Card Payments is a unique feature that allows you to split a payment to several SiteIDs previously linked to your merchant account. Initiate a payment with one or more Splits objects depending on the SiteID. The Split object must contain the following parameters: SiteID, APIKey, Amount, MerchantTransactionID and the OriginatorTransactionID.

    Please keep in mind that the Authorization header of the request must use the SiteID and APIKey of the Marketplace.

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

    Request:

    POST https://securetest.smart2pay.com/v1/payments
    Authorization: Basic MTAxMDpnYWJp
    
    { 
      "Payment": {  
      "MerchantTransactionID": "s2p_test1a",
      "Amount": "100",
      "Currency": "EUR",
        "ReturnURL": "http://demo.smart2pay.com/redirect.php",
        "Description": "Split Payment test",
        "StatementDescriptor": "card payment",
        "OriginatorTransactionID":"s2p_teste123",
        "ClientIP": "82.208.151.136",
        "BillingAddress": {
          "City": "Iasi",
          "ZipCode": "7000-49",
          "State": "Iasi",
          "Street": "Sf Lazar",
          "StreetNumber": "37",
          "HouseNumber1": "5A",
          "HouseExtension1": "-",
          "Country": "BR"
        },
        "ShippingAddress": {
          "City": "Iasi",
          "ZipCode": "700049",
          "State": "Iasi",
          "Street": "Sf Lazar",
          "StreetNumber": "37",
          "HouseNumber": "-",
          "HouseExtension": "-",
          "Country": "BR"
        },
        "Customer" : {
          "FirstName":"John",
          "LastName":"Dow",
          "Email": "challenge@challenge.com",
          "SocialSecurityNumber": "00003456789"
        },
       "Card": {
          "HolderName": "Johnn Snow",
          "Number": "4000023104662535", 
          "ExpirationMonth": "12",
          "ExpirationYear": "2023",
          "SecurityCode": "554",
          "RequireSecurityCode1": false
        },
    
        "Capture": false,
        "Retry": false,
        "GenerateCreditCardToken": false,
        "3DSecure": false,
    
         "Splits": [
          {
          "SiteID": 1000,
          "APIKey": "a8913f1b-0211",
          "Amount": "60",
          "MerchantTransactionID" : "s2p_test1ad", 
          "OriginatorTransactionID": "89128810-f754-415f-9887-eae6cd444d8e"
        },
        {
          "SiteID": 1061,
          "APIKey": "MDYxM2RjYjAtZDgxMy00",
          "Amount": "40",
          "MerchantTransactionID" : "s2p_test1233", 
          "OriginatorTransactionID": "89128810-f754-415f-9887-eae6cd444d8e"
        }
      ]
      }
    }
    

    Response:

    HTTP/1.1 201 Created
    Content-Type: application/json; charset=utf-8
    
    {
        "Payment": {
            "ID": 428473,
            "ClientIP": "82.208.151.136",
            "SkinID": null,
            "Created": "20200702132836",
            "MerchantTransactionID": "s2p_test1a",
            "OriginatorTransactionID": "s2p_teste123",
            "Amount": "100",
            "Currency": "EUR",
            "CapturedAmount": "0",
            "ReturnURL": "http://demo.smart2pay.com/redirect.php",
            "Description": "Split Payment test",
            "StatementDescriptor": "card payment",
            "MethodID": 6,
            "MethodOptionID": null,
            "SiteID": 66789,
            "NotificationDateTime": null,
            "Customer": {
                "ID": 2766,
                "MerchantCustomerID": null,
                "Email": "challenge@challenge.com",
                "FirstName": "John",
                "LastName": "Dow",
                "Gender": null,
                "SocialSecurityNumber": "00003456789",
                "Phone": null,
                "Company": null
            },
            "BillingAddress": {
                "ID": 2963,
                "City": "Iasi",
                "ZipCode": "7000-49",
                "State": "Iasi",
                "Street": "Sf Lazar",
                "StreetNumber": "37",
                "HouseNumber": null,
                "HouseExtension": null,
                "Country": "BR"
            },
            "ShippingAddress": {
                "ID": 2614,
                "City": "Iasi",
                "ZipCode": "700049",
                "State": "Iasi",
                "Street": "Sf Lazar",
                "StreetNumber": "37",
                "HouseNumber": "-",
                "HouseExtension": "-",
                "Country": "BR"
            },
            "Articles": null,
            "Card": {
                "HolderName": "Johnn Snow",
                "Number": "Visa-2535",
                "ExpirationMonth": "12",
                "ExpirationYear": "2023"
            },
            "CreditCardToken": null,
            "Status": {
                "ID": 9,
                "Info": "Authorized",
                "Reasons": []
            },
            "MethodTransactionID": "111067",
            "AuthorizationCode": "111067",
            "PaymentTokenLifetime": 10,
            "Capture": false,
            "CaptureDetails": null,
            "Retry": false,
            "RedirectURL": null,
            "3DSecure": false,
            "3DSecureData": null,
            "DeviceInfo": null,
            "ScaExemption": null,
            "CardOnFile": null,
            "Fraud": {
                "Status": "Accept",
                "Score": 31,
                "Reason": "No decision provided"
            },
            "AddressVerification": null,
            "Splits": [
                {
                    "ID": 446,
                    "PaymentID": 428473,
                    "SiteID": 1000,
                    "MerchantTransactionID": "s2p_test1ad",
                    "OriginatorTransactionID": "89128810-f754-415f-9887-eae6cd444d8e",
                    "Created": "20200702132840",
                    "Amount": "60",
                    "Currency": "EUR",
                    "CapturedAmount": "0",
                    "StateDetails": {
                        "ID": 9,
                        "Info": "Authorized",
                        "Reasons": []
                    }
                },
                {
                    "ID": 447,
                    "PaymentID": 428473,
                    "SiteID": 1061,
                    "MerchantTransactionID": "s2p_test1233",
                    "OriginatorTransactionID": "89128810-f754-415f-9887-eae6cd444d8e",
                    "Created": "20200702132840",
                    "Amount": "40",
                    "Currency": "EUR",
                    "CapturedAmount": "0",
                    "StateDetails": {
                        "ID": 9,
                        "Info": "Authorized",
                        "Reasons": []
                    }
                }
            ]
        }
    }

  2. Capture a Split

    Definition: Full Capture – POST /v1/payments/{id}/capture

    Where:
    • {id} – GlobalPay Payment ID

    Once the payment has an Authorized status, you can capture either the full amount or a partial amount of the initial authorized amount for the transaction depending on the Split ID provided and the amount. You only need to sent in the Request the Split ID and the amount desired to be captured. Checkout the below example of a captured split payment.

    Request:

    POST https://securetest.smart2pay.com/v1/payments/428473/capture
    Authorization: Basic MTAxMDpnYWJp
    
    {
        "Payment": {
            "Split": {
                "ID": 446,
                "Amount": 60,
                "OriginatorTransactionID": "s2p_teste123"
            }
        }
    }

    Response:

    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    
    {
        "Payment": {
            "ID": 428473,
            "ClientIP": "82.208.151.136",
            "SkinID": null,
            "Created": "20200702132836",
            "MerchantTransactionID": "s2p_test1a",
            "OriginatorTransactionID": "s2p_teste123",
            "Amount": "100",
            "Currency": "EUR",
            "CapturedAmount": "60",
            "ReturnURL": "http://demo.smart2pay.com/redirect.php",
            "Description": "Split Payment test",
            "StatementDescriptor": "card payment",
            "MethodID": 6,
            "MethodOptionID": null,
            "SiteID": 66789,
            "NotificationDateTime": null,
            "Customer": null,
            "BillingAddress": null,
            "ShippingAddress": null,
            "Articles": null,
            "Card": {
                "HolderName": "Johnn Snow",
                "Number": "Visa-2535",
                "ExpirationMonth": "12",
                "ExpirationYear": "2023"
            },
            "CreditCardToken": null,
            "Status": {
                "ID": 35,
                "Info": "PartiallyCaptured",
                "Reasons": []
            },
            "MethodTransactionID": null,
            "AuthorizationCode": "111067",
            "PaymentTokenLifetime": null,
            "Capture": false,
            "CaptureDetails": null,
            "Retry": false,
            "RedirectURL": null,
            "3DSecure": false,
            "3DSecureData": null,
            "DeviceInfo": null,
            "ScaExemption": null,
            "CardOnFile": null,
            "Fraud": null,
            "AddressVerification": null,
            "Split": {
                "ID": 446,
                "PaymentID": 428473,
                "SiteID": 1000,
                "MerchantTransactionID": "s2p_test1ad",
                "OriginatorTransactionID": "89128810-f754-415f-9887-eae6cd444d8e",
                "Created": "20200702132840",
                "Amount": "60",
                "Currency": "EUR",
                "CapturedAmount": "60",
                "StateDetails": {
                    "ID": 11,
                    "Info": "Captured",
                    "Reasons": []
                },
                "CaptureDetails": {
                    "ID": 29035,
                    "PaymentID": 428473,
                    "SiteID": 66789,
                    "Created": "20200702141826",
                    "MerchantTransactionID": "s2p_test1a",
                    "OriginatorTransactionID": null,
                    "Amount": "60",
                    "Currency": "EUR",
                    "Status": {
                        "ID": 2,
                        "Info": "Success",
                        "Reasons": []
                    }
                }
            }
        }
    }

  3. Refund a Split

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

    Where:
    • payments/{id} – GlobalPay Payment ID
    • splits/{id} – The ID of the split payment
    • captures/{id} – The ID of the captured payment

    When you are initiating a refund you need to provide the Refund Amount and the Merchant Transaction ID, that is automatically generated. You can change this ID by introducing your ID value.

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

    Request:

    POST https://securetest.smart2pay.com/v1/payments/428473/splits/446/captures/29035/refunds
    Authorization: Basic MTAxMDpnYWJp
    
    {
      "Refund": {
          "MerchantTransactionID": "s2p_test_refund1",
          "Amount": 60,
          "Description": "refund for x",
          "StatementDescriptor": "refund for product X",
          "OriginatorTransactionID": "s2p_teste123"
      }
    }

    Response:

    HTTP/1.1 201 Created
    Content-Type: application/json; charset=utf-8
    
    {
        "Refund": {
            "ID": 23742,
            "SiteID": 66789,
            "Created": "20200702143342",
            "MerchantTransactionID": "s2p_test_refund1",
            "OriginatorTransactionID": "s2p_teste123",
            "InitialPaymentID": 428473,
            "SplitID": 446,
            "Amount": "60",
            "Currency": "EUR",
            "Description": "refund for x",
            "StatementDescriptor": "refund for product X",
            "Customer": null,
            "BillingAddress": null,
            "BankAddress": null,
            "Articles": null,
            "Status": {
                "ID": 2,
                "Info": "Success",
                "Reasons": []
            },
            "MethodTransactionID": "196244198"
        }
    }

  4. Cancel a full payment

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

    Where:
    • {id} – GlobalPay Payment ID

    A payment can be cancelled if it has an Authorized or an Open status. Only the full payment with an Authorized status will support cancellation. If one of its splits payments has been previously captured, the payment changed its status in PartiallyCaptured so it will no longer support cancellation.

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

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

    Response:

    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    
    {
        "Payment": {
            "ID": 428480,
            "ClientIP": "82.208.151.136",
            "SkinID": null,
            "Created": "20200702145229",
            "MerchantTransactionID": "s2p_test1c",
            "OriginatorTransactionID": "s2p_teste123",
            "Amount": "100",
            "Currency": "EUR",
            "CapturedAmount": "0",
            "ReturnURL": "http://demo.smart2pay.com/redirect.php",
            "Description": "Split Payment test",
            "StatementDescriptor": "card payment",
            "MethodID": 6,
            "MethodOptionID": null,
            "SiteID": 66789,
            "NotificationDateTime": null,
            "Customer": null,
            "BillingAddress": null,
            "ShippingAddress": null,
            "Articles": null,
            "Card": {
                "HolderName": "Johnn Snow",
                "Number": "Visa-2535",
                "ExpirationMonth": "12",
                "ExpirationYear": "2023"
            },
            "CreditCardToken": null,
            "Status": {
                "ID": 3,
                "Info": "Cancelled",
                "Reasons": []
            },
            "MethodTransactionID": null,
            "AuthorizationCode": "111738",
            "PaymentTokenLifetime": null,
            "Capture": false,
            "CaptureDetails": null,
            "Retry": false,
            "RedirectURL": null,
            "3DSecure": false,
            "3DSecureData": null,
            "DeviceInfo": null,
            "ScaExemption": null,
            "CardOnFile": null,
            "Fraud": null,
            "AddressVerification": null,
            "Splits": [
                {
                    "ID": 449,
                    "PaymentID": 428480,
                    "SiteID": 1000,
                    "MerchantTransactionID": "s2p_test1123",
                    "OriginatorTransactionID": "89128810-f754-415f-9887-eae6cd444d8e",
                    "Created": "20200702145229",
                    "Amount": "60",
                    "Currency": "EUR",
                    "CapturedAmount": "0",
                    "StateDetails": {
                        "ID": 3,
                        "Info": "Cancelled",
                        "Reasons": []
                    }
                },
                {
                    "ID": 450,
                    "PaymentID": 428480,
                    "SiteID": 1061,
                    "MerchantTransactionID": "s2p_test1244",
                    "OriginatorTransactionID": "89128810-f754-415f-9887-eae6cd444d8e",
                    "Created": "20200702145229",
                    "Amount": "40",
                    "Currency": "EUR",
                    "CapturedAmount": "0",
                    "StateDetails": {
                        "ID": 3,
                        "Info": "Cancelled",
                        "Reasons": []
                    }
                }
            ]
        }
    }

Dana Recurring Payment

Definition: POST /v1/payments/recurrent

A recurring payment is created in the same manner a one-off payment is created. In addition, you need to send the PreapprovalID (the PreapprovalID received when you created/opened a preapproval) and the information specific to each payment method.

For Dana (1136), you need to send the PreapprovalID (the PreapprovalID received when you created/opened a preapproval) and the Amount to be captured.

Checkout the below example of a recurring payment request for Dana (1136) that is based on the PreapprovalID. Please send in the payment request the Description parameter and Country parameter that should be the same with the ones sent in the Preapproval request.

Request:

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

{
  "Payment": {
    "PreapprovalID": 22265,
    "MerchantTransactionID": "reccuringPayin-DanaRecurrent",
    "Amount": 100,
    "Currency": "IDR",
    "MethodID": 1136,
    "Description": "recurring payment",
    "BillingAddress": {
      "Country": "ID"
    }
  }
}

Response:

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

{
    "Payment": {
        "ID": 4937474,
        "SkinID": null,
        "ClientIP": null,
        "Created": "20200330142936",
        "MerchantTransactionID": "reccuringPayin-DanaRecurrent",
        "OriginatorTransactionID": null,
        "Amount": "100",
        "Currency": "IDR",
        "CapturedAmount": null,
        "ReturnURL": null,
        "Description": "recurring payment",
        "MethodID": 1136,
        "MethodOptionID": null,
        "IncludeMethodIDs": null,
        "ExcludeMethodIDs": null,
        "PrioritizeMethodIDs": null,
        "SiteID": 30597,
        "NotificationDateTime": null,
        "Customer": null,
        "BillingAddress": {
            "ID": 657,
            "City": null,
            "ZipCode": null,
            "State": null,
            "Street": null,
            "StreetNumber": null,
            "HouseNumber": null,
            "HouseExtension": null,
            "Country": "ID"
        },
        "ShippingAddress": null,
        "Articles": null,
        "Details": null,
        "ReferenceDetails": null,
        "CustomParameters": null,
        "PreapprovalID": 22265,
        "Status": {
            "ID": 1,
            "Info": "Open",
            "Reasons": null
        },
        "Fraud": null,
        "MethodTransactionID": null,
        "TokenLifetime": null,
        "Capture": null,
        "PreapprovalDetails": null,
        "RedirectURL": null
    }
}