Skip to main content

Bik Checkout

Use this API to ingest checkout data(e.g., abandoned carts or abonded a products) from an external source into Bik.

Request Parameters

NameTypeRequired/OptionalDescription
sourcestringRequiredSource identifier (e.g. your company/brand name BIK)
payloadobjectRequiredFull checkout object
info

You can refer to the Shopify Webhook Docs for more details about the payload structure and fields.

Request Information

CategoryValue
HTTP requestPOST
URLhttps://bikapi.bikayi.app/integrations/bikPlatformFunctions-bikCheckout

Sample Request

curl --location 'https://bikapi.bikayi.app/integrations/bikPlatformFunctions-bikCheckout' \
--header 'Authorization: Basic AUTH_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"source": "BIK",
"payload": {
"id": 456789123456,
"abandoned_checkout_url": "https://example.com/checkout/38787918201132",
"buyer_accepts_marketing": true,
"cart_token": "xyz-cart-token",
"closed_at": null,
"completed_at": "2025-04-10T10:00:00Z",
"created_at": "2025-04-10T09:00:00Z",
"currency": "USD",
"customer": {
"accepts_marketing": true,
"created_at": "2025-04-01T08:00:00Z",
"currency": "USD",
"default_address": {
"address1": "123 Main St",
"city": "Los Angeles",
"company": null,
"country": "United States",
"country_code": "US",
"country_name": "United States",
"customer_id": 123456,
"default": true,
"first_name": "John",
"id": 111,
"last_name": "Doe",
"latitude": 34.0522,
"longitude": -118.2437,
"name": "John Doe",
"phone": "1234567890",
"province": "California",
"province_code": "CA",
"zip": "90001"
},
"email": "john.doe@example.com",
"first_name": "John",
"id": 123456,
"last_name": "Doe",
"phone": "1234567890",
"multipass_identifier": null,
"last_order_id": null,
"last_order_name": null,
"note": null,
"orders_count": 3,
"state": "enabled",
"tags": "vip,newsletter",
"tax_exempt": false,
"total_spent": "299.99",
"updated_at": "2025-04-10T08:59:00Z",
"verified_email": true
},
"customer_id": 123456,
"customer_locale": "en",
"discount_code": "SPRING10",
"discount_codes": [
{
"amount": "10.00",
"applicable": true,
"description": "Spring Sale 10%",
"non_applicable_reason": "",
"title": "SPRING10",
"value": "10.0",
"value_type": "percentage"
}
],
"device_id": null,
"email": "john.doe@example.com",
"gateway": "stripe",
"gift_cards": {
"amount_used": "20.00",
"balance": "30.00",
"id": "giftcard123",
"last_characters": "1234"
},
"landing_site": "/promo",
"line_items": [
{
"applied_discounts": [],
"compare_at_price": "49.99",
"destination_location_id": 123,
"discount_codes": [],
"fulfillment_service": "manual",
"gift_card": false,
"grams": 500,
"key": "abc123",
"line_price": "39.99",
"name": "Cool T-Shirt",
"origin_location_id": 456,
"price": "39.99",
"product_id": 78910,
"properties": null,
"quantity": 1,
"requires_shipping": true,
"sku": "TSHIRT001",
"taxable": true,
"tax_lines": [
{
"compare_at": 0,
"position": 1,
"price": "3.20",
"rate": 0.08,
"source": "shopify",
"title": "State Tax",
"zone": "CA"
}
],
"title": "Cool T-Shirt",
"variant_id": 111213,
"variant_title": "Large",
"vendor": "CoolBrand"
}
],
"location_id": 555,
"note": "Please deliver after 5 PM.",
"note_attributes": [],
"payment_due": "49.99",
"phone": "1234567890",
"presentment_currency": "USD",
"referring_site": "https://facebook.com",
"shipping_address": {
"address1": "123 Main St",
"city": "Los Angeles",
"company": null,
"country": "United States",
"country_code": "US",
"country_name": "United States",
"customer_id": 123456,
"default": false,
"first_name": "John",
"id": 222,
"last_name": "Doe",
"latitude": 34.0522,
"longitude": -118.2437,
"name": "John Doe",
"phone": "1234567890",
"province": "California",
"province_code": "CA",
"zip": "90001"
},
"shipping_lines": [
{
"api_client_id": null,
"applied_discounts": [],
"carrier_identifier": null,
"carrier_service_id": null,
"code": "STANDARD",
"delivery_category": null,
"id": "ship123",
"markup": "0.00",
"phone": null,
"price": "5.00",
"requested_fulfillment_service_id": null,
"source": "usps",
"tax_lines": [],
"title": "Standard Shipping",
"validation_context": null
}
],
"source_indentifier": null,
"source_name": "web",
"source_url": null,
"subtotal_price": "39.99",
"tax_lines": [
{
"compare_at": 0,
"position": 1,
"price": "3.20",
"rate": 0.08,
"source": "shopify",
"title": "State Tax",
"zone": "CA"
}
],
"taxes_included": false,
"token": "checkout-token-123",
"total_discounts": "10.00",
"total_line_items_price": "39.99",
"total_price": "49.99",
"total_tax": "3.20",
"total_weight": 500,
"updated_at": "2025-04-10T10:00:00Z",
"user_id": 654321
}
}'

JSON response example:

{
"status": 200,
"success": true
}

Response parameters

NameTypeDescription
statusnumberResponse status
successbooleanIs successful response or not

Errors

Error CodeMeaning
400Invalid payload! -- Your request is invalid/invalid parameters.
401Unauthorized -- User is not authenticated.
404Not Found -- The specified API could not be found.
500Internal Server Error -- We had a problem with our server. Try again later.

Error response example:

{
"status": 400,
"errors": [
{
"message": "Invalid payload!"
}
]
}