Bookandlink Documentations

API Payment Hub > Komoju

Komoju

Before you can integrate with Komoju, you are expected to have a Komoju account and register your Key on the Payment Hub. See Payment Gateway to register.

EnvironmentBASE_URL
Staginghttps://payment-hub.bnlstg.com
Productionhttps://paymenthub.bookandlink.com
#FeatureSupport
1Return to specific URL after success or failed to payYES
2Tokenize credit cardYES
3Tokenize 3ds credit cardYES

Currency

The following is a list of available currencies supported by the Komoju Payment Gateway.

  • JPY - Japanese Yen
  • USD - United States Dollar
  • EUR - Euro (used by the Eurozone)
  • TWD - New Taiwan Dollar
  • KRW - South Korean Won
  • PLN - Polish Złoty
  • GBP - British Pound Sterling
  • HKD - Hong Kong Dollar
  • SGD - Singapore Dollar
  • NZD - New Zealand Dollar
  • AUD - Australian Dollar
  • IDR - Indonesian Rupiah
  • MYR - Malaysian Ringgit
  • PHP - Philippine Peso
  • THB - Thai Baht
  • CNY - Chinese Yuan Renminbi
  • BRL - Brazilian Real
  • CHF - Swiss Franc
  • CAD - Canadian Dollar
  • VND - Vietnamese Dong

Language

Komoju provides a feature to change the language on generated invoices. The following are the languages supported by Komoju. Payment Hub use en - English as default language.

  • en - English
  • ja - Japanese
  • ko - Korean

Payment Method

