Kredivo Transactions API

Status, cancellation and reversal of transactions.

OpenAPI Specification

kredivo-transactions-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Kredivo Checkout Calculator Transactions 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: Transactions
  description: Status, cancellation and reversal of transactions.
paths:
  /offline/v1/reversal_transaction:
    post:
      operationId: reverseOfflineTransaction
      tags:
      - Transactions
      summary: Reverse an offline (EDC) transaction
      description: Reverses an offline transaction that has not completed, identified by `order_id`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReversalRequest'
            example:
              order_id: '12345678912'
              server_key: 8tLHIx8V0N6KtnSpS9Nbd6zROFFJH7
      responses:
        '200':
          description: Reversal result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleStatusResponse'
              examples:
                ok:
                  value:
                    message: ''
                    status: OK
                error:
                  value:
                    message: ''
                    status: ERROR
  /kredivo/transaction/status:
    post:
      operationId: checkTransactionStatus
      tags:
      - Transactions
      summary: Check a transaction's status by order ID
      description: 'Polls the authoritative state of a transaction by merchant `order_id`. Documented as the

        fallback when a push notification to `push_uri` fails to arrive.

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionStatusRequest'
            example:
              server_key: 8tLHIx8V0N6KtnSpS9Nbd6zROFFJH7
              order_id: KB-0c40f395
      responses:
        '200':
          description: Transaction state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionStatus'
              example:
                fraud_status: accept
                transaction_time: 1637743030
                order_id: KB-0c40f395
                external_userid: S9JRJ2bGiS4d
                status: OK
                legal_name: Rangge
                message: Transaction is settlement
                amount: '75000.00'
                discount_amount: 0
                transaction_id: 7401e873-ea77-455e-9f31-4ca2268304dc
                payment_type: 30_days
                transaction_status: settlement
  /kredivo/v2/cancel_transaction:
    post:
      operationId: cancelTransaction
      tags:
      - Transactions
      summary: Cancel a transaction in full or in part
      description: 'Cancels a transaction. Omitting `cancellation_amount`, or passing an amount equal to the

        transaction amount, is a full cancellation; a smaller amount is a partial cancellation. An

        amount larger than the remaining cancellable amount, or zero or negative, is rejected.


        `cancellation_id` is the merchant-supplied idempotency key for this operation: one order ID

        may carry several cancellation IDs. When no `cancellation_id` is sent, Kredivo uses the pair

        (`order_id`, `cancellation_amount`) as the uniqueness key, and rejects a repeat of that same

        pair if less than one hour has elapsed since the previous request.

        '
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelTransactionRequest'
            example:
              server_key: 8tLHIx8V0N6KtnSpS9Nbd6zROFFJH7
              transaction_id: 2be7d9ea-ccba-4743-8b92-0f1fc3ec358d
              cancellation_amount: 5000
              cancellation_reason: Out of stock
              cancelled_by: Althea
              cancellation_date: '1512032053'
              order_id: KB-0123456
              cancellation_id: '1234567'
      responses:
        '200':
          description: Cancellation result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleStatusResponse'
              examples:
                ok:
                  value:
                    status: OK
                    message: Succes cancelling transaction by amount
                amountTooLarge:
                  value:
                    status: ERROR
                    error:
                      code: 2415
                      message: Cancellation amount bigger than remaining transaction amount that can be cancelled
                      kind: deprecated
                alreadyCancelled:
                  value:
                    status: ERROR
                    error:
                      code: 1009
                      message: Transaksi sudah dibatalkan.
                      kind: deprecated
components:
  schemas:
    SimpleStatusResponse:
      type: object
      properties:
        status:
          type: string
          enum:
          - OK
          - ERROR
        message:
          type: string
        error:
          $ref: '#/components/schemas/ErrorDetail'
    ReversalRequest:
      type: object
      required:
      - server_key
      - order_id
      properties:
        server_key:
          type: string
        order_id:
          type: string
    TransactionStatusRequest:
      type: object
      required:
      - server_key
      - order_id
      properties:
        server_key:
          type: string
        order_id:
          type: string
    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
    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
    TransactionStatus:
      type: object
      properties:
        status:
          type: string
          enum:
          - OK
          - ERROR
        message:
          type: string
        legal_name:
          type: string
        external_userid:
          type: string
        order_id:
          type: string
        transaction_id:
          type: string
        transaction_time:
          type: integer
          description: UNIX epoch timestamp.
        amount:
          type: string
        discount_amount:
          type: number
        payment_type:
          $ref: '#/components/schemas/PaymentType'
        sub_merchant_id:
          type: string
        user_token:
          type: string
        transaction_status:
          type: string
          description: 'settlement — transaction successful; pending — shopper has not completed the

            transaction; deny — denied by Kredivo; cancel — cancelled by the merchant;

            expire — shopper did not complete, transaction expired.

            '
          enum:
          - settlement
          - pending
          - deny
          - cancel
          - expire
        fraud_status:
          type: string
          description: 'accept — approved by the Fraud Detection System; deny — denied by FDS, the transaction

            automatically fails.

            '
          enum:
          - accept
          - deny
        error:
          $ref: '#/components/schemas/ErrorDetail'
    CancelTransactionRequest:
      type: object
      required:
      - server_key
      - order_id
      - transaction_id
      properties:
        server_key:
          type: string
        order_id:
          type: string
        transaction_id:
          type: string
        cancellation_id:
          type: string
          maxLength: 60
          description: 'Merchant-supplied idempotency key for the cancellation. One order id may have multiple

            cancellation ids. When omitted, (order_id, cancellation_amount) is the uniqueness key and

            a repeat within one hour is rejected.

            '
        cancellation_amount:
          type: integer
          description: Omit or match the transaction amount for a full cancellation; smaller for partial.
        cancellation_reason:
          type: string
        cancelled_by:
          type: string
        cancellation_date:
          type: string
          description: Epoch seconds.
  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/