🔑 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
IPN is the trusted server-to-server callback that Takbull sends to the IPNAddress you configured for the order. It is used to notify your system when the payment status changes, even if the customer closes the browser or the redirect page is not reached.
In practice, the redirect URL tells the user that they are returning to your site, but the IPN is the reliable source of the final payment result. Do not treat the redirect as the only confirmation signal.
- Verify the callback is for the expected order using
uniqIdororder_reference. - Check
statusCode:0means success; any other value means an error or pending state. - Call ValidateNotification with the same
uniqIdto fetch the latest and authoritative order/payment state. - Make your handler idempotent so the same IPN is not processed twice.
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
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 |
| Parameter | Type | Description |
|---|---|---|
customerFullName | String | Customer full name |
email | String | Customer email address |
phoneNumber | String | Customer phone number |
identityNumber | String | Israeli ID / tax identity number |
address | Object | Customer address — see Address table below |
| Parameter | Type | Description |
|---|---|---|
address1 | String | Street and house number |
address2 | String | Apartment / suite / additional address line |
city | String | City |
country | String | Country |
zipCode | String | Postal/ZIP code |
{
"invoiceItems": [
{
"rowId": 1,
"description": "some product description",
"isTaxteble": true,
"unitPrice": 1000,
"totalPrice": 1000,
"quantity": 1
}
],
"customerVM": {
"customerFullName": "Muhammad Waqas",
"email": "muhammad@example.com",
"phoneNumber": "+972501234567",
"identityNumber": "123456789",
"address": {
"address1": "street 16",
"address2": "Apartment 5",
"city": "TLV",
"country": "ISRAEL",
"zipCode": "12345"
}
},
"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.
The flow depends on the package (PackageUniqId) and on who pays for it (SubscriptionPayer):
| Case | What happens | Result |
|---|---|---|
Free package / no PackageUniqId |
The account is created immediately with the free package. No payment. | Synchronous — ErrorCode 0 or 1. |
Paid package, SubscriptionPayer: "Parent" |
The parent's saved card (the card the parent pays Takbull with) is charged for the package. On success the child account is created, the package is assigned to it and API credentials are issued. | Synchronous — ErrorCode 0 with MerchantId, ApiKey, ApiSecret. |
Paid package, SubscriptionPayer: "Child" |
Nothing is charged yet. The child is sent to a Takbull payment page to save a card. Only then is the account created, the package charged to the child's card and the monthly subscription opened. | Asynchronous — ErrorCode 600113 + PaymentRedirectUrl; the final result arrives
via RedirectUrl (browser) and IpnUrl (server). See Child pays flow below. |
In every case the child's login is created with the given Email/Password and needs no email verification.
In the child-pays case the login stays disabled until the payment completes.
{
"Email": "child@example.com",
"Password": "SecurePass123!",
"FirstName": "John",
"LastName": "Doe",
"Phone": "0501234567",
"PackageUniqId": "pkg_basic_001",
"SubscriptionPayer": "Parent",
"MerchantDetails": {
"Name": "Child Business Ltd.",
"NameEn": "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,
"FirstName": "John",
"LastName": "Doe",
"IdentityNumber": "203458101",
"IdentitycreationDate": "2015-04-12",
"IncorporationDate": "2015-01-01",
"Sex": "M",
"DateOfBirth": "1985-06-20",
"BirthCountry": "Israel",
"bankcode": "12",
"branchcode": "345",
"accountnumber": "123456",
"BusinessDomainDescription": "6012"
}
}
| 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. |
RedirectUrl | String | ✅ when the child pays | Absolute http/https URL on the parent's site. After the child completes the payment page, the child's browser is redirected here (see Child pays flow). |
IpnUrl | String | ❌ | Absolute http/https URL. When the child pays, the activation result and the child account details are POSTed here (see Child pays flow). |
MerchantDetails | Object | ✅ | Merchant profile. Required when providing the required BusinessType field and other business details. |
MerchantDetails.BusinessType | Number | ✅ | Required business type for the merchant. Use one of the values in the BusinessType table below. |
When the assigned package includes a Upay clearing/provider module, the fields below are forwarded to
Upay's FULLCREATEACCOUNT request. Provide them inside the MerchantDetails object.
| Field | Type | Required | Description |
|---|---|---|---|
Name | String | ✅ | Registered company/business name (Hebrew). Maps to Upay companyname. |
NameEn | String | ❌ | Company/business name in English. Maps to Upay companynameEN. |
BusinessNumber | String | ✅ | Business/company registration number. Maps to Upay companyidentity. |
BusinessType | Number | ✅ | Takbull business type: 1 = Osek Murshe, 2 = Company (LTD), 3 = Exempt dealer (Osek Patur), 4 = Non-profit, 5 = Partnership, 6 = Public company. It sets the VAT handling of the merchant's documents. Do not send Upay's compantype here; Takbull derives it from this value. |
BizRegiEmail | String | ✅ | Business email registered with Upay. Maps to Upay email. |
PhoneNumber1 | String | ✅ | Business phone number. Maps to Upay phonenumber. |
Address1 | String | ✅ | Business street address. Maps to Upay address. |
City | String | ✅ | Business city. Maps to Upay city. |
FirstName | String | ✅ | Account owner / controlling person first name. Maps to Upay firstname. |
LastName | String | ✅ | Account owner / controlling person last name. Maps to Upay lastname. |
IdentityNumber | String | ✅ | Owner's ID (Teudat Zehut) number. Maps to Upay identitynumber. |
IdentitycreationDate | String (yyyy-MM-dd) | ❌ | Issue date of the owner's ID document. Maps to Upay identitynumbercreationdate. |
IncorporationDate | String (yyyy-MM-dd) | ❌ | Company incorporation / business opening date. Maps to Upay incorporationdate. |
Sex | String | ❌ | Owner gender (e.g. M / F). Maps to Upay sex. |
DateOfBirth | String (yyyy-MM-dd) | ❌ | Owner date of birth. Maps to Upay birthdate. |
BirthCountry | String | ❌ | Owner country of birth. Maps to Upay birthcountry. |
bankcode | String | ✅ | Settlement bank code. Maps to Upay bankcode. |
branchcode | String | ✅ | Settlement bank branch code. Maps to Upay branchcode. |
accountnumber | String | ✅ | Settlement bank account number. Maps to Upay accountnumber. |
BusinessDomainDescription | String | ❌ | Business occupation / MCC classification. Maps to Upay occupationid. |
| Value | API name | Hebrew name | English description |
|---|---|---|---|
1 | OsekMurshe | עוסק מורשה | Authorized dealer |
2 | LTD | חברה בע"מ | Limited company |
3 | Exemptdealer | עוסק פטור | Exempt dealer |
4 | NonProfitOrganization | עמותה | Non-profit organization |
5 | Partnership | שותפות | Partnership |
6 | Public | חברה ציבורית | Public company |
If the merchant already has a Upay account, send the fields below inside MerchantDetails instead of the
account-opening fields above. The account is linked to the new merchant rather than opened. The credentials are
verified before any payment is taken, and the package is charged in full, clearing setup fee included.
| Field | Type | Required | Description |
|---|---|---|---|
IsExistingAccount | Boolean | ✅ | true to link an existing Upay account. |
ProviderKey | String | ✅ | The email the existing Upay account signs in with. |
ProviderSecret | String | ✅ | The existing Upay account's password. |
The Mcc field inside MerchantDetails is a standard ISO 18245 merchant category code
describing the merchant's line of business. Send the numeric code that best matches the merchant's activity.
Common values are listed below; if none apply, use 5999 (miscellaneous retail).
| MCC | Category |
|---|---|
5411 | Grocery Stores, Supermarkets |
5462 | Bakeries |
5499 | Miscellaneous Food Stores |
5511 | Car & Truck Dealers (Sales, Service, Repairs) |
5541 | Service Stations (Fuel) |
5651 | Family Clothing Stores |
5661 | Shoe Stores |
5691 | Men's & Women's Clothing Stores |
5732 | Electronics Stores |
5734 | Computer Software Stores |
5812 | Eating Places, Restaurants |
5814 | Fast Food Restaurants |
5912 | Drug Stores, Pharmacies |
5941 | Sporting Goods Stores |
5945 | Hobby, Toy & Game Shops |
5947 | Gift, Card, Novelty & Souvenir Shops |
5977 | Cosmetic Stores |
5992 | Florists |
5999 | Miscellaneous & Specialty Retail |
7011 | Hotels, Motels & Resorts |
7230 | Beauty & Barber Shops |
7298 | Health & Beauty Spas |
7372 | Computer Programming, Data Processing & Consulting |
7392 | Management, Consulting & Public Relations Services |
7399 | Business Services (Not Elsewhere Classified) |
7997 | Membership Clubs, Sports & Recreation |
8011 | Doctors & Physicians |
8021 | Dentists & Orthodontists |
8049 | Podiatrists & Chiropractors |
8062 | Hospitals |
8099 | Medical Services & Health Practitioners |
8111 | Legal Services & Attorneys |
8211 | Elementary & Secondary Schools |
8220 | Colleges, Universities & Professional Schools |
8299 | Educational Services |
8351 | Child Care Services |
8398 | Charitable & Social Service Organizations |
8641 | Civic, Social & Fraternal Associations |
8699 | Membership Organizations (Not Elsewhere Classified) |
8931 | Accounting, Auditing & Bookkeeping Services |
8999 | Professional Services (Not Elsewhere Classified) |
| Value | Behavior |
|---|---|
Parent | The authenticated parent merchant's saved card is charged immediately. On success the child account is created and activated with the package, and the result is returned in the same response. |
Child | The response returns ErrorCode 600113 with a PaymentRedirectUrl. The child account is activated only after the child saves a card and the package is charged to it. RedirectUrl is required. |
Use this flow when the new merchant pays Takbull for its own subscription. Your system (the parent) opens the account, the child pays on a Takbull-hosted page, and you are notified of the result.
- Call
CreateAccountwithSubscriptionPayer: "Child", a paidPackageUniqId,RedirectUrland (recommended)IpnUrl. - The response has
ErrorCode 600113,PaymentRedirectUrl,OrderUniqIdandAffiliationId. SaveAffiliationId— it identifies this account in the redirect and in the IPN. Send the child toPaymentRedirectUrl. - The child enters card details on the Takbull payment page. The card is saved for the subscription.
- Takbull then creates the child merchant, assigns the package, charges the package (setup + first period) to the child's card, opens the monthly subscription on the same card, issues API credentials (if the package includes API / clearing) and enables the login.
- The child's browser is redirected to
RedirectUrlwith the query parameters below. - A server-to-server
POST(JSON) is sent toIpnUrlwith the final result and the child account details.
{
"Email": "child@example.com",
"Password": "SecurePass123!",
"FirstName": "John",
"LastName": "Doe",
"Phone": "0501234567",
"PackageUniqId": "pkg_basic_001",
"SubscriptionPayer": "Child",
"RedirectUrl": "https://parent.example.com/takbull/child-account/return",
"IpnUrl": "https://parent.example.com/takbull/child-account/ipn",
"MerchantDetails": { "Name": "Child Business Ltd.", "BusinessNumber": "123456789" }
}
{
"Success": true,
"ErrorCode": 600113,
"ErrorMessage": "Payment is required to activate this child account. Please complete the payment process.",
"UserId": 1042,
"MerchantId": null,
"Email": "child@example.com",
"ParentMerchantId": "MID_parent456",
"AffiliationId": 7,
"SubscriptionPayer": "Child",
"PaymentRedirectUrl": "https://api.takbull.co.il/PaymentGateway?orderUniqId=3f0b1c2e-...",
"OrderUniqId": "3f0b1c2e-...",
"ApiKey": null,
"ApiSecret": null
}
MerchantId and the API credentials are not available yet — they are delivered in the IPN once the payment completes.
| Parameter | Description |
|---|---|
status | activated, failed, processing (activation still running — wait for the IPN), pending or payment_failed. |
statusCode | 0 on success. |
affiliationId | The AffiliationId returned by CreateAccount. |
childMid | MID of the child merchant (when created). |
Example: https://parent.example.com/takbull/child-account/return?status=activated&statusCode=0&affiliationId=7&childMid=MID_abc123
Use the redirect only to show the child a result page. It is not signed, the child may close the browser before it
arrives, and processing means the activation had not finished yet — update your records from the IPN.
Sent as POST with Content-Type: application/json and User-Agent: TakbullIPNAgent,
once the activation has finished (successfully or not).
{
"Status": "Activated",
"StatusCode": 0,
"StatusDescription": "Child account activated",
"AffiliationId": 7,
"ParentMerchantId": "MID_parent456",
"MerchantId": "MID_abc123",
"UserId": 1042,
"Email": "child@example.com",
"PackageUniqId": "pkg_basic_001",
"OrderUniqId": "3f0b1c2e-...",
"ApiKey": "5c2a493c-1a92-4222-9a4d-b50340757cf8",
"ApiSecret": "8e2e4556-7d59-4476-833c-471f4bf6a605"
}
| Field | Type | Description |
|---|---|---|
Status | String | Activated — the account is active and the package was charged. Failed — activation failed (see StatusCode). |
StatusCode | Number | 0 on success; otherwise the error code (see Error Codes). |
StatusDescription | String | Human-readable result / failure reason. |
AffiliationId | Number | The AffiliationId returned by CreateAccount. Use it to match the IPN to your request. |
ParentMerchantId | String | Your (the parent's) MID. |
MerchantId | String | MID of the new child merchant. |
UserId | Number | Internal user ID of the child's login. |
Email | String | Login email of the child account. |
PackageUniqId | String | The package that was assigned and charged. |
OrderUniqId | String | The payment-page order on which the child saved the card. |
ApiKey / ApiSecret | String | API credentials of the child terminal, when the package includes an API or clearing module. Empty on failure. |
- Respond with any
2xxstatus to acknowledge. Any other status, or no response, is retried — up to 3 attempts, 15 minutes apart. - Make your handler idempotent: the same IPN may arrive more than once. Match it by
AffiliationId. - The IPN carries the child's
ApiSecret— use anhttpsIpnUrland store the credentials securely. - If the payment is abandoned no IPN is sent. You may call
CreateAccountagain with the sameEmail: the previous pending request is cancelled and a new payment link is returned. - On
Failedafter the payment (e.g. the package charge was declined), contact Takbull support — the email cannot be reused automatically.
{
"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, or is not a valid email address. |
600107 | Password is required, or too weak: at least 8 characters with upper- and lower-case letters, a digit and a special character. |
600108 | Parent merchant not found. |
600109 | Failed to create user account (for example, the email already exists). |
600110 | User was not created successfully. |
600111 | Failed to register the clearing provider (Upay) for the child merchant. When the parent pays, the account is created all the same: Success is true, the API keys are returned, and Takbull support completes the clearing setup. |
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. |
600116 | RedirectUrl is missing or invalid (required when the child pays). |
600117 | IpnUrl is not a valid absolute http/https URL. |
600118 | Failed to create the payment page for the child. |
600119 | ProviderKey / ProviderSecret are missing although IsExistingAccount is true. Nothing was charged. |
600127 | Could not sign in to the existing Upay account with the given ProviderKey / ProviderSecret. Nothing was charged. |
600128 | (Paid packages) MerchantDetails is not valid; ErrorMessage lists what is missing or wrong (required fields, bank details, a BusinessNumber that already has a Takbull account). Checked before any payment — nothing was charged. |
600125 | (Parent pays) The payment was received but the account setup did not complete. Do not pay again: resend the same request (same Email and PackageUniqId) to finish the setup without a new charge. OrderUniqId and AffiliationId identify the payment. |
600126 | (Parent pays) The payment could not be confirmed. Do not resend the request; Takbull support has been notified and will complete the account or release the payment. |
600120 | (IPN only) The stored account request could not be read. |
600121 | (IPN only) The pending child login was not found or is already active. |
600122 | (IPN only) The package was not found. |
600123 | (IPN only) An unexpected internal error occurred during activation. |
| Other | (IPN only) When the package charge on the child's card is declined, StatusCode is the payment error code and StatusDescription its description. |
Document Settings
Reads / updates the document (invoice & receipt) settings of the authenticated merchant, or of one of its
active affiliated child merchants when ChildMid is given. On update only the fields sent are changed;
the response returns the full settings after the change.
- Right after
CreateAccount(or after theActivatedIPN in the child-pays flow), to set up how the new child's documents look and are sent — default document type, VAT handling, email subject/body, SMS text, etc. - At any later time, to keep a child's document settings in sync with your system, without the child logging in.
- Without
ChildMid, to manage your own document settings.
Settings are kept per language: he (Hebrew documents, default) and en (English documents) are
separate sets — update each one you use. If a merchant has no settings yet for the language, defaults are created from
the merchant profile on the first call. A child can be managed only while its affiliation is Active.
Recommended: call GetDocumentSettings first, then send only the fields you want to change.
| Parameter | Type | Required | Description |
|---|---|---|---|
childMid | String | ❌ | MID of an active affiliated child. Omit to read the authenticated merchant's settings. |
lang | String | ❌ | he (default) or en. |
The response has the same structure as the UpdateDocumentSettings response below.
{
"ChildMid": "MID_abc123",
"Language": "he",
"Settings": {
"DefaultDocumentType": 320,
"IsItemIncludeTax": true,
"EmailFromDisplayName": "Child Business Ltd.",
"EmaiSubjectMsg": "Your document from Child Business",
"EmailDocumentToMerchantAsCopy": true,
"MerchantEmailToSendCopy": "child@example.com",
"AddPaymentLink": false,
"HideUnits": true,
"DocumentNumbering": [
{ "DocumentType": 320, "Count": 1000 },
{ "DocumentType": 400, "Count": 2000 }
]
}
}
| Field | Type | Required | Description |
|---|---|---|---|
ChildMid | String | ❌ | MID of an active affiliated child. Omit to update the authenticated merchant. |
Language | String | ❌ | Settings language: he (default) or en. |
Settings | Object | ✅ | Fields to change (all optional). |
| Field | Type | Description |
|---|---|---|
DefaultDocumentType | Number | Default document type (e.g. 320 = חשבונית מס קבלה). |
CurrencyCode | String | Default currency (e.g. ILS). |
IsTaxtable | Boolean | Documents are subject to VAT. |
IsItemIncludeTax | Boolean | Item prices include VAT. |
Comments | String | Default comments printed on documents. |
EmailFromDisplayName | String | Sender display name on document emails. |
EmaiSubjectMsg | String | Document email subject. |
EmailBodyMsg | String (HTML) | Document email body (sanitized). Placeholders: [[customerName]], [[documentType]]. |
EmailDocumentToMerchantAsCopy | Boolean | Send a copy of every document to the merchant. |
MerchantEmailToSendCopy | String | Email address for the merchant copy. |
SmsMsg / SmsFrom | String | Document SMS text and sender. |
AddPaymentLink | Boolean | Add a payment link to sent documents. |
ShowIlsInForeignCurrency | Boolean | Show the ILS amount on foreign-currency documents. |
HideSQU / HideUnits | Boolean | Hide the SKU / units columns. |
KabalaWithoutItems | Boolean | Issue receipts without item lines. |
RoundSum | Boolean | Round document totals. |
ShowMerchantEmailAddress | Boolean | Print the merchant email on documents. |
ShowTaxRowInKabala | Boolean | Show the VAT row on receipts. |
ShowCustomerBalance | Boolean | Show the customer balance on documents. |
ThemeId | Number | Document design theme. |
DocumentNumbering | Array | Optional per-document-type numbering updates. Each entry contains DocumentType and Count; Count is the last/current number and cannot be lower than an already issued document. |
| Value | API name | Hebrew name |
|---|---|---|
80 | HatzaatMehir | הצעת מחיר |
81 | HeshbonIska | חשבון עסקה |
82 | HodaatHiyuv | הודעת חיוב |
100 | Hazmana | הזמנה |
200 | TeudatMishloah | תעודת משלוח |
300 | Heshbonit | חשבונית עסקה |
305 | HeshbonitMas | חשבונית מס |
320 | HeshbonitMasKabala | חשבונית מס קבלה |
330 | HeshbonitMasZikui | חשבונית מס זיכוי |
355 | HeshbonitMasZikuiAndKabala | חשבונית מס זיכוי והחזר כספים |
400 | Kabala | קבלה |
401 | RefundKabala | זיכוי קבלה |
405 | KabalaTruma | קבלה תרומה |
406 | RefundKabalaTruma | זיכוי קבלה תרומה |
{
"Success": true,
"ErrorCode": 0,
"ErrorMessage": null,
"Mid": "MID_abc123",
"Language": "he",
"Settings": {
"DefaultDocumentType": 320,
"IsItemIncludeTax": true,
"DocumentNumbering": [ { "DocumentType": 320, "Count": 1000 } ],
"...": "..."
}
}
| ErrorCode | Description |
|---|---|
600104 | Could not resolve the authenticated merchant identity. |
600130 | Settings is required. |
600131 | Invalid DefaultDocumentType. |
600132 | Invalid MerchantEmailToSendCopy. |
600133 | An unexpected internal error occurred. |
600134 | ChildMid is not an active affiliated child of the authenticated merchant. |
600135 | Invalid document numbering entry. |
600136 | Duplicate document numbering entries. |
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 |