3. File π
You can use this service to initiate payments using a file that contains the payment details within the scope of the bulk payment method.
Initiate Payment (File)
POST {{Base Adres}}/api/paywall/payment/bulk/file/startdirect
Important: To use the bulk payment initiation service, you must include the apikeypublic and apiclientpublic parameters in the header. PaymentAPI Address
You can send a maximum of 150,000 transactions to the bulk payment service within the file model. After submitting the bulk payment request, only the BulkPaymentId is returned in the API response. All transactions are then processed by the Paywall queue mechanism.
The File π model is designed to handle high-volume data processing. Therefore, we strongly recommend using GZip or Brotli compression for your requests. This ensures that the data transmitted over the network is compressed, reducing latency by up to 90%.
In the File π model, bulk payment requests submitted between 23:00 and 00:00 are processed after midnight, starting from 02:00. This waiting period is applied to ensure the consistency of financial reports. </> Example Code
In the File π model, data is received via Form-Data.
apikeypublic
string
Yes
The Public Key you obtained from the merchant panel.
apiclientpublic
string
Yes
The Public Client you obtained from the merchant panel.
Sample Form-Data parameters to be sent to the service are as follows.
FileFormat
short
Yes
File type of the file containing the payment details.i See: File Patterns
File
File
Yes
File containing the payment details
FilePattern
short
Yes
This parameter defines the pattern of the file containing the payment details. It enables Paywall to recognize and process the file content correctly. See: File Patterns
CurrencyId
int
Yes
Currency
Note: If provided, all payments will be processed using the specified currency value. If not provided, TRY will be used as the default.
Installment
int
No
Installment
Note: If provided, all payments will be processed using the specified installment value. If not provided, transactions will be processed as single (non-installment) by default.
CallbackAddress
string
No
Callback Address
Note: If the CallbackAddress is provided, the responses for bulk payments initiated via file will also be sent as a file. Therefore, the specified endpoint must be designed to receive the response file via form-data with the parameter name File.
See: Submitted File
Half2D
bool
No
Indicates whether the payment will be authorized (pre-authorized) or not.
Amount
decimal
No
If not specified, it will be calculated based on the data within the file.
MerchantUniqueCode
string
No
Primary tracking code for the bulk payment.
Note: If not provided in the request, it will be generated automatically.
TrackingCode
string
No
Secondary tracking code for the bulk payment.
Note: If not provided in the request, it will be generated automatically.
CallbackBodyCompression
bool
No
If the relevant parameter is sent as true, the response will be compressed and sent to the address specified in the CallbackAddress parameter.
Response returned from the service:
ErrorCode
int
Error code. Returns '0' if the operation is successful.
Result
bool
Returns true if the operation is successful, false if it fails.
Message
string
Contains information about the operation or an error message.
Body
object
Detailed information about the bulk payment transaction.
Example Code
Responses for bulk payments processed via file are also delivered as a file. You can always access the response file from the Paywall panel. Additionally, if you provide a CallbackAddress during the bulk payment initiation, the file will also be sent to the specified address.
See: Bulk Payment Result File
Last updated