NAV
json

Getting Started

Introduction

Simplifying Buying

Kredivo checkout API allows you to implement our checkout process so Kredivo users can make a transaction on your platform, be it web based or app based. Our checkout API will ask User to enter his/her Kredivo phone number & PIN, followed by an OTP, to do a transaction from our embedded page.

Optimized for all devices More sales with no risk
Kredivo Checkout adapts seamlessly to both desktops and mobile devices. This means that you instantly get the same conversion on mobiles as on desktops. One-click buying increases conversion by an additional 29% for returning customers. Kredivo assumes all risk for both the customer and merchant. That means no more charge-backs for you as a merchant.

Preparation

Prepare your site

To complete the Kredivo Checkout integration process as simply and quickly as possible, we recommend that you start by setting up the following.

Checkout page and confirmation page

Both the checkout page and the checkout confirmation page are hosted by you. Both these pages must include a div that you will populate with the Kredivo Checkout button. You will learn what the Kredivo Checkout is in our first tutorial, embed the checkout. Kredivo Checkout is responsive, which means that it will always use the full width of the container.

Tip! Place the Kredivo Checkout button so that your customers can see it instantly after loading the checkout page without scrolling. Provide clear calls to action to improve your conversion rates, such as "Finalize your purchase now".

mco

An example of what the checkout looks like on different devices.

Push notification URI

As you will learn in the Confirm purchase tutorial, Kredivo needs a URI to inform you of the order status. You will need to include a placeholder in the push URI, which Kredivo will then replace with the order URI when we send the push request. You can download example push URI Here

Developer Help

If you need any help with the documentation and sandbox environment, please email merchops@finaccel.co and we will respond as soon as possible.

If you do not have a merchant account, please email merchops@finaccel.co to get setup with one.

Developer FAQ

  1. Does Kredivo work on desktop and mobile? Yes, desktop, mobile, and tablet web.
  2. I am not a retailer but I want to offer Kredivo financial products in my site/app do you have an API for that? See previous answer. If you are interested in using Kredivo for your site/app, email us at merchops@finaccel.co
  3. Is Kredivo another payment processor? No. Kredivo is a point of sale credit solution for your customers.

2-click Checkout

This is the most basic checkout feature suitable for either a web based platform or app based platform. Here is the API structure:

flow2c

First, you will need to call the checkout API by passing all the required parameters. If successful, you will receive a redirect URL as a response. This URL will redirect the user to Kredivo payment page. There are at least 3 components that are required to obtain the payment page:

You will need a server_key to interact with the Kredivo server. Please send an email to merchops@finaccel.co to sign up as an Kredivo merchant and get the server_key.

Initiate 2-click Checkout

To initiate 2-click checkout with Kredivo, you will need to call checkout/init API.

Using the API: POST /checkout/init

The Request JSON structured like this:

{
  "server_key": "MEJ4FLRc74UU64cxCF8Z3HYSpPctD7",
  "tenure": 1,
  "amount": 6505000,
  "order_id": "KD14721",
  "source": "ecom",
  "items": [
    {
      "id": "BB12345678",
      "name": "iPhone 5S",
      "price": 6000000,
      "type": "Smartphone",
      "url": "http://merchant.com/cellphones/iphone5s_64g",
      "quantity": 1
    },
    {
      "id": "AZ14565678",
      "name": "Hailee Sneakers Blink Silver",
      "price": 250000,
      "url": "http://merchant.com/fashion/shoes/sneakers-blink-shoes",
      "type": "Sneakers",
      "quantity": 2
    },
    {
      "id": "taxfee",
      "name": "Tax Fee",
      "price": 1000,
      "quantity": 1
    },
    {
      "id": "shippingfee",
      "name": "Shipping Fee",
      "price": 9000,
      "quantity": 1,
      "parent_type": "SELLER",
      "parent_id": "SELLER456"
    },
    {
      "id": "discount",
      "name": "Discount",
      "price": 5000,
      "quantity": 1
    }
  ],
  "sellers": [
    {
      "id": "SELLER123",
      "name": "Sunrise",
      "email": "sunrise@gmail.com",
      "url": "https://onlineshop/seller/sunrise",
      "mobile_number": "+84-123456789",
      "address_detail": {
        "name": "Ngo Thuy Duong",
        "address": "180 Bui Thi Xuan",
        "province": "ho chi minh",
        "district": "Phu Nhuan",
        "ward": "3"
      }
    },
    {
      "id": "SELLER456",
      "name": "Sunshine",
      "email": "sunshine@gmail.com",
      "url": "https://onlineshop/seller/sunshine",
      "mobile_number": "+84-987654321",
      "address_detail": {
        "name": "Ngo Anh Tuan ",
        "address": "180 Ly Tu Trong",
        "province": "ho chi minh",
        "district": "Phu Nhuan",
        "ward": "Vo Thi Sau"
      }
    }
  ],
  "buyers": [
    {
      "name": "Nguyen Van Long",
      "email": "long123@gmail.com",
      "mobile_number": "+84-983123456"
    }
  ],
  "shipping_addresses": [
    {
      "name": "Nguyen Van Long",
      "address": "100 Nguyen Tu Luc",
      "province": "Ho Chi Minh",
      "district": "Tan Binh",
      "ward": "5",
      "mobile_number": "+84-983123456"
    }
  ],
  "push_url": "https://pushurlofmerchant.com",
  "back_to_store_url": "https://successtransaction.com",
  "cancel_url": "https://cancel.com",
  "ip_address": "123.23.24.11",
  "user_agent": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G960F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36",
  "device_id": "samsung"
}

The Response returns JSON structured like this:


Positive Response :
{
    "status": 1,
    "message": "Success",
    "checkout_url": "https://pay-vn-sandbox.kredivo.com/signIn?tk=c94c431-ab34-1234",
    "transaction_id": "c01ec51e-9322-4545-aba5-c0f5eae671fc"
}

Negative response:
{
    "status": 2012,
    "message": "Invalid Merchant"
}


Request Body

