Kredivo Checkout API

Initiating a Kredivo installment checkout (2-click, 0-click, QR, EDC).

OpenAPI Specification

kredivo-checkout-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Kredivo Calculator Checkout API
  version: v2
  summary: Merchant-facing installment ("Buy Now, Pay Later") checkout API for Kredivo.
  description: "The Kredivo Checkout API lets an ecommerce store, marketplace, POS or EDC terminal offer\nKredivo installment payment at checkout.\n\nSurfaces documented by Kredivo:\n\n* **2-click Checkout** — merchant posts the cart, receives a `redirect_url`, and sends the\n  shopper to Kredivo to authenticate with phone + PIN + OTP.\n* **0-click Checkout** — once a shopper is tokenized (`tokenize_user: true` /\n  `client_user_key`), later purchases are placed with the stored `user_token`.\n* **QR Checkout** — dynamic (per-transaction) or static (per-store) QR for physical stores.\n* **EDC Checkout** — checkout initiated from a physical EDC terminal, with reversal support.\n* **Additional APIs** — transaction status, full/partial cancellation, and an installment\n  and interest calculator.\n\nEvery operation authenticates with the per-merchant `server_key` carried **in the JSON\nrequest body**, not in a header. Transaction outcomes arrive asynchronously as an HTTP POST\nto the merchant's `push_uri`; the merchant confirms by calling `GET /kredivo/v2/update`\nwith the `transaction_id` and `signature_key` from the notification.\n\nThis description was generated by the API Evangelist enrichment pipeline from Kredivo's\npublished developer documentation at https://doc.kredivo.com/. It is a faithful\ntranscription of the documented request/response surface — it is not published by Kredivo.\n"
  contact:
    name: Kredivo Merchant Operations
    email: merchops@finaccel.co
    url: https://doc.kredivo.com/
  termsOfService: https://kredivo.com/p/in/tos.html
  x-generated: '2026-07-19'
  x-method: generated
  x-source: https://doc.kredivo.com/
servers:
- url: https://sandbox.kredivo.com
  description: Sandbox. Published server key and test account are documented under Environment Setup.
- url: https://{productionHost}
  description: 'Production. Kredivo does not publish the production endpoint; merchants must request it from

    merchops@kredivo.com before going live.

    '
  variables:
    productionHost:
      default: production-endpoint-provided-by-kredivo
      description: Production host supplied by Kredivo merchant operations.
tags:
- name: Checkout
  description: Initiating a Kredivo installment checkout (2-click, 0-click, QR, EDC).
