Documentationv6.2

Create Express Package

Create a regular (Express) shipping order through KiriminAja MitraAPI with KA Credit payment support.

POST

This endpoint is used to create Express shipping order requests (pickup or drop-off) to various 3PLs integrated with KiriminAja. Version v6.2 supports payment via KA Credit as an alternative to non-COD payment gateways.

Disclaimer: The APIs for Pos Indonesia, RPX, and Paxel are available separately. Contact the technical team for more information.

KA Credit Note: When making a payment using KA Credit (payment_method: "credit"), make sure your KA Credit balance is at least equal to the total shipping_cost in the request. If your balance is insufficient, the request will be rejected.

Order Flow (Sequence)

sequenceDiagram
participant c as Client
participant kaj as KiriminAja
participant pg as Payment
participant pl as 3PL

c->>kaj: Create Package (COD or NonCOD)
Note over c,kaj: Saat membayar dengan KA Credit,<br/>pastikan saldo Anda minimal<br/>sama dengan shipping_cost.
kaj-->>pg: Create Non-COD Payment (jika perlu)
pg-->>kaj: Confirm Payment (jika non-COD)
kaj->>kaj: Queue Request AWB
kaj->>pl: Create AWB
Note over kaj,pl: Pickup/Drop-Off & COD/NonCOD
pl->>kaj: Confirm AWB Created
kaj->>c: Webhook AWB Confirmed

Request Parameters

Top-Level Payload (Sender Details)

FieldData TypeNullableDescription
addressstring (min:10, max:200)falseSender's full address
namestring (min:1, max:50)falseSender's name
phonestring (min:9, max:13)falseSender's phone number. Must be in the format 08... or 62...
kecamatan_idintegerfalseSender's subdistrict ID
kelurahan_idintegerfalseSender's village ID (for carriers that support sub-districts)
zipcodestring (max:5)trueSender's ZIP code
latitudenumerictruePickup coordinates. Required for Lion & Pos Indonesia
longitudenumerictruePickup coordinates. Required for Lion & Pos Indonesia
platform_namestringtrueApp name for notifications (default: mitra)
schedulestring (YYYY-MM-DD HH:mm:ss)falseEstimated time the package will be ready. Enter any time if all packages are drop-offs
payment_methodenum (credit, qris)truev6.2 NEW Payment method. Enter "credit" to pay with KA Credit. Default: va
pinstring (6 digits)truev6.2 NEW KA Credit account PIN. Required when payment_method = "credit"
packagesarray (min: 1 object)falseSee the Packages Object structure

Packages Object

FieldData TypeNullableDescription
order_idstring (max:20)falsePartner-side order ID. Must use a string prefix (e.g., FEB-1782355684238)
destination_namestring (max:50)falseRecipient's name
destination_phonestring (min:9, max:13)falseRecipient's phone number. Must be in the format 08... or 62...
destination_addressstring (min:10, max:255)falseRecipient's full address (minimum 10 characters to avoid "Bad Address" detection)
destination_province_idintegertrueRecipient's province ID
destination_county_idintegertrueRecipient's county/city ID
destination_subdistrict_idintegerfalseRecipient's subdistrict ID
destination_village_idintegertrueRecipient's village ID
destination_zipcodestring (max:5)trueRecipient's ZIP code
weightinteger (min:1)falsePackage weight in grams
widthinteger (min:1)falsePackage width in cm
lengthinteger (min:1)falsePackage length in cm
heightinteger (min:1)falsePackage height in cm
qtyintegertrueNumber of items in the package (default 1 if empty)
item_namestring (max:255)falseName of the package contents
item_valueinteger (min:1000)falseTotal value of the goods (Rupiah)
shipping_costintegerfalseShipping rate (see Shipping Price API). When payment_method = "credit", this is the amount that will be debited from the KA Credit balance
servicestringfalseShipping carrier code (e.g., jne, jnt, sicepat, posindonesia)
service_typestringfalseService type (e.g., REG23, EZ, CTC, OKE)
package_type_idintegerfalsePackage type (default 7, or 9 for regular packages in v6.2). See https://bit.ly/package_type_id
insurance_amountnumerictrueSee Terms & Conditions
add_costintegertrueAdditional cost (default 0)
codintegerfalseCOD value. Set to 0 for non-COD packages. Cannot be combined with payment_method = "credit"
dropbooleantruetrue = drop-off / cashless, false = pickup
notestring (max:50)trueSpecial notes for the courier