Komoju provides several payment methods that can be used. This is optional and will use all supported payment methods on your account. The payment method that can be used also depends on your subscription to Komoju.

  • alipay: Alipay (China's leading third-party online payment solution)
  • alipay_hk: Alipay Hong Kong
  • amazon_pay: Amazon Pay (Amazon's online payment processing service)
  • tng: TNG Wallet (a digital wallet service in Hong Kong)
  • gcash: GCash (a mobile wallet in the Philippines)
  • kakaopay: KakaoPay (a mobile payment and digital wallet service in South Korea)
  • truemoney: TrueMoney (a digital payment service in Thailand)
  • dana: Dana (an Indonesian digital wallet and payment platform)
  • au: AU (a Japanese mobile phone network operator)
  • aupay: AU Pay (a mobile payment service provided by AU)
  • bancontact: Bancontact (a Belgian electronic payment method)
  • bank_transfer: Bank transfer
  • banrisul: Banrisul (a Brazilian bank)
  • bit_cash: BitCash (a digital currency in Japan)
  • blik: BLIK (a Polish mobile payment system)
  • credit_card: Credit card
  • credit_card_korea: Credit card (South Korea)
  • credit_card_brazil: Credit card (Brazil)
  • culture_voucher: Culture voucher
  • cvs: Convenience store payment
  • doku_wallet: DOKU Wallet (an Indonesian digital wallet)
  • docomo: NTT Docomo (a Japanese mobile phone operator)
  • dospara: Dospara (a Japanese online retailer)
  • dragonpay: Dragonpay (an online payment platform in the Philippines)
  • enets: eNETS (an online payment gateway in Singapore)
  • epospay: EPOSpay (a payment gateway in Japan)
  • eps: EPS (Electronic Payment Standard in Austria)
  • fpx: FPX (Financial Process Exchange in Malaysia)
  • giropay: Giropay (an online payment system in Germany)
  • grabpayotp: GrabPay OTP (a payment service in Southeast Asia)
  • happy_money: Happy Money (a digital payment platform in South Korea)
  • ideal: iDEAL (an online payment system in the Netherlands)
  • japan_mobile: Japan Mobile payment
  • konbini: Konbini payment (payment at convenience stores in Japan)
  • komoju_pay: Komoju Pay (a payment gateway in Japan)
  • linepay: LINE Pay (a mobile payment service provided by LINE)
  • merpay: Merpay (a mobile payment service in Japan)
  • mobile: Mobile payment
  • multibanco: Multibanco (an interbank network in Portugal)
  • mybank: MyBank (an online payment method in Italy)
  • narvesen: Narvesen (a convenience store chain in Norway)
  • naverpay: Naver Pay (a mobile payment service in South Korea)
  • nanaco: Nanaco (a prepaid card service in Japan)
  • net_cash: NetCash (a digital payment method in South Korea)
  • ovo: OVO (a digital wallet and payment service in Indonesia)
  • pay_easy: PayEasy (an online payment method in Japan)
  • payco: Payco (a digital wallet and payment service in South Korea)
  • paypay: PayPay (a mobile payment service in Japan)
  • paypost: PayPost (a payment service in Japan)
  • paysafe_card: Paysafecard (a prepaid online payment method)
  • paysera: Paysera (an online payment platform)
  • payu: PayU (an online payment service provider)
  • perlas: Perlas (a Lithuanian payment system)
  • pix: PIX (Instant Payment System in Brazil)
  • poli: POLi Payments (an online payment system in Australia and New Zealand)
  • przelewy24: Przelewy24 (an online payment method in Poland)
  • rakutenpay: Rakuten Pay (a mobile payment service provided by Rakuten)
  • sofortbanking: Sofortüberweisung (an online payment method in Germany)
  • softbank: SoftBank payment
  • steam_prepaid_card: Steam Prepaid Card
  • unionpay: UnionPay (a Chinese payment card)
  • web_money: WebMoney (an online payment settlement system)
  • wechatpay: WeChat Pay (a mobile payment service provided by WeChat)
  • paidy: Paidy (a buy now, pay later service in Japan)
  • toss: Toss (a South Korean mobile payment app)

To get available Payment method from your account, you can check in your Komoju dashboard via Payment Methods menu.

Hosted Payment Page

Komoju allows to present hosted payment links via html iframe. Below are several screenshots of the hosted payment link from Komoju.

Iframe Hosted Payment Link
Entire Hosted Payment Link

Tokenize

Tokenize is used to generate tokens based on the user's credit card. Later this token can be used to make payments or charge transactions.

In Payment Hub, this endpoint can be used specifically to create tokens only, or automatically charge transactions.

We recommend that this process be carried out directly from the client page so that the customer's credit card credentials do not pass through your server. This process can be done with your public token or client token as the Authorization header. For the security of your account, use a public token if this process is done via client side.

For Komoju, tokens that have been generated can be use for onetime payment.


Create Token Only

POST: BASE_URL/api/v1/transactions/token

curl --location 'BASE_URL/api/v1/transactions/token' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' \
--header 'Content-Type: application/json' \
--data '{
    "payment_vendor": "65f3b208559e33aa146f7dca",
    "credit_card" : {
        "account_name" : "John Doe",
        "account_number" : "3530111333300000",
        "exp_month" : "12",
        "exp_year" : 2040,
        "cvn" : "123",
        "first_two_digits_pin" : "12",
        "social_id" : "123123",
        "email" : "dev@bookandlink.com",
        "phone" : "+6281xxxxxxxxxxxx"
    },
    "currency" : "KRW"
}
<html>

  <body>
    <button onclick="generateToken()">Generate Token</button>
  </body>

  <script>
    async function generateToken() {
      var   public_key = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9";
      const token      = await fetch('BASE_URL/api/v1/transactions/token', {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          'Authorization': `Bearer ${public_key}`,
        },
        body: JSON.stringify({
          "payment_vendor": "66021e70b3239bdfc1dcd8e1",
          "credit_card" : {
              "account_name" : "John Doe",
              "account_number" : "3530111333300000",
              "exp_month" : "12",
              "exp_year" : 2040,
              "cvn" : "123",
              "first_two_digits_pin" : "12",
              "social_id" : "123123",
              "email" : "dev@bookandlink.com",
              "phone" : "+6281xxxxxxxxxxxx"
          },
          "currency" : "KRW"
        })
      }).then(r => r.json())
      console.log(token);
    }

  </script>
</html>'
Body Parameters
FieldDescriptionsType
payment_vendorYour payment gateway ID to use.text
credit_card.account_nameCustomer credit card account nametext
credit_card.account_numberCustomer credit card account numbertext
credit_card.exp_monthCustomer credit card expired account monthtext
credit_card.exp_yearCustomer credit card expired account yearnumber
credit_card.cvn3 digit of credit card CVN. It won't be used for domestic Korean cardstext
credit_card.first_two_digits_pin3 digit PIN, required only for KWR currencytext
credit_card.social_id6 digit social id, required only for KWR currency. Filled with date of birth (YYMMDD)text
credit_card.emailCustomer emailtext
currency3 digits Transaction currencytext
Response Parameters
{
    "success": true,
    "message": "Tokenize successfully",
    "data": {
        "token": "tok_65d41a418e22680sfew",
        "status": "verified",
        "transaction": null
    }
}

Create Token & Charge

POST: BASE_URL/api/v1/transactions/token

curl --location 'BASE_URL/api/v1/transactions/token' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' \
--header 'Content-Type: application/json' \
--data '{
    "payment_vendor": "65f3b208559e33aa146f7dca",
    "credit_card" : {
        "account_name" : "John Doe",
        "account_number" : "4000000000001091",
        "exp_month" : "12",
        "exp_year" : 2040,
        "cvn" : "123",
        "first_two_digits_pin" : "12",
        "social_id" : "123123",
        "email" : "dev@bookandlink.com",
        "phone" : "+6281xxxxxxxxxxxx"
    },
    "currency" : "KRW",
    "transaction_detail" : {
        "merchant_ref_code": "84b88501",
        "amount": 1500,
        "service_charge": 0,
        "description": "Invoice 84b88501",
        "currency" : "KRW",
        "first_name": "",
        "last_name": "",
        "mobile": "",
        "email": "",
        "send_email" : true,
        "webhook_url": "https://clientpage.io/webhook/84b88501"
    }
}'
<html>

  <body>
    <button onclick="generateToken()">Generate Token</button>
  </body>

  <script>
    async function generateToken() {
      var   public_key = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9";
      const token      = await fetch('BASE_URL/api/v1/transactions/token', {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          'Authorization': `Bearer ${public_key}`,
        },
        body: JSON.stringify({
          "payment_vendor": "66021e70b3239bdfc1dcd8e1",
          "credit_card"   : {
            "account_name"  : "Test Card",
            "account_number": "4100000000000100",
            "exp_month"     : "08",
            "exp_year"      : 2025,
            "cvn"           : "123"
            "first_two_digits_pin" : "12",
            "social_id" : "123123",
            "email" : "dev@bookandlink.com",
            "phone" : "+6281xxxxxxxxxxxx"
          },
          "currency" : "KRW",
          "transaction_detail" : {
            "merchant_ref_code": "84b88501",
            "amount": 1500,
            "service_charge": 0,
            "description": "Invoice 84b88501",
            "currency" : "KRW",
            "first_name": "",
            "last_name": "",
            "mobile": "",
            "email": "",
            "send_email" : true,
            "webhook_url": "https://clientpage.io/webhook/84b88501"
          }
        })
      }).then(r => r.json())
      console.log(token);
    }

  </script>