paths:
  /kredivo/v2/checkout_url:
    post:
      operationId: createCheckoutUrl
      tags:
      - Checkout
      summary: Initiate a 2-click or 0-click checkout
      description: 'Creates a Kredivo checkout for the supplied cart and returns a `redirect_url` the merchant

        sends the shopper to. Set `tokenize_user: true` with a `client_user_key` to tokenize the

        shopper for later 0-click purchases; supply an existing `user_token` to attempt a 0-click

        purchase. If the `user_token` is invalid the response still carries a `redirect_url` that

        the merchant should follow to fall back to regular 2-click checkout.

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckoutRequest'
            examples:
              twoClick:
                summary: 2-click checkout
                value:
                  server_key: MEJ4FLRc74UU64cxCF8Z3HYSpPctD7
                  payment_type: 30_days
                  client_user_key: rangge@finaccel.co
                  transaction_details:
                    amount: 6505000
                    order_id: KD14721
                    items:
                    - id: BB12345678
                      name: iPhone 5S
                      price: 6000000
                      type: Smartphone
                      url: http://merchant.com/cellphones/iphone5s_64g
                      quantity: 1
                    - id: taxfee
                      name: Tax Fee
                      price: 1000
                      quantity: 1
                  customer_details:
                    first_name: Rangge
                    last_name: Septyo
                    email: rangge@finaccel.co
                    phone: 081513114262
                  push_uri: https://www.merchantcallback.com/notify
                  back_to_store_uri: https://merchant.com/store
              zeroClick:
                summary: 0-click checkout with a stored user token
                value:
                  server_key: MEJ4FLRc74UU64cxCF8Z3HYSpPctD7
                  payment_type: 30_days
                  tokenize_user: false
                  client_user_key: rangge@finaccel.co
                  user_token: XXXX-XXXX
                  transaction_details:
                    amount: 6505000
                    order_id: KD14721
                    items:
                    - id: BB12345678
                      name: iPhone 5S
                      price: 6000000
                      type: Smartphone
                      url: http://merchant.com/cellphones/iphone5s_64g
                      quantity: 1
                  customer_details:
                    first_name: Rangge
                    email: rangge@finaccel.co
                    phone: 081513114262
                  push_uri: https://www.merchantcallback.com/notify
                  back_to_store_uri: https://merchant.com/store
      responses:
        '200':
          description: 'Checkout created, or an application-level error. Kredivo signals success and failure

            through the `status` field of the body rather than the HTTP status code.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutResponse'
              examples:
                ok:
                  value:
                    status: OK
                    message: ''
                    redirect_url: https://sandbox.kredivo.com/kredivo/v2/signin?tk=XXX
                error:
                  value:
                    status: ERROR
                    error:
                      code: null
                      message: Invalid merchant
                      kind: deprecated
  /offline/v1/init_checkout:
    post:
      operationId: initOfflineCheckout
      tags:
      - Checkout
      summary: Initiate a QR or EDC checkout
      description: 'Initiates an offline (physical store) checkout. With `source: "QR"` Kredivo returns a

        dynamic QR code — as an image URL or as a string, selected by `qr_type` — that the shopper

        scans in the Kredivo app. With `source: "EDC Mobile"` the checkout is initiated from an EDC

        terminal against the shopper''s `mobile_number`.

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OfflineCheckoutRequest'
            examples:
              qr:
                summary: Dynamic QR checkout
                value:
                  server_key: 8tLHIx8V0N6KtnSpS9Nbd6zROFFJH7x
                  amount: 70000
                  source: QR
                  qr_type: IMAGE
                  order_id: 548tIt83saeN
                  sub_merchant_id: KFCSenayanCity
                  push_uri: https://www.merchantcallback.com/notify
                  items:
                  - id: '001'
                    name: Product Name
                    price: 50000
                    quantity: 1
              edc:
                summary: EDC terminal checkout
                value:
                  server_key: 8tLHIx8V0N6KtnSpS9Nbd6zROFFJH7
                  sub_merchant_id: KFCSenayanCity
                  source: EDC Mobile
                  push_uri: https://merchant.com/pushnotif
                  order_id: '12345678912'
                  amount: 15000
                  mobile_number: +62-85210549044
                  terminal_id: WDCMERCHANT0001
      responses:
        '200':
          description: Offline checkout initiated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OfflineCheckoutResponse'
              example:
                status: OK
                message: ''
                transaction_id: bcda87e2-e87b-4b7f-add4-206bb4c1d72c
                order_id: '12345678912'
