Definition: POST /v1/payouts
The payment methods that support payouts are: SEPA Payouts (MethodID = 1), Trustly (MethodID = 29), P24 (MethodID = 12), Pay With Crypto (MethodID = 97), Interac Instant (MethodID = 100),Giropay (MethodID = 4),PayU (MethodID = 19),PayPal (MethodID = 94),Secure Bank Transfer (MethodID = 98),Open Banking (MethodID = 101),Qiwi Wallet (MethodID = 1003). Please keep in mind that is always mandatory to send the MethodID parameter in the payout request, otherwise the payout request will fail.
To initiate a payout, you must create a payout object. The parameters of the payout are sent in the message body as a JSON object.
A 201 HTTP response (Created) is returned if the payout was correctly initialized.
-
- For SEPA Payouts (1) you need to send in the request the below parameters, including the Customer’s first and last name and Customer IBAN parameter.
Request:
{"Payout":{"hint":"","regexp":"","type":"object","MerchantTransactionID":{"hint":"Merchant Transaction ID, a number that uniquely identifies a transaction in your system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"Amount":{"hint":"Payout amount. The last two digits represent the decimal part (11.54 will be sent 1154). Please be aware that data type string is also accepted as long as it contains only digits.","regexp":"^\\d{1,12}$","type":"int"},"Currency":{"hint":"The currency in which you sell the services or products. Format is according to ISO 4217, a three-letter code.","regexp":"^[A-Z]{3}$","type":"string"},"Description":{"hint":"Text describing the service or product sold; will be displayed on the payment page.","regexp":"^.{1,255}$","type":"string"},"MethodID":{"hint":"The ID of the payment method.","regexp":"^\\d{1,12}$","type":"int"},"StatementDescriptor":{"hint":"Description per transaction that appears on the customer\u2019s billing statement, explaining a charge of the merchant. It helps the customer identify the purchase.","regexp":"^.{1,255}$","type":"string"},"BillingAddress":{"hint":"Billing Address details","regexp":"","type":"object","ID":{"hint":"Address ID, a unique number that identifies an address in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"Country":{"hint":"Customer\u2018s country. Recommended to be sent in order to increase the conversion. If MethodID is missing, this field (taken from BillingAddress object) controls which payment methods are shown on the hosted payment pages. Format is according to ISO-3166-1 alpha-2, a two-letter code.","regexp":"^([A-Za-z]{2})?$","type":"string"},"City":{"hint":"City name","regexp":"^(.{1,255})?$","type":"string"},"ZipCode":{"hint":"Postal code","regexp":"^(.{1,255})?$","type":"string"},"State":{"hint":"State name","regexp":"^(.{1,255})?$","type":"string"},"Street":{"hint":"Street name","regexp":"^(.{1,255})?$","type":"string"},"StreetNumber":{"hint":"Street Number","regexp":"^(.{1,255})?$","type":"string"},"HouseNumber":{"hint":"House Number","regexp":"^(.{1,255})?$","type":"string"},"HouseExtension":{"hint":"House Extension","regexp":"^(.{1,255})?$","type":"string"}},"Customer":{"hint":"Customer details","regexp":"","type":"object","ID":{"hint":"Customer ID","regexp":"^\\d{1,12}$","type":"int"},"MerchantCustomerID":{"hint":"The ID of the customer in your system.","regexp":"^([0-9a-zA-Z_-]{1,50})?$","type":"string"},"Email":{"hint":"Customer\u2019s email","regexp":"^[a-zA-Z0-9\\._%+-]{1,100}@[a-zA-Z0-9\\.-]{1,40}\\.[a-zA-Z]{1,8}$","type":"string"},"FirstName":{"hint":"Customer\u2019s first name","regexp":"","type":"string"},"LastName":{"hint":"Customer\u2019s last name","regexp":"","type":"string"},"Gender":{"hint":"Customer\u2019s gender. It can have the following values: 1 - Male, 2 - Female.","regexp":"","type":"string"},"DateOfBirth":{"hint":"Customer date of birth","regexp":"^(((19|20)\\d\\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01]))$","type":"date"},"SocialSecurityNumber":{"hint":"Customer\u2018s social or fiscal identifier","regexp":"","type":"string"},"Phone":{"hint":"Customer\u2019s phone including prefix","regexp":"","type":"string"},"Company":{"hint":"Company name (for legal entities)","regexp":"","type":"string"},"InputDateTime":{"hint":"Customer creation date","regexp":"","type":"datetime"}},"Card":{"hint":"Card details","regexp":"","type":"object","HolderName":{"hint":"The person whose name is on the credit card.","regexp":"^[^\\d]*$","type":"string"},"Number":{"hint":"The number of the credit card","regexp":"^(\\d{16,19})$","type":"string"},"ExpirationMonth":{"hint":"The expiration month of the credit card","regexp":"^(0?[1-9]|1[0-2])$","type":"string"},"ExpirationYear":{"hint":"The expiration year of the credit card","regexp":"^(20|)([0-9]{2})$","type":"string"},"IssuingBankCountry":{"hint":"Card issuing bank country","regexp":"^[a-zA-Z]{2}$","type":"string"},"SecurityCode":{"hint":"The card security code (also called CVV2) consists of a 3 or 4 digit number that appears on the credit card.","regexp":"^([0-9]){3,4}$","type":"string"},"RequireSecurityCode":{"hint":"If set to false when the security code parameter is not used, it will not redirect to the form page to fill in the security code, but the payment will be directly sent to the payment provider.","regexp":"","type":"bool"},"Token":{"hint":"Card token","regexp":"","type":"string"},"MaskedNumber":{"hint":"Card masked number","regexp":"","type":"string"}},"Details":{"hint":"In some cases we send various details about the payment (e.g. Reference Number and Bank Details of the Customer for Bank Transfer payments).","regexp":"","type":"array of objects","CustomerIBAN":{"hint":"Customer\u2019s IBAN (International Bank Account Number), a code (up to 34 alphanumeric characters) that uniquely identifies an account held at any bank anywhere in the world.","regexp":"","type":"string"},"CustomerBankAccountID":{"hint":"Customer bank account id","regexp":"","type":"string"},"CryptoAddress":{"hint":"Address when paying with crypto","regexp":"","type":"string"},"CryptoCurrency":{"hint":"Crypto currency","regexp":"^[A-Z]{3}$","type":"string"},"SecurityQuestion":{"hint":"Security question","regexp":"","type":"string"},"SecurityAnswer":{"hint":"Security answer","regexp":"","type":"string"},"IPAddress":{"hint":"IP Address","regexp":"^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$","type":"string"}}}}POST https://paytest.smart2pay.com/v1/payouts Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk= { "Payout": { "MerchantTransactionID": "s2ptest_j1", "Amount": 2000, "Currency": "EUR", "MethodID": 1, "Customer": { "Email": "test@test.com", "FirstName": "John", "LastName": "Smith" }, "BillingAddress": { "Country": "NL" }, "Details": { "CustomerIBAN": "NL611904300234573201" } } }
Response:
{"Payout":{"hint":"","regexp":"","type":"object","InvalidRequestID":{"hint":"Payout failure reference ID","regexp":"","type":"string"},"ID":{"hint":"Payout ID, a unique number that identifies the payout in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"SiteID":{"hint":"The ID of the site","regexp":"^\\d{1,12}$","type":"int"},"Created":{"hint":"Date and time when the payout was created.","regexp":"","type":"datetime"},"MethodID":{"hint":"The ID of the payment method.","regexp":"^\\d{1,12}$","type":"int"},"MerchantTransactionID":{"hint":"Merchant Transaction ID, a number that uniquely identifies a transaction in your system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"OriginatorTransactionID":{"hint":"Originator transaction ID, a number that uniquely identifies the transaction in the original requester\u2019s system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"Amount":{"hint":"Payout amount. The last two digits represent the decimal part (11.54 will be sent 1154). Please be aware that data type string is also accepted as long as it contains only digits.","regexp":"^\\d{1,12}$","type":"int"},"Currency":{"hint":"The currency in which you sell the services or products. Format is according to ISO 4217, a three-letter code.","regexp":"^[A-Z]{3}$","type":"string"},"Description":{"hint":"Text describing the service or product sold; will be displayed on the payment page.","regexp":"^.{1,255}$","type":"string"},"StatementDescriptor":{"hint":"Description per transaction that appears on the customer\u2019s billing statement, explaining a charge of the merchant. It helps the customer identify the purchase.","regexp":"^.{1,255}$","type":"string"},"Status":{"hint":"Payout status","regexp":"","type":"object","ID":{"hint":"The ID of the payout status. It can have the following values: 1 - Open, 2 - Success, 4 - Failed.","regexp":"","type":"int"},"Info":{"hint":"The description of the status","regexp":"","type":"string"},"Reasons":{"hint":"The reasons why the payment got to this status.","regexp":"","type":"array of objects","Code":{"hint":"The id of the message type transmitted in the response. See our section GlobalPay Return Codes for a complete description.","regexp":"","type":"int"},"Info":{"hint":"The message body","regexp":"","type":"string"}}},"Customer":{"hint":"Customer details","regexp":"","type":"object","ID":{"hint":"Customer ID","regexp":"^\\d{1,12}$","type":"int"},"MerchantCustomerID":{"hint":"The ID of the customer in your system.","regexp":"^([0-9a-zA-Z_-]{1,50})?$","type":"string"},"Email":{"hint":"Customer\u2019s email","regexp":"^[a-zA-Z0-9\\._%+-]{1,100}@[a-zA-Z0-9\\.-]{1,40}\\.[a-zA-Z]{1,8}$","type":"string"},"FirstName":{"hint":"Customer\u2019s first name","regexp":"","type":"string"},"LastName":{"hint":"Customer\u2019s last name","regexp":"","type":"string"},"Gender":{"hint":"Customer\u2019s gender. It can have the following values: 1 - Male, 2 - Female.","regexp":"","type":"string"},"DateOfBirth":{"hint":"Customer date of birth","regexp":"^(((19|20)\\d\\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01]))$","type":"date"},"SocialSecurityNumber":{"hint":"Customer\u2018s social or fiscal identifier","regexp":"","type":"string"},"Phone":{"hint":"Customer\u2019s phone including prefix","regexp":"","type":"string"},"Company":{"hint":"Company name (for legal entities)","regexp":"","type":"string"},"InputDateTime":{"hint":"Customer creation date","regexp":"","type":"datetime"}},"BillingAddress":{"hint":"Billing Address details","regexp":"","type":"object","ID":{"hint":"Address ID, a unique number that identifies an address in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"Country":{"hint":"Customer\u2018s country. Recommended to be sent in order to increase the conversion. If MethodID is missing, this field (taken from BillingAddress object) controls which payment methods are shown on the hosted payment pages. Format is according to ISO-3166-1 alpha-2, a two-letter code.","regexp":"^([A-Za-z]{2})?$","type":"string"},"City":{"hint":"City name","regexp":"^(.{1,255})?$","type":"string"},"ZipCode":{"hint":"Postal code","regexp":"^(.{1,255})?$","type":"string"},"State":{"hint":"State name","regexp":"^(.{1,255})?$","type":"string"},"Street":{"hint":"Street name","regexp":"^(.{1,255})?$","type":"string"},"StreetNumber":{"hint":"Street Number","regexp":"^(.{1,255})?$","type":"string"},"HouseNumber":{"hint":"House Number","regexp":"^(.{1,255})?$","type":"string"},"HouseExtension":{"hint":"House Extension","regexp":"^(.{1,255})?$","type":"string"}},"Details":{"hint":"In some cases we send various details about the payment (e.g. Reference Number and Bank Details of the Customer for Bank Transfer payments).","regexp":"","type":"array of objects","CustomerIBAN":{"hint":"Customer\u2019s IBAN (International Bank Account Number), a code (up to 34 alphanumeric characters) that uniquely identifies an account held at any bank anywhere in the world.","regexp":"","type":"string"},"CustomerBankAccountID":{"hint":"Customer bank account id","regexp":"","type":"string"},"CryptoAddress":{"hint":"Address when paying with crypto","regexp":"^.{1,50}$","type":"string"},"CryptoCurrency":{"hint":"Crypto currency","regexp":"^[A-Z]{3}$","type":"string"},"SecurityQuestion":{"hint":"Security question","regexp":"^.{6,40}$","type":"string"},"SecurityAnswer":{"hint":"Security answer","regexp":"^.{6,25}$","type":"string"},"IPAddress":{"hint":"IP Address","regexp":"^.{1,45}$","type":"string"}}}}HTTP/1.1 201 Created Content-Type: application/json; charset=utf-8 { "Payout": { "ID": 376, "Created": "20200821131247", "MerchantTransactionID": "s2ptest_j1", "Amount": 2000, "Currency": "EUR", "MethodID": 1, "Description": null, "SiteID": 30201, "Customer": { "ID": 335, "MerchantCustomerID": null, "Email": "test@test.com", "FirstName": "John", "LastName": "Smith", "Gender": null, "SocialSecurityNumber": null, "Phone": null, "Company": null, "DateOfBirth": null }, "BillingAddress": { "ID": 170, "City": null, "ZipCode": null, "State": null, "Street": null, "StreetNumber": null, "HouseNumber": null, "HouseExtension": null, "Country": "NL" }, "Status": { "ID": 1, "Info": "Open", "Reasons": null } } }
- For P24 Payouts (12) you need to send in the request the following parameters: Customer’s details first name, last name, email address and Customer IBAN parameter. Also, please send the Billing address parameters: Country, City, Street and ZipCode. These parameters will appear on the bank statement.
Request:
{"Payout":{"hint":"","regexp":"","type":"object","MerchantTransactionID":{"hint":"Merchant Transaction ID, a number that uniquely identifies a transaction in your system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"Amount":{"hint":"Payout amount. The last two digits represent the decimal part (11.54 will be sent 1154). Please be aware that data type string is also accepted as long as it contains only digits.","regexp":"^\\d{1,12}$","type":"int"},"Currency":{"hint":"The currency in which you sell the services or products. Format is according to ISO 4217, a three-letter code.","regexp":"^[A-Z]{3}$","type":"string"},"Description":{"hint":"Text describing the service or product sold; will be displayed on the payment page.","regexp":"^.{1,255}$","type":"string"},"MethodID":{"hint":"The ID of the payment method.","regexp":"^\\d{1,12}$","type":"int"},"StatementDescriptor":{"hint":"Description per transaction that appears on the customer\u2019s billing statement, explaining a charge of the merchant. It helps the customer identify the purchase.","regexp":"^.{1,255}$","type":"string"},"BillingAddress":{"hint":"Billing Address details","regexp":"","type":"object","ID":{"hint":"Address ID, a unique number that identifies an address in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"Country":{"hint":"Customer\u2018s country. Recommended to be sent in order to increase the conversion. If MethodID is missing, this field (taken from BillingAddress object) controls which payment methods are shown on the hosted payment pages. Format is according to ISO-3166-1 alpha-2, a two-letter code.","regexp":"^([A-Za-z]{2})?$","type":"string"},"City":{"hint":"City name","regexp":"^(.{1,255})?$","type":"string"},"ZipCode":{"hint":"Postal code","regexp":"^(.{1,255})?$","type":"string"},"State":{"hint":"State name","regexp":"^(.{1,255})?$","type":"string"},"Street":{"hint":"Street name","regexp":"^(.{1,255})?$","type":"string"},"StreetNumber":{"hint":"Street Number","regexp":"^(.{1,255})?$","type":"string"},"HouseNumber":{"hint":"House Number","regexp":"^(.{1,255})?$","type":"string"},"HouseExtension":{"hint":"House Extension","regexp":"^(.{1,255})?$","type":"string"}},"Customer":{"hint":"Customer details","regexp":"","type":"object","ID":{"hint":"Customer ID","regexp":"^\\d{1,12}$","type":"int"},"MerchantCustomerID":{"hint":"The ID of the customer in your system.","regexp":"^([0-9a-zA-Z_-]{1,50})?$","type":"string"},"Email":{"hint":"Customer\u2019s email","regexp":"^[a-zA-Z0-9\\._%+-]{1,100}@[a-zA-Z0-9\\.-]{1,40}\\.[a-zA-Z]{1,8}$","type":"string"},"FirstName":{"hint":"Customer\u2019s first name","regexp":"","type":"string"},"LastName":{"hint":"Customer\u2019s last name","regexp":"","type":"string"},"Gender":{"hint":"Customer\u2019s gender. It can have the following values: 1 - Male, 2 - Female.","regexp":"","type":"string"},"DateOfBirth":{"hint":"Customer date of birth","regexp":"^(((19|20)\\d\\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01]))$","type":"date"},"SocialSecurityNumber":{"hint":"Customer\u2018s social or fiscal identifier","regexp":"","type":"string"},"Phone":{"hint":"Customer\u2019s phone including prefix","regexp":"","type":"string"},"Company":{"hint":"Company name (for legal entities)","regexp":"","type":"string"},"InputDateTime":{"hint":"Customer creation date","regexp":"","type":"datetime"}},"Card":{"hint":"Card details","regexp":"","type":"object","HolderName":{"hint":"The person whose name is on the credit card.","regexp":"^[^\\d]*$","type":"string"},"Number":{"hint":"The number of the credit card","regexp":"^(\\d{16,19})$","type":"string"},"ExpirationMonth":{"hint":"The expiration month of the credit card","regexp":"^(0?[1-9]|1[0-2])$","type":"string"},"ExpirationYear":{"hint":"The expiration year of the credit card","regexp":"^(20|)([0-9]{2})$","type":"string"},"IssuingBankCountry":{"hint":"Card issuing bank country","regexp":"^[a-zA-Z]{2}$","type":"string"},"SecurityCode":{"hint":"The card security code (also called CVV2) consists of a 3 or 4 digit number that appears on the credit card.","regexp":"^([0-9]){3,4}$","type":"string"},"RequireSecurityCode":{"hint":"If set to false when the security code parameter is not used, it will not redirect to the form page to fill in the security code, but the payment will be directly sent to the payment provider.","regexp":"","type":"bool"},"Token":{"hint":"Card token","regexp":"","type":"string"},"MaskedNumber":{"hint":"Card masked number","regexp":"","type":"string"}},"Details":{"hint":"In some cases we send various details about the payment (e.g. Reference Number and Bank Details of the Customer for Bank Transfer payments).","regexp":"","type":"array of objects","CustomerIBAN":{"hint":"Customer\u2019s IBAN (International Bank Account Number), a code (up to 34 alphanumeric characters) that uniquely identifies an account held at any bank anywhere in the world.","regexp":"","type":"string"},"CustomerBankAccountID":{"hint":"Customer bank account id","regexp":"","type":"string"},"CryptoAddress":{"hint":"Address when paying with crypto","regexp":"","type":"string"},"CryptoCurrency":{"hint":"Crypto currency","regexp":"^[A-Z]{3}$","type":"string"},"SecurityQuestion":{"hint":"Security question","regexp":"","type":"string"},"SecurityAnswer":{"hint":"Security answer","regexp":"","type":"string"},"IPAddress":{"hint":"IP Address","regexp":"^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$","type":"string"}}}}POST https://paytest.smart2pay.com/v1/payouts Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk= { "Payout": { "MerchantTransactionID": "s2ptest_a12", "Amount": 3, "Currency": "PLN", "Description": "Test Payout", "MethodID": "12", "Customer": { "Email": "test@test.com", "FirstName": "John", "LastName": "Smith" }, "BillingAddress": { "City": "City", "ZipCode": "700000", "Street": "Street", "Country": "PL" }, "Details": { "CustomerIBAN": "PL24109024027163352166834377" } } }
Response:
{"Payout":{"hint":"","regexp":"","type":"object","InvalidRequestID":{"hint":"Payout failure reference ID","regexp":"","type":"string"},"ID":{"hint":"Payout ID, a unique number that identifies the payout in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"SiteID":{"hint":"The ID of the site","regexp":"^\\d{1,12}$","type":"int"},"Created":{"hint":"Date and time when the payout was created.","regexp":"","type":"datetime"},"MethodID":{"hint":"The ID of the payment method.","regexp":"^\\d{1,12}$","type":"int"},"MerchantTransactionID":{"hint":"Merchant Transaction ID, a number that uniquely identifies a transaction in your system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"OriginatorTransactionID":{"hint":"Originator transaction ID, a number that uniquely identifies the transaction in the original requester\u2019s system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"Amount":{"hint":"Payout amount. The last two digits represent the decimal part (11.54 will be sent 1154). Please be aware that data type string is also accepted as long as it contains only digits.","regexp":"^\\d{1,12}$","type":"int"},"Currency":{"hint":"The currency in which you sell the services or products. Format is according to ISO 4217, a three-letter code.","regexp":"^[A-Z]{3}$","type":"string"},"Description":{"hint":"Text describing the service or product sold; will be displayed on the payment page.","regexp":"^.{1,255}$","type":"string"},"StatementDescriptor":{"hint":"Description per transaction that appears on the customer\u2019s billing statement, explaining a charge of the merchant. It helps the customer identify the purchase.","regexp":"^.{1,255}$","type":"string"},"Status":{"hint":"Payout status","regexp":"","type":"object","ID":{"hint":"The ID of the payout status. It can have the following values: 1 - Open, 2 - Success, 4 - Failed.","regexp":"","type":"int"},"Info":{"hint":"The description of the status","regexp":"","type":"string"},"Reasons":{"hint":"The reasons why the payment got to this status.","regexp":"","type":"array of objects","Code":{"hint":"The id of the message type transmitted in the response. See our section GlobalPay Return Codes for a complete description.","regexp":"","type":"int"},"Info":{"hint":"The message body","regexp":"","type":"string"}}},"Customer":{"hint":"Customer details","regexp":"","type":"object","ID":{"hint":"Customer ID","regexp":"^\\d{1,12}$","type":"int"},"MerchantCustomerID":{"hint":"The ID of the customer in your system.","regexp":"^([0-9a-zA-Z_-]{1,50})?$","type":"string"},"Email":{"hint":"Customer\u2019s email","regexp":"^[a-zA-Z0-9\\._%+-]{1,100}@[a-zA-Z0-9\\.-]{1,40}\\.[a-zA-Z]{1,8}$","type":"string"},"FirstName":{"hint":"Customer\u2019s first name","regexp":"","type":"string"},"LastName":{"hint":"Customer\u2019s last name","regexp":"","type":"string"},"Gender":{"hint":"Customer\u2019s gender. It can have the following values: 1 - Male, 2 - Female.","regexp":"","type":"string"},"DateOfBirth":{"hint":"Customer date of birth","regexp":"^(((19|20)\\d\\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01]))$","type":"date"},"SocialSecurityNumber":{"hint":"Customer\u2018s social or fiscal identifier","regexp":"","type":"string"},"Phone":{"hint":"Customer\u2019s phone including prefix","regexp":"","type":"string"},"Company":{"hint":"Company name (for legal entities)","regexp":"","type":"string"},"InputDateTime":{"hint":"Customer creation date","regexp":"","type":"datetime"}},"BillingAddress":{"hint":"Billing Address details","regexp":"","type":"object","ID":{"hint":"Address ID, a unique number that identifies an address in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"Country":{"hint":"Customer\u2018s country. Recommended to be sent in order to increase the conversion. If MethodID is missing, this field (taken from BillingAddress object) controls which payment methods are shown on the hosted payment pages. Format is according to ISO-3166-1 alpha-2, a two-letter code.","regexp":"^([A-Za-z]{2})?$","type":"string"},"City":{"hint":"City name","regexp":"^(.{1,255})?$","type":"string"},"ZipCode":{"hint":"Postal code","regexp":"^(.{1,255})?$","type":"string"},"State":{"hint":"State name","regexp":"^(.{1,255})?$","type":"string"},"Street":{"hint":"Street name","regexp":"^(.{1,255})?$","type":"string"},"StreetNumber":{"hint":"Street Number","regexp":"^(.{1,255})?$","type":"string"},"HouseNumber":{"hint":"House Number","regexp":"^(.{1,255})?$","type":"string"},"HouseExtension":{"hint":"House Extension","regexp":"^(.{1,255})?$","type":"string"}},"Details":{"hint":"In some cases we send various details about the payment (e.g. Reference Number and Bank Details of the Customer for Bank Transfer payments).","regexp":"","type":"array of objects","CustomerIBAN":{"hint":"Customer\u2019s IBAN (International Bank Account Number), a code (up to 34 alphanumeric characters) that uniquely identifies an account held at any bank anywhere in the world.","regexp":"","type":"string"},"CustomerBankAccountID":{"hint":"Customer bank account id","regexp":"","type":"string"},"CryptoAddress":{"hint":"Address when paying with crypto","regexp":"^.{1,50}$","type":"string"},"CryptoCurrency":{"hint":"Crypto currency","regexp":"^[A-Z]{3}$","type":"string"},"SecurityQuestion":{"hint":"Security question","regexp":"^.{6,40}$","type":"string"},"SecurityAnswer":{"hint":"Security answer","regexp":"^.{6,25}$","type":"string"},"IPAddress":{"hint":"IP Address","regexp":"^.{1,45}$","type":"string"}}}}HTTP/1.1 201 Created Content-Type: application/json; charset=utf-8 { "Payout": { "ID": 4390, "Created": "20201216060630", "MerchantTransactionID": "s2ptest_a12", "Amount": "3", "Currency": "PLN", "MethodID": 12, "Description": "Test Payout", "SiteID": 30199, "Details": { "CustomerIBAN": "PL24109024027163352166834377" }, "Customer": { "ID": 2677591, "MerchantCustomerID": null, "Email": "test@test.com", "FirstName": "John", "LastName": "Smith", "Gender": null, "SocialSecurityNumber": null, "Phone": null, "Company": null, "DateOfBirth": null }, "BillingAddress": { "ID": 13966, "City": "City", "ZipCode": "700000", "State": null, "Street": "Street", "StreetNumber": null, "HouseNumber": null, "HouseExtension": null, "Country": "PL" }, "Status": { "ID": 1, "Info": "Open", "Reasons": null } } }
- For SEPA Payouts (1) you need to send in the request the below parameters, including the Customer’s first and last name and Customer IBAN parameter.
For B2B payouts you can send in the request the Company parameter instead of FirstName and LastName parameters.
Request:
POST https://paytest.smart2pay.com/v1/payouts
Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=
{
"Payout": {
"MerchantTransactionID": "s2ptest_j1",
"Amount": 2000,
"Currency": "EUR",
"MethodID": 1,
"Customer": {
"Email": "test@test.com",
"Company": "Test Company SRL"
},
"BillingAddress": {
"Country": "NL"
},
"Details": {
"CustomerIBAN": "NL611904300234573201"
}
}
}
{"Payout":{"hint":"","regexp":"","type":"object","MerchantTransactionID":{"hint":"Merchant Transaction ID, a number that uniquely identifies a transaction in your system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"Amount":{"hint":"Payout amount. The last two digits represent the decimal part (11.54 will be sent 1154). Please be aware that data type string is also accepted as long as it contains only digits.","regexp":"^\\d{1,12}$","type":"int"},"Currency":{"hint":"The currency in which you sell the services or products. Format is according to ISO 4217, a three-letter code.","regexp":"^[A-Z]{3}$","type":"string"},"Description":{"hint":"Text describing the service or product sold; will be displayed on the payment page.","regexp":"^.{1,255}$","type":"string"},"MethodID":{"hint":"The ID of the payment method.","regexp":"^\\d{1,12}$","type":"int"},"StatementDescriptor":{"hint":"Description per transaction that appears on the customer\u2019s billing statement, explaining a charge of the merchant. It helps the customer identify the purchase.","regexp":"^.{1,255}$","type":"string"},"BillingAddress":{"hint":"Billing Address details","regexp":"","type":"object","ID":{"hint":"Address ID, a unique number that identifies an address in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"Country":{"hint":"Customer\u2018s country. Recommended to be sent in order to increase the conversion. If MethodID is missing, this field (taken from BillingAddress object) controls which payment methods are shown on the hosted payment pages. Format is according to ISO-3166-1 alpha-2, a two-letter code.","regexp":"^([A-Za-z]{2})?$","type":"string"},"City":{"hint":"City name","regexp":"^(.{1,255})?$","type":"string"},"ZipCode":{"hint":"Postal code","regexp":"^(.{1,255})?$","type":"string"},"State":{"hint":"State name","regexp":"^(.{1,255})?$","type":"string"},"Street":{"hint":"Street name","regexp":"^(.{1,255})?$","type":"string"},"StreetNumber":{"hint":"Street Number","regexp":"^(.{1,255})?$","type":"string"},"HouseNumber":{"hint":"House Number","regexp":"^(.{1,255})?$","type":"string"},"HouseExtension":{"hint":"House Extension","regexp":"^(.{1,255})?$","type":"string"}},"Customer":{"hint":"Customer details","regexp":"","type":"object","ID":{"hint":"Customer ID","regexp":"^\\d{1,12}$","type":"int"},"MerchantCustomerID":{"hint":"The ID of the customer in your system.","regexp":"^([0-9a-zA-Z_-]{1,50})?$","type":"string"},"Email":{"hint":"Customer\u2019s email","regexp":"^[a-zA-Z0-9\\._%+-]{1,100}@[a-zA-Z0-9\\.-]{1,40}\\.[a-zA-Z]{1,8}$","type":"string"},"FirstName":{"hint":"Customer\u2019s first name","regexp":"","type":"string"},"LastName":{"hint":"Customer\u2019s last name","regexp":"","type":"string"},"Gender":{"hint":"Customer\u2019s gender. It can have the following values: 1 - Male, 2 - Female.","regexp":"","type":"string"},"DateOfBirth":{"hint":"Customer date of birth","regexp":"^(((19|20)\\d\\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01]))$","type":"date"},"SocialSecurityNumber":{"hint":"Customer\u2018s social or fiscal identifier","regexp":"","type":"string"},"Phone":{"hint":"Customer\u2019s phone including prefix","regexp":"","type":"string"},"Company":{"hint":"Company name (for legal entities)","regexp":"","type":"string"},"InputDateTime":{"hint":"Customer creation date","regexp":"","type":"datetime"}},"Card":{"hint":"Card details","regexp":"","type":"object","HolderName":{"hint":"The person whose name is on the credit card.","regexp":"^[^\\d]*$","type":"string"},"Number":{"hint":"The number of the credit card","regexp":"^(\\d{16,19})$","type":"string"},"ExpirationMonth":{"hint":"The expiration month of the credit card","regexp":"^(0?[1-9]|1[0-2])$","type":"string"},"ExpirationYear":{"hint":"The expiration year of the credit card","regexp":"^(20|)([0-9]{2})$","type":"string"},"IssuingBankCountry":{"hint":"Card issuing bank country","regexp":"^[a-zA-Z]{2}$","type":"string"},"SecurityCode":{"hint":"The card security code (also called CVV2) consists of a 3 or 4 digit number that appears on the credit card.","regexp":"^([0-9]){3,4}$","type":"string"},"RequireSecurityCode":{"hint":"If set to false when the security code parameter is not used, it will not redirect to the form page to fill in the security code, but the payment will be directly sent to the payment provider.","regexp":"","type":"bool"},"Token":{"hint":"Card token","regexp":"","type":"string"},"MaskedNumber":{"hint":"Card masked number","regexp":"","type":"string"}},"Details":{"hint":"In some cases we send various details about the payment (e.g. Reference Number and Bank Details of the Customer for Bank Transfer payments).","regexp":"","type":"array of objects","CustomerIBAN":{"hint":"Customer\u2019s IBAN (International Bank Account Number), a code (up to 34 alphanumeric characters) that uniquely identifies an account held at any bank anywhere in the world.","regexp":"","type":"string"},"CustomerBankAccountID":{"hint":"Customer bank account id","regexp":"","type":"string"},"CryptoAddress":{"hint":"Address when paying with crypto","regexp":"","type":"string"},"CryptoCurrency":{"hint":"Crypto currency","regexp":"^[A-Z]{3}$","type":"string"},"SecurityQuestion":{"hint":"Security question","regexp":"","type":"string"},"SecurityAnswer":{"hint":"Security answer","regexp":"","type":"string"},"IPAddress":{"hint":"IP Address","regexp":"^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$","type":"string"}}}}Also, you can avoid sending each time the Customer and Country details by sending the CustomerID and BillingAddressID – the ones you receive in the initial Response.
Request:
POST https://paytest.smart2pay.com/v1/payouts
Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=
{
"Payout": {
"MerchantTransactionID": "s2ptest_j1",
"Amount": 2000,
"Currency": "EUR",
"MethodID": 1,
"Customer": {
"ID": 335
},
"BillingAddress": {
"ID": 170
},
"Details": {
"CustomerIBAN": "NL611904300234573201"
}
}
}
{"Payout":{"hint":"","regexp":"","type":"object","MerchantTransactionID":{"hint":"Merchant Transaction ID, a number that uniquely identifies a transaction in your system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"Amount":{"hint":"Payout amount. The last two digits represent the decimal part (11.54 will be sent 1154). Please be aware that data type string is also accepted as long as it contains only digits.","regexp":"^\\d{1,12}$","type":"int"},"Currency":{"hint":"The currency in which you sell the services or products. Format is according to ISO 4217, a three-letter code.","regexp":"^[A-Z]{3}$","type":"string"},"Description":{"hint":"Text describing the service or product sold; will be displayed on the payment page.","regexp":"^.{1,255}$","type":"string"},"MethodID":{"hint":"The ID of the payment method.","regexp":"^\\d{1,12}$","type":"int"},"StatementDescriptor":{"hint":"Description per transaction that appears on the customer\u2019s billing statement, explaining a charge of the merchant. It helps the customer identify the purchase.","regexp":"^.{1,255}$","type":"string"},"BillingAddress":{"hint":"Billing Address details","regexp":"","type":"object","ID":{"hint":"Address ID, a unique number that identifies an address in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"Country":{"hint":"Customer\u2018s country. Recommended to be sent in order to increase the conversion. If MethodID is missing, this field (taken from BillingAddress object) controls which payment methods are shown on the hosted payment pages. Format is according to ISO-3166-1 alpha-2, a two-letter code.","regexp":"^([A-Za-z]{2})?$","type":"string"},"City":{"hint":"City name","regexp":"^(.{1,255})?$","type":"string"},"ZipCode":{"hint":"Postal code","regexp":"^(.{1,255})?$","type":"string"},"State":{"hint":"State name","regexp":"^(.{1,255})?$","type":"string"},"Street":{"hint":"Street name","regexp":"^(.{1,255})?$","type":"string"},"StreetNumber":{"hint":"Street Number","regexp":"^(.{1,255})?$","type":"string"},"HouseNumber":{"hint":"House Number","regexp":"^(.{1,255})?$","type":"string"},"HouseExtension":{"hint":"House Extension","regexp":"^(.{1,255})?$","type":"string"}},"Customer":{"hint":"Customer details","regexp":"","type":"object","ID":{"hint":"Customer ID","regexp":"^\\d{1,12}$","type":"int"},"MerchantCustomerID":{"hint":"The ID of the customer in your system.","regexp":"^([0-9a-zA-Z_-]{1,50})?$","type":"string"},"Email":{"hint":"Customer\u2019s email","regexp":"^[a-zA-Z0-9\\._%+-]{1,100}@[a-zA-Z0-9\\.-]{1,40}\\.[a-zA-Z]{1,8}$","type":"string"},"FirstName":{"hint":"Customer\u2019s first name","regexp":"","type":"string"},"LastName":{"hint":"Customer\u2019s last name","regexp":"","type":"string"},"Gender":{"hint":"Customer\u2019s gender. It can have the following values: 1 - Male, 2 - Female.","regexp":"","type":"string"},"DateOfBirth":{"hint":"Customer date of birth","regexp":"^(((19|20)\\d\\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01]))$","type":"date"},"SocialSecurityNumber":{"hint":"Customer\u2018s social or fiscal identifier","regexp":"","type":"string"},"Phone":{"hint":"Customer\u2019s phone including prefix","regexp":"","type":"string"},"Company":{"hint":"Company name (for legal entities)","regexp":"","type":"string"},"InputDateTime":{"hint":"Customer creation date","regexp":"","type":"datetime"}},"Card":{"hint":"Card details","regexp":"","type":"object","HolderName":{"hint":"The person whose name is on the credit card.","regexp":"^[^\\d]*$","type":"string"},"Number":{"hint":"The number of the credit card","regexp":"^(\\d{16,19})$","type":"string"},"ExpirationMonth":{"hint":"The expiration month of the credit card","regexp":"^(0?[1-9]|1[0-2])$","type":"string"},"ExpirationYear":{"hint":"The expiration year of the credit card","regexp":"^(20|)([0-9]{2})$","type":"string"},"IssuingBankCountry":{"hint":"Card issuing bank country","regexp":"^[a-zA-Z]{2}$","type":"string"},"SecurityCode":{"hint":"The card security code (also called CVV2) consists of a 3 or 4 digit number that appears on the credit card.","regexp":"^([0-9]){3,4}$","type":"string"},"RequireSecurityCode":{"hint":"If set to false when the security code parameter is not used, it will not redirect to the form page to fill in the security code, but the payment will be directly sent to the payment provider.","regexp":"","type":"bool"},"Token":{"hint":"Card token","regexp":"","type":"string"},"MaskedNumber":{"hint":"Card masked number","regexp":"","type":"string"}},"Details":{"hint":"In some cases we send various details about the payment (e.g. Reference Number and Bank Details of the Customer for Bank Transfer payments).","regexp":"","type":"array of objects","CustomerIBAN":{"hint":"Customer\u2019s IBAN (International Bank Account Number), a code (up to 34 alphanumeric characters) that uniquely identifies an account held at any bank anywhere in the world.","regexp":"","type":"string"},"CustomerBankAccountID":{"hint":"Customer bank account id","regexp":"","type":"string"},"CryptoAddress":{"hint":"Address when paying with crypto","regexp":"","type":"string"},"CryptoCurrency":{"hint":"Crypto currency","regexp":"^[A-Z]{3}$","type":"string"},"SecurityQuestion":{"hint":"Security question","regexp":"","type":"string"},"SecurityAnswer":{"hint":"Security answer","regexp":"","type":"string"},"IPAddress":{"hint":"IP Address","regexp":"^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$","type":"string"}}}}- For Trustly Payouts(29) you need to send in the request the Customer Bank Account ID parameter.
Request:
{"Payout":{"hint":"","regexp":"","type":"object","MerchantTransactionID":{"hint":"Merchant Transaction ID, a number that uniquely identifies a transaction in your system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"Amount":{"hint":"Payout amount. The last two digits represent the decimal part (11.54 will be sent 1154). Please be aware that data type string is also accepted as long as it contains only digits.","regexp":"^\\d{1,12}$","type":"int"},"Currency":{"hint":"The currency in which you sell the services or products. Format is according to ISO 4217, a three-letter code.","regexp":"^[A-Z]{3}$","type":"string"},"Description":{"hint":"Text describing the service or product sold; will be displayed on the payment page.","regexp":"^.{1,255}$","type":"string"},"MethodID":{"hint":"The ID of the payment method.","regexp":"^\\d{1,12}$","type":"int"},"StatementDescriptor":{"hint":"Description per transaction that appears on the customer\u2019s billing statement, explaining a charge of the merchant. It helps the customer identify the purchase.","regexp":"^.{1,255}$","type":"string"},"BillingAddress":{"hint":"Billing Address details","regexp":"","type":"object","ID":{"hint":"Address ID, a unique number that identifies an address in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"Country":{"hint":"Customer\u2018s country. Recommended to be sent in order to increase the conversion. If MethodID is missing, this field (taken from BillingAddress object) controls which payment methods are shown on the hosted payment pages. Format is according to ISO-3166-1 alpha-2, a two-letter code.","regexp":"^([A-Za-z]{2})?$","type":"string"},"City":{"hint":"City name","regexp":"^(.{1,255})?$","type":"string"},"ZipCode":{"hint":"Postal code","regexp":"^(.{1,255})?$","type":"string"},"State":{"hint":"State name","regexp":"^(.{1,255})?$","type":"string"},"Street":{"hint":"Street name","regexp":"^(.{1,255})?$","type":"string"},"StreetNumber":{"hint":"Street Number","regexp":"^(.{1,255})?$","type":"string"},"HouseNumber":{"hint":"House Number","regexp":"^(.{1,255})?$","type":"string"},"HouseExtension":{"hint":"House Extension","regexp":"^(.{1,255})?$","type":"string"}},"Customer":{"hint":"Customer details","regexp":"","type":"object","ID":{"hint":"Customer ID","regexp":"^\\d{1,12}$","type":"int"},"MerchantCustomerID":{"hint":"The ID of the customer in your system.","regexp":"^([0-9a-zA-Z_-]{1,50})?$","type":"string"},"Email":{"hint":"Customer\u2019s email","regexp":"^[a-zA-Z0-9\\._%+-]{1,100}@[a-zA-Z0-9\\.-]{1,40}\\.[a-zA-Z]{1,8}$","type":"string"},"FirstName":{"hint":"Customer\u2019s first name","regexp":"","type":"string"},"LastName":{"hint":"Customer\u2019s last name","regexp":"","type":"string"},"Gender":{"hint":"Customer\u2019s gender. It can have the following values: 1 - Male, 2 - Female.","regexp":"","type":"string"},"DateOfBirth":{"hint":"Customer date of birth","regexp":"^(((19|20)\\d\\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01]))$","type":"date"},"SocialSecurityNumber":{"hint":"Customer\u2018s social or fiscal identifier","regexp":"","type":"string"},"Phone":{"hint":"Customer\u2019s phone including prefix","regexp":"","type":"string"},"Company":{"hint":"Company name (for legal entities)","regexp":"","type":"string"},"InputDateTime":{"hint":"Customer creation date","regexp":"","type":"datetime"}},"Card":{"hint":"Card details","regexp":"","type":"object","HolderName":{"hint":"The person whose name is on the credit card.","regexp":"^[^\\d]*$","type":"string"},"Number":{"hint":"The number of the credit card","regexp":"^(\\d{16,19})$","type":"string"},"ExpirationMonth":{"hint":"The expiration month of the credit card","regexp":"^(0?[1-9]|1[0-2])$","type":"string"},"ExpirationYear":{"hint":"The expiration year of the credit card","regexp":"^(20|)([0-9]{2})$","type":"string"},"IssuingBankCountry":{"hint":"Card issuing bank country","regexp":"^[a-zA-Z]{2}$","type":"string"},"SecurityCode":{"hint":"The card security code (also called CVV2) consists of a 3 or 4 digit number that appears on the credit card.","regexp":"^([0-9]){3,4}$","type":"string"},"RequireSecurityCode":{"hint":"If set to false when the security code parameter is not used, it will not redirect to the form page to fill in the security code, but the payment will be directly sent to the payment provider.","regexp":"","type":"bool"},"Token":{"hint":"Card token","regexp":"","type":"string"},"MaskedNumber":{"hint":"Card masked number","regexp":"","type":"string"}},"Details":{"hint":"In some cases we send various details about the payment (e.g. Reference Number and Bank Details of the Customer for Bank Transfer payments).","regexp":"","type":"array of objects","CustomerIBAN":{"hint":"Customer\u2019s IBAN (International Bank Account Number), a code (up to 34 alphanumeric characters) that uniquely identifies an account held at any bank anywhere in the world.","regexp":"","type":"string"},"CustomerBankAccountID":{"hint":"Customer bank account id","regexp":"","type":"string"},"CryptoAddress":{"hint":"Address when paying with crypto","regexp":"","type":"string"},"CryptoCurrency":{"hint":"Crypto currency","regexp":"^[A-Z]{3}$","type":"string"},"SecurityQuestion":{"hint":"Security question","regexp":"","type":"string"},"SecurityAnswer":{"hint":"Security answer","regexp":"","type":"string"},"IPAddress":{"hint":"IP Address","regexp":"^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$","type":"string"}}}}POST https://paytest.smart2pay.com/v1/payouts Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk= { "Payout": { "MerchantTransactionID": "s2ptest_j1", "Amount": 1000, "Currency": "EUR", "MethodID": 29, "Customer": { "Email": "youremail@email.com" }, "Details":{ "CustomerBankAccountID": "3541977722"} } }
Response:
{"Payout":{"hint":"","regexp":"","type":"object","InvalidRequestID":{"hint":"Payout failure reference ID","regexp":"","type":"string"},"ID":{"hint":"Payout ID, a unique number that identifies the payout in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"SiteID":{"hint":"The ID of the site","regexp":"^\\d{1,12}$","type":"int"},"Created":{"hint":"Date and time when the payout was created.","regexp":"","type":"datetime"},"MethodID":{"hint":"The ID of the payment method.","regexp":"^\\d{1,12}$","type":"int"},"MerchantTransactionID":{"hint":"Merchant Transaction ID, a number that uniquely identifies a transaction in your system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"OriginatorTransactionID":{"hint":"Originator transaction ID, a number that uniquely identifies the transaction in the original requester\u2019s system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"Amount":{"hint":"Payout amount. The last two digits represent the decimal part (11.54 will be sent 1154). Please be aware that data type string is also accepted as long as it contains only digits.","regexp":"^\\d{1,12}$","type":"int"},"Currency":{"hint":"The currency in which you sell the services or products. Format is according to ISO 4217, a three-letter code.","regexp":"^[A-Z]{3}$","type":"string"},"Description":{"hint":"Text describing the service or product sold; will be displayed on the payment page.","regexp":"^.{1,255}$","type":"string"},"StatementDescriptor":{"hint":"Description per transaction that appears on the customer\u2019s billing statement, explaining a charge of the merchant. It helps the customer identify the purchase.","regexp":"^.{1,255}$","type":"string"},"Status":{"hint":"Payout status","regexp":"","type":"object","ID":{"hint":"The ID of the payout status. It can have the following values: 1 - Open, 2 - Success, 4 - Failed.","regexp":"","type":"int"},"Info":{"hint":"The description of the status","regexp":"","type":"string"},"Reasons":{"hint":"The reasons why the payment got to this status.","regexp":"","type":"array of objects","Code":{"hint":"The id of the message type transmitted in the response. See our section GlobalPay Return Codes for a complete description.","regexp":"","type":"int"},"Info":{"hint":"The message body","regexp":"","type":"string"}}},"Customer":{"hint":"Customer details","regexp":"","type":"object","ID":{"hint":"Customer ID","regexp":"^\\d{1,12}$","type":"int"},"MerchantCustomerID":{"hint":"The ID of the customer in your system.","regexp":"^([0-9a-zA-Z_-]{1,50})?$","type":"string"},"Email":{"hint":"Customer\u2019s email","regexp":"^[a-zA-Z0-9\\._%+-]{1,100}@[a-zA-Z0-9\\.-]{1,40}\\.[a-zA-Z]{1,8}$","type":"string"},"FirstName":{"hint":"Customer\u2019s first name","regexp":"","type":"string"},"LastName":{"hint":"Customer\u2019s last name","regexp":"","type":"string"},"Gender":{"hint":"Customer\u2019s gender. It can have the following values: 1 - Male, 2 - Female.","regexp":"","type":"string"},"DateOfBirth":{"hint":"Customer date of birth","regexp":"^(((19|20)\\d\\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01]))$","type":"date"},"SocialSecurityNumber":{"hint":"Customer\u2018s social or fiscal identifier","regexp":"","type":"string"},"Phone":{"hint":"Customer\u2019s phone including prefix","regexp":"","type":"string"},"Company":{"hint":"Company name (for legal entities)","regexp":"","type":"string"},"InputDateTime":{"hint":"Customer creation date","regexp":"","type":"datetime"}},"BillingAddress":{"hint":"Billing Address details","regexp":"","type":"object","ID":{"hint":"Address ID, a unique number that identifies an address in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"Country":{"hint":"Customer\u2018s country. Recommended to be sent in order to increase the conversion. If MethodID is missing, this field (taken from BillingAddress object) controls which payment methods are shown on the hosted payment pages. Format is according to ISO-3166-1 alpha-2, a two-letter code.","regexp":"^([A-Za-z]{2})?$","type":"string"},"City":{"hint":"City name","regexp":"^(.{1,255})?$","type":"string"},"ZipCode":{"hint":"Postal code","regexp":"^(.{1,255})?$","type":"string"},"State":{"hint":"State name","regexp":"^(.{1,255})?$","type":"string"},"Street":{"hint":"Street name","regexp":"^(.{1,255})?$","type":"string"},"StreetNumber":{"hint":"Street Number","regexp":"^(.{1,255})?$","type":"string"},"HouseNumber":{"hint":"House Number","regexp":"^(.{1,255})?$","type":"string"},"HouseExtension":{"hint":"House Extension","regexp":"^(.{1,255})?$","type":"string"}},"Details":{"hint":"In some cases we send various details about the payment (e.g. Reference Number and Bank Details of the Customer for Bank Transfer payments).","regexp":"","type":"array of objects","CustomerIBAN":{"hint":"Customer\u2019s IBAN (International Bank Account Number), a code (up to 34 alphanumeric characters) that uniquely identifies an account held at any bank anywhere in the world.","regexp":"","type":"string"},"CustomerBankAccountID":{"hint":"Customer bank account id","regexp":"","type":"string"},"CryptoAddress":{"hint":"Address when paying with crypto","regexp":"^.{1,50}$","type":"string"},"CryptoCurrency":{"hint":"Crypto currency","regexp":"^[A-Z]{3}$","type":"string"},"SecurityQuestion":{"hint":"Security question","regexp":"^.{6,40}$","type":"string"},"SecurityAnswer":{"hint":"Security answer","regexp":"^.{6,25}$","type":"string"},"IPAddress":{"hint":"IP Address","regexp":"^.{1,45}$","type":"string"}}}}HTTP/1.1 201 Created Content-Type: application/json; charset=utf-8 { "Payout": { "ID": 376, "Created": "20190507131247", "MerchantTransactionID": "s2ptest_j1", "Amount": "1000", "Currency": "EUR", "MethodID": 29, "Description": null, "SiteID": 30201, "Details": { "CustomerBankAccountID": "3541977722" }, "Customer": { "ID": 335, "MerchantCustomerID": null, "Email": "youremail@email.com", "FirstName": null, "LastName": null, "Gender": null, "SocialSecurityNumber": null, "Phone": null, "Company": null, "DateOfBirth": null }, "BillingAddress": null, "Status": { "ID": 1, "Info": "Open", "Reasons": null } } }
- For Pay With Crypto Payouts (97) you need to send in the request the mandatory parameters Crypto Address and Crypto Currency.
Request:
{"Payout":{"hint":"","regexp":"","type":"object","MerchantTransactionID":{"hint":"Merchant Transaction ID, a number that uniquely identifies a transaction in your system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"Amount":{"hint":"Payout amount. The last two digits represent the decimal part (11.54 will be sent 1154). Please be aware that data type string is also accepted as long as it contains only digits.","regexp":"^\\d{1,12}$","type":"int"},"Currency":{"hint":"The currency in which you sell the services or products. Format is according to ISO 4217, a three-letter code.","regexp":"^[A-Z]{3}$","type":"string"},"Description":{"hint":"Text describing the service or product sold; will be displayed on the payment page.","regexp":"^.{1,255}$","type":"string"},"MethodID":{"hint":"The ID of the payment method.","regexp":"^\\d{1,12}$","type":"int"},"StatementDescriptor":{"hint":"Description per transaction that appears on the customer\u2019s billing statement, explaining a charge of the merchant. It helps the customer identify the purchase.","regexp":"^.{1,255}$","type":"string"},"BillingAddress":{"hint":"Billing Address details","regexp":"","type":"object","ID":{"hint":"Address ID, a unique number that identifies an address in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"Country":{"hint":"Customer\u2018s country. Recommended to be sent in order to increase the conversion. If MethodID is missing, this field (taken from BillingAddress object) controls which payment methods are shown on the hosted payment pages. Format is according to ISO-3166-1 alpha-2, a two-letter code.","regexp":"^([A-Za-z]{2})?$","type":"string"},"City":{"hint":"City name","regexp":"^(.{1,255})?$","type":"string"},"ZipCode":{"hint":"Postal code","regexp":"^(.{1,255})?$","type":"string"},"State":{"hint":"State name","regexp":"^(.{1,255})?$","type":"string"},"Street":{"hint":"Street name","regexp":"^(.{1,255})?$","type":"string"},"StreetNumber":{"hint":"Street Number","regexp":"^(.{1,255})?$","type":"string"},"HouseNumber":{"hint":"House Number","regexp":"^(.{1,255})?$","type":"string"},"HouseExtension":{"hint":"House Extension","regexp":"^(.{1,255})?$","type":"string"}},"Customer":{"hint":"Customer details","regexp":"","type":"object","ID":{"hint":"Customer ID","regexp":"^\\d{1,12}$","type":"int"},"MerchantCustomerID":{"hint":"The ID of the customer in your system.","regexp":"^([0-9a-zA-Z_-]{1,50})?$","type":"string"},"Email":{"hint":"Customer\u2019s email","regexp":"^[a-zA-Z0-9\\._%+-]{1,100}@[a-zA-Z0-9\\.-]{1,40}\\.[a-zA-Z]{1,8}$","type":"string"},"FirstName":{"hint":"Customer\u2019s first name","regexp":"","type":"string"},"LastName":{"hint":"Customer\u2019s last name","regexp":"","type":"string"},"Gender":{"hint":"Customer\u2019s gender. It can have the following values: 1 - Male, 2 - Female.","regexp":"","type":"string"},"DateOfBirth":{"hint":"Customer date of birth","regexp":"^(((19|20)\\d\\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01]))$","type":"date"},"SocialSecurityNumber":{"hint":"Customer\u2018s social or fiscal identifier","regexp":"","type":"string"},"Phone":{"hint":"Customer\u2019s phone including prefix","regexp":"","type":"string"},"Company":{"hint":"Company name (for legal entities)","regexp":"","type":"string"},"InputDateTime":{"hint":"Customer creation date","regexp":"","type":"datetime"}},"Card":{"hint":"Card details","regexp":"","type":"object","HolderName":{"hint":"The person whose name is on the credit card.","regexp":"^[^\\d]*$","type":"string"},"Number":{"hint":"The number of the credit card","regexp":"^(\\d{16,19})$","type":"string"},"ExpirationMonth":{"hint":"The expiration month of the credit card","regexp":"^(0?[1-9]|1[0-2])$","type":"string"},"ExpirationYear":{"hint":"The expiration year of the credit card","regexp":"^(20|)([0-9]{2})$","type":"string"},"IssuingBankCountry":{"hint":"Card issuing bank country","regexp":"^[a-zA-Z]{2}$","type":"string"},"SecurityCode":{"hint":"The card security code (also called CVV2) consists of a 3 or 4 digit number that appears on the credit card.","regexp":"^([0-9]){3,4}$","type":"string"},"RequireSecurityCode":{"hint":"If set to false when the security code parameter is not used, it will not redirect to the form page to fill in the security code, but the payment will be directly sent to the payment provider.","regexp":"","type":"bool"},"Token":{"hint":"Card token","regexp":"","type":"string"},"MaskedNumber":{"hint":"Card masked number","regexp":"","type":"string"}},"Details":{"hint":"In some cases we send various details about the payment (e.g. Reference Number and Bank Details of the Customer for Bank Transfer payments).","regexp":"","type":"array of objects","CustomerIBAN":{"hint":"Customer\u2019s IBAN (International Bank Account Number), a code (up to 34 alphanumeric characters) that uniquely identifies an account held at any bank anywhere in the world.","regexp":"","type":"string"},"CustomerBankAccountID":{"hint":"Customer bank account id","regexp":"","type":"string"},"CryptoAddress":{"hint":"Address when paying with crypto","regexp":"","type":"string"},"CryptoCurrency":{"hint":"Crypto currency","regexp":"^[A-Z]{3}$","type":"string"},"SecurityQuestion":{"hint":"Security question","regexp":"","type":"string"},"SecurityAnswer":{"hint":"Security answer","regexp":"","type":"string"},"IPAddress":{"hint":"IP Address","regexp":"^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$","type":"string"}}}}POST https://paytest.smart2pay.com/v1/payouts Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk= { "Payout": { "MerchantTransactionID": "s2p_test_restcd156462", "Amount": 3000, "Currency": "EUR", "Description": "Test Payout", "MethodID": "97", "Details": { "CryptoAddress": "0x9006203f86D7381a3d227fe54310C9fD4e2d1552", "CryptoCurrency": "ETH" } } }
Response:
{"Payout":{"hint":"","regexp":"","type":"object","InvalidRequestID":{"hint":"Payout failure reference ID","regexp":"","type":"string"},"ID":{"hint":"Payout ID, a unique number that identifies the payout in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"SiteID":{"hint":"The ID of the site","regexp":"^\\d{1,12}$","type":"int"},"Created":{"hint":"Date and time when the payout was created.","regexp":"","type":"datetime"},"MethodID":{"hint":"The ID of the payment method.","regexp":"^\\d{1,12}$","type":"int"},"MerchantTransactionID":{"hint":"Merchant Transaction ID, a number that uniquely identifies a transaction in your system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"OriginatorTransactionID":{"hint":"Originator transaction ID, a number that uniquely identifies the transaction in the original requester\u2019s system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"Amount":{"hint":"Payout amount. The last two digits represent the decimal part (11.54 will be sent 1154). Please be aware that data type string is also accepted as long as it contains only digits.","regexp":"^\\d{1,12}$","type":"int"},"Currency":{"hint":"The currency in which you sell the services or products. Format is according to ISO 4217, a three-letter code.","regexp":"^[A-Z]{3}$","type":"string"},"Description":{"hint":"Text describing the service or product sold; will be displayed on the payment page.","regexp":"^.{1,255}$","type":"string"},"StatementDescriptor":{"hint":"Description per transaction that appears on the customer\u2019s billing statement, explaining a charge of the merchant. It helps the customer identify the purchase.","regexp":"^.{1,255}$","type":"string"},"Status":{"hint":"Payout status","regexp":"","type":"object","ID":{"hint":"The ID of the payout status. It can have the following values: 1 - Open, 2 - Success, 4 - Failed.","regexp":"","type":"int"},"Info":{"hint":"The description of the status","regexp":"","type":"string"},"Reasons":{"hint":"The reasons why the payment got to this status.","regexp":"","type":"array of objects","Code":{"hint":"The id of the message type transmitted in the response. See our section GlobalPay Return Codes for a complete description.","regexp":"","type":"int"},"Info":{"hint":"The message body","regexp":"","type":"string"}}},"Customer":{"hint":"Customer details","regexp":"","type":"object","ID":{"hint":"Customer ID","regexp":"^\\d{1,12}$","type":"int"},"MerchantCustomerID":{"hint":"The ID of the customer in your system.","regexp":"^([0-9a-zA-Z_-]{1,50})?$","type":"string"},"Email":{"hint":"Customer\u2019s email","regexp":"^[a-zA-Z0-9\\._%+-]{1,100}@[a-zA-Z0-9\\.-]{1,40}\\.[a-zA-Z]{1,8}$","type":"string"},"FirstName":{"hint":"Customer\u2019s first name","regexp":"","type":"string"},"LastName":{"hint":"Customer\u2019s last name","regexp":"","type":"string"},"Gender":{"hint":"Customer\u2019s gender. It can have the following values: 1 - Male, 2 - Female.","regexp":"","type":"string"},"DateOfBirth":{"hint":"Customer date of birth","regexp":"^(((19|20)\\d\\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01]))$","type":"date"},"SocialSecurityNumber":{"hint":"Customer\u2018s social or fiscal identifier","regexp":"","type":"string"},"Phone":{"hint":"Customer\u2019s phone including prefix","regexp":"","type":"string"},"Company":{"hint":"Company name (for legal entities)","regexp":"","type":"string"},"InputDateTime":{"hint":"Customer creation date","regexp":"","type":"datetime"}},"BillingAddress":{"hint":"Billing Address details","regexp":"","type":"object","ID":{"hint":"Address ID, a unique number that identifies an address in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"Country":{"hint":"Customer\u2018s country. Recommended to be sent in order to increase the conversion. If MethodID is missing, this field (taken from BillingAddress object) controls which payment methods are shown on the hosted payment pages. Format is according to ISO-3166-1 alpha-2, a two-letter code.","regexp":"^([A-Za-z]{2})?$","type":"string"},"City":{"hint":"City name","regexp":"^(.{1,255})?$","type":"string"},"ZipCode":{"hint":"Postal code","regexp":"^(.{1,255})?$","type":"string"},"State":{"hint":"State name","regexp":"^(.{1,255})?$","type":"string"},"Street":{"hint":"Street name","regexp":"^(.{1,255})?$","type":"string"},"StreetNumber":{"hint":"Street Number","regexp":"^(.{1,255})?$","type":"string"},"HouseNumber":{"hint":"House Number","regexp":"^(.{1,255})?$","type":"string"},"HouseExtension":{"hint":"House Extension","regexp":"^(.{1,255})?$","type":"string"}},"Details":{"hint":"In some cases we send various details about the payment (e.g. Reference Number and Bank Details of the Customer for Bank Transfer payments).","regexp":"","type":"array of objects","CustomerIBAN":{"hint":"Customer\u2019s IBAN (International Bank Account Number), a code (up to 34 alphanumeric characters) that uniquely identifies an account held at any bank anywhere in the world.","regexp":"","type":"string"},"CustomerBankAccountID":{"hint":"Customer bank account id","regexp":"","type":"string"},"CryptoAddress":{"hint":"Address when paying with crypto","regexp":"^.{1,50}$","type":"string"},"CryptoCurrency":{"hint":"Crypto currency","regexp":"^[A-Z]{3}$","type":"string"},"SecurityQuestion":{"hint":"Security question","regexp":"^.{6,40}$","type":"string"},"SecurityAnswer":{"hint":"Security answer","regexp":"^.{6,25}$","type":"string"},"IPAddress":{"hint":"IP Address","regexp":"^.{1,45}$","type":"string"}}}}HTTP/1.1 201 Created Content-Type: application/json; charset=utf-8 { "Payout": { "ID": 4989, "Created": "20210312154614", "MerchantTransactionID": "s2p_test_restcd156462", "Amount": "3000", "Currency": "EUR", "MethodID": 97, "Description": "Test Payout", "SiteID": 30201, "Details": { "CryptoAddress": "0x9006203f86D7381a3d227fe54310C9fD4e2d1552", "CryptoCurrency": "ETH" }, "Customer": null, "BillingAddress": null, "Status": { "ID": 1, "Info": "Open", "Reasons": null }, "MethodTransactionID": null } }
- For Interac Instant Payouts (100) you also need to send in the request the mandatory parameters SecurityQuestion and SecurityAnswer together with the email address, name and phone number. We recommend that the MerchantCustomerID and the IPAddress to be sent although they are optional parameters. See below the full request of a payout with all the mandatory and optional parameters.
Request:
{"Payout":{"hint":"","regexp":"","type":"object","MerchantTransactionID":{"hint":"Merchant Transaction ID, a number that uniquely identifies a transaction in your system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"Amount":{"hint":"Payout amount. The last two digits represent the decimal part (11.54 will be sent 1154). Please be aware that data type string is also accepted as long as it contains only digits.","regexp":"^\\d{1,12}$","type":"int"},"Currency":{"hint":"The currency in which you sell the services or products. Format is according to ISO 4217, a three-letter code.","regexp":"^[A-Z]{3}$","type":"string"},"Description":{"hint":"Text describing the service or product sold; will be displayed on the payment page.","regexp":"^.{1,255}$","type":"string"},"MethodID":{"hint":"The ID of the payment method.","regexp":"^\\d{1,12}$","type":"int"},"StatementDescriptor":{"hint":"Description per transaction that appears on the customer\u2019s billing statement, explaining a charge of the merchant. It helps the customer identify the purchase.","regexp":"^.{1,255}$","type":"string"},"BillingAddress":{"hint":"Billing Address details","regexp":"","type":"object","ID":{"hint":"Address ID, a unique number that identifies an address in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"Country":{"hint":"Customer\u2018s country. Recommended to be sent in order to increase the conversion. If MethodID is missing, this field (taken from BillingAddress object) controls which payment methods are shown on the hosted payment pages. Format is according to ISO-3166-1 alpha-2, a two-letter code.","regexp":"^([A-Za-z]{2})?$","type":"string"},"City":{"hint":"City name","regexp":"^(.{1,255})?$","type":"string"},"ZipCode":{"hint":"Postal code","regexp":"^(.{1,255})?$","type":"string"},"State":{"hint":"State name","regexp":"^(.{1,255})?$","type":"string"},"Street":{"hint":"Street name","regexp":"^(.{1,255})?$","type":"string"},"StreetNumber":{"hint":"Street Number","regexp":"^(.{1,255})?$","type":"string"},"HouseNumber":{"hint":"House Number","regexp":"^(.{1,255})?$","type":"string"},"HouseExtension":{"hint":"House Extension","regexp":"^(.{1,255})?$","type":"string"}},"Customer":{"hint":"Customer details","regexp":"","type":"object","ID":{"hint":"Customer ID","regexp":"^\\d{1,12}$","type":"int"},"MerchantCustomerID":{"hint":"The ID of the customer in your system.","regexp":"^([0-9a-zA-Z_-]{1,50})?$","type":"string"},"Email":{"hint":"Customer\u2019s email","regexp":"^[a-zA-Z0-9\\._%+-]{1,100}@[a-zA-Z0-9\\.-]{1,40}\\.[a-zA-Z]{1,8}$","type":"string"},"FirstName":{"hint":"Customer\u2019s first name","regexp":"","type":"string"},"LastName":{"hint":"Customer\u2019s last name","regexp":"","type":"string"},"Gender":{"hint":"Customer\u2019s gender. It can have the following values: 1 - Male, 2 - Female.","regexp":"","type":"string"},"DateOfBirth":{"hint":"Customer date of birth","regexp":"^(((19|20)\\d\\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01]))$","type":"date"},"SocialSecurityNumber":{"hint":"Customer\u2018s social or fiscal identifier","regexp":"","type":"string"},"Phone":{"hint":"Customer\u2019s phone including prefix","regexp":"","type":"string"},"Company":{"hint":"Company name (for legal entities)","regexp":"","type":"string"},"InputDateTime":{"hint":"Customer creation date","regexp":"","type":"datetime"}},"Card":{"hint":"Card details","regexp":"","type":"object","HolderName":{"hint":"The person whose name is on the credit card.","regexp":"^[^\\d]*$","type":"string"},"Number":{"hint":"The number of the credit card","regexp":"^(\\d{16,19})$","type":"string"},"ExpirationMonth":{"hint":"The expiration month of the credit card","regexp":"^(0?[1-9]|1[0-2])$","type":"string"},"ExpirationYear":{"hint":"The expiration year of the credit card","regexp":"^(20|)([0-9]{2})$","type":"string"},"IssuingBankCountry":{"hint":"Card issuing bank country","regexp":"^[a-zA-Z]{2}$","type":"string"},"SecurityCode":{"hint":"The card security code (also called CVV2) consists of a 3 or 4 digit number that appears on the credit card.","regexp":"^([0-9]){3,4}$","type":"string"},"RequireSecurityCode":{"hint":"If set to false when the security code parameter is not used, it will not redirect to the form page to fill in the security code, but the payment will be directly sent to the payment provider.","regexp":"","type":"bool"},"Token":{"hint":"Card token","regexp":"","type":"string"},"MaskedNumber":{"hint":"Card masked number","regexp":"","type":"string"}},"Details":{"hint":"In some cases we send various details about the payment (e.g. Reference Number and Bank Details of the Customer for Bank Transfer payments).","regexp":"","type":"array of objects","CustomerIBAN":{"hint":"Customer\u2019s IBAN (International Bank Account Number), a code (up to 34 alphanumeric characters) that uniquely identifies an account held at any bank anywhere in the world.","regexp":"","type":"string"},"CustomerBankAccountID":{"hint":"Customer bank account id","regexp":"","type":"string"},"CryptoAddress":{"hint":"Address when paying with crypto","regexp":"","type":"string"},"CryptoCurrency":{"hint":"Crypto currency","regexp":"^[A-Z]{3}$","type":"string"},"SecurityQuestion":{"hint":"Security question","regexp":"","type":"string"},"SecurityAnswer":{"hint":"Security answer","regexp":"","type":"string"},"IPAddress":{"hint":"IP Address","regexp":"^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$","type":"string"}}}}POST https://paytest.smart2pay.com/v1/payouts Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk= { "Payout": { "MerchantTransactionID": "s2p_test_214rtt5431645", "Amount": 100, "Currency": "CAD", "MethodID": 100, "Description": "from REST", "Customer": { "Email": "john@test.com", "FirstName": "John", "LastName": "Doe", "Phone": "6135550104", "MerchantCustomerID": "test5" }, "Details": { "SecurityQuestion": "What is your favorite city", "SecurityAnswer": "Toronto", "IPAddress": "1.2.3.4" } } }
Response:
{"Payout":{"hint":"","regexp":"","type":"object","InvalidRequestID":{"hint":"Payout failure reference ID","regexp":"","type":"string"},"ID":{"hint":"Payout ID, a unique number that identifies the payout in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"SiteID":{"hint":"The ID of the site","regexp":"^\\d{1,12}$","type":"int"},"Created":{"hint":"Date and time when the payout was created.","regexp":"","type":"datetime"},"MethodID":{"hint":"The ID of the payment method.","regexp":"^\\d{1,12}$","type":"int"},"MerchantTransactionID":{"hint":"Merchant Transaction ID, a number that uniquely identifies a transaction in your system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"OriginatorTransactionID":{"hint":"Originator transaction ID, a number that uniquely identifies the transaction in the original requester\u2019s system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"Amount":{"hint":"Payout amount. The last two digits represent the decimal part (11.54 will be sent 1154). Please be aware that data type string is also accepted as long as it contains only digits.","regexp":"^\\d{1,12}$","type":"int"},"Currency":{"hint":"The currency in which you sell the services or products. Format is according to ISO 4217, a three-letter code.","regexp":"^[A-Z]{3}$","type":"string"},"Description":{"hint":"Text describing the service or product sold; will be displayed on the payment page.","regexp":"^.{1,255}$","type":"string"},"StatementDescriptor":{"hint":"Description per transaction that appears on the customer\u2019s billing statement, explaining a charge of the merchant. It helps the customer identify the purchase.","regexp":"^.{1,255}$","type":"string"},"Status":{"hint":"Payout status","regexp":"","type":"object","ID":{"hint":"The ID of the payout status. It can have the following values: 1 - Open, 2 - Success, 4 - Failed.","regexp":"","type":"int"},"Info":{"hint":"The description of the status","regexp":"","type":"string"},"Reasons":{"hint":"The reasons why the payment got to this status.","regexp":"","type":"array of objects","Code":{"hint":"The id of the message type transmitted in the response. See our section GlobalPay Return Codes for a complete description.","regexp":"","type":"int"},"Info":{"hint":"The message body","regexp":"","type":"string"}}},"Customer":{"hint":"Customer details","regexp":"","type":"object","ID":{"hint":"Customer ID","regexp":"^\\d{1,12}$","type":"int"},"MerchantCustomerID":{"hint":"The ID of the customer in your system.","regexp":"^([0-9a-zA-Z_-]{1,50})?$","type":"string"},"Email":{"hint":"Customer\u2019s email","regexp":"^[a-zA-Z0-9\\._%+-]{1,100}@[a-zA-Z0-9\\.-]{1,40}\\.[a-zA-Z]{1,8}$","type":"string"},"FirstName":{"hint":"Customer\u2019s first name","regexp":"","type":"string"},"LastName":{"hint":"Customer\u2019s last name","regexp":"","type":"string"},"Gender":{"hint":"Customer\u2019s gender. It can have the following values: 1 - Male, 2 - Female.","regexp":"","type":"string"},"DateOfBirth":{"hint":"Customer date of birth","regexp":"^(((19|20)\\d\\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01]))$","type":"date"},"SocialSecurityNumber":{"hint":"Customer\u2018s social or fiscal identifier","regexp":"","type":"string"},"Phone":{"hint":"Customer\u2019s phone including prefix","regexp":"","type":"string"},"Company":{"hint":"Company name (for legal entities)","regexp":"","type":"string"},"InputDateTime":{"hint":"Customer creation date","regexp":"","type":"datetime"}},"BillingAddress":{"hint":"Billing Address details","regexp":"","type":"object","ID":{"hint":"Address ID, a unique number that identifies an address in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"Country":{"hint":"Customer\u2018s country. Recommended to be sent in order to increase the conversion. If MethodID is missing, this field (taken from BillingAddress object) controls which payment methods are shown on the hosted payment pages. Format is according to ISO-3166-1 alpha-2, a two-letter code.","regexp":"^([A-Za-z]{2})?$","type":"string"},"City":{"hint":"City name","regexp":"^(.{1,255})?$","type":"string"},"ZipCode":{"hint":"Postal code","regexp":"^(.{1,255})?$","type":"string"},"State":{"hint":"State name","regexp":"^(.{1,255})?$","type":"string"},"Street":{"hint":"Street name","regexp":"^(.{1,255})?$","type":"string"},"StreetNumber":{"hint":"Street Number","regexp":"^(.{1,255})?$","type":"string"},"HouseNumber":{"hint":"House Number","regexp":"^(.{1,255})?$","type":"string"},"HouseExtension":{"hint":"House Extension","regexp":"^(.{1,255})?$","type":"string"}},"Details":{"hint":"In some cases we send various details about the payment (e.g. Reference Number and Bank Details of the Customer for Bank Transfer payments).","regexp":"","type":"array of objects","CustomerIBAN":{"hint":"Customer\u2019s IBAN (International Bank Account Number), a code (up to 34 alphanumeric characters) that uniquely identifies an account held at any bank anywhere in the world.","regexp":"","type":"string"},"CustomerBankAccountID":{"hint":"Customer bank account id","regexp":"","type":"string"},"CryptoAddress":{"hint":"Address when paying with crypto","regexp":"^.{1,50}$","type":"string"},"CryptoCurrency":{"hint":"Crypto currency","regexp":"^[A-Z]{3}$","type":"string"},"SecurityQuestion":{"hint":"Security question","regexp":"^.{6,40}$","type":"string"},"SecurityAnswer":{"hint":"Security answer","regexp":"^.{6,25}$","type":"string"},"IPAddress":{"hint":"IP Address","regexp":"^.{1,45}$","type":"string"}}}}HTTP/1.1 201 Created Content-Type: application/json; charset=utf-8 { "Payout": { "ID": 5569, "Created": "20210511082638", "MerchantTransactionID": "s2p_test_214rtt5431645", "Amount": "100", "Currency": "CAD", "MethodID": 100, "Description": "from REST", "SiteID": 30199, "Details": { "SecurityQuestion": "What is your favorite city", "SecurityAnswer": "Toronto", "IPAddress": "1.2.3.4" }, "Customer": { "ID": 2721756, "MerchantCustomerID": "test5", "Email": "john@test.com", "FirstName": "John", "LastName": "Doe", "Gender": null, "SocialSecurityNumber": null, "Phone": "6135550104", "Company": null, "DateOfBirth": null }, "BillingAddress": null, "Status": { "ID": 1, "Info": "Open", "Reasons": null }, "MethodTransactionID": null } }
In case of an API error, an HTTP 4xx (you did something wrong) or HTTP 5xx (we did something wrong) response is returned.
For more information about the reasons of a wrong request response see our section GlobalPay Return Codes.
Request:
POST https://paytest.smart2pay.com/v1/payouts
Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=
{
"Payout": {
"MerchantTransactionID": "s2ptest_j2",
"Amount": 1000,
"Currency": "EUR",
"Customer": {
"Email": "youremail@email.com"
},
"Details":{
"CustomerBankAccountID": "3541977722"
}
}
}
{"Payout":{"hint":"","regexp":"","type":"object","InvalidRequestID":{"hint":"Payout failure reference ID","regexp":"","type":"string"},"ID":{"hint":"Payout ID, a unique number that identifies the payout in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"SiteID":{"hint":"The ID of the site","regexp":"^\\d{1,12}$","type":"int"},"Created":{"hint":"Date and time when the payout was created.","regexp":"","type":"datetime"},"MethodID":{"hint":"The ID of the payment method.","regexp":"^\\d{1,12}$","type":"int"},"MerchantTransactionID":{"hint":"Merchant Transaction ID, a number that uniquely identifies a transaction in your system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"OriginatorTransactionID":{"hint":"Originator transaction ID, a number that uniquely identifies the transaction in the original requester\u2019s system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"Amount":{"hint":"Payout amount. The last two digits represent the decimal part (11.54 will be sent 1154). Please be aware that data type string is also accepted as long as it contains only digits.","regexp":"^\\d{1,12}$","type":"int"},"Currency":{"hint":"The currency in which you sell the services or products. Format is according to ISO 4217, a three-letter code.","regexp":"^[A-Z]{3}$","type":"string"},"Description":{"hint":"Text describing the service or product sold; will be displayed on the payment page.","regexp":"^.{1,255}$","type":"string"},"StatementDescriptor":{"hint":"Description per transaction that appears on the customer\u2019s billing statement, explaining a charge of the merchant. It helps the customer identify the purchase.","regexp":"^.{1,255}$","type":"string"},"Status":{"hint":"Payout status","regexp":"","type":"object","ID":{"hint":"The ID of the payout status. It can have the following values: 1 - Open, 2 - Success, 4 - Failed.","regexp":"","type":"int"},"Info":{"hint":"The description of the status","regexp":"","type":"string"},"Reasons":{"hint":"The reasons why the payment got to this status.","regexp":"","type":"array of objects","Code":{"hint":"The id of the message type transmitted in the response. See our section GlobalPay Return Codes for a complete description.","regexp":"","type":"int"},"Info":{"hint":"The message body","regexp":"","type":"string"}}},"Customer":{"hint":"Customer details","regexp":"","type":"object","ID":{"hint":"Customer ID","regexp":"^\\d{1,12}$","type":"int"},"MerchantCustomerID":{"hint":"The ID of the customer in your system.","regexp":"^([0-9a-zA-Z_-]{1,50})?$","type":"string"},"Email":{"hint":"Customer\u2019s email","regexp":"^[a-zA-Z0-9\\._%+-]{1,100}@[a-zA-Z0-9\\.-]{1,40}\\.[a-zA-Z]{1,8}$","type":"string"},"FirstName":{"hint":"Customer\u2019s first name","regexp":"","type":"string"},"LastName":{"hint":"Customer\u2019s last name","regexp":"","type":"string"},"Gender":{"hint":"Customer\u2019s gender. It can have the following values: 1 - Male, 2 - Female.","regexp":"","type":"string"},"DateOfBirth":{"hint":"Customer date of birth","regexp":"^(((19|20)\\d\\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01]))$","type":"date"},"SocialSecurityNumber":{"hint":"Customer\u2018s social or fiscal identifier","regexp":"","type":"string"},"Phone":{"hint":"Customer\u2019s phone including prefix","regexp":"","type":"string"},"Company":{"hint":"Company name (for legal entities)","regexp":"","type":"string"},"InputDateTime":{"hint":"Customer creation date","regexp":"","type":"datetime"}},"BillingAddress":{"hint":"Billing Address details","regexp":"","type":"object","ID":{"hint":"Address ID, a unique number that identifies an address in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"Country":{"hint":"Customer\u2018s country. Recommended to be sent in order to increase the conversion. If MethodID is missing, this field (taken from BillingAddress object) controls which payment methods are shown on the hosted payment pages. Format is according to ISO-3166-1 alpha-2, a two-letter code.","regexp":"^([A-Za-z]{2})?$","type":"string"},"City":{"hint":"City name","regexp":"^(.{1,255})?$","type":"string"},"ZipCode":{"hint":"Postal code","regexp":"^(.{1,255})?$","type":"string"},"State":{"hint":"State name","regexp":"^(.{1,255})?$","type":"string"},"Street":{"hint":"Street name","regexp":"^(.{1,255})?$","type":"string"},"StreetNumber":{"hint":"Street Number","regexp":"^(.{1,255})?$","type":"string"},"HouseNumber":{"hint":"House Number","regexp":"^(.{1,255})?$","type":"string"},"HouseExtension":{"hint":"House Extension","regexp":"^(.{1,255})?$","type":"string"}},"Details":{"hint":"In some cases we send various details about the payment (e.g. Reference Number and Bank Details of the Customer for Bank Transfer payments).","regexp":"","type":"array of objects","CustomerIBAN":{"hint":"Customer\u2019s IBAN (International Bank Account Number), a code (up to 34 alphanumeric characters) that uniquely identifies an account held at any bank anywhere in the world.","regexp":"","type":"string"},"CustomerBankAccountID":{"hint":"Customer bank account id","regexp":"","type":"string"},"CryptoAddress":{"hint":"Address when paying with crypto","regexp":"^.{1,50}$","type":"string"},"CryptoCurrency":{"hint":"Crypto currency","regexp":"^[A-Z]{3}$","type":"string"},"SecurityQuestion":{"hint":"Security question","regexp":"^.{6,40}$","type":"string"},"SecurityAnswer":{"hint":"Security answer","regexp":"^.{6,25}$","type":"string"},"IPAddress":{"hint":"IP Address","regexp":"^.{1,45}$","type":"string"}}}}Response:
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
"Payout": {
"ID": 0,
"Created": null,
"MerchantTransactionID": "s2ptest_j2",
"Amount": "1000",
"Currency": null,
"Description": null,
"SiteID": 30201,
"Details": {
"CustomerBankAccountID": "3541977722"
},
"Customer": {
"MerchantCustomerID": null,
"Email": "youremail@email.com",
"FirstName": null,
"LastName": null,
"Gender": null,
"SocialSecurityNumber": null,
"Phone": null,
"Company": null,
"DateOfBirth": null
},
"BillingAddress": null,
"Status": {
"ID": null,
"Info": null,
"Reasons": [
{
"Code": "1",
"Info": "Missing parameter - MethodID"
}
]
}
}
}
{"Payout":{"hint":"","regexp":"","type":"object","InvalidRequestID":{"hint":"Payout failure reference ID","regexp":"","type":"string"},"ID":{"hint":"Payout ID, a unique number that identifies the payout in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"SiteID":{"hint":"The ID of the site","regexp":"^\\d{1,12}$","type":"int"},"Created":{"hint":"Date and time when the payout was created.","regexp":"","type":"datetime"},"MethodID":{"hint":"The ID of the payment method.","regexp":"^\\d{1,12}$","type":"int"},"MerchantTransactionID":{"hint":"Merchant Transaction ID, a number that uniquely identifies a transaction in your system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"OriginatorTransactionID":{"hint":"Originator transaction ID, a number that uniquely identifies the transaction in the original requester\u2019s system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"Amount":{"hint":"Payout amount. The last two digits represent the decimal part (11.54 will be sent 1154). Please be aware that data type string is also accepted as long as it contains only digits.","regexp":"^\\d{1,12}$","type":"int"},"Currency":{"hint":"The currency in which you sell the services or products. Format is according to ISO 4217, a three-letter code.","regexp":"^[A-Z]{3}$","type":"string"},"Description":{"hint":"Text describing the service or product sold; will be displayed on the payment page.","regexp":"^.{1,255}$","type":"string"},"StatementDescriptor":{"hint":"Description per transaction that appears on the customer\u2019s billing statement, explaining a charge of the merchant. It helps the customer identify the purchase.","regexp":"^.{1,255}$","type":"string"},"Status":{"hint":"Payout status","regexp":"","type":"object","ID":{"hint":"The ID of the payout status. It can have the following values: 1 - Open, 2 - Success, 4 - Failed.","regexp":"","type":"int"},"Info":{"hint":"The description of the status","regexp":"","type":"string"},"Reasons":{"hint":"The reasons why the payment got to this status.","regexp":"","type":"array of objects","Code":{"hint":"The id of the message type transmitted in the response. See our section GlobalPay Return Codes for a complete description.","regexp":"","type":"int"},"Info":{"hint":"The message body","regexp":"","type":"string"}}},"Customer":{"hint":"Customer details","regexp":"","type":"object","ID":{"hint":"Customer ID","regexp":"^\\d{1,12}$","type":"int"},"MerchantCustomerID":{"hint":"The ID of the customer in your system.","regexp":"^([0-9a-zA-Z_-]{1,50})?$","type":"string"},"Email":{"hint":"Customer\u2019s email","regexp":"^[a-zA-Z0-9\\._%+-]{1,100}@[a-zA-Z0-9\\.-]{1,40}\\.[a-zA-Z]{1,8}$","type":"string"},"FirstName":{"hint":"Customer\u2019s first name","regexp":"","type":"string"},"LastName":{"hint":"Customer\u2019s last name","regexp":"","type":"string"},"Gender":{"hint":"Customer\u2019s gender. It can have the following values: 1 - Male, 2 - Female.","regexp":"","type":"string"},"DateOfBirth":{"hint":"Customer date of birth","regexp":"^(((19|20)\\d\\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01]))$","type":"date"},"SocialSecurityNumber":{"hint":"Customer\u2018s social or fiscal identifier","regexp":"","type":"string"},"Phone":{"hint":"Customer\u2019s phone including prefix","regexp":"","type":"string"},"Company":{"hint":"Company name (for legal entities)","regexp":"","type":"string"},"InputDateTime":{"hint":"Customer creation date","regexp":"","type":"datetime"}},"BillingAddress":{"hint":"Billing Address details","regexp":"","type":"object","ID":{"hint":"Address ID, a unique number that identifies an address in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"Country":{"hint":"Customer\u2018s country. Recommended to be sent in order to increase the conversion. If MethodID is missing, this field (taken from BillingAddress object) controls which payment methods are shown on the hosted payment pages. Format is according to ISO-3166-1 alpha-2, a two-letter code.","regexp":"^([A-Za-z]{2})?$","type":"string"},"City":{"hint":"City name","regexp":"^(.{1,255})?$","type":"string"},"ZipCode":{"hint":"Postal code","regexp":"^(.{1,255})?$","type":"string"},"State":{"hint":"State name","regexp":"^(.{1,255})?$","type":"string"},"Street":{"hint":"Street name","regexp":"^(.{1,255})?$","type":"string"},"StreetNumber":{"hint":"Street Number","regexp":"^(.{1,255})?$","type":"string"},"HouseNumber":{"hint":"House Number","regexp":"^(.{1,255})?$","type":"string"},"HouseExtension":{"hint":"House Extension","regexp":"^(.{1,255})?$","type":"string"}},"Details":{"hint":"In some cases we send various details about the payment (e.g. Reference Number and Bank Details of the Customer for Bank Transfer payments).","regexp":"","type":"array of objects","CustomerIBAN":{"hint":"Customer\u2019s IBAN (International Bank Account Number), a code (up to 34 alphanumeric characters) that uniquely identifies an account held at any bank anywhere in the world.","regexp":"","type":"string"},"CustomerBankAccountID":{"hint":"Customer bank account id","regexp":"","type":"string"},"CryptoAddress":{"hint":"Address when paying with crypto","regexp":"^.{1,50}$","type":"string"},"CryptoCurrency":{"hint":"Crypto currency","regexp":"^[A-Z]{3}$","type":"string"},"SecurityQuestion":{"hint":"Security question","regexp":"^.{6,40}$","type":"string"},"SecurityAnswer":{"hint":"Security answer","regexp":"^.{6,25}$","type":"string"},"IPAddress":{"hint":"IP Address","regexp":"^.{1,45}$","type":"string"}}}}