👥 Customers & VaultCustomers

Get preferred payment rails

Return smart-pick rail recommendations with customer history, mandate state, and margin-aware reasoning.

GET/customers/{id}/preferred-rails

Return smart-pick rail recommendations with customer history, mandate state, and margin-aware reasoning.


Related endpoints

  • GET /customers/{id}/state — Get customer billing state
  • GET /customers/{customerId}/invoices — List customer invoices
  • GET /customers/{customerId}/subscriptions — List customer subscriptions
  • GET /customers/{customerId}/orders — List customer orders
  • GET /customers/{customerId}/payments — List customer payments
  • PUT /customers/external/batch — Batch upsert customers by external ID
  • POST /customers — Create a new customer
  • GET /customers — List customers

Common errors

  • 400 invalid_request — malformed payload or failed validation.
  • 401 authentication_error — missing, invalid, expired, or revoked credential. Codes: authentication_failed, invalid_api_key, expired_api_key, api_key_revoked, session_invalid, merchant_required. Carries a WWW-Authenticate: Bearer challenge.
  • 404 resource_missing — the referenced resource does not exist or is not visible to your key.
x-api-key<token>

Your RevKeen merchant API key. Create and manage keys in Dashboard → Settings → Developer. Use rk_sandbox_* for staging/test and rk_live_* for production. The same key may be sent as Authorization: Bearer <key> if that suits your HTTP client better. A missing, invalid, expired, or revoked key returns 401 with a WWW-Authenticate: Bearer challenge; a valid key without the required scope returns 403.

In: header

Path Parameters

id*string

Customer UUID

Formatuuid

Query Parameters

invoice_id?string

Optional invoice context used to apply invoice-level rail restrictions and amount.

Formatuuid
amount?|

Optional amount in minor units. Use amount_minor for the explicit alias.

Range0 <= value
amount_minor?|

Optional amount in minor units. Overrides invoice total for margin-aware ranking.

Range0 <= value

Response Body

application/json

application/json

application/json

application/json

application/json

Stuck on an error response? Ask the RevKeen assistant to explain it.
curl -X GET "https://api.revkeen.com/v2/customers/11111111-1111-4111-8111-111111111111/preferred-rails?invoice_id=11111111-1111-4111-8111-111111111111&amount=1000" \
  -H "x-api-key: $REVKEEN_API_KEY"

Synthetic documentation data, validated against the response schema; not a live API result.

{  "data": {    "customer_id": "00000000-0000-4000-8000-000000000001",    "invoice_id": "f4c4edb8-11e0-4b33-bcc1-482dc59ebb32",    "amount_minor": 0,    "currency": "string",    "preferred_rails": [      {        "rail": "card",        "available": true,        "reason_if_not": "string",        "last_used_at": "2019-08-24T14:15:22Z",        "mandate_id": "00000000-0000-4000-8000-000000000001",        "mandate_ref": "string",        "rank": 1,        "score": 0,        "reason": "string",        "reasons": [          "string"        ],        "estimated_fee_minor": 0,        "net_after_fees_minor": 0,        "mandate": {          "id": "00000000-0000-4000-8000-000000000001",          "status": "PENDING_LODGEMENT",          "created_at": "2026-09-01T12:00:00Z",          "bureau_suspend_confirmed": true        }      }    ]  }}

Put this endpoint to work