Update Abandoned Checkout URL for Custom Checkout App like Gokwik, Shiprocket, etc.

Version: 1.0
Last Updated: April 2025

Overview

This API allows you to update checkout URLs for Abandoned Checkout URL while using custom external checkout app on Shopify like Gokwik, Shiproket, etc. The API uses API Key and HMAC signature for authentication. HMAC signature can be generated using Secret key shared with you and post payload of data.

Prerequisite

You will required X-Api-Key and Secret Key in order to use this API.
Shopify Store owner can generate those credetials from Chatix Shopify Application Admin > Settings.

API Endpoint URL

https://api.chatix.app/2025/04/checkout/url

Authentication

Required Headers

Header Description Example
Content-Type Must be application/json Content-Type: application/json
X-Api-Key Your API key X-Api-Key: abc123...
X-Signature HMAC-SHA256 signature X-Signature: 1f53f3e5e1cc576b2ddcfcabb1............3f69b6ce73e1b8e24174f9f7fc



i) Generating the Signature

The X-Signature header is a HMAC-SHA256 signature created using your secret key and the JSON-encoded request body:

PHP Example

$data = [
    "url" => "https://your-store.myshopify.com/checkout/your-order-id",
    'checkout_id' => "123123123",
    'shop' => "ethnicyug.myshopify.com"
];
$secret_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$signature = hash_hmac('sha256', json_encode($data), $secret_key);

Important: The order of fields in the JSON payload must be consistent when generating the signature and when making the API request. It's recommended to use the same JSON serialization method for both operations.



ii) API Endpoint

Update URL: Updates a checkout URL for Abandoned Checkouts.

Request Details

  • Method: POST
  • URL: https://api.chatix.app/2025/04/checkout/url
  • Content-Type: application/json

Request Body

{
  "url": "https://store.myshopify.com/checkout/123456789/information",
  "shop": "store.myshopify.com",
  "checkout_id": "123456789"
}

Request Parameters

Parameter Type Required Description
url string Yes Complete checkout URL
shop string Yes Shopify store domain
checkout_id string Yes Unique checkout identifier


Success Response (200 OK)

{
    "success": true,
    "message": "URL added to processing queue",
    "data": {
        "url": "https://your-store.myshopify.com/checkout/your-order-id",
        "created_at": "2025-04-01 05:42:17"
    }
}


Error Responses

Status Code Status Message Additional Info
400 false url is required -
400 false Invalid URL format -
401 false Invalid or inactive API key -
401 false API key and signature are required -
403 false Invalid signature -
429 false Rate limit exceeded retry_after: 60
500 false Internal server error -

Example Request

{
    "url": "https://store.myshopify.com/checkout/123456789/information",
    "shop": "store.myshopify.com",
    "checkout_id": "123456789"
}

Rate Limiting

  • Limit: 100 requests per minute per API key
  • Window: Rolling 60-second window
  • Response: 429 status code with retry_after field

Sample cURL

curl -X POST "https://api.chatix.app/2025/04/checkout/url" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: your_api_key" \
  -H "X-Signature: 1f53f3e5e1cc576b2ddcfcabb17fe7a736cc2e3f69b6ce73e1b8e24174f9f7fc" \
  -d '{
    "url": "https://store.myshopify.com/checkout/123456789/information",
    "shop": "store.myshopify.com",
    "checkout_id": "123456789"
  }'

Troubleshooting Guide

Common Issues and solutions

1) Invalid Signature

Problem: Receiving 403 Forbidden with "Invalid signature" message
Solution:

  • Verify the signature is correct
  • Check if API key matches the signature
  • Ensure request body matches exactly

2) Rate Limit Exceeded

Problem: Receiving 429 Too Many Requests
Solution:

  • Wait for the specified retry_after period
  • Implement exponential backoff in your code
  • Consider upgrading your API plan for higher limits

3) Invalid API Key

Problem: Receiving 401 Unauthorized
Solution:

  • Verify API key is correct
  • Check if API key is active
  • Ensure shop domain matches the API key

4) Invalid URL Format

Problem: Receiving 400 Bad Request
Solution:

  • Ensure URL is properly formatted
  • Check for valid HTTPS protocol
  • Verify URL is properly encoded

Best Practices

  • Always validate URLs before sending
  • Keep your API key secure
  • Implement proper error handling
  • Respect rate limits
  • Use HTTPS for all requests
  • Store credentials securely

Support

For technical support or questions:


This documentation is confidential and intended for authorized API users only.