Skip to main content
POST
/
merchant
/
payment
/
external_gateway_payment
/
mark_failed
Mark External Gateway Payment As Failed
curl --request POST \
  --url https://api.unibee.dev/merchant/payment/external_gateway_payment/mark_failed \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "externalTransactionId": "<string>",
  "paymentId": "<string>",
  "signature": "<string>",
  "timestamp": 123,
  "failureReason": "<string>",
  "gatewayId": 123
}
'
{
  "code": 123,
  "data": {
    "invoiceId": "<string>",
    "paymentId": "<string>",
    "status": "<string>"
  },
  "merchantId": 123,
  "message": "<string>",
  "redirect": "<string>",
  "requestId": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Mark payment as failed using external gateway result. Auth: OpenAPI + signature (HMAC-SHA256, hex).

externalTransactionId
string<string>
required

External payment transaction id from gateway, used for correlation

paymentId
string<string>
required

The UniBee paymentId

signature
string<string>
required

HMAC-SHA256 hex signature using External Gateway API Key over 'paymentId|externalTransactionId|timestamp'

timestamp
integer<int64>
required

Unix timestamp in seconds, used for signature and anti-replay

failureReason
string<string>

Human-readable failure reason from external gateway

gatewayId
integer<int64>

External gateway id (optional), if omitted will be resolved from paymentId

Response

200 - application/json
code
integer<int>
data
object
merchantId
integer<int64>
message
string<string>
redirect
string<string>
requestId
string<string>