DOKU Malaysia API Reference
Home
Products
Products
  • Checkout
  • Payment
  • Cards Payment
DOKU Docs
Home
Products
Products
  • Checkout
  • Payment
  • Cards Payment
DOKU Docs
  1. Cards Payment
  • Introduction
  • Getting Started
    • Create Account
    • Make your first API call
    • Authentication & API Keys
  • Checkout
    • Overview
    • Create Checkout
      POST
    • Retrieve Checkout Status
      GET
  • Payment
    • Overview
    • Create Payment
      POST
    • Get Bank List - FPX
      POST
    • Retrieve Payment Status
      GET
  • Cards Payment
    • Overview
    • Payment Form
      • Request Payment
    • Host-to-Host Payment
      • Check Three D Secure
      • Charge Payment
      • Capture Authorized Payment
    • Request Refund
      POST
    • Unbind Token
      POST
    • Check Status
      GET
  • Payout
    • Overview
    • Inquire Beneficiary Account
      POST
    • Send Payout
      POST
    • Read Payout Status
      GET
    • Read Available Balance
      GET
  • Notification
    • Overview
    • Retry Notification
    • Setup Notification URL
    • Sample Notification - Global
      POST
    • Sample Notification - Cards
      POST
  • Technical Reference
    • Authentication & Integrity
    • Idempotency
    • Data Type
    • Order & Transaction Status
    • Postman Collection
    • Response Code
      • Error Code
      • Payout Response Code
      • Credit Card Acquirer Response Code
    • API Version
      • Create Checkout
      • Create Payment
      • Get Bank List - FPX
      • Retrieve Checkout
      • Retrieve Payment
      • Inquire Beneficiary Account
      • Send Payout
      • Read Payout Status
      • Read Available Balance
    • Signature
      • Signature - Global
        • Prepare Signature Component
        • Generating Signature
        • Validating Signature
        • Sample Code
      • Signature - Cards Payment API
        • Signature Component from Response Header
        • Signature from API Get Method
        • Sample Code
        • Signature Component from Request Header
  1. Cards Payment

Request Refund

POST
/cancellation/credit-card/refund
Environment
Sandbox - https://api-sandbox.doku.com
Production - https://api.doku.com
These are the possible Response Status:
1.
VOID: If the funds has not settled to your bank account. The refund.amount must equal to order.amount, otherwise will fail
2.
PARTIAL_REFUND: If the funds has settled to your bank account, and the refund.amount is less than order.amount
3.
FULL_REFUND: If the funds has settled to your bank account, and the refund.amount is equal to order.amount
Notification will be sent to merchant's configured endpoint URL upon successful refund or void.

Request

Header Params

Body Params application/json

Example
{
    "order": {
        "invoice_number": "INV-20210118-0001"
    },
    "payment": {
        "original_request_id": "b266c265-3d61-4708-9860-c0d5b9a98f8c"
    },
    "refund": {
        "amount": 11
    }
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/cancellation/credit-card/refund' \
--header 'Client-Id: 10791114622547' \
--header 'Request-Id: e71fe02a-bfef-4af9-a6f6-2cf1f03b00e7' \
--header 'Request-Timestamp: 2020-11-18T08:45:42Z' \
--header 'Signature: HMACSHA256=vl9DBTX5KhEiXmnpOD0TSm8PYQknuHPdyHSTSc3W6Ps=' \
--header 'Content-Type: application/json' \
--data '{
    "order": {
        "invoice_number": "INV-20210118-0001"
    },
    "payment": {
        "original_request_id": "b266c265-3d61-4708-9860-c0d5b9a98f8c"
    },
    "refund": {
        "amount": 11
    }
}'

Responses

🟢200OK
application/json
Bodyapplication/json

Example
{
    "order": {
        "invoice_number": "INV-20210118-0001"
    },
    "payment": {
        "original_request_id": "b266c265-3d61-4708-9860-c0d5b9a98f8c"
    },
    "refund": {
        "amount": 11,
        "type": "FULL_REFUND",
        "status": "SUCCESS",
        "message": "Approved",
        "approval_code": "12321"
    }
}
🟠400Bad Request
🔴500Server Error
Modified at 2026-11-02 08:08:29
Previous
Capture Authorized Payment
Next
Unbind Token
Built with