Skip to navigation

Set default payment method

View as Markdown

Sets a payment method as the default for a payee. Only verified payment methods can be set as default.

Path Parameters

ParameterTypeRequiredDescription
payee_idUUIDYesID of the payee
payment_method_idUUIDYesID of the payment method to set as default

Success Responses

Status CodeDescription
200OK - The payment method was successfully set as default

Error Responses

Status CodeError CodeDescription
401AUTHENTICATION_ERRORAuthentication credentials are invalid or missing
403AUTHORIZATION_ERRORYou do not have permission to perform this action
404NOT_FOUNDThe specified payment method or payee was not found
422INVALID_OPERATIONThe payment method cannot be set as default (e.g., not verified)

Authentication

x-api-keystring

RootPay API key sent in the x-api-key header. Keys are environment-scoped: live_* for production, test_* for sandbox.

OR
AuthorizationBearer

Short-lived session JWT from the Session Tokens API. Send as Authorization: Bearer <token>. Accepted on payment-method endpoints for a specific payee or payer; mint tokens with an API key.

Path parameters

payee_idstringRequiredformat: "uuid"
payment_method_idstringRequiredformat: "uuid"

Response

Payment method set as default successfully
dataobject
warningstring or nullOptional