curl --request POST \
--url https://api-dev.rain.xyz/v1/issuing/users/{userId}/cards \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"configuration": {
"displayName": "<string>",
"productId": "<string>",
"productRef": "<string>",
"virtualCardArt": "<string>"
},
"bulkShippingGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taxId": "<string>"
}
'import requests
url = "https://api-dev.rain.xyz/v1/issuing/users/{userId}/cards"
payload = {
"configuration": {
"displayName": "<string>",
"productId": "<string>",
"productRef": "<string>",
"virtualCardArt": "<string>"
},
"bulkShippingGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taxId": "<string>"
}
headers = {
"Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
configuration: {
displayName: '<string>',
productId: '<string>',
productRef: '<string>',
virtualCardArt: '<string>'
},
bulkShippingGroupId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
taxId: '<string>'
})
};
fetch('https://api-dev.rain.xyz/v1/issuing/users/{userId}/cards', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-dev.rain.xyz/v1/issuing/users/{userId}/cards",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'configuration' => [
'displayName' => '<string>',
'productId' => '<string>',
'productRef' => '<string>',
'virtualCardArt' => '<string>'
],
'bulkShippingGroupId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'taxId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-dev.rain.xyz/v1/issuing/users/{userId}/cards"
payload := strings.NewReader("{\n \"configuration\": {\n \"displayName\": \"<string>\",\n \"productId\": \"<string>\",\n \"productRef\": \"<string>\",\n \"virtualCardArt\": \"<string>\"\n },\n \"bulkShippingGroupId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"taxId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Api-Key", "<api-key>")
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-dev.rain.xyz/v1/issuing/users/{userId}/cards")
.header("Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"configuration\": {\n \"displayName\": \"<string>\",\n \"productId\": \"<string>\",\n \"productRef\": \"<string>\",\n \"virtualCardArt\": \"<string>\"\n },\n \"bulkShippingGroupId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"taxId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.rain.xyz/v1/issuing/users/{userId}/cards")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"configuration\": {\n \"displayName\": \"<string>\",\n \"productId\": \"<string>\",\n \"productRef\": \"<string>\",\n \"virtualCardArt\": \"<string>\"\n },\n \"bulkShippingGroupId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"taxId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "physical",
"status": "notActivated",
"last4": "<string>",
"expirationMonth": "<string>",
"expirationYear": "<string>",
"limit": {
"amount": 123,
"frequency": "per24HourPeriod"
},
"tokenWallets": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Create a card for a user
Creates a card for a user. For physical cards, the userโs first name and last name must contain only latin characters (A-Z, a-z, spaces and hyphens) without accent marks.
curl --request POST \
--url https://api-dev.rain.xyz/v1/issuing/users/{userId}/cards \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"configuration": {
"displayName": "<string>",
"productId": "<string>",
"productRef": "<string>",
"virtualCardArt": "<string>"
},
"bulkShippingGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taxId": "<string>"
}
'import requests
url = "https://api-dev.rain.xyz/v1/issuing/users/{userId}/cards"
payload = {
"configuration": {
"displayName": "<string>",
"productId": "<string>",
"productRef": "<string>",
"virtualCardArt": "<string>"
},
"bulkShippingGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taxId": "<string>"
}
headers = {
"Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
configuration: {
displayName: '<string>',
productId: '<string>',
productRef: '<string>',
virtualCardArt: '<string>'
},
bulkShippingGroupId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
taxId: '<string>'
})
};
fetch('https://api-dev.rain.xyz/v1/issuing/users/{userId}/cards', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-dev.rain.xyz/v1/issuing/users/{userId}/cards",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'configuration' => [
'displayName' => '<string>',
'productId' => '<string>',
'productRef' => '<string>',
'virtualCardArt' => '<string>'
],
'bulkShippingGroupId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'taxId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-dev.rain.xyz/v1/issuing/users/{userId}/cards"
payload := strings.NewReader("{\n \"configuration\": {\n \"displayName\": \"<string>\",\n \"productId\": \"<string>\",\n \"productRef\": \"<string>\",\n \"virtualCardArt\": \"<string>\"\n },\n \"bulkShippingGroupId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"taxId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Api-Key", "<api-key>")
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-dev.rain.xyz/v1/issuing/users/{userId}/cards")
.header("Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"configuration\": {\n \"displayName\": \"<string>\",\n \"productId\": \"<string>\",\n \"productRef\": \"<string>\",\n \"virtualCardArt\": \"<string>\"\n },\n \"bulkShippingGroupId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"taxId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.rain.xyz/v1/issuing/users/{userId}/cards")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"configuration\": {\n \"displayName\": \"<string>\",\n \"productId\": \"<string>\",\n \"productRef\": \"<string>\",\n \"virtualCardArt\": \"<string>\"\n },\n \"bulkShippingGroupId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"taxId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "physical",
"status": "notActivated",
"last4": "<string>",
"expirationMonth": "<string>",
"expirationYear": "<string>",
"limit": {
"amount": 123,
"frequency": "per24HourPeriod"
},
"tokenWallets": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Authorizations
Path Parameters
Id of the user to create a card for
Body
Card to create
physical, virtual The initial status of the card
notActivated, active, locked, canceled The initial limit of the card, in cents, - this can be changed later
Show child attributes
Show child attributes
An object for configuring the card
Show child attributes
Show child attributes
Shipping address for physical cards. When a bulk shipping group ID is provided, this address is can be used for the final delivery stage from the shipping group delivery address to the end recipient.
Show child attributes
Show child attributes
Unique identifier for a shipping group that consolidates multiple physical cards for delivery to a single address. Required for bulk shipping operations and must be obtained from the /shipping-groups endpoint.
The address that will serve as the billing address for the card. Defaults to shipping address/team address if not explicitly provided
Show child attributes
Show child attributes
Optional tax identification number for the cardholder, used only for physical cards to improve customs acceptance on international orders. It is not required, is never persisted, and is ignored for virtual cards.
1 - 32Response
Successful operation
physical, virtual notActivated, active, locked, canceled Show child attributes
Show child attributes
The name of the wallet that the tokenized card was added to
When the card was created
When the card was last updated