Collect
Collect is a service where funds from transactions are transferred directly to the accounts specified in the transaction parameters. Upon successful completion of the transaction, the funds are credited to the specified account number. Each provided account is verified and must be on the list of approved accounts assigned to the given merchant.
To start accepting payments through the Collect service, you must sign the appropriate agreement and provide a list of supported accounts. Please contact the Customer Service Department to discuss the details and possibilities of activating the service.
Transaction
Setting up a transaction in the Collect service is analogous to setting up a standard transaction and requires two mandatory parameters:
collect.account * | Accepts 28 characters and an account number in IBAN format. Only Polish accounts are supported. To successfully set up a transaction, the account provided in the parameter must be on the merchant's list of accounts. |
collect.receiver * | Accepts uppercase and lowercase letters (a-z, A-Z) and Polish characters, digits (0-9), special characters: / - , . and spaces. |
* Fields required.
Example:
The basic request body should look like this:
{ "amount": 10.21, "description": "Transakcja testowa collect", "lang": "pl", "payer": { "email": "[email protected]", "name": "Test Tpay", "phone": "123456789", "address": "Plac Andersa 3", "code": "11-123", "city": "Poznań", "country": "PL" }, "collect": { "account": "PL63105015201000009091194713", "receiver": "Odbiorca testowy" } }
Adding a Bank Account to the Trusted List
The /collect/bank-accounts endpoint is available only to selected merchants. Please contact Customer Service Department for more details.
Creating a collect transaction is only possible for trusted bank accounts.
To add a bank account to the system, you need to provide the following parameters:
accountNumber * | The bank account number in IBAN format (28 characters). Only Polish accounts are supported. |
ownerName * | The account holder’s name. Maximum length: 1000 characters. |
additionalInformation * | Additional information about the account holder, e.g., address or tax ID (NIP). Maximum length: 1000 characters. |
* Fields required.
Check the API Reference for details: POST /collect/bank-accounts
The basic request body should look as follows:
Example:
curl --location --request POST 'http://api.tpay.com/collect/bank-accounts' \ --header 'Authorization: Bearer <access_token>' \ --header 'Content-Type: application/json' \ --data '{ "accountNumber" : "PL49612314784098788023189726", "ownerName" : "Jan Kowalski", "additionalInformation" : "ul. Słoneczna 4/5c, 60-001 Poznań" }'
Retrieving the List of Trusted Bank Accounts
To retrieve the list of trusted bank accounts, send a GET request to the following endpoint:
https://api.tpay.com/collect/bank-accounts
In the request, you can specify the following query parameters (queryParam):
page | Page number. |
limit | Number of results per page. |
Check the API Reference for details: GET /collect/bank-accounts
Example: