Check Payments Status API


The following endpoint checks the status of a single Payment

/payments/:id/status

Path Paramters

Fieldis required?Description
idmandatoryinteger Unique identifier of the Payment to be retrieved

Example

curl -X GET \
  https://api.durianpay.id/v1/payments/pay_wA2X2Mvm2d4965/status \
  -H 'authorization: [Base64({Your_Server_Key}:)]' \
  -H 'content-type: application/json' \

Response Code : 200

Here is an example of success response

{
    "data": {
        "status": "completed",
        "is_completed": true,
        "signature": "9e892f199d026d06a56669e658a56f264610431d24e8b4d07f7bd46f6d5062d2"
    }
}

Error Response Code : 401

Here is an example error response for unauthorized access

{
    "error": "invalid Authorization header in request",
    "error_code": "DPAY_UNAUTHORIZED_ACCESS"
}

Error Response Code : 500

Here is an example error response for internal server error

{
    "error": "error getting payment status",
    "error_code": "DPAY_INTERNAL_ERROR"
}