Skip to main content

Update Ramp Intent Status

Manually update the status of a ramp intent. This is useful for cancelling intents from your frontend or marking them as completed after verifying a transaction.

PATCHhttps://api.zenpayz.com/payment/api/v1/ramp-intents/:intentId/status
Bearer · API key

Request

Headers

HeaderDescription
Content-Type
REQUIRED
application/json
x-request-id
OPTIONAL
Custom request ID for tracing
Public Endpoint

This endpoint does not require authentication headers.

Path Parameters

ParameterTypeDescription
intentId
REQUIRED
stringThe ramp intent ID

Body Parameters

ParameterTypeDescription
status
REQUIRED
stringTarget status: active, completed, or cancelled

Status Transitions

Only certain transitions are allowed. Attempting an invalid transition returns a 400 error.

Current StatusAllowed Transitions
createdactive, cancelled, expired
activecompleted, cancelled, expired
completed— (terminal)
expired— (terminal)
cancelled— (terminal)
    ┌──────────┐
│ created │
└──┬───┬───┘
│ │
active cancelled / expired

┌──▼──────┐
│ active │
└──┬──┬───┘
│ │
completed cancelled / expired

(completed, expired, cancelled are terminal)

Response

Success (200 OK)

{
"success": true,
"data": {
"intentId": "ri_1710345678000_a1b2c3d4e5f6g7h8",
"status": "cancelled"
},
"message": "Ramp intent status updated"
}

Response Fields

ParameterTypeDescription
intentId
OPTIONAL
stringThe intent ID
status
OPTIONAL
stringThe updated status

Error Responses

CodeHTTPMessage
BAD_REQUEST400Invalid status transition (e.g. completedactive)
NOT_FOUND404Intent with the given ID does not exist

Examples

# Cancel an intent
curl -X PATCH https://api.zenpayz.com/payment/api/v1/ramp-intents/ri_1710345678000_a1b2c3d4e5f6g7h8/status \
-H "Content-Type: application/json" \
-d '{ "status": "cancelled" }'

# Mark as completed
curl -X PATCH https://api.zenpayz.com/payment/api/v1/ramp-intents/ri_1710345678000_a1b2c3d4e5f6g7h8/status \
-H "Content-Type: application/json" \
-d '{ "status": "completed" }'

Next Steps