ZyloPaydocs

Request IDs

Every response carries a Request-Id. Log it, and quote it to support.

Every response, success or error, carries the ID of the request in two headers:

Request-Id: 6f1c2a9e-3b7d-4c55-9a0e-2d4b8f1e7c30
X-Request-Id: 6f1c2a9e-3b7d-4c55-9a0e-2d4b8f1e7c30

Errors repeat it in the body as error.request_id. ZyloPay's logs for the request carry the same ID, so support can find exactly what happened.

Send your own

You may send your own correlation ID in X-Request-Id: 8-128 characters of A-Z a-z 0-9 . _ : -. ZyloPay uses it as the request ID and returns it. An ID that does not match the format is replaced by one ZyloPay generates.

curl https://zylopay-api.fly.dev/api/v1/balance \
  -H "Authorization: Bearer $ZYLOPAY_SECRET_KEY" \
  -H "X-Request-Id: order-48213.refund-1"

Log it

Log the request ID with every ZyloPay call your systems make, next to your own IDs. In the Node SDK it is on every result and error:

const payment = await zp.payments.retrieve('pay_1042');
console.log(payment.lastResponse.requestId);

try {
  await zp.payments.retrieve('pay_0');
} catch (err) {
  console.error(err.code, err.requestId);
}

Webhook deliveries carry their own IDs instead: ZyloPay-Event-Id and ZyloPay-Delivery-Id.

On this page