Name Type Description
server_key String Required. Each merchant will have server_key generated by Kredivo
tenure Integer Required. You can set default value with 1. Payment term chosen by the customer
amount Double Required. Total price of the checkout
order_id String Required. Each transaction will have unique order_id generated by merchant
source String Required. Source of transaction. you have to use this id: ecom
items Array of objects Details of the items
sellers Array of objects Optional (compulsory for marketplaces). Details of the seller for marketplaces
buyers Array of objects Required. Details of the customer
shipping_addresses Object Required. Shipping address of the customer. shipping is required for goods (excluding ticket/voucher)
push_url String Required. URI of merchant push-notification API (HTTP POST)
back_to_store_url String Required. URI of your store page. Kredivo will redirect user to this page once a transaction has been completed.
cancel_url String Optional. URI that the customer is sent to if the customer chooses to cancel the Kredivo payment before completion
ip_address String Optional. Metadata for analytic & fraud prevention purposes
user_agent String Optional. Metadata for analytic & fraud prevention purposes
device_id String Optional. Metadata for analytic & fraud prevention purposes
imsi String Optional. Metadata for analytic & fraud prevention purposes

Response

Name Type Description
status Integer Status code
message String Description of status
redirect_url String Redirect URL will be sent for regular transaction. If the user has been authenticated, there will be 2 scenarios: If our security system flags the transaction, we will pass a redirect URL that contains an OTP challenge for the user. Otherwise, we will not pass any redirect URL and you will only need to wait for a callback from Kredivo.
error Message : Description of error status

Items

Name Type Description
id String Required. Can be product SKU. Important! for item fee such as: shipping fee, admin fee etc. you have to use this id: shippingfee, adminfee, taxfee, discount, discount_sku, additionalfee, insurancefee, mixpayment, downpayment, downpayment_sku.
name String Required. product name given by merchant
price Double Required. Price of the item
type String Required. Product category.
quantity Integer Required. Quantity of the item bought
url String Required. URL to the product item on merchant site
image_url String Optional. URL to the product item image

Sellers

Name Type Description
id String Required. Seller's Id
name String Required. Seller's name
email String Required. Seller's email
url String Required. Seller's url
mobile_number String Optional. Seller's mobile_number
address_detail Address Required. Seller's residential address

Buyers

Name Type Description
name String Required.
email String Required.
mobile_number String Required.

Address

Name Type Description
name String Required.
address String Required.
province String Required.
district String Required.
ward String Required.
mobile_number String Required.

HTTP(S) Header

Name Type Description
Content-Type String application/json
Accept String application/json

Confirm Transaction

In this tutorial you will learn how to confirm that you have received and created an order in your system. This confirmation is needed in response to a push notification from Kredivo, indicating that the user has completed the transaction. Once you have received the push notification, you should update the status of the transaction.

1. Receive notification from Kredivo

Once a consumer has completed a purchase, Kredivo will inform you via a POST request. The POST request will be made to the push notification URI you provided when you created the checkout order.

HTTP Notification example of transaction::

{
  "amount": "1000000.0",
  "discount_amount": "200000.0",
  "disbursed_amount": "800000.0",
  "tenure": 1,
  "trx_status": "pending",
  "order_id": "KD125262",
  "transaction_time": 1501846094,
  "transaction_id": "fadee4e5-99a2-48d6-952d-007f3fa508e8",
  "signature_key": "o5KZPDcxgEA9QutAVcIQwE3suQRkTEIA1VXcoHp7KaWJnpH",
  "message": "pending merchant’s confirmation",
  "voucher_code": "PROMO123"
}

Response Body

