D
API Reference

Payment API

Endpoint payment status proxy dari Toko Digital ke aplikasi utama Dazo.

Check payment status

POSThttp://localhost:8000/api/payment/check-status/order-id
curl --request POST \
  --url http://localhost:8000/api/payment/check-status/order-id

Route memasang throttle 10,1.

Alur request:

text
POST Toko Digital /api/payment/check-status/<order-id>
  → POST target service /api/payment/check-status/<order-id>
  ← response JSON dan status HTTP target

Target dipilih dari:

EnvironmentVariable
ProductionBACKEND_API_URL_PROD
DevelopmentBACKEND_API_URL_DEV
Default/localBACKEND_API_URL_LOCAL

Response

Jika upstream mengembalikan response, status dan JSON diteruskan. Jika request melebihi timeout atau mengalami exception, endpoint mengembalikan:

json
{
  "error": "Failed to check payment status"
}

dengan HTTP 500.