Expire transaction

Expire transaction is triggered to update the transaction_status to expire, when the customer fails to complete the payment. The expired order_id can be reused for the same or different payment methods.

Expire API can be used in both Core API and Snap integrations.

Expire Transaction Method

See sample on the right -- try it yourself!

HTTP MethodEndpointDefinition
POSTBASE_URL/v2/{order_id OR transaction_id}/expireExpire the transaction.

Expire Transaction Response and Notifications

  "status_code": "407",
  "status_message": "Success, transaction has expired",
  "transaction_id": "447e846a-403e-47db-a5da-d7f3f06375d6",
  "order_id": "vtmbill05",
  "payment_type": "echannel",
  "transaction_time": "2015-06-15 13:36:24",
  "transaction_status": "expire",
  "gross_amount": "10000.00"
  "status_code": "202",
  "status_message": "midtrans payment notification",
  "transaction_id": "841c7da8-530b-435a-9f67-c9d632d15537",
  "order_id": "1000176721005355",
  "gross_amount": "698879.00",
  "payment_type": "bank_transfer",
  "transaction_time": "2016-07-04 00:53:55",
  "transaction_status": "expire",
  "permata_va_number": "8778004890127981",
  "signature_key": "f1066b06ec8a4b7d6ffb941fd9772f6df304618e15e02cf17c2914cec12793e19c71653042f7f617b027eae6ecb6759529c67eca9af55264b736408d8b4df2b9"
  "status_code" : "412",
  "status_message" : "Merchant cannot modify the status of the transaction"
JSON AttributeDescriptionType
status_codeStatus code of transaction charge result.String
status_messageDescription of transaction charge result.String
transaction_idTransaction ID given by Midtrans.String
order_idOrder ID specified by you.String
payment_typeThe payment method used by the customer.String
transaction_timeTimestamp of transaction in ISO 8601 format. Time Zone: GMT+7.String
transaction_statusTransaction status after charge credit card transaction. Possible values are
capture : Transaction is accepted by the bank and ready for settlement.
deny: transaction is denied by the bank or FDS.
authorize: Credit card is authorized in pre-authorization feature.
gross_amountTotal amount of transaction in IDR.String
Click Try It! to start a request and see the response here!