curl --request POST \
--url https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/assign \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"cardholder_id": "5135e6cc-28b6-4889-81dc-3b86a09e1395",
"card_number": "4096360800133951",
"card_currency": "USD",
"card_mode": "SINGLE"
}
'import requests
url = "https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/assign"
payload = {
"cardholder_id": "5135e6cc-28b6-4889-81dc-3b86a09e1395",
"card_number": "4096360800133951",
"card_currency": "USD",
"card_mode": "SINGLE"
}
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"x-auth-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-idempotency-key': '<x-idempotency-key>',
'x-auth-token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
cardholder_id: '5135e6cc-28b6-4889-81dc-3b86a09e1395',
card_number: '4096360800133951',
card_currency: 'USD',
card_mode: 'SINGLE'
})
};
fetch('https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/assign', 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-sandbox.uqpaytech.com/api/v1/issuing/cards/assign",
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([
'cardholder_id' => '5135e6cc-28b6-4889-81dc-3b86a09e1395',
'card_number' => '4096360800133951',
'card_currency' => 'USD',
'card_mode' => 'SINGLE'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-auth-token: <api-key>",
"x-idempotency-key: <x-idempotency-key>"
],
]);
$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-sandbox.uqpaytech.com/api/v1/issuing/cards/assign"
payload := strings.NewReader("{\n \"cardholder_id\": \"5135e6cc-28b6-4889-81dc-3b86a09e1395\",\n \"card_number\": \"4096360800133951\",\n \"card_currency\": \"USD\",\n \"card_mode\": \"SINGLE\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("x-auth-token", "<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-sandbox.uqpaytech.com/api/v1/issuing/cards/assign")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"cardholder_id\": \"5135e6cc-28b6-4889-81dc-3b86a09e1395\",\n \"card_number\": \"4096360800133951\",\n \"card_currency\": \"USD\",\n \"card_mode\": \"SINGLE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/assign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-idempotency-key"] = '<x-idempotency-key>'
request["x-auth-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cardholder_id\": \"5135e6cc-28b6-4889-81dc-3b86a09e1395\",\n \"card_number\": \"4096360800133951\",\n \"card_currency\": \"USD\",\n \"card_mode\": \"SINGLE\"\n}"
response = http.request(request)
puts response.read_body{
"card_id": "c0cef051-29c5-4796-b86a-cd5b684bfad7",
"card_order_id": "c0cef051-29c5-4796-b86a-cd5ee34bfad7",
"create_time": "2024-03-21T17:17:32+08:00",
"card_status": "ACTIVE",
"order_status": "PENDING"
}Assign Card
Assign a physical card or bulk created virtual card to a cardholder.
curl --request POST \
--url https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/assign \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"cardholder_id": "5135e6cc-28b6-4889-81dc-3b86a09e1395",
"card_number": "4096360800133951",
"card_currency": "USD",
"card_mode": "SINGLE"
}
'import requests
url = "https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/assign"
payload = {
"cardholder_id": "5135e6cc-28b6-4889-81dc-3b86a09e1395",
"card_number": "4096360800133951",
"card_currency": "USD",
"card_mode": "SINGLE"
}
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"x-auth-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-idempotency-key': '<x-idempotency-key>',
'x-auth-token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
cardholder_id: '5135e6cc-28b6-4889-81dc-3b86a09e1395',
card_number: '4096360800133951',
card_currency: 'USD',
card_mode: 'SINGLE'
})
};
fetch('https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/assign', 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-sandbox.uqpaytech.com/api/v1/issuing/cards/assign",
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([
'cardholder_id' => '5135e6cc-28b6-4889-81dc-3b86a09e1395',
'card_number' => '4096360800133951',
'card_currency' => 'USD',
'card_mode' => 'SINGLE'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-auth-token: <api-key>",
"x-idempotency-key: <x-idempotency-key>"
],
]);
$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-sandbox.uqpaytech.com/api/v1/issuing/cards/assign"
payload := strings.NewReader("{\n \"cardholder_id\": \"5135e6cc-28b6-4889-81dc-3b86a09e1395\",\n \"card_number\": \"4096360800133951\",\n \"card_currency\": \"USD\",\n \"card_mode\": \"SINGLE\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("x-auth-token", "<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-sandbox.uqpaytech.com/api/v1/issuing/cards/assign")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"cardholder_id\": \"5135e6cc-28b6-4889-81dc-3b86a09e1395\",\n \"card_number\": \"4096360800133951\",\n \"card_currency\": \"USD\",\n \"card_mode\": \"SINGLE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v1/issuing/cards/assign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-idempotency-key"] = '<x-idempotency-key>'
request["x-auth-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cardholder_id\": \"5135e6cc-28b6-4889-81dc-3b86a09e1395\",\n \"card_number\": \"4096360800133951\",\n \"card_currency\": \"USD\",\n \"card_mode\": \"SINGLE\"\n}"
response = http.request(request)
puts response.read_body{
"card_id": "c0cef051-29c5-4796-b86a-cd5b684bfad7",
"card_order_id": "c0cef051-29c5-4796-b86a-cd5ee34bfad7",
"create_time": "2024-03-21T17:17:32+08:00",
"card_status": "ACTIVE",
"order_status": "PENDING"
}Authorizations
The API token for login provided by UQPAY.
Headers
Specifies the sub-account on whose behalf the request is made. This should be set to the account_id, which can be retrieved via the List Connected Accounts endpoint. If omitted or empty, the request is executed using the master account.
More information at Connected Accounts.
A unique identifier (UUID) used to maintain operation idempotency, ensuring that repeated executions of the same operation do not result in unintended effects or duplication. It helps preserve data consistency in the face of network errors, retries, or failures.
Body
Unique identifier for cardholder.
"5135e6cc-28b6-4889-81dc-3b86a09e1395"
Card number.
"4096360800133951"
The currency assigned to the card.
"USD"
Card Mode.
SINGLE, SHARE "SINGLE"
Metadata for the card assignment. When assigning a Personal Visa card, you must provide card_sku_code. Omit metadata for other card products.
Show child attributes
Show child attributes
Response
Assign card successfully.
Unique identifier for the card.
"c0cef051-29c5-4796-b86a-cd5b684bfad7"
ID of the card order.
"c0cef051-29c5-4796-b86a-cd5ee34bfad7"
Create time at which the object was created.
"2024-03-21T17:17:32+08:00"
Card status enum. See the Card lifecycle and statuses guide for more information.
PENDING: The request to create the card has been received and is under review.ACTIVE: The request to create the card was successful and the card is ready to use.FROZEN: All incoming authorization requests will be declined. The card can be reactivated to accept new authorizations.BLOCKED: The card was blocked by UQPAY due to suspicious activity.PRE_CANCEL: The card is scheduled for cancellation and is in a waiting period during which all incoming authorization requests are declined. It transitions toCANCELLEDwhen the waiting period ends.CANCELLED: The card cannot be reactivated from this state, all incoming authorization requests will be permanently declined.LOST: The card has been reported as lost to UQPAY.STOLEN: The card has been reported as stolen to UQPAY.FAILED: The request to create a card using Create Card failed.
PENDING, ACTIVE, FROZEN, BLOCKED, PRE_CANCEL, CANCELLED, LOST, STOLEN, FAILED "ACTIVE"
This field will contain the status of the request after processing.
PENDING-The initial status of the order request.PROCESSING- If this status shall be subject to webhooks notification.SUCCESS- The final status of the order request is successful.FAILED- The final status of the order request is failed.
PENDING, PROCESSING, SUCCESS, FAILED 
