2. Tsunami 🌊

You can use this service to initiate payments under the batch payment method. With this service, you can send your payment orders to Paywall. The payments will be completed, and a callback notificatio

Initiate Payment (Tsunami)

POST {{Base Adres}}/api/paywall/payment/bulk/big/startdirect

Important: To use the batch payment initiation service, you must include the parameters apikeypublic and apiclientpublic in the Header section.

PaymentAPI Addess

In the Tsunami model’s batch payment service, you can send up to 50,000 transactions. After you submit the batch payment request, only the BulkPaymentId is returned in the API response. All transactions are then processed by Paywall’s queue mechanism.

Parameter
Type
Compolsory
Description

apikeypublic

string

Yes

The Public Key you obtained from the merchant panel.

apiclientpublic

string

Yes

The Public Client you obtained from the merchant panel.

The sample JSON and example codes to be sent to the service are as follows:

{
    "PaymentDetail": {
        "Amount": 4.53,
        "MerchantUniqueCode": "{{$guid}}",
        "CurrencyId": 1,
        "Installment": 2,
        "CallbackAddress": "https://webhook.site/fdd9d71c-4381-481f-abf4-2fba544f8a2d",
        "ChannelId": 0,
        "TagId": 0,
        "ClientIP": "1.1.1.1",
        "Half2D": false,
        "CallbackBodySplit": false,
        "CallbackBodyCompression": false
    },
    "CardMethod": 2, // 1: General card for all products | 2: Single card for each product
    // Eğer 1 gelirse aşağıdaki kart nesnesi
    "CardModel": 1, // 1: ECommerce | 2: Insurance
    "Payments": [
        {
            "Customer": {
                "FullName": "FullName",
                "Phone": "5336662211",
                "Email": "[email protected]",
                "Country": "Country",
                "City": "City",
                "Address": "Address",
                "IdentityNumber": "IdentityNumber",
                "TaxNumber": "TaxNumber"
            },
            "Product": {
                "ProductId": "1",
                "ProductName": "12",
                "ProductCategory": "1",
                "ProductDescription": "denemr",
                "ProductAmount": 1.51
            },
            "Card": {
                "OwnerName": "Enes Tütüncü",
                "Number": "5528790000000008",
                "IdentityNumber": "",
                "ExpireMonth": "12",
                "ExpireYear": "2030",
                "Cvv": "123"
            }
        }
    ]
}

Root Directory

Parameter
Type
Compolsory
Compolsory

PaymentDetail

json

Yes

The JSON object where the payment details will be placed.

CardMethod

int

Yes

The card method to be used for the payments. Depending on this parameter, each payment will either be processed using a single card or with a unique card for each transaction. Types

CardModel

int

Yes

The card method through which the payment will be collected. Types

Payments

List<Payment>

Yes

A JSON object in the form of a list that contains the payments to be collected under the batch payment process.

Root Directory: PaymentDetail

Parameter
Type
Compolsory
Description

Amount

string

Yes

The total amount to be collected in the payment transaction.

MerchantUniqueCode

decimal

Yes

A unique code defined specifically for the merchant.

CurrencyId

string

Yes

Represents the currency in which the transaction will be carried out. Currency

Installement

integer

Yes

Indicates the number of installments selected by the customer in their payment plan.

CallbackAddress

string

Yes

The address to which the system will send the result information after the transaction is completed.

ClientIP

string

Yes

Represents the IP address of the user performing the transaction.

Half2D

bool

No

This parameter supports you in finalizing your payments with a separate request. If you send the Half2D parameter as true, the payment will remain in authorization at the bank until you make the finalization call.

CallbackBodySplit

bool

No

When the batch payment process is completed, the POST notification is sent in parts if the related parameter is set to true.

Example: For 50,000 payments, if the parameter is sent as true, the system may send the notifications in 5 separate parts of 10,000 each, depending on its current load. This allows you to process the transactions incrementally on your side, reducing the strain on your system.

CallbackBodyCompression

bool

No

The POST notification sent after the payment request is completed may have a large body due to the data it contains. If you set the CallbackBodyCompression parameter to true, the POST notifications will be sent compressed using GZip. In this case, you will need to decompress the GZip body on your side before processing it.

Room Directory: Payments

Parameter
Type
Compolsory
Description

Customer > FullName

string

Yes

Customer full name

Customer > Phone

string

Yes

Customer phone number

Customer > Email

string

Yes

Customer email address

Customer > Country

string

Yes

Customer country

Customer > City

string

Yes

Customer city information

Customer > Address

string

No

Customer address information

Customer > IdentityNumber

string

No

Customer identification information

Customer > TaxNumber

string

No

Customer tax number information

Product > ProductId

string

Yes

Sold product identification information

Product > ProductName

string

Yes

Sold product name

Product > ProductCategory

string

Yes

Category information of the sold product

Product > ProductDescription

string

No

Description information of the sold product

Product > ProductAmount

decimal

Yes

Amount information of the sold product

Note: The total amount of all products must equal the main amount.

Card > OwnerName

string

Conditional

Cardholder name

Card > Number

string

Conditional

Card number

Card > IdentityNumber

string

Conditional

Cardholder identification information

Card > CardNoFirst

string

Conditional

First 8 digits of the card

Card > CardNoLast

string

Conditional

Last 4 digits of the card

Card > ExpireMonth

string

Conditional

Card expiration month information

Card > ExpireYear

string

Conditional

Card expiration year information

Card > Cvv

string

Conditional

Card CVV information

Response returned from the service:

Parameter
Type
Description

ErrorCode

int

Error code. Returns '0' if the operation is successful.

Result

bool

Returns true if the operation is successful, and false if it fails.

Message

string

Contains information or an error message related to the operation.

Body

object

Detailed information related to the batch payment transaction.

Example Code:

{
    "ErrorCodeType": 1,
    "ErrorMessage": null,
    "ErrorCode": 0,
    "Result": true,
    "Message": "Bulk payment created and enqueued",
    "Body": {
        "BulkPaymentId": 2682,
        "BatchSize": 1000,
        "BatchCount": 5,
        "ProcessedBatchCount": 5,
        "NotProcessedBatchCount": 0,
        "MerchantUniqueCode": "8c404c4a-7bd0-4835-96fc-cc285804c522"
    }
}

Last updated