Skip to navigation

Resolve which provider a payment would use

Answers “which provider would this use?” without creating anything. The provider is chosen in this order: the customer’s own payment_provider, then the first matching routing rule, then the account default. reason says which step decided, and matched_rule names the rule. Needs providers:read.

Authentication

AuthorizationBearer

A secret key (rl_sk_test_..., rl_sk_live_...) or a restricted key with limited scopes (rl_rk_test_..., rl_rk_live_...). A restricted key can carry agent: true and an expires_at, and is what a coding agent should hold. Keys end in a checksum so secret scanners can recognize them. People create, roll and revoke keys in the dashboard; GET /v1/api_keys lists them, masked.

Request

This endpoint expects an object.
currencystringRequired
customer_idstringOptional
external_customer_idstringOptional
amountintegerOptional
Minor units, for rules that depend on size.
planstringOptional

The plan (ID or key).

billing_countrystringOptional
modeenumOptional

top_up buys credits, subscription starts a plan, payment_method saves a card for postpaid invoices.

Allowed values:

Response

The provider and why.
object"payment_provider_resolution"
providerstring
reasonenum

customer_override: the customer has a payment_provider. routing_rule: the first matching rule chose it. account_default: nothing else matched.

Allowed values:
matched_rulestringOptional

The routing rule that decided. Only when reason is routing_rule.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error