Create a Payout

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:

      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:

      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:

      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:

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

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"
    }
  }
}
  • For Trustly Payouts(29) you need to send in the request the Customer Bank Account ID parameter.

    Request:

    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:

    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:

    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:

    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:

    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:

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

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