</html>
Body Parameters
FieldDescriptionsType
payment_vendorYour payment gateway ID to use text
credit_card.account_nameCustomer credit card account nametext
credit_card.account_numberCustomer credit card account numbertext
credit_card.exp_monthCustomer credit card expired account monthtext
credit_card.exp_yearCustomer credit card expired account yearnumber
credit_card.cvn3 digit of credit card CVN. It won't be used for domestic Korean cardstext
credit_card.first_two_digits_pin3 digit PIN, required only for KWR currencytext
credit_card.social_id6 digit social id, required only for KWR currency. Filled with date of birth (YYMMDD)text
credit_card.emailCustomer emailtext
currency3 digits Transaction currencytext
transaction_detail.merchant_ref_code      This is likely a reference code or identifier assigned by the merchant to uniquely identify a particular transaction. It helps in tracking and managing transactions.mandatory | unique
transaction_detail.amount                 Represents the monetary value of the transaction, indicating the total amount involved in the payment.mandatory | decimal
transaction_detail.service_charge         Refers to any additional charges or fees associated with the service. This could include transaction fees or service charges imposed by the payment processing system.mandatory | decimal
transaction_detail.description            Provides a brief description or comment related to the transaction. It could include details about the purpose of the payment or any other relevant information.mandatory | text
transaction_detail.first_name             Typically the first name of the person involved in the transaction. This could be the first name of the payer or recipient, depending on the context.optional | text
transaction_detail.last_name         Typically the last name of the person involved in the transaction. This could be the first name of the payer or recipient, depending on the context.optional | text
transaction_detail.mobile         Represents the mobile phone number associated with the transaction. It might be used for notifications or communication related to the payment.optional | text
transaction_detail.email                  The email address associated with the transaction. Similar to the mobile number, it could be used for communication and transaction-related notifications.conditional | text

