🔑 Authentication
Every request must include API_Key and API_Secret in the HTTP headers. Contact Takbull support to obtain sandbox credentials at app.takbull.co.il.
🔄 Redirect / iFrame Flow
- Send order details → receive a unique order ID (
uniqId) - Redirect user or open an iFrame at
https://api.takbull.co.il/PaymentGateway?orderUniqId={uniqId} - On payment submit, customer is redirected to your
RedirectAddress - Provide a
IPNAddresscallback that listens for payment notifications - On IPN receipt, call the Validation API to confirm order/transaction/invoice data
| PostProcessMethod | Behaviour |
|---|---|
0 | Redirect to RedirectAddress |
1 | Window message event (for iFrame / SPA) |
Get Payment Page Redirect URL
{
"order_reference": "A11A234",
"OrderTotalSum": 150.77,
"RedirectAddress": "https://someurl.com/processSuccess?ordeid=1da23a"
}
{
"responseCode": 0,
"uniqId": "89fd6612-2c4b-4a7b-91a3-dd9bdf0ee26a"
}
| Parameter | Type | Description |
|---|---|---|
order_reference | String | Your system order ID |
IPNAddress | String | IPN callback URL |
DisplayType | String | iframe or redirect |
PostProcessMethod | String | 0=redirect · 1=window message |
IsMobile | Boolean | Set true for mobile redirect |
CancelReturnAddress | String | URL on order cancel |
RedirectAddress | String | URL on payment success |
CustomerFullName | String | |
CustomerPhoneNumber | String | |
Customer | Object | See Customer table below |
City | String | |
Country | String | |
DealType | Number | 1=Regular · 2=Payments · 4=Recurring · 6=J2/Token · 7=Suspended |
PaymentMethodType | Number | 3=Credit card (default) · 21=Bit |
RecuringDueDate | Date | Subscription pay date |
RecuringInterval | Number | 1=Daily · 2=Weekly · 3=Monthly · 4=Annual · 5=EachMonth |
Interval | Number | Number of intervals (charge every N days/months) |
InitialAmount | Number | Amount charged on subscription creation |
InitialChargeDescroption | String | Invoice label for initial charge |
FirstPaymentamount | Number | Override first payment when DealType=2 |
CreateDocument | Boolean | Create invoice true/false |
DocumentType | Number | 80=הצעת מחיר · 81=חשבון עסקה · 82=הודעת חיוב · 100=הזמנה · 200=תעודת משלוח · 300=חשבונית עסקה · 305=חשבונית מס · 320=חשבונית מס קבלה · 330=חשבונית מס זיכוי · 355=חשבונית מס זיכוי והחזר כספים · 400=קבלה · 401=זיכוי קבלה · 405=קבלה תרומה · 406=זיכוי קבלה תרומה |
Language | String | en / he / fr |
Currency | String | USD / ILS / EUR |
NumberOfPayments | Number | Number of installments |
MinNumberOfPayments | Number | |
MaxNumberOfPayments | Number | |
OrderTotalSum | Number | Final amount to charge |
OrderTaxAmount | Number | |
Taxtable | Boolean | |
DiscountType | Number | 0=None · 1=Fixed · 2=Percentage |
Discount | Number | |
Products | Array | Required for invoice creation — see Products table |
ShippingAmount | Number | |
ShippingAddress1 | String | |
ShippingAddress2 | String | |
ShippingZipCode | String | |
ShippingCity | String | |
ShippingCountry | String |
| Parameter | Type |
|---|---|
IdentityNumber | String |
CustomerFullName | String |
Email | String |
PhoneNumber | String |
Address | Object — see Address table |
| Parameter | Type |
|---|---|
Address1 | String |
Address2 | String |
City | String |
Country | String |
Zip | String |
| Parameter | Type | Description |
|---|---|---|
SKU | String | |
ProductName | String | |
Description | String | |
Price | Number | e.g. 15.90 |
TaxAmount | Number | e.g. 17.0 |
CurrencyCode | String | |
Discount | Number | |
DiscountType | Number | 0=None · 1=Fixed · 2=Percentage |
OpenSum | Boolean | |
Quantity | Number | |
MinQuantity | Number | |
MaxQuantity | Number | |
QuantityInterval | Number |
| Field | Type | Description |
|---|---|---|
responseCode | Number | 0 = Success, otherwise fail |
uniqId | GUID | Use for the payment gateway redirect |
description | String | Error description if failed |
statusCode=0 means success. On failure, statusDescription contains the reason.
PaymentMethodType=21)To charge with Bit, send PaymentMethodType=21 in the create-order request.
- Detect whether the customer is browsing from a mobile device. If so, send
IsMobile=truein the request. This tells the gateway to return a deep link that can open the Bit application directly. - In the response you will receive a
urlparameter. This is the link that opens the Bit application. - Navigate the customer to that URL — for example
window.open(url)(or setwindow.location.href = url) — so the Bit app is launched to complete the payment.
| Field | Type | Description |
|---|---|---|
IsMobile | Boolean | Request field. Set true when the client accesses from a mobile device |
url | String | Response field. URL to open the Bit application — navigate to it via window.open(url) |
| Field | Type | Description |
|---|---|---|
InternalCode | Number | 0=Success |
InternalDescription | String | Error description |
transactionInternalId | String | e.g. 000125685 |
uniqId | String | Order unique ID in Takbull |
On init you receive a message from the iframe containing the height of the iframe so you can adjust the iframe height accordingly.
Get Transaction
{
"id": 3067,
"transactionId": "000000164",
"tranProviderId": "82965",
"amount": 210.10,
"transactionType": 10,
"currency": "ILS",
"paymentMethod": 3,
"numberOfPayments": 1,
"cardToken": "xxxxxxxxxxx",
"cardTokenExpirationMonth": 3,
"cardTokenExpirationYear": 25,
"last4DigitsCardNumber": "0000",
"dealType": 1,
"clearer": "LMI",
"cardCompanyTtype": "CAL",
"cardtype": "VI",
"status": 1,
"statusCode": 0,
"transactionDate": "2023-05-20T23:42:25.9201733",
"customerFullName": "test",
"isDocumentCreated": true,
"invoiceId": 4158,
"invoiceUniqId": "6fcab03f-39de-45df-9fed-80784e1ab9fd",
"documentNumber": 40101
}
Several response fields are returned as numeric codes. Use the tables below to interpret them.
transactionType| Value | Description |
|---|---|
10 | Charge (חיוב) |
20 | Refund (זיכוי) |
30 | Charge Back / cancellation (ביטול עסקה) |
60 | Token / J2 |
70 | Suspended (מושהה) |
paymentMethod| Value | Description |
|---|---|
1 | Cash (מזומן) |
3 | Credit Card (כרטיס אשראי) |
11 | PayPal |
21 | Bit |
32 | Apple Pay |
33 | Google Pay |
dealType| Value | Description |
|---|---|
1 | Regular (רגיל) |
2 | Payments / installments (תשלומים) |
4 | Recurring / standing order (הוראת קבע) |
6 | Token / J2 |
7 | Suspended charge (חיוב מושהה) |
status| Value | Description |
|---|---|
1 | Approved |
2 | Declined |
3 | PARTIALLY_REFUNDED |
4 | PENDING |
5 | REFUNDED |
6 | FAILED |
statusCode=0 indicates a successful transaction. Any other value indicates an error.Order Validation
Double-check order status after IPN receipt.
{ "uniqId": "89fd6612-2c4b-4a7b-91a3-dd9bdf0ee26a" }
{
"orderId": 0,
"internalCode": 1400101,
"internalDescription": "INVALID",
"providerCode": 0,
"doNotRetry": false,
"isSubscriptionPayment": false,
"saveToken": false,
"documentId": 0,
"amount": 0.0,
"dealType": 0,
"orderStatus": 0,
"tranSactionStatus": 0
}
IPN — Instant Payment Notification
Takbull calls your IPNAddress to guarantee delivery of payment results even when redirects fail.
uniqId to confirm payment details.Charge Token
Charge a saved card token without showing the payment form.
{
"order_reference": 219,
"IPNAddress": "https://yourdomain.com/ipn",
"RedirectAddress": "https://yourdomain.com/thank-you",
"CancelReturnAddress": "https://yourdomain.com/cart",
"Products": [
{
"SKU": "22",
"Description": "Polo",
"Price": "20.00",
"Quantity": 1,
"TaxAmount": "0.00",
"IsTaxteble": false,
"Discount": "0.00"
}
],
"Currency": "USD",
"CustomerFullName": "John Smith",
"Customer": {
"CustomerFullName": "John Smith",
"Email": "john@example.com",
"PhoneNumber": "1234567890",
"Address": { "Address1": "123 Main St", "City": "New York", "Country": "US", "Zip": "10001" }
},
"OrderTotalSum": "74.00",
"Language": "en",
"CreateDocument": true,
"MaxNumberOfPayments": 1,
"CreditCard": {
"CardExternalToken": "828e8373-76f0-4bad-b397-abcdd08a226a"
}
}
{
"orderId": 0,
"internalCode": 0,
"internalDescription": "OK",
"providerCode": 0,
"doNotRetry": false,
"orderStatus": 0,
"tranSactionStatus": 0
}
Invoice Creation
| Parameter | Type | Description |
|---|---|---|
invoiceItems | Array | Invoice line items — see table below |
customerVM | Object | Customer details |
sendToCustomer | Boolean | Send invoice to customer email |
totalTaxAmount | Number | |
taxtable | Boolean | |
totalTaxFree | Number | |
totalPriceWithTax | Number | |
isItemIncludeTax | Boolean | |
currency | String | |
language | String | |
discount | Number | |
discountType | Number | 0=None · 1=Fixed · 2=Percentage |
comments | String | |
documentType | Number | 320=חשבונית מס קבלה · 305=חשבונית מס · 300=חשבונית עסקה · 400=קבלה · 405=קבלה תרומה |
isNegativeDocument | Boolean | Set true for refund/credit note |
totalSumPaidInCash | Number | |
totalSumPaidInCheck | Number | |
totalSumPaidInCreditcard | Number | |
totalSumPaidInWIreTransfer | Number | |
cashes | Array | [{ description, amount }] |
checks | Array | [{ checkNumber, checkDueDate, amount, bankNumber, bankBranch, accountNumber }] |
wireTransfers | Array | [{ amount, bankNumber, bankBranch, accountNumber }] |
customPayments | Array | [{ methodName, amount }] |
| Parameter | Type | Description |
|---|---|---|
Description | String | |
IsTaxteble | Boolean | |
UnitPrice | Number | e.g. 15.90 |
TaxAmount | Number | e.g. 17.0 |
CurrencyCode | String | |
Discount | Number | |
DiscountType | Number | 0=None · 1=Fixed · 2=Percentage |
Quantity | Number |
| Parameter | Type | Required | Description |
|---|---|---|---|
methodName | String | No | Payment method display name |
amount | Number | Yes | Payment amount |
creationDate | DateTimeOffset | Yes | Payment creation date |
currancy | String | No | Currency code |
payerAccountNumber | String | No | Payer account number |
referanceId | String | No | External reference identifier |
{
"invoiceItems": [
{
"rowId": 1,
"description": "some product description",
"isTaxteble": true,
"unitPrice": 1000,
"totalPrice": 1000,
"quantity": 1
}
],
"customerVM": {
"customerFullName": "Muhammad Waqas",
"address": { "address1": "street 16", "city": "TLV", "country": "ISRAEL" }
},
"sendToCustomer": false,
"documentDate": "Tue May 23 2023",
"totalTaxAmount": 170,
"taxtable": true,
"totalTaxFree": 1000,
"totalPriceWithTax": 1170,
"isItemIncludeTax": true,
"currency": "ILS",
"language": "he",
"documentType": 320,
"totalSumPaidInCash": 500,
"totalSumPaidInCheck": 670,
"cashes": [{ "description": "מזומן", "amount": 500 }],
"checks": [{ "checkDueDate": "Tue May 23 2023", "amount": 670 }],
"wireTransfers": [],
"customPayments": []
}
{
"responseCode": 0,
"documentNumber": 45325,
"isOk": true,
"errorList": [],
"documentVM": {
"id": 287727,
"documentNumber": 45325,
"documentType": 320,
"totalPriceWithTax": 1170.0,
"currency": "ILS",
"uniqId": "3ab63741-fe90-49b7-9934-50105676b0cd"
}
}
Cancel Subscription
Cancels a recurring payment subscription. The uniqId is the original order ID from the Get Redirect URL call.
Refund / Cancel Transaction
| Parameter | Type | Description |
|---|---|---|
RefundType | Number | 1=Cancel deal only · 2=Cancel with document · 3=Partial refund · 4=Partial refund with document |
RefundAmount | Number | Required for partial refund (e.g. 115.5) |
TransactionInternalNumber | String | e.g. 000125685 |
Comments | String | Optional reason |
{
"RefundType": 2,
"RefundAmount": null,
"TransactionInternalNumber": "00012547",
"Comments": "No inventory"
}
{
"orderId": 0,
"internalCode": 0,
"internalDescription": "OK",
"providerCode": 0,
"documentId": 0
}
Create Account
Creates a child merchant account under the authenticated parent merchant (affiliate program). The parent merchant is always resolved from the API key — never from the request body.
{
"Email": "child@example.com",
"Password": "SecurePass123!",
"FirstName": "John",
"LastName": "Doe",
"Phone": "0501234567",
"PackageUniqId": "pkg_basic_001",
"SubscriptionPayer": "Parent",
"MerchantDetails": {
"Name": "Child Business Ltd.",
"BusinessNumber": "123456789",
"BusinessType": 1,
"BizRegiEmail": "child@example.com",
"Address1": "רחוב הרצל 1",
"City": "תל אביב",
"Country": "Israel",
"countryCode": 972,
"Zip": "6120101",
"PhoneNumber1": "0501234567",
"WebSiteUrl": "https://childbusiness.com",
"Mcc": 5999
}
}
| Field | Type | Required | Description |
|---|---|---|---|
Email | String | ✅ | Login email for the child account. Must be unique. |
Password | String | ✅ | Initial login password for the child account. |
FirstName | String | ❌ | First name of the account owner. |
LastName | String | ❌ | Last name of the account owner. |
Phone | String | ❌ | Mobile phone number of the account owner. |
PackageUniqId | String | ❌ | Unique ID of the module package to assign. If omitted, the free package is assigned automatically. |
SubscriptionPayer | String | ❌ | Who pays for the subscription: Parent or Child. Defaults to Child. |
MerchantDetails | Object | ❌ | Additional merchant profile (business name, address, provider credentials, etc.). |
| Value | Behavior |
|---|---|
Parent | The authenticated parent merchant is charged immediately. Child account is activated on successful payment. |
Child | Child account is created with PendingPayment status. A PaymentRedirectUrl is returned for the child to complete payment. |
{
"Success": true,
"ErrorCode": 0,
"ErrorMessage": "Child account created successfully.",
"UserId": 1042,
"MerchantId": "MID_abc123",
"Email": "child@example.com",
"ParentMerchantId": "MID_parent456",
"AffiliationId": 7,
"SubscriptionPayer": "Parent",
"PaymentRedirectUrl": null,
"OrderUniqId": null,
"ApiKey": "5c2a493c-1a92-4222-9a4d-b50340757cf8",
"ApiSecret": "8e2e4556-7d59-4476-833c-471f4bf6a605"
}
| Field | Type | Description |
|---|---|---|
Success | Boolean | true when the operation completed without a blocking error. |
ErrorCode | Number | Numeric result code. 0 on full success. See the Error Codes table below. |
ErrorMessage | String | Human-readable result/error description. |
UserId | Number | Internal user ID of the newly created account owner. |
MerchantId | String | MID of the newly created child merchant. |
Email | String | Email address of the newly created account. |
ParentMerchantId | String | MID of the authenticated parent merchant. |
AffiliationId | Number | ID of the affiliation record linking parent and child. Nullable. |
SubscriptionPayer | String | Who is responsible for paying the subscription fee. Nullable. |
PaymentRedirectUrl | String | URL to redirect the merchant to complete payment. Only set when ErrorCode == 600113 (payment required). |
OrderUniqId | String | Unique ID of the pending payment order. Used alongside PaymentRedirectUrl. |
ApiKey | String | API key issued for the newly created child terminal. Returned when an API/provider module is assigned. |
ApiSecret | String | API secret issued for the newly created child terminal. Returned when an API/provider module is assigned. |
| ErrorCode | Description |
|---|---|
0 | Success. Child account created. |
1 | Success. Child account created with the free package. |
600104 | Could not resolve the authenticated merchant identity from the API credentials. |
600105 | Request data is required (body is null). |
600106 | Email is required. |
600107 | Password is required. |
600108 | Parent merchant not found. |
600109 | Failed to create user account. |
600110 | User was not created successfully. |
600111 | Failed to register provider for the child merchant. |
600113 | Payment is required to activate the child account. See PaymentRedirectUrl. |
600114 | Validation error while creating the child account. |
600115 | An unexpected internal error occurred. |
Get Order
Retrieves a single order by its unique identifier. The response includes full order details: customer info, payment sums, products, transactions, invoices, and shipping.
| Parameter | Type | Required | Description |
|---|---|---|---|
orderUniqId | string | ✅ | Unique identifier of the order. |
{
"uniqId": "ord_abc123",
"orderStatus": 2,
"dealType": 1,
"createDate": "2024-01-15T10:30:00",
"language": "he",
"orderTotalSum": 250.00,
"currency": "ILS",
"taxAmount": 39.57,
"taxtable": true,
"discount": 0,
"discountType": 0,
"paymentMethodType": 1,
"numberOfPayments": 1,
"paymentsCharged": 1,
"firstPaymentamount": 250.00,
"folowedPaymentamount": 0,
"customerFullName": "John Doe",
"customerFirstName": "John",
"customerLastName": "Doe",
"customerEmail": "john@example.com",
"customerPhoneNumber": "0501234567",
"city": "Tel Aviv",
"country": "Israel",
"order_reference": "EXT-REF-001",
"IPNAddress": "https://yoursite.com/ipn",
"comments": "Gift wrap please",
"shippingAmount": 20.00,
"shippingAddress1": "Herzl St 1",
"shippingCity": "Tel Aviv",
"shippingCountry": "Israel",
"products": [
{ "name": "Widget", "quantity": 2, "price": 115.00, "currency": "ILS" }
],
"transactions": [
{ "transactionId": "txn_xyz", "amount": 250.00, "status": 1 }
],
"invoices": [],
"customer": {
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"phoneNumber": "0501234567",
"externalCustomerId": "cust_001"
}
}
orderStatus| Value | Description |
|---|---|
0 | Pending (מוכן) |
1 | Failed (נכשל) |
2 | Processing (בעיבוד) |
3 | Completed (הושלם) |
4 | OnHold (ממתין) |
5 | Cancelled (בוטל) |
6 | Refunded (בוצע זיכוי) |
7 | Removed |
8 | ReSubmit (חיוב חוזר) |
9 | Abandoned (ננטש) |
dealType| Value | Description |
|---|---|
1 | Regular (רגיל) |
2 | Payments / installments (תשלומים) |
4 | Recurring / standing order (הוראת קבע) |
6 | Token / J2 |