Definition: POST /v1/payouts
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. There are two ways in which a payout can be initiated:
-
First one is when you create a payout object with all the necessary card details, like in the below example.
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://securetest.smart2pay.com/v1/payouts Authorization: Basic MTAxMDpnYWJp { "Payout": { "MerchantTransactionID": "test_h4", "Amount": 1000, "Currency": "EUR", "Description": "payment product", "Card": { "HolderName": "John Doe", "Number": "4548812049400004", "ExpirationMonth": "02", "ExpirationYear": "2029" } } }
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": 214, "SiteID": 1010, "Created": "20181016133234", "MerchantTransactionID": "test_h4", "OriginatorTransactionID": null, "Amount": "1000", "Currency": "EUR", "Description": "payment product", "StatementDescriptor": null, "Status": { "ID": 2, "Info": "Success", "Reasons": [] } } }
-
The second one is when you create a payout object containing only the Credit Card Token that was received in a previous card payment.
If you initiate a Card payment and you set the GenerateCreditCardToken parameter to true, a token element is sent in the response, containing the value of the newly created credit card token.
The token received in the response can be used to initiate future payouts.
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://securetest.smart2pay.com/v1/payouts Authorization: Basic MTAxMDpnYWJp { "Payout": { "MerchantTransactionID": "s2ptest_i11", "Amount": "100", "Currency": "EUR", "Description": "Payout Token Test", "CreditCardToken": { "Value": "C0D510746B513D66093609AA92BDA295" } } }
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": 219, "SiteID": 1010, "Created": "20190612130707", "MerchantTransactionID": "s2ptest_i11", "OriginatorTransactionID": null, "Amount": "100", "Currency": "EUR", "Description": "Payout Token Test", "StatementDescriptor": null, "Status": { "ID": 2, "Info": "Success", "Reasons": [] } } }
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 Card Processing Return Codes.
Request:
POST https://securetest.smart2pay.com/v1/payouts
Authorization: Basic MTAxMDpnYWJp
{
"Payout": {
"MerchantTransactionID": "test_h5",
"Amount": 1000,
"Currency": "EUR",
"Description": "payment product"
}
}
{"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"}}}}Response:
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
"Payout": {
"InvalidRequestID": "i3355",
"ID": null,
"SiteID": 1010,
"Created": null,
"MerchantTransactionID": "test_h5",
"OriginatorTransactionID": null,
"Amount": "1000",
"Currency": "EUR",
"Description": "payment product",
"StatementDescriptor": null,
"Status": {
"ID": null,
"Info": null,
"Reasons": [
{
"Code": 1206,
"Info": "CardDetails are missing"
}
]
}
}
}
{"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"}}}}