Note: required for Stripe and Reddot
transaction_detail.currency               Indicates the currency in which the transaction is conducted. It specifies the monetary unit, such as USD (U.S. Dollar) or EUR (Euro). Each payment merchant has available currency. To get the available currency, you can check based on Vendor Payment Gateway you used on this transaction.mandatory | text
transaction_detail.send_emailIndicate whether this payment link will be sent to the customer via email or notbool
transaction_detail.webhook_url *       A URL provided by the merchant where real-time updates or notifications about the transaction status can be sent. Webhooks are often used for automated communication.
Once transaction has an update on payment status, Payment Hub will send a signal to this Webhook. You can provide the merchant_ref_code to this webhook URL parameter. When this webhook is called, you can retrieve the transaction status based on merchant_ref_code to get the latest transaction status.
optional | text | GET
Response Parameters
{
    "success": true,
    "message": "Tokenize and Charge Successfully",
    "data": {
        "token": "65d419718e2268001799cd87",
        "status": "verified",
        "transaction": {
            "ID": "65d4197150dab0e83598a14b",
            "ClientId": "65d2ab05d469920aee62896f",
            "Description": "Invoice 84b88501",
            "FirstName": "",
            "LastName": "",
            "Amount": 100000,
            "ServiceCharge": 0,
            "Mobile": "",
            "Currency": "JPY",
            "Email": "",
            "PaymentMethod": null,
            "PaymentVendor": "65f3b208559e33aa146f7dca",
            "Status": "paid",
            "Total": 100000,
            "MerchantRefCode": "84b88501",
            "WebhookUrl": "https://clientpage.io/webhook/84b88501",
            "PaymentFailReason": "",
            "Lang": "",
            "SendEmail": true,
            "Enable3dSecure": false,
            "PaymentLinkType": "",
            "ExpiredAt": "0001-01-01T00:00:00Z",
            "CreatedAt": "2024-02-20T03:16:01.184Z",
            "UpdatedAt": "2024-02-20T03:16:05.429Z",
            "VendorId": "",
            "VendorOrderId": "",
            "VendorPaymentId": "65d419756449350015255ab2",
            "VendorPaidAt": "2024-02-20T03:16:05.429Z",
            "VendorPaymentChannel": "VISA",
            "VendorPaymentMethod": "CREDIT_CARD",
            "Refunds": null
        }
    }
}
Field Descriptions type
tokenRepresent the generated token from credit cardtext
statusRepresent the token status from merchant. It can be "review", "verified", "failed", "fraud", "skipped", "used"
  • review, this token need to verify by client
  • failed, this token is failed to generate
  • review, credit card detected as fraud
  • skipped, authentication was skipped because of a system error such as connection error with the 3D Secure 2.0 authentication server. In this case, you may continue processing the payment or retry authentication.
  • used, token already used to charge will unable to recharged
text
transactionRepresent the transaction that has been charge. Will return null if create token onlyobject

Note:

Transaction status can be "paid" or "failed".

  • paid, If the charge process is successful with the token
  • failed, if the charge process is failed with the token provided

Error Codes
Error CodeMessageDescription
401UnauthorizedThe client token was invalid
400Validation failedInputs are failing validation. The errors field contains details about which fields are violating validation.
500Server went wrongAn internal error occurred

Create 3ds Token

This endpoint is specifically used to generate 3D secure tokens. This endpoint will provide the one time use token, status and verify URL.

We recommend that this process be carried out directly from the client page so that the customer's credit card credentials do not pass through your server. This process can be done with your public token or client token as the Authorization header. For the security of your account, use a public token if this process is done via client side.

POST: BASE_URL/api/v1/transactions/token/3ds

Server side example

curl --location 'BASE_URL/api/v1/transactions/token/3ds' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' \
--header 'Content-Type: application/json' \
--data '{
    
    "payment_vendor": "66021e70b3239bdfc1dcd8e1",
    "credit_card" : {
        "account_name" : "Test Card",
        "account_number" : "4100000000000100",
        "exp_month" : "08",
        "exp_year" : 2025,
        "cvn" : "123",
        "first_two_digits_pin" : "12",
        "social_id" : "123123",
        "email" : "dev@bookandlink.com",
        "phone" : "+6281xxxxxxxxxxxx"
    },
    "amount" : 150,
    "currency" : "KRW",
    "return_url" : "https://example.com/complete"

}'

