Shopify

Linking via Shopify

Manual payment method setup with redirect script and private app access for order updates.

Step 1 - Access admin panel

Login to your Shopify account and open your store admin.

Step 2 - Create manual payment method

  1. Go to Settings - Payments.
  2. Create a custom payment method.
  3. Set title/details/instructions (for example: pay online with CrossPay).
  4. Activate payment method.

Step 3 - Add script in Additional scripts

Go to Settings - Payments - Order processing - Additional scripts and add your redirect script.

<script type="text/javascript">
var api_data = "82e4b4fd3a16ad99229af9911ce8e6d2";
var invoice_id = ("{{ order_name }}").replace('#','');
var apiKey = "Customer Api-Key in Bill";
var total = {{ total_price }} / 100;
var currency = "USD";
var inv_info = [{"row_title":"Tax","row_value":"2"},{"row_title":"Delivery","row_value":"1"},{"row_title":"Capon","row_value":1},{"row_title":"Discount","row_value":0}];
var userName = "{{ billing_address.name }}";
var return_url = "Api Link Path";
var email = "{{ email }}";
var mobile = "{{ shipping_address.phone }}";
var url = "https://crosspayonline.com/api/createInvoiceByAccount?api_data="+api_data+"&invoice_id="+invoice_id+"&apiKey="+apiKey+"&total="+total+"&currency="+currency+"&inv_details={\"inv_items\":[{\"name\":\"Shoping From Store\",\"quntity\":\"1\",\"unitPrice\":\""+total+"\",\"totalPrice\":\""+total+"\",\"currency\":\"USD\"}],\"inv_info\":"+JSON.stringify(inv_info)+",\"user\":{\"userName\":\""+userName+"\"}}&return_url="+return_url+"&email="+email+"&mobile="+mobile+"&name="+userName;
window.location.href = url;
</script>

Replace token/api key and return URL with your real values before production.

Step 4 - Success and failure pages

  1. Go to Online Store - Pages.
  2. Create Success page and Failure page.
  3. Provide both URLs to CrossPay support for redirect setup.

Create private app

  1. Go to Apps - Manage private apps.
  2. Create a new private app (for example: CrossPay Online).
  3. Grant required Admin API order permissions.
  4. Share store domain and app password with CrossPay integration engineer.