Name Type Description
transaction_id String Transaction Id given by Kredivo
trx_status String Transaction status:
pending: Transaction is successfully verified by Kredivo, pending for merchant to call update API to confirm and allow the transaction to be finalized (Please only call update API when you receive "pending" status from push notification
failed: Transaction failed (e.g Merchant did not called Update API within 30 seconds)
denied: Transaction denied by Kredivo (due to insufficient limit, user has overdue debt, etc.)
transaction_time UNIX timestamp (epoch) Timestamp of transaction
tenure Integer Payment term by the customer (1, 3, 6, 12)
order_id String Order Id given by merchant
amount String The transaction amount
discount_amount String Discount amount applied at Kredivo's checkout page.
disbursed_amount String The amount disbursed to the merchant, equal to the amount sent by the merchant in checkout/init API minus the discount_amount. Note: The amount mentioned in the push notification is the final amount (after deducting the shortfall downpayment)
signature_key String Signature key to validate if the notification is originated from Kredivo.
message String message from Kredivo (if any)
voucher_code String Voucher code used by user (if any)

2. Merchant Response

merchant response should be in JSON, structured like this:

{
  "status": "OK",
  "message": "Message from merchant if any"
}

3. Confirm the order status

Once you receive a push notification from Kredivo with trx_status "pending", that means Kredivo has already approved the transaction. You need to call Update API to Confirm and Approve the transaction.

Using the API: POST /checkout/update

The Request JSON structured like this:

{
  "signature_key": "Lrgsmk09S0f8biAf/bYGrfDXJXvk7ftLMZ3L1b4o7+4LxARUGA9e1wsA64OTE33eiV7ULiOv/ZPy4SJ7TDT9ugxECGLtuMF65cmZyLLkaLY=",
  "transaction_id": "9ce1596f-bd4e-4fa2-b49f-3537de3f4128",
  "status": "settled"
}

Example response after call API update:

{
  "status": "settlement",
  "message": "Success",
  "tenure": 1,
  "transaction_time": 1645289475,
  "order_id": "B21145",
  "amount": "4000000.0",
  "discount_amount": "300000.0",
  "disbursed_amount": "2100000.0",
  "user_token": null
}

Request Body

Name Type Description
signature_key String Required. Signature key to validate if the notification is originated from Kredivo.
transaction_id String Required. Transaction ID given by Kredivo
status String Required. Transaction status:
settled: Merchant confirm Transaction is successful from merchant side
failed: Merchant confirm Transaction is failed from merchant side

Response

Name Type Description
status String Transaction status:
settlement: Transaction is successful
pending: User has not completed the transaction
denied: Transaction has been denied by Kredivo
cancel: Transaction has been cancelled by merchant
failed: Merchant fails to call confirm API within 30 seconds
message String Description of status
tenure Integer Payment term chosen by the customer (1, 3, 6, 12)
transaction_time UNIX timestamp (epoch) Timestamp of transaction
order_id String Order ID given by merchant
amount Double Transaction amount
user_token string Ignore this field for 2-click checkout

4. Settle an order in your system

You should now settle the order in your system if transaction*status from the response is _SETTLED*.

0-click Checkout

0-click Checkout is a feature that allows Kredivo users to tokenize their Kredivo account inside the merchant's platform. A tokenized user will then be able enjoy our express checkout feature. Whereas our regular checkout requires the user to enter his/her phone number, PIN, and OTP to confirm the transaction, the 0-click Checkout will essentially allow the user to checkout without entering anything. In the case where our security system flags a transaction as suspicious, we will throw an OTP challenge to the user. Here is the API structure:

flowexprs

0-click Checkout is a great leap forward even when compared to our already smooth 2-click regular checkout. It is the smoothest checkout process in the market today, giving unparalleled user experience.

This feature is only available for select merchants. Contact us if you're interested in using this feature.

Initiate 0-click Checkout

This step will show you how you can tokenize the user through our regular checkout page. If you are interested in tokenizing the user separately from the transaction, read the Tokenize Kredivo Account guide below.

The first time you call this API, you will need to pass the parameter tokenizer_user as true to enable tokenization. If that transaction is successful, you will get a user_token in our response. Any subsequent transaction will now become 0-click once you start passing this user_token.

To initiate 0-click Checkout with Kredivo, you will need to call checkout/init API.

Using the API: POST /checkout/init

The Request JSON structured like this:

{
  "server_key": "MEJ4FLRc74UU64cxCF8Z3HYSpPctD7",
  "tenure": 1,
  "client_user_key": "useremail@gmail.com",
  "user_token": "XXXX-XXXX",
  "amount": 6505000,
  "order_id": "KD14721",
  "source": "ecom",
  "items": [
    {
      "id": "BB12345678",
      "name": "iPhone 5S",
      "price": 6000000,
      "type": "Smartphone",
      "url": "http://merchant.com/cellphones/iphone5s_64g",
      "quantity": 1
    },
    {
      "id": "AZ14565678",
      "name": "Hailee Sneakers Blink Silver",
      "price": 250000,
      "url": "http://merchant.com/fashion/shoes/sneakers-blink-shoes",
      "type": "Sneakers",
      "quantity": 2
    },
    {
      "id": "taxfee",
      "name": "Tax Fee",
      "price": 1000,
      "quantity": 1
    },
    {
      "id": "shippingfee",
      "name": "Shipping Fee",
      "price": 9000,
      "quantity": 1,
      "parent_type": "SELLER",
      "parent_id": "SELLER456"
    },
    {
      "id": "discount",
      "name": "Discount",
      "price": 5000,
      "quantity": 1
    }
  ],
  "sellers": [
    {
      "id": "SELLER123",
      "name": "Sunrise",
      "email": "sunrise@gmail.com",
      "url": "https://onlineshop/seller/sunrise",
      "mobile_number": "+84-123456789",
      "address_detail": {
        "name": "Ngo Thuy Duong",
        "address": "180 Bui Thi Xuan",
        "province": "ho chi minh",
        "district": "Phu Nhuan",
        "ward": "3"
      }
    },
    {
      "id": "SELLER456",
      "name": "Sunshine",
      "email": "sunshine@gmail.com",
      "url": "https://onlineshop/seller/sunshine",
      "mobile_number": "+84-987654321",
      "address_detail": {
        "name": "Ngo Anh Tuan ",
        "address": "180 Ly Tu Trong",
        "province": "ho chi minh",
        "district": "Phu Nhuan",
        "ward": "Vo Thi Sau"
      }
    }
  ],
  "buyers": [
    {
      "name": "Nguyen Van Long",
      "email": "long123@gmail.com",
      "mobile_number": "+84-983123456"
    }
  ],
  "shipping_addresses": [
    {
      "name": "Nguyen Van Long",
      "address": "100 Nguyen Tu Luc",
      "province": "Ho Chi Minh",
      "district": "Tan Binh",
      "ward": "5",
      "mobile_number": "+84-983123456"
    }
  ],
  "push_url": "https://pushurlofmerchant.com",
  "back_to_store_url": "https://successtransaction.com",
  "cancel_url": "https://cancel.com",
  "ip_address": "123.23.24.11",
  "user_agent": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G960F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36",
  "device_id": "samsung"
}

The Response returns JSON structured like this:


Positive Response (Code 2007 indicate transaction valid for tokenization):
{
    "status": 1,
    "message": "This transaction is ready for tokenization",
    "checkout_url": "https://pay-vn-staging.kredivo.com/signIn?tk=30ce9850-db4d-4742-9f12-e2a32a03bb5",
    "transaction_id": "30ce9850-db4d-4742-9f12-e2a22ad03bb5",
    "code": 2007
}

Neutral Response (Transaction not valid for tokenization, but the user can still check out with 2-click checkout link):
{
    "status": 1,
    "message": "Success",
    "checkout_url": "https://pay-vn-staging.kredivo.com/signIn?tk=e8c186c6-9221-4175-a6-4745783c",
    "transaction_id": "e8c186c6-9221-4175-a4b6-4745bb783c"
}

Negative response:
{
    "status": 2012,
    "message": "Invalid Merchant"
}


Request Body

Name Type Description
server_key String Required. Each merchant will have server_key generated by Kredivo
tenure Integer Required. You can set default value with 1 or 12. Payment term chosen by the customer (1, 3, 6, 12)
tokenize_user Boolean Only send this with True if you want to tokenize the user. You will get user_token when the transaction status is settled.
client_user_key String Required. Should be unique per user on client side. For example you can use the user's email address. You must send this information when tokenize new users or when initiating 0-click transactions. Please make sure to send correct combination of client_user_key and user_token to initiate 0-click transactions.
user_token String Optional. If user_token is set, this will be used to authenticate user. Please make sure to send correct combination of client_user_key and user_token to initiate 0-click transaction.
amount Double Required. Total price of the checkout
order_id String Required. Each transaction will have unique order_id generated by merchant
source String Required. Source of transaction. you have to use this id: ecom
items Array of objects Details of the items
sellers Array of objects Optional (compulsory for marketplaces). Details of the seller for marketplaces
buyers Array of objects Required. Details of the customer
shipping_addresses Object Required. Shipping address of the customer. shipping is required for goods (excluding ticket/voucher)
push_url String Required. URI of merchant push-notification API (HTTP POST)
back_to_store_url String Required. URI of your store page. Kredivo will redirect user to this page once a transaction has been completed.
cancel_url String Optional. URI that the customer is sent to if the customer chooses to cancel the Kredivo payment before completion
ip_address String Optional. Metadata for analytic & fraud prevention purposes
user_agent String Optional. Metadata for analytic & fraud prevention purposes
device_id String Optional. Metadata for analytic & fraud prevention purposes
imsi String Optional. Metadata for analytic & fraud prevention purposes

Response

Name Type Description
status Integer Status code
message String Description of status
redirect_url String Redirect URL will be sent for regular transaction. If the user has been authenticated, there will be 2 scenarios: If our security system flags the transaction, we will pass a redirect URL that contains an OTP challenge for the user. Otherwise, we will not pass any redirect URL and you will only need to wait for a callback from Kredivo.
error Message : Description of error status

Product Item

Name Type Description
id String Required. Can be product SKU. Important! for item fee such as: shipping fee, admin fee etc. you have to use this id: shippingfee, adminfee, taxfee, discount, discount_sku, additionalfee, insurancefee, mixpayment, downpayment, downpayment_sku.
name String Required. product name given by merchant
price Double Required. Price of the item
url String Required. URL to the product item on merchant site
image_url String Optional. URL to the product item image
type String Required. Product category.
quantity Integer Required. Quantity of the item bought

Buyers

Name Type Description
name String Required.
email String Required.
mobile_number String Required.

Address

Name Type Description
name String Required.
address String Required.
province String Required.
district String Required.
ward String Required.
mobile_number String Required.

Sellers

Name Type Description
id String Required. Seller's Id
name String Required. Seller's name
url String Required. Seller's url
email String Required. Seller's email
mobile_number String Optional. Seller's mobile number
address_detail Address Required. Seller's residential address

HTTP(S) Header

Name Type Description
Content-Type String application/json
Accept String application/json

Confirm Transaction

In this tutorial you will learn how to confirm that you have received and created an order in your system. This confirmation is needed in response to a push notification from Kredivo, indicating that the user has completed the transaction. Once you have received the push notification, you should update the status of the transaction.

1. Receive notification from Kredivo

Once a consumer has completed a purchase, Kredivo will inform you via a POST request. The POST request will be made to the push notification URI you provided when you created the checkout order.

HTTP Notification example of transaction:

{
  "amount": "1000000.0",
  "discount_amount": "200000.0",
  "disbursed_amount": "800000.0",
  "tenure": 1,
  "trx_status": "pending",
  "order_id": "KD125262",
  "transaction_time": 1501846094,
  "transaction_id": "fadee4e5-99a2-48d6-952d-007f3fa508e8",
  "signature_key": "o5KZPDcxgEA9QutAVcIQwE3suQRkTEIA1VXcoHp7KaWJnpH",
  "message": "pending merchant’s confirmation",
  "voucher_code": "PROMO123"
}

Response Body

Name Type Description
transaction_id String Transaction Id given by Kredivo
trx_status String Transaction status:
pending: Transaction is successfully verified by Kredivo, pending for merchant to call update API to confirm and allow the transaction to be finalized (Please only call update API when you receive "pending" status from push notification
failed: Transaction failed (e.g Merchant did not called Update API within 30 seconds)
denied: Transaction denied by Kredivo (due to insufficient limit, user has overdue debt, etc.)
transaction_time UNIX timestamp (epoch) Timestamp of transaction
tenure Integer Payment term by the customer (1, 3, 6, 12)
order_id String Order Id given by merchant
amount String The transaction amount
discount_amount String Discount amount applied at Kredivo's checkout page.
disbursed_amount String The amount disbursed to the merchant, equal to the amount sent by the merchant in checkout/init API minus the discount_amount. Note: The amount mentioned in the push notification is the final amount (after deducting the shortfall downpayment)
signature_key String Signature key to validate if the notification is originated from Kredivo.
message String message from Kredivo (if any)
voucher_code String Voucher code used by user (if any)

2. Merchant Response

merchant response should be in JSON, structured like this:

{
  "status": "OK",
  "message": "Message from merchant if any"
}

3. Confirm the order status

Once you receive a push notification from Kredivo with trx_status "pending", that means Kredivo has already approved the transaction. You need to call Update API to Confirm and Approve the transaction.

Using the API: POST /checkout/update

The Request JSON structured like this:

{
  "signature_key": "Lrgsmk09S0f8biAf/bYGrfDXJXvk7ftLMZ3L1b4o7+4LxARUGA9e1wsA64OTE33eiV7ULiOv/ZPy4SJ7TDT9ugxECGLtuMF65cmZyLLkaLY=",
  "transaction_id": "9ce1596f-bd4e-4fa2-b49f-3537de3f4128",
  "status": "settled"
}

Example response after call API update:

{
  "status": "settlement",
  "message": "Success",
  "tenure": 1,
  "transaction_time": 1645289475,
  "order_id": "B21145",
  "amount": "4000000.0",
  "discount_amount": "300000.0",
  "disbursed_amount": "2100000.0",
  "user_token": "XXXX-XXXX"
}

Request Body

Name Type Description
signature_key String Required. Signature key to validate if the notification is originated from Kredivo.
transaction_id String Required. Transaction ID given by Kredivo
status String Required. Transaction status:
settled: Merchant confirm Transaction is successful from merchant side
failed: Merchant confirm Transaction is failed from merchant side

Response

Name Type Description
status String Transaction status:
settlement: Transaction is successful
pending: User has not completed the transaction
denied: Transaction has been denied by Kredivo
cancel: Transaction has been cancelled by merchant
failed: Merchant fails to call confirm API within 30 seconds
message String Description of status
tenure Integer Payment term chosen by the customer (1, 3, 6, 12)
transaction_time UNIX timestamp (epoch) Timestamp of transaction
order_id String Order ID given by merchant
amount Double Transaction amount
user_token string user_token sent from Kredivo to tokenize the user.

4. Settle an order in your system

You should now settle the order in your system if transaction*status from the response is _SETTLED*.

Get User Credit Details

Once the user is tokenized, you can then call this API to know about the remaining limit, account status, and account type of the user. You will need the user token to call this API.

Using the API: POST /get_credit_details

The Request JSON structured like this:

{
  "server_key": "ABCD-XXXX-1234",
  "user_token": "XXXX-YYYY"
}

Request Body

Name Type Description
server_key String Mandatory
user_token String Mandatory. user_token sent from Kredivo to tokenize the user.

Response

{
  "status": 1,
  "message": "Success",
  "limit": {
    "1": 3449094,
    "3": 9618221,
    "6": 18305674,
    "12": 23500000
  }
}

Negative response JSON should be structured like this:

{
  "status": 2012,
  "message": "Invalid Merchant"
}

Success Response

Name Type Description
status Integer Status code
message String Description of status
limit Object Detail of user credit details

Limit

Name Type Description
tenure string Possible values: 1, 3, 6, 12
remaining_limit integer remaining user limit for each tenure

Error Response

Name Type Description
status String Status code
message String Error message

Tokenize Kredivo Account

We highly recommend tokenizing the users along with the transaction using the 0 click check out flow (reference to Initiate 0-click Checkout).

This will result in a higher tokenization and transaction rate. However, if you wish to tokenize the user separately from the transaction, you can use this API instead to tokenize the user. A push notification will be sent to your callback url with the user_token.

To tokenizing the user with Kredivo, you will need to call user/tokenize/init API.

Using the API: POST /user/tokenize/init

The Request JSON structured like this:

{
  "client_user_key": "6d0a32af-60c0-492d-bbe0-55e48118a296",
  "server_key": "85c1c3086f8d448682ff5ff98149b271",
  "callback_url": "https://api-merchant.io/tokenize/callback",
  "back_to_store_url": "https://api-merchant.io/user/tokenize",
  "signature_key": "3fb0eb199aa5c747c43f36319896af83a03277a7"
}

The Response JSON structured like this:

Positive Response
{
  "status": 1,
  "message": "success",
  "tokenize_url": "https://pay-vn.kredivo.com/signIn?cid=6d0a32af-60c0-492d-bbe0-55e48118a296"
}

Negative Response (Invalid server_key):
{
  "status": 2012,
  "message": "Invalid Merchant"
}

Negative Response (Client_user_key and user_token already exists and status of Tokenization is Active):
{
  "status": 2009,
  "message": "Sorry, There's a conflict in tokenization request"
}

Negative Response (Invalid signature_key):
{
  "status": 2030,
  "message": "Invalid Signature Key"
}

Request Body

Name Type Description
client_user_key String Required. Should be unique per user on merchant side. For example you can use user external id.
server_key String Required. Each merchant will have server_key generated by Kredivo.
callback_url String Required. URI of your store for Kredivo sending information about user tokenization process.
back_to_store_url String Required. URI of your store page. Kredivo will redirect user to this page once a process has been completed (Success or Failed).
signature_key String Required. Signature key to validate if the request is originated from Merchant. Value: sha1(server_key={merchant_server_key}&client_user_key={merchant_client_user_key}&callback_url={merchant_callback_url})

Success Response Body

Name Type Description
status String Status code.
message String Detail status.
tokenize_url String Kredivo URI page for open the login page for user making tokenization.

Failed Response Body

Name Type Description
status String Status code.
message String Detail status.

Push Notif

Once Kredivo has received and processed the tokenization request from the users, we will send a push notification to your callback url to notify the result.

The Success Request JSON structured like this:

{
  "client_user_key": "6d0a32af-60c0-492d-bbe0-55e48118a296",
  "user_token": "eaeb2c20-8321-4e4f-9344-21c06dbe27ef",
  "status": "success",
  "message": "Tokenization Success"
}

The Failed Request JSON structured like this:

{
  "client_user_key": "6d0a32af-60c0-492d-bbe0-55e48118a296",
  "status": "failed",
  "message": "Wallet is inactive"
}

Push Notif Request Body

Kredivo expect Merchants should accept this request in their callback_url

Name Type Description
status string Status of tokenization process. Value can be success or failed.
message string Detail information that explain status, e.g.. Tokenization Success, Wallet is inactive, Max OTP Attempt, etc.
client_user_key String The user identifier when making tokenization.
user_token string This will be used to authenticate user when making 0-click transaction. We return only if status is success.

Push Notif Response Body

It's expected for merchant to send below response when merchant server already received the notification from Kredivo server.

Name Type Description
status integer Please send us the status code as followed: 9100 (Success), 9200 (Failed to updated tokenize status in merchant side), 9999 (Others)
message string Description of status

Offline Checkout

This is the offline checkout feature suitable for app based platform.

First, you will need to call the checkout API by passing all the required parameters. If successful, the user will have a button to checkout the order. There are at least 3 components that are required to obtain the checkout page:

You will need a server_key to interact with the Kredivo server. Please send an email to merchops@finaccel.co to sign up as an Kredivo merchant and get the server_key.

You will need a dealer_code,a submerchant unique ID to initiate an offline checkout. Please send an email to merchops@finaccel.co to add submerchants to your group and get the dealer code.

Initiate Offline Checkout

To initiate offline checkout with Kredivo, you will need to call checkout/init API.

Using the API: POST /checkout/init

The Request JSON structured like this:

{
  "server_key": "MEJ4FLRc74UU64cxCF8Z3HYSpPctD7",
  "dealer_code": "SF241290",
  "tenure": 1,
  "expiry_time": 1708489655,
  "amount": 1400000,
  "source": "offline",
  "order_id": "KD14723",
  "items": [
    {
      "id": "items",
      "name": "Xiaomi pocophone",
      "price": 1500000,
      "type": "Smartphone",
      "quantity": 1,
      "url": "https://tokopedia.com/barang/anu"
    },
    {
      "id": "downpayment_SKU",
      "name": "Down Payment",
      "price": 200000,
      "quantity": 1
    },
    {
      "id": "item_001",
      "name": "Xiaomi pocophone",
      "price": 100000,
      "type": "Smartphone",
      "quantity": 1,
      "url": "https://tokopedia.com/barang/anu"
    }
  ],
  "buyers": [
    {
      "name": "Pete Hamill",
      "email": "Morton3@gmail.com",
      "mobile_number": "+84-987668348"
    }
  ],
  "push_url": "https://api-staging-vn.kredivo.com/healthcheck",
  "back_to_store_url": " https://api-staging-vn.kredivo.com",
  "metadata": {}
}

The Response returns JSON structured like this:


Positive Response :
{
    "status": 1,
    "message": "Success",
    "transaction_id": "e54af0b0-ee15-4267-8536-ccb8a9f21ab5",
    "qr_link": "https://finaccel-api-vietnam-staging.s3.amazonaws.com/offline_transaction/documents/qr_image/offline_qr_99713.png"
}

Negative Responses:
Code 2012 - Invalid server key:
- Ensure that server key is the same as given by our team.
{
    "status": 2012,
    "message": "Invalid Merchant"
}

Negative Response
Code 1002 - Invalid Request:
- Ensure that dealer code is registered
- Ensure that expiry time is greater than current time.
- Ensure that the amount is above the minimum required amount.
{
    "status": 1002,
    "message": "Bad request, please check your request."
}

Request Body

Name Type Description
server_key String Required. Each merchant will have server_key generated by Kredivo
tenure Integer Required. You can set default value with 1. Payment term chosen by the customer
expiry_time UNIX timestamp (epoch) Optional. Time until the transaction is expired. Default is 24 hours (1 day)
amount Double Required. Total price of the checkout
order_id String Required. Each transaction will have unique order_id generated by merchant
source String Required. Source of transaction. you have to use this id: offline
items Array of objects Details of the items
buyers Array of objects Required. Details of the customer
push_url String Required. URI of merchant push-notification API (HTTP POST)
back_to_store_url String Required. URI of your store page. Kredivo will redirect user to this page once a transaction has been completed.
metadata Objects Optional. Any valid JSON object will be saved, currently can be filled with user agent for analytic and fraud prevention purposes.

Response

Name Type Description
status Integer Status code
message String Description of status
transaction_id String ID of transaction, generated by Kredivo. Used to follow up transaction.
qr_link String QR for user to scan if they're continuing with the checkout.

Items

Name Type Description
id String Required. Can be product SKU. Important! for item fee such as: shipping fee, admin fee etc. you have to use this id: shippingfee, adminfee, taxfee, discount, discount_sku, additionalfee, insurancefee, mixpayment, downpayment, downpayment_sku.
name String Required. product name given by merchant
price Double Required. Price of the item
type String Required. Product category.
quantity Integer Required. Quantity of the item bought
url String Required. URL to the product item on merchant site
image_url String Optional. URL to the product item image

Buyers

Name Type Description
name String Required.
email String Required.
mobile_number String Required.

HTTP(S) Header

Name Type Description
Content-Type String application/json
Accept String application/json

Confirm Transaction

In this tutorial you will learn how to confirm that you have received and created an order in your system. This confirmation is needed in response to a push notification from Kredivo, indicating that the user has completed the transaction. Once you have received the push notification, you should update the status of the transaction.

1. Receive notification from Kredivo

Once a consumer has completed a purchase, Kredivo will inform you via a POST request. The POST request will be made to the push notification URI you provided when you created the checkout order.

HTTP Notification example of transaction::

{
  "amount": "1200000.0",
  "discount_amount": "200000.0",
  "disbursed_amount": "800000.0",
  "total_downpayment": "200000.0",
  "tenure": 1,
  "trx_status": "pending",
  "order_id": "KD125262",
  "transaction_time": 1501846094,
  "transaction_id": "fadee4e5-99a2-48d6-952d-007f3fa508e8",
  "signature_key": "o5KZPDcxgEA9QutAVcIQwE3suQRkTEIA1VXcoHp7KaWJnpH",
  "message": "pending merchant’s confirmation",
  "metadata": {},
  "voucher_code": "PROMO123"
}

Response Body

Name Type Description
transaction_id String Transaction Id given by Kredivo
trx_status String Transaction status:
pending: Transaction is successfully verified by Kredivo, pending for merchant to call update API to confirm and allow the transaction to be finalized (Please only call update API when you receive "pending" status from push notification
failed: Transaction failed (e.g Merchant did not called Update API within 30 seconds)
denied: Transaction denied by Kredivo (due to insufficient limit, user has overdue debt, etc.)
transaction_time UNIX timestamp (epoch) Timestamp of transaction
tenure Integer Payment term by the customer (1, 3, 6, 12)
order_id String Order Id given by merchant
amount String The transaction amount
discount_amount String Discount amount applied at Kredivo's checkout page.
disbursed_amount String The amount disbursed to the merchant, equal to the amount sent by the merchant in checkout/init API minus the discount_amount. Note: The amount mentioned in the push notification is the final amount (after deducting the shortfall downpayment)
total_downpayment String The amount of downpayment user needs to pay to merchant, equals to the difference in Kredivo User Limit and transaction amount.
signature_key String Signature key to validate if the notification is originated from Kredivo.
message String message from Kredivo (if any)
metadata Object Metadata sent to Kredivo during init checkout
voucher_code String Voucher code used by user (if any)

2. Merchant Response

merchant response should be in JSON, structured like this:

{
  "status": "OK",
  "message": "Message from merchant if any"
}

3. Confirm the order status

Once you receive a push notification from Kredivo with trx_status "pending", that means Kredivo has already approved the transaction. You need to call Update API to Confirm and Approve the transaction.

Using the API: POST /checkout/update

The Request JSON structured like this:

{
  "signature_key": "Lrgsmk09S0f8biAf/bYGrfDXJXvk7ftLMZ3L1b4o7+4LxARUGA9e1wsA64OTE33eiV7ULiOv/ZPy4SJ7TDT9ugxECGLtuMF65cmZyLLkaLY=",
  "transaction_id": "9ce1596f-bd4e-4fa2-b49f-3537de3f4128",
  "status": "settled"
}

Example response after call API update:

{
  "status": "settlement",
  "message": "Success",
  "tenure": 1,
  "transaction_time": 1645289475,
  "order_id": "KD125262",
  "amount": "4000000.0",
  "discount_amount": "300000.0",
  "disbursed_amount": "2100000.0",
  "user_token": null
}

Request Body

Name Type Description
signature_key String Required. Signature key to validate if the notification is originated from Kredivo.
transaction_id String Required. Transaction ID given by Kredivo
status String Required. Transaction status:
settled: Merchant confirm Transaction is successful from merchant side
failed: Merchant confirm Transaction is failed from merchant side

Response

Name Type Description
status String Transaction status:
settlement: Transaction is successful
pending: User has not completed the transaction
denied: Transaction has been denied by Kredivo
cancel: Transaction has been cancelled by merchant
failed: Merchant fails to call confirm API within 30 seconds
expired: Transaction has exceeded the maximum time limit to settle
message String Description of status
tenure Integer Payment term chosen by the customer (1, 3, 6, 12)
transaction_time UNIX timestamp (epoch) Timestamp of transaction
order_id String Order ID given by merchant
amount Double Transaction amount
user_token string Ignore this field for 2-click checkout

4. Settle an order in your system

You should now settle the order in your system if transaction*status from the response is _SETTLED*.

Aborting an order (Offline Transaction Only)

If you want to abort an order, you can call the following API. Note that abort is only for PRE settlement, please use cancellation API once it reached SETTLED status.

Using the API: POST checkout/<transaction_id>/abort

The Request JSON structured like this:

{
  "server_key": "MEJ4FLRc74UU64cxCF8Z3HYSpPctD7",
  "dealer_code": "STORE123123",
  "order_id": "KD125262"
}

Example response after call API update:

{
  "transaction_id": "9ce1596f-bd4e-4fa2-b49f-3537de3f4128"
}

Request Body

Name Type Description
server_key String Required. Each merchant will have server_key generated by Kredivo.
dealer_code String Required. Each submerchant will have dealer_code generated by Kredivo.
order_id String Required. Order ID of transaction given by merchant

Response

Name Type Description
transaction_id String Transaction ID given by Kredivo

Additional APIs

You will find other APIs here that will help you check the transaction status (in case our push notification failed), cancel the transaction, and calculate the interest and payment.

Check Transaction Status

Once your customer is done processing the transaction on their side, you will need to call check transaction status API.

Using the API: POST /transaction/status

The Request JSON structured like this:

{
  "server_key": "8tLHIx8V0N6KtnSpS9Nbd6zROFFJH7",
  "transaction_id": "7401e873-ea77-455e-9f31-4ca2268304dc"
}

Response:

{
  "status": 1,
  "message": "Success",
  "order_id": "K12345",
  "checkout_amount": 4000000.0,
  "tenure": 1,
  "items": [
    {
      "name": "Máy lọc không khí",
      "unit_price": "1900000.0",
      "total_amount": "3800000.0",
      "quantity": 2,
      "sku": "items",
      "sku_type": 0,
      "category": "Smartphone1"
    },
    {
      "name": "Shipping_Fee",
      "unit_price": "200000.0",
      "total_amount": "200000.0",
      "quantity": 1,
      "sku": "shipping_fee",
      "sku_type": 1,
      "category": null
    },
    {
      "name": "Platform Fee",
      "unit_price": "40000.0",
      "total_amount": "40000.0",
      "quantity": 1,
      "sku": "platform_fee",
      "sku_type": 2,
      "category": "Fees"
    }
  ],
  "trx_status": "settlement"
}

Request Body

Name Type Description
server_key String Required. Each merchant will have server_key generated by Kredivo.
transaction_id String Required. Transaction Id given by Kredivo.

Response Body

Name Type Description
status Integer Status code
order_id String Order ID given by merchant
checkout_amount Double Original transaction amount
tenure Integer Payment term chosen by the customer (1, 3, 6, 12)
trx_status String Transaction status:
settlement: Transaction is successful settled
pending: User has not completed the transaction
denied: Transaction has been denied by Kredivo
cancel: Transaction has been cancelled by merchant
failed: Merchant fails to call confirm API within 30 seconds
expired: Transaction has exceeded the maximum time limit to settle
Aborted by User: Transaction has been aborted by user
message String Detail status
items Array of objects Details of the items bought by users

Cancel Transaction

Transaction can be cancelled with this API if transaction has been completed.

Using the API: POST /transaction/cancel

The Request JSON structured like this:

{
  "transaction_id": "7ab07794-8ccf-4406-bd52-91bf6b7e7c03",
  "server_key": "merchant_server_key",
  "reason": "Out of stock",
  "cancelled_by": "merchant_name",
  "amount": 90500,
  "order_id": "KB-3dfa4b15"
}

Request Body

Name Type Description
transaction_id String Required. Transaction Id given by Kredivo
server_key String Required. Each merchant will have server_key generated by Kredivo.
reason String Required. A description that clarifies reason of cancelling the transaction
cancelled_by String Required. Cancellation requester name/ id
amount Integer Optional. If you don't pass this parameter or if you pass a cancellation amount that is equal to the transaction amount, it will be treated as a full cancellation. If the cancellation amount passed is less than the transaction amount, it will be treated as a partial cancellation. If the cancellation amount is bigger than the transaction amount or a 0 or a negative number, we will return an error.
order_id String Required. Order Id given by merchant

Response:


 Positive Response :

{
    "status": 1,
    "message": "API cancel received"
}

 Negative Response:

{
    "status": 2011,
    "message": "Field amount is negative."
}

Response Body

Name Type Description
status Integer Status code
message String Description of status

Kredivo Loan Calculator

This API will give you the breakdown of the monthly payment of Kredivo installment.

Using the API: POST /loan/calculator

The Request JSON structured like this:

{
  "tenure": 1,
  "amount": 1000000,
  "source": "ecom",
  "server_key": "kredivovietnamECOM123"
}

Request Body

Name Type Description
tenure Integer Required. You can set default value with 1. Payment term chosen by the customer (1)
amount Integer Required. Total price of the checkout
source String Required. Source of transaction. you have to use this id: ecom
server_key String Required. Each merchant will have server_key generated by Kredivo

Example Response:

{
  "status": 1,
  "message": "Success",
  "1": {
    "interest_rate": "0%",
    "interest_amount": 0,
    "monthly_installment": 1000000,
    "processing_fee": 10000,
    "processing_fee_rate": "1.0%",
    "initial_amount": 1000000,
    "total_amount": 1000000,
    "payback_amount": 1010000
  }
}

Response Body

Name Type Description
status Integer Status code
message String Description of status
interest_rate String Interest rate on the loan
interest_amount Integer Interest amount of the loan
monthly_installment Integer Amount the customer has to pay each term
processing_fee Integer Processing fee of the loan
processing_fee_rate String Processing fee rate on the loan
initial_amount Integer Checkout amount of the loan
total_amount Integer Total amount of the loan
payback_amount Integer Total amount the customer has to payback

API Error Code

API Init/Checkout response error code

Code Message Description
1 Success Success request
1002 Bad request, please check you request. Bad request, due to duplicate order_id, wrong fields name, invalid dealer_code, expiry_time less than today, invalid amount for installment loans (amount must be greater than 700,000 VND for tenor 3,6, and 12 months)
2012 Invalid Merchant. Invalid Server key
9999 Sorry, something went wrong. Please try again in a few minutes The server encountered an unexpected condition that prevented it from fulfilling the request. Please contact Kredivo Team to verify the errors.

API Confirm Transaction response error code

Code Message Description
1002 Bad request, please check you request Missing mandatory keys, Invalid transaction token, Invalid signature key

API Cancel Transaction response error code

Code Message Description
2011 Field amount is negative Amount is negative
2012 Invalid Merchant Server_key invalid
2013 Transaction id {} amount cancel {} different with co amount {} Cancel amount different with checked out amount from the transaction
2015 Transaction is not settled. Cannot cancel Transaction status is not in settle status
2016 Loan is already cancelled. Cannot cancel Transaction has already been canceled
2017 You can't cancel the transactions that was created more than 20 days Cannot cancel transaction that has been settled more than 20 days
2018 Invalid transaction token Invalid transaction token
9999 Sorry, something went wrong. Please try again in a few minutes The server encountered an unexpected condition that prevented it from fulfilling the request.

API Abort Transaction (Offline Transaction Only) response error code

Code Message Description
2001 Invalid Transaction The given dealer code, transaction_id, dealer_code, or server_key is invalid
2012 Invalid Merchant Server_key invalid
2043 Transaction Expired Transaction already expired in Kredivo system
2046 Abort not Eligible Transaction is not eligible for abort, happens because the transaction already settled / denied / cancelled.
9999 Sorry, something went wrong. Please try again in a few minutes The server encountered an unexpected condition that prevented it from fulfilling the request. Please contact Kredivo Team to verify the errors.

API User Tokenization response error code

Code Message Description
1 Success Success request
2009 Sorry, There's a conflict in tokenization request User already have valid tokenization
2012 Invalid Merchant Server_key invalid
2030 Invalid Signature Key Value of signature key is mismatched
9999 Sorry, something went wrong. Please try again in a few minutes The server encountered an unexpected condition that prevented it from fulfilling the request. Please contact Kredivo Team to verify the errors.

Branding & Visual

Logos

Using Kredivo's logotype generates trust and increases your conversion.

Your website's background

Depending on if you have dark or light background you can get either a blue or white logo.

Width

We recommend that the Kredivo logo displayed at your site is between 100-300 px. Note that you should not add px after the size parameter.

Example:

basic

basic-white

Download Kredivo logo here.

On your frontpage

When showing the different payment alternatives you offer in your store, display our one and only logo. When hovering over the logo shows details on the payment methods available in your store.

On product level

You will increase the conversion for high value products by showing your consumers that they have the ability to pay in installments. Always use our logotype on product level. The logotype is highly recognisable, even in small sizes. For optimal conversion use our payment method widget.

Marketing Resource

What is Merchant Success?

Kredivo team is here to work together with you to identify and solve problems, support and build a long-term mutual relationship, as well as create collaborative campaigns to increase your revenue.

Our product is your "Sales Enabler", meaning that Kredivo helps your customer to buy more and more often. In order to see significant results of our product, we strongly encourage you to implement merchant best practice

Why is this important to implement Merchant Best Practices?

  1. Incremental sales takes time and effort. Acquiring customer that is loyal require time and effort. Kredivo is here to facilitate the process through Merchant Best Practice.

  2. Education is crucial. Instant credit financing is not a familiar concept with many consumers. It is important for merchant to educate and create a good consumer flow within the platform.

  3. Sales enabler engine. "Buy now pay later" and "Installment without credit card" is a very strong message for consumers, allowing them to buy more and more often. Sharing this messages within the platform clearly will help increase sales.

Important Information

  1. Please send all Kredivo related collateral (newsletter, product promotion, social media posting, banner, FAQ) to successops@finaccel.co prior to posting for approval.
  2. For any merchant related inquiries on customer service and payment information please send it to merchant.help@kredivo.com. (Note: this is for merchant related inquiries not consumers related inquiries, in any circumstances this email shall not be given to consumers).
  3. For any consumer related inquiries on our product, technical and payment please let the consumer send these inquiries to support.vn@kredivo.com or call at +84-1900-2525-42 (Note: Merchant is able to relay this email and phone number to consumers)

Other Marketing Resources

Environment Setup

Sandbox

Use credentials below to integrate with our sandbox server.

Credential Description
Domain URL https://api-sandbox-vn.kredivo.com
Server Key Please ask merchops@kredivo.com
Test Account
Username: 900000000
Password: 447462
Transaction OTP: 4567

Production

Use credentials below to integrate with our production server. Only transaction comes to this server will be processed by our server.

Credential Description
End Point Please ask merchops@kredivo.com for live server end point before going live.