API reference

Create an agent

Merchants can create agent accounts under their organisation.

POSThttps://api.xxpayus.online/api/v1/agents/createMerchant

Idempotency and safe recovery

Agent creation supports an optional Idempotency-Key containing 1–128 ASCII letters, digits, dots, underscores, colons or hyphens. Use a unique key for each intended account creation.

  1. 1Keep the same key and identical request data when recovering an interrupted request.
  2. 2A committed operation returns the original successful account response without creating another account.
  3. 3A pending or uncertain operation must be reconciled. Do not create another account using a different key.
  4. 4A rejected operation cannot dispatch another account using its original key.
  5. 5Only when the response explicitly confirms that account creation was not dispatched and the operation is closed may you initiate a new request with a new key after correcting the failure.

Retrieve provisioning status

GEThttps://api.xxpayus.online/api/v1/agents/provisioning/{id}Merchant

Use the provisioning reference UUID returned by the account creation API. Both endpoints require the agents:create scope and approved Merchant API access.

Operation statuses are pending, committed, rejected and uncertain. Audit statuses are not_required, pending and completed. Foreign and unknown references return HTTP 404.

Never automatically recreate an account after a timeout, uncertain result or reconciliation error. A rejected status alone does not provide a new dispatch authorization.

FieldTypeDescription
emailstring, requiredAgent sign-in email
passwordstring, required6–72 characters
full_namestring, requiredDisplay name
method_feesarray, requiredProvide an array, including an empty array when no explicit method fees are supplied. Applicable omitted fees inherit merchant floors. Explicit fees cannot be below those floors.
tag_fee_percentnumber, optionalTag payment fee percent
Response · 201
{
  "agent_id": "b7e2…",
  "email": "agent@example.com",
  "role": "agent",
  "method_fees": [],
  "tag_fee_percent": 0
}