Create a Physical Card
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pinData: {encryptedKey: 'encryptedKey', encryptedPin: 'encryptedPin', iv: 'iv'},
transactionHash: '0x1234567890123456789012345678901234567890123456789012345678901234'
})
};
fetch('https://api.gnosispay.com/api/v1/order/{orderId}/create-card', 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/order/{orderId}/create-card \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pinData": {
"encryptedKey": "encryptedKey",
"encryptedPin": "encryptedPin",
"iv": "iv"
},
"transactionHash": "0x1234567890123456789012345678901234567890123456789012345678901234"
}
'import requests
url = "https://api.gnosispay.com/api/v1/order/{orderId}/create-card"
payload = {
"pinData": {
"encryptedKey": "encryptedKey",
"encryptedPin": "encryptedPin",
"iv": "iv"
},
"transactionHash": "0x1234567890123456789012345678901234567890123456789012345678901234"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gnosispay.com/api/v1/order/{orderId}/create-card"
payload := strings.NewReader("{\n \"pinData\": {\n \"encryptedKey\": \"encryptedKey\",\n \"encryptedPin\": \"encryptedPin\",\n \"iv\": \"iv\"\n },\n \"transactionHash\": \"0x1234567890123456789012345678901234567890123456789012345678901234\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/order/{orderId}/create-card")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pinData\": {\n \"encryptedKey\": \"encryptedKey\",\n \"encryptedPin\": \"encryptedPin\",\n \"iv\": \"iv\"\n },\n \"transactionHash\": \"0x1234567890123456789012345678901234567890123456789012345678901234\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gnosispay.com/api/v1/order/{orderId}/create-card")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pinData\": {\n \"encryptedKey\": \"encryptedKey\",\n \"encryptedPin\": \"encryptedPin\",\n \"iv\": \"iv\"\n },\n \"transactionHash\": \"0x1234567890123456789012345678901234567890123456789012345678901234\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}Physical Card Order
Create a Physical Card
The last step in the physical card creation process.
Note: To apply a coupon code, use the /api/v1/order/{orderId}/attach-coupon endpoint before creating the card.
Validation Requirements:
- User must have completed KYC successfully
- User must have a verified phone number
- User must have name and address set
- User’s country must be supported
- User must not have reached maximum active cards limit
- Safe account should be setup
- User must not have existing pending card orders
- For paid cards, a valid transaction hash is required
POST
/
api
/
v1
/
order
/
{orderId}
/
create-card
Create a Physical Card
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pinData: {encryptedKey: 'encryptedKey', encryptedPin: 'encryptedPin', iv: 'iv'},
transactionHash: '0x1234567890123456789012345678901234567890123456789012345678901234'
})
};
fetch('https://api.gnosispay.com/api/v1/order/{orderId}/create-card', 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/order/{orderId}/create-card \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pinData": {
"encryptedKey": "encryptedKey",
"encryptedPin": "encryptedPin",
"iv": "iv"
},
"transactionHash": "0x1234567890123456789012345678901234567890123456789012345678901234"
}
'import requests
url = "https://api.gnosispay.com/api/v1/order/{orderId}/create-card"
payload = {
"pinData": {
"encryptedKey": "encryptedKey",
"encryptedPin": "encryptedPin",
"iv": "iv"
},
"transactionHash": "0x1234567890123456789012345678901234567890123456789012345678901234"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gnosispay.com/api/v1/order/{orderId}/create-card"
payload := strings.NewReader("{\n \"pinData\": {\n \"encryptedKey\": \"encryptedKey\",\n \"encryptedPin\": \"encryptedPin\",\n \"iv\": \"iv\"\n },\n \"transactionHash\": \"0x1234567890123456789012345678901234567890123456789012345678901234\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/order/{orderId}/create-card")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pinData\": {\n \"encryptedKey\": \"encryptedKey\",\n \"encryptedPin\": \"encryptedPin\",\n \"iv\": \"iv\"\n },\n \"transactionHash\": \"0x1234567890123456789012345678901234567890123456789012345678901234\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gnosispay.com/api/v1/order/{orderId}/create-card")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pinData\": {\n \"encryptedKey\": \"encryptedKey\",\n \"encryptedPin\": \"encryptedPin\",\n \"iv\": \"iv\"\n },\n \"transactionHash\": \"0x1234567890123456789012345678901234567890123456789012345678901234\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the card order.
Example:
"1234"
Body
application/json