Table of Contents
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 https://admin.voomerr.com/api/set_active_card.php
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 #
yaml
POST https://admin.voomerr.com/api/set_active_card.php
Content-Type: application/json
{
"card_id": 1234,
"user_id": 5678
}
Example Response #
json
{
"success": true,
"message": "Card set as active successfully.",
"active_card": 1234
}