Set Active Card

The “set active card” API allows users to set one of their saved payment cards as the active card to use for transactions. This API requires the user to provide their user ID and the ID of the card they wish to set as active. The response will indicate whether the operation was successful or not.

Endpoint #

The Voomerr Set active card endpoint is POST

Request Parameters #

Parameter Name Data Type Required Description
card_id integer Yes The ID of the card to be set active
user_id integer Yes The ID of the user

Response #

Field Data Type Description
success boolean Indicates whether the operation was successful.
message string Contains a message describing the result of the operation.
active_card integer The ID of the card that has been set as the active card for the user. If the operation was not successful, this will be null.

Example Request #

Content-Type: application/json
"card_id": 1234,
"user_id": 5678

Example Response #

"success": true,
"message": "Card set as active successfully.",
"active_card": 1234

Powered by BetterDocs