Client Side Example

<html>

  <body>
    <button onclick="generateToken()">Generate Token</button>
  </body>

  <script>
    async function generateToken() {
      var   public_key = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Ik9iamVjdElEKFwiNjYwMjE4NDBiMzIzOWJkZmMxZGNkOGRiXCIpIiwiR2VuZXJhdGVkQXQiOiIyMDI0LTAzLTI3VDE2OjQzOjE4LjEzOTkwNjYzNiswODowMCIsIlRva2VuVHlwZSI6InB1YmxpYyIsImV4cCI6MTcxMTUzMjU5OH0.sfw-Jg9OcL443VU4q1AXlYE2l8o3aqnHKneCA-xWVLM";
      const token      = await fetch('BASE_URL/api/v1/transactions/token/3ds', {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          'Authorization': `Bearer ${public_key}`,
        },
        body: JSON.stringify({
          "payment_vendor": "66021e70b3239bdfc1dcd8e1",
          "credit_card"   : {
            "account_name"  : "Test Card",
            "account_number": "4100000000000100",
            "exp_month"     : "08",
            "exp_year"      : 2025,
            "cvn"           : "123",
            "first_two_digits_pin" : "12",
            "social_id" : "123123",
            "email" : "dev@bookandlink.com",
            "phone" : "+6281xxxxxxxxxxxx"
          },
          "amount"    : 150,
          "currency"  : "KRW",
          "return_url": "https://example.com/complete"
        })
      }).then(r => r.json())
      console.log(token);
    }

  </script>
</html>
Body Parameters
FieldDescriptionsType
payment_vendorYour payment gateway ID to usetext
credit_card.account_nameCustomer credit card account nametext
credit_card.account_numberCustomer credit card account numbertext
credit_card.exp_monthCustomer credit card expired account monthtext
credit_card.exp_yearCustomer credit card expired account yearnumber
credit_card.cvn3 digit of credit card CVN. It won't be used for domestic Korean cardstext
credit_card.first_two_digits_pin3 digit PIN, required only for KWR currencytext
credit_card.social_id6 digit social id, required only for KWR currency. Filled with date of birth (YYMMDD)text
credit_card.emailCustomer emailtext
amountAmount to chargenumber
currencyIndicates the currency in which the transaction is conducted.text
return_urlThe URL to redirect the user to after a user successfully verify their credit card tokentext
Response Parameters
{
    "success": true,
    "message": "Tokenize successfully",
    "data": {
        "token": "tok_3qvdgryitlvhts9pw6orlb18v",
        "status": "review",
        "auth_url": "https://komoju.com/gpayments_offsite/offsite?token=tok_7vuefq1rcwx98xq92n0cwp9cd"
    }
}
FieldDescriptionstype
tokenRepresent the generated token from credit cardtext
statusRepresent the token status from merchant. It can be "review", "verified", "failed", "fraud", "skipped", or "used"
  • review, this token need to verify by client
  • failed, this token is failed to generate
  • review, credit card detected as fraud
  • skipped, authentication was skipped because of a system error such as connection error with the 3D Secure 2.0 authentication server. In this case, you may continue processing the payment or retry authentication.
  • used, token already used to charge will unable to recharged
text
auth_urlIf the status was review, client can be redirected to this URL to verify the token before charge.text
Error Codes
Error CodeMessageDescription
401UnauthorizedThe client token was invalid
400Validation failedInputs are failing validation. The errors field contains details about which fields are violating validation.
500Server went wrongAn internal error occurred
3ds token verification page

Check Token Status

This endpoint allow you to check the status of token.

GET: BASE_URL/api/v1/transactions/token