components:
  schemas:
    Customer:
      type: object
      required:
      - first_name
      - email
      - phone
      properties:
        first_name:
          type: string
        last_name:
          type: string
        email:
          type: string
          format: email
        phone:
          type: string
    CheckoutResponse:
      type: object
      properties:
        status:
          type: string
          enum:
          - OK
          - ERROR
        message:
          type: string
        redirect_url:
          type: string
          description: 'URL to send the shopper to. Omitted when a 0-click checkout completed without shopper

            interaction; present on an invalid user_token so the merchant can fall back to 2-click.

            '
        error:
          $ref: '#/components/schemas/ErrorDetail'
    TransactionDetails:
      type: object
      required:
      - order_id
      - amount
      - items
      properties:
        order_id:
          type: string
          description: Order id given by the merchant.
        amount:
          type: number
          format: double
        items:
          type: array
          items:
            $ref: '#/components/schemas/ProductItem'
    CheckoutRequest:
      type: object
      required:
      - server_key
      - payment_type
      - transaction_details
      - customer_details
      - push_uri
      - back_to_store_uri
      properties:
        server_key:
          type: string
          description: Per-merchant key generated by Kredivo.
        payment_type:
          $ref: '#/components/schemas/PaymentType'
        tokenize_user:
          type: boolean
          description: Set true to tokenize the shopper for later 0-click checkout.
        client_user_key:
          type: string
          description: Merchant-side identifier for the shopper. Required when tokenize_user is true.
        user_token:
          type: string
          description: Existing token for a 0-click checkout.
        transaction_details:
          $ref: '#/components/schemas/TransactionDetails'
        customer_details:
          $ref: '#/components/schemas/Customer'
        sellers:
          type: array
          description: Required for marketplaces.
          items:
            $ref: '#/components/schemas/Seller'
        billing_address:
          $ref: '#/components/schemas/Address'
        shipping_address:
          $ref: '#/components/schemas/Address'
        metadata:
          $ref: '#/components/schemas/Metadata'
        push_uri:
          type: string
          description: Merchant endpoint that receives the asynchronous transaction push notification.
        user_cancel_uri:
          type: string
        back_to_store_uri:
          type: string
        expiration_time:
          type: string
          description: Epoch seconds. Defaults to 24 hours.
    Address:
      type: object
      required:
      - first_name
      - address
      - city
      - postal_code
      - phone
      - country_code
      properties:
        first_name:
          type: string
        last_name:
          type: string
        address:
          type: string
        city:
          type: string
        postal_code:
          type: string
        phone:
          type: string
        country_code:
          type: string
          example: IDN
    OfflineCheckoutResponse:
      type: object
      properties:
        status:
          type: string
          enum:
          - OK
          - ERROR
        message:
          type: string
        transaction_id:
          type: string
        order_id:
          type: string
        qr_url:
          type: string
          description: QR code image URL, returned when qr_type is IMAGE.
        qr_string:
          type: string
          description: QR code string representation, returned when qr_type is STRING.
        error:
          $ref: '#/components/schemas/ErrorDetail'
    PaymentType:
      type: string
      description: Installment tenure chosen by the shopper.
      enum:
      - 30_days
      - 3_months
      - 6_months
      - 9_months
      - 12_months
      - 18_months
      - 24_months
    ProductItem:
      type: object
      description: 'A cart line. Beyond real SKUs, Kredivo reserves the ids `shippingfee`, `adminfee`, `taxfee`,

        `discount`, `additionalfee`, `insurancefee` and `mixpayment` for non-product lines.

        '
      required:
      - id
      - name
      - price
      - quantity
      properties:
        id:
          type: string
          description: SKU, or one of the reserved fee/discount ids.
        name:
          type: string
        price:
          type: number
          format: double
        type:
          type: string
          description: Product category.
        url:
          type: string
          description: Product URL on the merchant site.
        image_url:
          type: string
        quantity:
          type: integer
        parent_type:
          type: string
          enum:
          - SELLER
          - ITEM
        parent_id:
          type: string
          description: Seller or item id this line belongs to.
    ErrorDetail:
      type: object
      description: Kredivo's error envelope. Note the API returns HTTP 200 with status ERROR.
      properties:
        kind:
          type: string
          description: Type of error.
        code:
          type:
          - integer
          - 'null'
          description: Numeric error code. May be null.
        message:
          type: string
    Seller:
      type: object
      description: A marketplace seller. Required when the merchant is a marketplace.
      required:
      - id
      - name
      - email
      - url
      - address
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type: string
          format: email
        url:
          type: string
        legal_id:
          type: string
        address:
          $ref: '#/components/schemas/Address'
    Metadata:
      type: object
      description: Device and network signals used by Kredivo's fraud detection system.
      properties:
        ip_address:
          type: string
        user_agent:
          type: string
        device_id:
          type: string
        imsi:
          type: string
    OfflineCheckoutRequest:
      type: object
      required:
      - server_key
      - amount
      - source
      - order_id
      - push_uri
      properties:
        server_key:
          type: string
        amount:
          type: number
          format: double
        source:
          type: string
          description: QR for a dynamic QR checkout, "EDC Mobile" for an EDC terminal checkout.
          enum:
          - QR
          - EDC Mobile
        qr_type:
          type: string
          description: Requested QR representation. IMAGE returns a QR image URL.
          enum:
          - IMAGE
          - STRING
        order_id:
          type: string
        sub_merchant_id:
          type: string
          description: Identifier of the sub-merchant / outlet.
        push_uri:
          type: string
        mobile_number:
          type: string
          description: Shopper phone number. Used by EDC checkout.
        terminal_id:
          type: string
          description: Optional outlet EDC device identifier.
        sellers:
          $ref: '#/components/schemas/Seller'
        items:
          type: array
          items:
            $ref: '#/components/schemas/ProductItem'
  securitySchemes:
    serverKey:
      type: apiKey
      in: header
      name: server_key
      description: 'NOTE ON MODELLING: Kredivo does not use a header or an HTTP auth scheme. The per-merchant

        `server_key` is sent as a **field in the JSON request body** of every operation, which

        OpenAPI cannot express as a security scheme. This entry documents the credential so tooling

        can see it; the body field `server_key` on each request schema is the real carrier. See

        authentication/kredivo-authentication.yml.

        '
      x-actual-location: request-body
      x-actual-field: server_key
externalDocs:
  description: Kredivo developer documentation
  url: https://doc.kredivo.com/