Skip to content

Cancel Payment

Cancel or close your payment link even after it being generated to your customer if there some modified detail in your data / order by using this endpoint.

JSON Attributes

NameData TypeRequiredDetails
transaction_idStringYesIfortepay Transaction ID
external_idString(64)YesUnique string from merchant, used in signature
order_idString(255)YesOnly allows '-' for special characters, not unique, may be duplicated
payment_methodStringYesFixed value: wallet
payment_channelStringYesFixed value: SHOPEEPAY

Information

Hostnamehttps://api-stage.ifortepay.id
Path/ewallet/v2/cancel-payment
HTTP MethodPOST

Headers

KeyFormatRequiredValue
Content-Typeapplication/jsonM
AuthorizationStringM
x-req-signatureStringM
x-versionStringMv3

Example

Body raw
json
{
    "transaction_id": "{{ifp_transaction_id}}",
    "external_id": "{{merchant_external_id}}",
    "order_id": "{{order_id}}",
    "payment_method": "wallet",
    "payment_channel": "{{channel_name: SHOPEEPAY}}"
}

Example Request

Body raw
json
curl --location 'https://api-stage.ifortepay.id/ewallet/v2/cancel-payment' \
--header 'Authorization: {{Authorization}}' \
--header 'x-req-signature: {{x-req-signature}}' \
--header 'Content-Type: application/json' \
--header 'x-version: v3' \
--data '{
    "transaction_id": "6e5273ce-4a42-4b80-af94-6ae9aabf8e23",
    "external_id": "29277091582193",
    "order_id": "Wallet-01",
    "payment_method": "wallet",
    "payment_channel": "SHOPEEPAY"
}'

Example Response

Body raw
json
{
  "transaction_id": "6e5273ce-4a42-4b80-af94-6ae9aabf8e23",
  "external_id": "29277091582193",
  "order_id": "Wallet-01",
  "response_code": "00",
  "payment_method": "wallet",
  "payment_channel": "shopeepay",
  "transaction_status": "CANCELED"
}

iFortepay API Documentation