RevKeenDocs

Get preferred payment rails

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


Related endpoints

  • 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
  • GET /customers/{id} — Get customer by ID

Common errors

  • 400 invalid_request — malformed payload or failed validation.
  • 401 unauthenticated — missing, malformed, or revoked API key.
  • 404 resource_missing — the referenced resource does not exist or is not visible to your key.
GET
/customers/{id}/preferred-rails
x-api-key<token>

Your RevKeen API key (powered by Unkey). Get it from Dashboard > Settings > API Keys. Use rk_sandbox_* for test mode and rk_live_* for production.

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

curl "https://api.revkeen.com/v2/customers/00000000-0000-0000-0000-000000000000/preferred-rails" \  -H "x-api-key: $REVKEEN_API_KEY"
{
  "data": {
    "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
    "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": "e98a8906-c5df-4f83-89a8-e8197c5fddcb",
        "mandate_ref": "string",
        "rank": 1,
        "score": 0,
        "reason": "string",
        "reasons": [
          "string"
        ],
        "estimated_fee_minor": 0,
        "net_after_fees_minor": 0,
        "mandate": {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "status": "PENDING_LODGEMENT",
          "createdAt": "2019-08-24T14:15:22Z"
        }
      }
    ]
  }
}
Empty
Empty
Empty