Activate a Card
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gnosispay.com/api/v1/cards/{cardId}/activate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.gnosispay.com/api/v1/cards/{cardId}/activate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gnosispay.com/api/v1/cards/{cardId}/activate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gnosispay.com/api/v1/cards/{cardId}/activate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gnosispay.com/api/v1/cards/{cardId}/activate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gnosispay.com/api/v1/cards/{cardId}/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "Card activated successfully"
}{
"message": "<string>"
}{
"error": "Card has been already activated"
}{
"error": "Internal server error"
}Card Management
Activate a Card
Prerequisites
- Card must have not been activated
- A Safe Account should be set for the authenticated user
If those conditions are met, the card is then activated. The activated time will be the moment that this endpoint was triggered, in UTC.
:::info This action also notifies the user by email :::
:::caution Be sure to have a Safe Account associated with the user. If a Safe Account is not tied to the user the endpoint will fail.
To check if a user has a Safe Account, you can get the User details via GET /api/v1/user and check if there’s at least one safeWallets tied to the user.
A Safe Account can be created via POST /api/v1/account
:::
POST
/
api
/
v1
/
cards
/
{cardId}
/
activate
Activate a Card
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gnosispay.com/api/v1/cards/{cardId}/activate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.gnosispay.com/api/v1/cards/{cardId}/activate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gnosispay.com/api/v1/cards/{cardId}/activate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gnosispay.com/api/v1/cards/{cardId}/activate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gnosispay.com/api/v1/cards/{cardId}/activate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gnosispay.com/api/v1/cards/{cardId}/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "Card activated successfully"
}{
"message": "<string>"
}{
"error": "Card has been already activated"
}{
"error": "Internal server error"
}