Skip to content

Latest commit

 

History

History
166 lines (145 loc) · 4.34 KB

transactions.md

File metadata and controls

166 lines (145 loc) · 4.34 KB

Bukalapak Transactions API

Bukalapak Transactions API

List Transactions

Get transactions owned by current user.

  • Use GET http method.
Resource URL
Parameters
  • page (optional). Keywords use to search products.
  • page (optional). Page number, default to 0.
  • per_page (optional). Number of transactions per_page, default to 10.
Example Request
curl -u 67287:lXymG93y83m6RHzZV5FY "https://api.bukalapak.com/v1/transactions.json?page=2"
Example Response
{
  "status":"OK",
  "transactions":[{
    "id":7870,
    "state":"remitted",
    "transaction_id":"130429230001",
    "amount":2340000,
    "shipping_fee":9000,
    "total_amount":2349000,
    "product":{
      "name":"Kamara", "url":"https://www.bukalapak.com/p/kamera/kamera-digital/gglw_-kamara"
    },
    "buyer":{
      "id":31432, "name":"Khairul", "username":"kahirul"
    },
    "seller":{
      "id":62817, "name":"Sayur Kangkung", "username":"sayurkangkung"
    },
    "actions":[]
  },
  {
    "id":7858,
    "state":"paid",
    "transaction_id":"130322140001",
    "amount":150000,
    "shipping_fee":9000,
    "total_amount":159000,
    "product":{
      "name":"pre order Haunted Trail Shirt","url":"https://www.bukalapak.com/p/fashion/men/t-shirt-165/gglu_-pre-order-haunted-trail-shirt"
    },
    "buyer":{
      "id":31432,"name":"Khairul","username":"kahirul"
    },
    "seller":{
      "id":62817,"name":"Sayur Kangkung","username":"sayurkangkung"
    },
    "actions":["deliver"]
  }]
  ,"message":null
}

Get Transaction

Get transaction details owned by current user.

  • Use GET http method.
Resource URL
Parameters
  • id (required). Identifier for transaction being read.
Example Request
curl -u 67287:lXymG93y83m6RHzZV5FY "https://api.bukalapak.com/v1/transactions/7870.json"
Example Response
{
  "status":"OK",
  "transactions":{
    "id":7870,
    "state":"remitted",
    "transaction_id":"130429230001",
    "amount":2340000,
    "shipping_fee":9000,
    "total_amount":2349000,
    "product":{
      "name":"Kamara", "url":"https://www.bukalapak.com/p/kamera/kamera-digital/gglw_-kamara"
    },
    "buyer":{
      "id":31432, "name":"Khairul", "username":"kahirul"
    },
    "seller":{
      "id":62817, "name":"Sayur Kangkung", "username":"sayurkangkung"
    },
    "actions":[]
  }
  ,"message":null
}

Confirm Shipping

Confirm Shipping for Transaction

  • Use POST http method.
  • Requires authentication
Resource URL
Parameters

None

POST request data
  • payment_shipping (required). Attributes of transaction shipping confirmation in JSON. Attributes constructed by following fields:
    • transaction_id (required). Transaction ID
    • shipping_code (required). Shipping receipt code
    • new_courier (optional). Used if courier used other than JNE, TIKI, or POS
Example Request
curl -u 67287:lXymG93y83m6RHzZV5FY -d '{ "payment_shipping": { "transaction_id":"7870", "shipping_code":"1568772840123" } }' https://api.bukalapak.com/v1/transactions/confirm_shipping.json -H "Content-Type: application/json" -X POST
Example Response

Failed example

{
  "status":"ERROR",
	"id":null,
	"message": "Belum ada konfirmasi pembayaran atau konfirmasi pengiriman barang sudah dilakukan"
}

Successfull example

{
	"status":"OK",
	"id":"1315",
	"message": "Konfirmasi pengiriman barang berhasil"
}