curl --request POST \
--url https://api-sandbox.finogates.com/v1/platform/card-transfers/cards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"card_number": "4111111111111111",
"exp_month": 12,
"exp_year": 2030,
"name_on_card": "Jane A Doe",
"cvv": "123"
}
'import requests
url = "https://api-sandbox.finogates.com/v1/platform/card-transfers/cards"
payload = {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"card_number": "4111111111111111",
"exp_month": 12,
"exp_year": 2030,
"name_on_card": "Jane A Doe",
"cvv": "123"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
card_number: '4111111111111111',
exp_month: 12,
exp_year: 2030,
name_on_card: 'Jane A Doe',
cvv: '123'
})
};
fetch('https://api-sandbox.finogates.com/v1/platform/card-transfers/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-sandbox.finogates.com/v1/platform/card-transfers/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([
'user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'card_number' => '4111111111111111',
'exp_month' => 12,
'exp_year' => 2030,
'name_on_card' => 'Jane A Doe',
'cvv' => '123'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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-sandbox.finogates.com/v1/platform/card-transfers/cards"
payload := strings.NewReader("{\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"card_number\": \"4111111111111111\",\n \"exp_month\": 12,\n \"exp_year\": 2030,\n \"name_on_card\": \"Jane A Doe\",\n \"cvv\": \"123\"\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-sandbox.finogates.com/v1/platform/card-transfers/cards")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"card_number\": \"4111111111111111\",\n \"exp_month\": 12,\n \"exp_year\": 2030,\n \"name_on_card\": \"Jane A Doe\",\n \"cvv\": \"123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.finogates.com/v1/platform/card-transfers/cards")
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 \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"card_number\": \"4111111111111111\",\n \"exp_month\": 12,\n \"exp_year\": 2030,\n \"name_on_card\": \"Jane A Doe\",\n \"cvv\": \"123\"\n}"
response = http.request(request)
puts response.read_body{
"status_code": 123,
"data": {
"card_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"brand": "<string>",
"last4": "<string>",
"name_on_card": "<string>",
"exp_month": 123,
"exp_year": 123,
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z"
},
"query_generated_time": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Add a Card
Add a card for one of your users. The card starts as pending_approval and becomes active once Finogate approves it. Webhooks: payment_method.card.added now, then payment_method.card.review_approved or .review_rejected. Sandbox test numbers only.
curl --request POST \
--url https://api-sandbox.finogates.com/v1/platform/card-transfers/cards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"card_number": "4111111111111111",
"exp_month": 12,
"exp_year": 2030,
"name_on_card": "Jane A Doe",
"cvv": "123"
}
'import requests
url = "https://api-sandbox.finogates.com/v1/platform/card-transfers/cards"
payload = {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"card_number": "4111111111111111",
"exp_month": 12,
"exp_year": 2030,
"name_on_card": "Jane A Doe",
"cvv": "123"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
card_number: '4111111111111111',
exp_month: 12,
exp_year: 2030,
name_on_card: 'Jane A Doe',
cvv: '123'
})
};
fetch('https://api-sandbox.finogates.com/v1/platform/card-transfers/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-sandbox.finogates.com/v1/platform/card-transfers/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([
'user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'card_number' => '4111111111111111',
'exp_month' => 12,
'exp_year' => 2030,
'name_on_card' => 'Jane A Doe',
'cvv' => '123'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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-sandbox.finogates.com/v1/platform/card-transfers/cards"
payload := strings.NewReader("{\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"card_number\": \"4111111111111111\",\n \"exp_month\": 12,\n \"exp_year\": 2030,\n \"name_on_card\": \"Jane A Doe\",\n \"cvv\": \"123\"\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-sandbox.finogates.com/v1/platform/card-transfers/cards")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"card_number\": \"4111111111111111\",\n \"exp_month\": 12,\n \"exp_year\": 2030,\n \"name_on_card\": \"Jane A Doe\",\n \"cvv\": \"123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.finogates.com/v1/platform/card-transfers/cards")
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 \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"card_number\": \"4111111111111111\",\n \"exp_month\": 12,\n \"exp_year\": 2030,\n \"name_on_card\": \"Jane A Doe\",\n \"cvv\": \"123\"\n}"
response = http.request(request)
puts response.read_body{
"status_code": 123,
"data": {
"card_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"brand": "<string>",
"last4": "<string>",
"name_on_card": "<string>",
"exp_month": 123,
"exp_year": 123,
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z"
},
"query_generated_time": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
- Token URL
- /v1/platform/auth/token
Body
Add a card for one of the platform's users. Sandbox test numbers only.
The user the card belongs to.
Any card number, 12 to 19 digits (spaces and dashes are ignored). In sandbox every card reads as a Visa and its transfers settle, except 4000000000000002, whose transfers are declined. The number is never stored.
12 - 23"4111111111111111"
Expiry month (1-12).
1 <= x <= 1212
Expiry year, four digits.
2000 <= x <= 21002030
Required. The cardholder's name as printed on the card, up to 120 characters. Shown beside the user's KYC name when Finogate reviews a transfer to the card.
"Jane A Doe"
Required. The card's security code (CVV / CVC), 3 or 4 digits. Used once to verify the card and never stored. In sandbox 000 fails the check (card_cvv_mismatch) and the card is not added.
"123"

