Getting Started

Direct API integration Guide

5min
introduction this guide aims to assist you in incorporating our direct apis into your system if you have no intention of utilising octifi websdk js, kindly proceed with reading the following information recommendation we recommend using our provided sdk if you're comfortable using javascript on your client side, as it hides complexity and is the suggested way to integrate with our apis you can learn more about using it in our web integration guide alternatively, you can use the rest apis and manually redirect the user in simple steps note for rest apis use the below base url and resource path staging/sg/my https //k2 latitudepay me/api/v1/ production(sg) https // k2 sg latitudepay com/api/v1/ production(my) https // k2 my latitudepay com/api/v1/ for redirection staging/sg/my https //latitudepay me/webview/checkout/${precheckoutid}/?merchant public key=${public key} https //latitudepay me/webview/checkout/${precheckoutid}/?merchant public key=${public key} production(sg) https //app sg latitudepay com/webview/checkout/${precheckoutid}/?merchant public key=${public key} https //app sg latitudepay com/webview/checkout/${precheckoutid}/?merchant public key=${public key} production(my) https //app my latitudepay com/webview/checkout/${precheckoutid}/?merchant public key=${public key} https //app my latitudepay com/webview/checkout/${precheckoutid}/?merchant public key=${public key} key required description example value config yes configuration settings for the payment modal object modal yes indicates whether a modal (popup) should be displayed for the payment process note it should be always false as we deprecated the modal popup false public api key yes public api key used for authentication "your public key" merchant logo no url or path to the merchant's logo image "" (empty string, no logo specified) redirect confirmation url action yes the http method (get ) used to redirect users to the confirmation url note post method deprecated "get" redirect callbacks yes configuration for redirect urls upon payment success and failure object onsuccess yes url to redirect to when the payment is successful "https //your app com/callback/success/" onfail yes url to redirect to when the payment fails "https //your app com/callback/failed/" checkout yes payment checkout details object checkout yes nested object for payment checkout object checkout yes nested object for payment checkout object merchant yes information about the merchant object name yes name of the merchant "merchant name" bill yes billing details for the purchase object display name no display name or description of the product being purchased "product purchase name" tax amount yes the tax amount for the purchase (if applicable) 0 total amount yes the total purchase amount "500" or "500 98" currency yes the currency code for the purchase "myr" or "sgd" merchant order id yes unique identifier for the merchant's order can we uuid or numeric or alpha numeric "487b0b67 7924 4484 ab14 ee7e51fb7c3d" or "1234555" or "ord 123123" customer yes customer details object phone number no customer's phone number for better user experience "" (empty string, no phone number specified) email no customer's email address "joedoe\@123fakestreet com" country code no country code for the customer's location "" (empty string, no country code specified) modal yes indicates whether a modal (popup) should be displayed for the payment process within the checkout section note it should be always false as we deprecated the modal popup false