POST
/
users
/
{user_id}
/
mandates
/
{mandate_id}
/
status
cURL
curl --request POST \
  --url http://localhost:8080/users/{user_id}/mandates/{mandate_id}/status
{
  "account_id": "<string>",
  "amount": {
    "value": 123
  },
  "created_at": "<string>",
  "id": "<string>",
  "last_modified_at": "<string>",
  "max_amount": {
    "value": 123
  },
  "user_id": "012345678901",
  "end_date": "<string>",
  "external_mandate_status": "<string>",
  "external_order_status": "<string>",
  "job_id": "<string>",
  "mandate_id": "<string>",
  "payment_method": "<string>",
  "payment_method_type": "<string>",
  "start_date": "<string>"
}

Path Parameters

user_id
string
required

User ID

mandate_id
string
required

Aarokya internal mandate UUID (mandates.id)

Response

Mandate refreshed from Juspay

account_id
string
required
amount
object
required
created_at
string
required
frequency
enum<string>
required

Debit frequency for a mandate. Mirrors Juspay's wire enum.

Available options:
AS_PRESENTED,
DAILY,
WEEKLY,
MONTHLY,
BIMONTHLY,
QUARTERLY,
HALF_YEARLY,
YEARLY,
ONE_TIME
id
string
required
last_modified_at
string
required
mandate_status
enum<string>
required

Internal mandate lifecycle status — coarse-grained view derived from the raw Juspay status string. Starts at INITIATED the moment a registration row is created (before/while the Juspay session is opened) and advances to PENDING/ACTIVE/etc. as Juspay reports progress.

Available options:
INITIATED,
PENDING,
CREATED,
ACTIVE,
LIVE,
PAUSED,
EXTERNALLY_PAUSED,
FAILED,
CANCELLED,
COMPLETED,
OTHER
max_amount
object
required
user_id
string
required

A validated 12-digit numeric user identifier.

Every external entry point validates:

  • JSON Deserialize runs [UserId::parse] (outer whitespace trimmed, length and digit-only enforced) via #[serde(try_from = "String")].
  • DB FromSql runs [UserId::parse] on every row read.

Display / Deref<Target = str> / AsRef<str> / Into<String> are derived via derive_more — the inner String is pass-through for every read-only borrow, display, and move-out.

Example:

"012345678901"

end_date
string | null
external_mandate_status
string | null
external_order_status
string | null
job_id
string | null
mandate_id
string | null
payment_method
string | null
payment_method_type
string | null
start_date
string | null