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) and Interac Instant (MethodID = 100). 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"
                }
            ]
        }
    }
}

Payout Notification

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

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

Payout notification format:

Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=

{
  "Payout": {
    "ID": 4390,
    "Created": "20201216060630",
    "MerchantTransactionID": "s2ptest_a12",
    "Amount": "3",
    "Currency": "PLN",
    "MethodID": 12,
    "Description": "Test Payout",
    "SiteID": 30199,
    "Details": null,
    "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": 2,
      "Info": "Success",
      "Reasons": null
    }
  }
}

Response:

204 No Content
  • Pay With Crypto Payouts / Withdrawals (97) are processed almost instantly (within less than 2-3 minutes for most times) and the Amounts reaches the user Crypto Account within 10-15 minutes.

    Payout notification format:

    Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=
    
    {
      "Payout": {
        "ID": 4989,
        "Created": "20210312154614",
        "MerchantTransactionID": "s2p_test_restcd156463",
        "Amount": "3000",
        "Currency": "EUR",
        "MethodID": 97,
        "Description": "Test Payout",
        "SiteID": 30201,
        "Details": null,
        "Customer": null,
        "BillingAddress": null,
        "Status": {
          "ID": 2,
          "Info": "Success",
          "Reasons": null
        },
        "MethodTransactionID": ""
      }
    }

    Response:

    204 No Content

Get information on a specific Payout

You can get information about a payout by using GET HTTP request.

Definition: GET /v1/payouts/{id}

Where:
  • {id} – GlobalPay Payout ID

Request:

GET https://paytest.smart2pay.com/v1/payouts/376
Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=

Response:

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

{
    "Payout": {
        "ID": 376,
        "Created": "20190507131247",
        "MerchantTransactionID": "s2ptest_j1",
        "Amount": "1000",
        "Currency": "EUR",
        "MethodID": 1,
        "Description": null,
        "SiteID": 30201,
        "Details": null,
        "Customer": {
            "ID": 335,
            "MerchantCustomerID": "0125",
            "Email": "youremail@email.com",
            "FirstName": "Example",
            "LastName": "Test",
            "Gender": "F",
            "SocialSecurityNumber": "ABCDE1234F",
            "Phone": "0765260000",
            "Company": "S2P",
            "DateOfBirth": "19800519"
        },
        "BillingAddress": null,
        "Status": {
            "ID": 2,
            "Info": "Success",
            "Reasons": null
        }
    }
}

Get information on Payouts Balance

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

Definition: GET /v1/payoutsbalance/methodID/currencyCode

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

    Request:

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

    Response:

    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    
    {
      "Balances": [
        {
          "MerchantID": 1045,
          "SiteID": 30201,
          "MethodID": 1,
          "CurrencyCode": "EUR",
          "AvailableAmount": 10000.00,
          "LastBalanceUpdateDateTime": "2020-10-29T15:36:10.807"
        },
        {
          "MerchantID": 1045,
          "SiteID": 30201,
          "MethodID": 1,
          "CurrencyCode": "RON",
          "AvailableAmount": 500000.00,
          "LastBalanceUpdateDateTime": "2020-10-29T15:36:34.733"
        },
        {
          "MerchantID": 1045,
          "SiteID": 30201,
          "MethodID": 29,
          "CurrencyCode": "EUR",
          "AvailableAmount": 20000.00,
          "LastBalanceUpdateDateTime": "2020-10-29T15:36:21.047"
        }
      ]
    }
  • The below request allows you to get all the balances that are active for your SiteID for a specific payment method.

    Request:

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

    Response:

    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    
    {
      "Balances": [
        {
          "MerchantID": 1045,
          "SiteID": 30201,
          "MethodID": 1,
          "CurrencyCode": "EUR",
          "AvailableAmount": 10000.00,
          "LastBalanceUpdateDateTime": "2020-10-29T15:36:10.807"
        },
        {
          "MerchantID": 1045,
          "SiteID": 30201,
          "MethodID": 1,
          "CurrencyCode": "RON",
          "AvailableAmount": 500000.00,
          "LastBalanceUpdateDateTime": "2020-10-29T15:36:34.733"
        }
      ]
    }
  • The below request allows you to get all the balances that are active for your SiteID for a specific currency.

    Request:

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

    Response:

    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    
    
    
    {
      "Balances": [
        {
          "MerchantID": 1045,
          "SiteID": 30201,
          "MethodID": 1,
          "CurrencyCode": "EUR",
          "AvailableAmount": 10000.00,
          "LastBalanceUpdateDateTime": "2020-10-29T15:36:10.807"
        },
        {
          "MerchantID": 1045,
          "SiteID": 30201,
          "MethodID": 29,
          "CurrencyCode": "EUR",
          "AvailableAmount": 20000.00,
          "LastBalanceUpdateDateTime": "2020-10-29T15:36:21.047"
        }
      ]
    }
  • The below request allows you to get all the balances that are active for your SiteID for a specific payment method and currency.

    Request:

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

    Response:

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