curl --location --request GET 'BASE_URL/api/v1/transactions/token' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.GV-Wei86FcFsdWz8wXMgzyBx06zaQLAUTMK4k-QUrz8' \
--header 'Content-Type: application/json' \
--data '{
    "payment_vendor": "65f3eadc9d311dea1a9f1ff8",
    "token" : "tok_8xw3kelmy3yrofmu9yed6oyzm"
}'
Response Parameters
{
    "success": true,
    "message": "Token check result",
    "data": {
        "chargeable": false,
        "description": "The token you requested was in review",
        "status": "review",
        "token": "tok_8xw3kelmy3yrofmu9yed6oyzm"
    }
}
FieldDescriptionstype
chargeableIndicate the token is available to charge or notboolean
descriptionIndicate the description of token statetext
statusRepresent the token status from merchant. It can be "review", "verified", "failed", "fraud", "skipped", "skipped", or "used"
  • review, this token need to verify by client
  • failed, this token is failed to generate
  • review, credit card detected as fraud
  • skipped, authentication was skipped because of a system error such as connection error with the 3D Secure 2.0 authentication server. In this case, you may continue processing the payment or retry authentication.
  • used, token already used to charge will unable to recharged
text
tokenEcho back the token from your payloadtext

Create Charge

If you don't want to automatically charge generated tokens, you can charge them manually via this endpoint.

POST: BASE_URL/api/v1/transactions/charge

curl --location 'BASE_URL/api/v1/transactions/charge' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' \
--header 'Content-Type: application/json' \
--data '{
    "payment_vendor" : "65f3eadc9d311dea1a9f1ff8",
    "token" : "tok_8xw3kelmy3yrofmu9yed6oyzm",
    "transaction_detail" : {
        "merchant_ref_code": "TEST_STG-500000007",
        "amount": 150,
        "service_charge": 0,
        "description": "Invoice TEST_STG-500000007",
        "currency": "JPY",
        "first_name": "",
        "last_name": "",
        "mobile": "",
        "email": "",
        "payment_method" : "",
        "lang": "",
        "send_email" : true,
        "webhook_url": "https://payku.bnlstg.com/hook/payment/TEST_STG-500000007"
    }
}'
Body Parameters
FieldDescriptionstype
payment_vendorYour payment gateway ID to usetext
tokenCredit card token that has been generated from create token endpoint.text
transaction_detailDetailed transaction information that you want to chargeobject
Response Parameters

This endpoint will create payment to current transaction based on merchant_ref_code and will echo back the paid transaction data.

{
    "success": true,
    "message": "Charge Credit Card Successfully",
    "data": {
        "token": "65d434c1644935001525604c",
        "transaction": {
            "ID": "65d4197150dab0e83598a14b",
            "ClientId": "65d2ab05d469920aee62896f",
            "Description": "Invoice 84b88501",
            "FirstName": "",
            "LastName": "",
            "Amount": 150,
            "ServiceCharge": 0,
            "Mobile": "",
            "Currency": "JPY",
            "Email": "",
            "PaymentMethod": null,
            "PaymentVendor": "65f3b208559e33aa146f7dca",
            "Status": "paid",
            "Total": 100000,
            "MerchantRefCode": "TEST_STG-500000007",
            "WebhookUrl": "https://clientpage.io/webhook/84b88501",
            "PaymentFailReason": "",
            "Lang": "",
            "SendEmail": true,
            "Enable3dSecure": false,
            "PaymentLinkType": "",
            "ExpiredAt": "0001-01-01T00:00:00Z",
            "CreatedAt": "2024-02-20T03:16:01.184Z",
            "UpdatedAt": "2024-02-20T03:16:05.429Z",
            "VendorId": "",
            "VendorOrderId": "",
            "VendorPaymentId": "65d419756449350015255ab2",
            "VendorPaidAt": "2024-02-20T03:16:05.429Z",
            "VendorPaymentChannel": "VISA",
            "VendorPaymentMethod": "CREDIT_CARD",
            "Refunds": null
        }
    }
}

Note:

Transaction status can be "paid" or "failed".

  • paid, If the charge process is successful with the token
  • failed, if the charge process is failed with the token provided

Error Codes
Error CodeMessageDescription
401UnauthorizedThe client token was invalid
400Validation failedInputs are failing validation. The errors field contains details about which fields are violating validation.
500Server went wrongAn internal error occurred

Webhook

Webhook is used to obtain real-time transaction data when an invoice is paid and refunded.

Adding hooks can be done via the Komoju dashboard → https://komoju.com/merchant/webhooks_new. To implemented Payment Hub Hook, please adding Payment Hub endpoint as invoice paid hook URL.

Webhook Value:

BASE_URL/api/v1/hook/komoju

For the event list, check the payment.captured, payment.refunded, payment.cancelled, payment.failed, and payment.expired event.

On this page