Rules for combining payment_method and cod:

  • payment_method = "credit" applies only to non-COD packages (cod: 0).
  • For COD packages, the system will automatically use the COD settlement scheme; the payment_method field is ignored.

Request Example (KA Credit)

{
  "address": "Kiriminaja Head, Jalan Palagan No 32",
  "name": "Toko Sumber Rejeki",
  "phone": "6281234567890",
  "kecamatan_id": 5788,
  "kelurahan_id": 31554,
  "zipcode": "55581",
  "latitude": -7.765,
  "longitude": 110.378,
  "platform_name": "MitraAPI",
  "payment_method": "credit",
  "pin": "123456",
  "schedule": "2026-06-25 10:00:00",
  "packages": [
    {
      "order_id": "FEB-1782355684238",
      "destination_name": "Lita Ang",
      "destination_phone": "6281567948619",
      "destination_address": "Surabaya Baru, Bandar Surabaya, Lampung Tengah, Lampung, 34159",
      "destination_provinsi_id": 18,
      "destination_kabupaten_id": 225,
      "destination_kecamatan_id": 3175,
      "destination_zipcode": "34159",
      "weight": 1000,
      "width": 30,
      "height": 15,
      "length": 20,
      "shipping_cost": 64000,
      "service": "jne",
      "service_type": "REG23",
      "insurance_amount": 0,
      "add_cost": 0,
      "cod": 0,
      "item_name": "Sepatu",
      "item_value": 250000,
      "package_type_id": 9,
      "drop": false,
      "note": "Sepatu bagus."
    }
  ]
}

Success Response

{
  "status": true,
  "text": "Request pickup berhasil",
  "method": "request_pickup",
  "payment_status": "paid",
  "payment_method": "credit",
  "credit_balance_after": 1936000,
  "qr_url": null,
  "details": [
    {
      "order_id": "FEB-1782355684238",
      "kj_order_id": "OKAFEB178235568",
      "awb": null,
      "service": "jne",
      "service_type": "REG23"
    }
  ],
  "pickup_number": "EPR-1782355684"
}

Response Parameters

FieldData TypeDescription
statusbooleantrue if the request was successfully received
textstringDescriptive message
methodstringName of the method called
payment_statusenum (paid, unpaid, pending)Payment status. paid when KA Credit directly deducts the balance
payment_methodenum (credit, va, cash)Payment method used
credit_balance_afterintegerv6.2 NEW Remaining KA Credit balance after deduction. Only appears when payment_method = "credit"
qr_urlstring | nullPayment QR URL (for non-COD via VA/QRIS). null when using KA Credit
details[].order_idstringPartner-side order ID (echo)
details[].kj_order_idstringKiriminAja internal order ID
details[].awbstring | nullAWB. null initially — will be sent via webhook after AWB is confirmed
details[].servicestringShipping carrier used
details[].service_typestringService type
pickup_numberstringPickup number

Error Response

Saldo KA Credit tidak mencukupi

{
  "status": false,
  "code": 4002,
  "text": "Saldo KA Credit tidak mencukupi. Saldo saat ini Rp1.500. Total kebutuhan Rp64.000.",
  "method": "request_pickup"
}

PIN tidak valid

{
  "status": false,
  "code": 4001,
  "text": "PIN KA Credit tidak valid.",
  "method": "request_pickup"
}

COD digabung dengan KA Credit

{
  "status": false,
  "code": 4003,
  "text": "Paket COD tidak dapat dibayar dengan KA Credit.",
  "method": "request_pickup"
}

Validasi field umum

{
  "status": false,
  "code": 422,
  "text": "The destination kecamatan id field is required.",
  "method": "request_pickup"
}