1. Sale
You can use this service to send an async sale request to your terminals.
POST
{{Base Address}}/api/payment/async/sale
It will be sufficient to send a request to the address provided above. You can use the 'Base Address' as desired for both the test environment and the production environment.
The header information to be sent to the service is as follows:
apikeyprivate
string
Yes
The Private Key obtained from the merchant panel.
apiclientprivate
string
Yes
The Private Client obtained from the merchant panel.
The body information to be sent to the service is as follows:
{
"TerminalId": "38e895c3-1a9a-4b73-8816-8557d1d031d6",
// "TerminalTagCode": "",
"MerchantUniqueCode": "{{$guid}}",
"DisplayCode": "Kişisel Bakım",
"Amount": 22,
"CurrencyId": 1,
"Methods": [
{
"PaymentMethodId": 1
},
{
"PaymentMethodId": 2
}
],
"CallbackAddress": "https://webhook.site/276d912e-090e-461a-aad5-5f137ab03cf4",
"SplitPaymentSupport": false,
"Customer": {
"Type": 1,
"FirstName": "eda",
"MiddleName": "seda",
"LastName": "meda",
"CompanyName": "",
"TaxOfficeCode": "",
"TaxNumber": "",
"Phone": "",
"Email": "",
"Identity": "11111111110",
"Country": "Türkiye",
"City": "İstanbul",
"District": "Mesela",
"Neighborhood": "Öyle",
"Address": "Tam sokağın ortası"
},
"Products": [
{
"Name": "Saç Tıraşı",
"TaxGroupId": 10,
"UnitCodeId": 1,
"Amount": 22,
"Quantity": 1,
"PaymentMethodId": 2
}
],
"SkipPrintCustomer": false,
"SkipPrintMerchant": false,
"SkipPaymentOptionScreen": false
}
TerminalId
string
Yes/No
Guid
The identity (ID) information of your terminal.
TerminalTagCode
string
Yes/No
25
Tag code
MerchantUniqueCode
Guid
Yes
-
The tracking number generated by you for the payment.
Amount
decimal
Yes
-
Sales amount
DisplayCode
string
No
25
The payment code that will be displayed on the terminal at the moment the payment is shown.
CurrencyId
string
Yes
-
Bkz: Currency
CallbackAddress
string
No
150
The callback URL where the payment status is sent.
Bkz: Example
Methods
Array<Method>
No
-
You can specify which payment methods you want to support using these parameters
Customer
Customer
No
-
The information of the customer who made the payment.
Products
Array<Product>
Yes
-
Product information
Method Object <Method>
PaymentMethodId
int
Yes
-
Payment Methods
Customer Object<Customer>
Type
int
Yes
-
Customer Types
FirstName
string
Yes/No
50
Customer Name
MiddleName
string
No
50
Customer's second name
LastName
string
Yes/No
50
Customer's surname
CompanyName
string
Yes/No
175
Company name
TaxOfficeCode
string
Yes/No
50
Company tax office code
TaxNumber
string
Yes/No
25
Company tax number
Phone
string
No
20
Phone
Email
string
No
100
Email address
Identity
string
Yes/No
20
Identity number
Country
string
No
50
Country
City
string
No
100
City
District
string
No
100
District/Neighborhood
Neighborhood
string
No
100
Street
Address
string
No
255
Full address
Product Object<Product>
Name
string
Yes
75
Product name
TaxGroupId
int
Yes
-
The product's VAT rate Bkz: Tax Group
UnitCodeId
int
Yes
-
The product's unit information
Bkz: Unit Codes
CurrencyId
string
Yes
-
Bkz: Currency
Amount
decimal
Yes
150
Product amount
Note: The total of the product amounts must be equal to the sales amount.
Quantity
int
Yes
-
Product quantity
The response returned from the service:
Result
object
Returns the details from the service response.
ErrorCode
int
Error code. If the transaction is successful, it returns a value of '0'.
Succeeded
bool
It returns a true or false value. If the transaction is successful, it returns 'true'.
Failed
bool
It returns a true or false value. If the transaction is unsuccessful, it returns 'true'.
Message
string
If the transaction is unsuccessful, this is the error message provided, with language support based on the locale parameter.
ClientMessage
string
It returns fixed values for Paywall error codes. You can perform mapping based on these values.
{
"Result": {
"PaymentRequestId": "1eb856a8-1d41-49ab-8994-ecee2880d62c",
"PaymentRequestActivityId": "2015c508-4029-4f6b-b7e2-4bf34a213c41",
"PaymentRequestActivityTypeId": 1,
"PaymentStatus": 4
},
"Failed": false,
"Message": null,
"ClientMessage": null,
"Succeeded": true
}
PaymentRequestId
Guid
The identifier for the Async payment in Paywall. It should be stored.
PaymentRequestActivityId
Guid
It is the identity information of the last transaction of the Async payment
PaymentRequestActivityTypeId
int
It is the type of the last transaction of the Async payment.
Bkz: Payment Type
PaymentStatus
int
The last status of the async payment Bkz: Payment Status
Last updated