Crear tarjetas
curl --request POST \
--url https://api.onepay.la/v1/issuing/cards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-idempotency: <x-idempotency>' \
--data '
{
"customer_id": "<string>",
"wallet_id": "<string>",
"nickname": "<string>",
"type": "<string>",
"address": {
"line_1": "<string>",
"line_2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"zip_code": "<string>"
}
}
'import requests
url = "https://api.onepay.la/v1/issuing/cards"
payload = {
"customer_id": "<string>",
"wallet_id": "<string>",
"nickname": "<string>",
"type": "<string>",
"address": {
"line_1": "<string>",
"line_2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"zip_code": "<string>"
}
}
headers = {
"x-idempotency": "<x-idempotency>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-idempotency': '<x-idempotency>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customer_id: '<string>',
wallet_id: '<string>',
nickname: '<string>',
type: '<string>',
address: {
line_1: '<string>',
line_2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
zip_code: '<string>'
}
})
};
fetch('https://api.onepay.la/v1/issuing/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.onepay.la/v1/issuing/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([
'customer_id' => '<string>',
'wallet_id' => '<string>',
'nickname' => '<string>',
'type' => '<string>',
'address' => [
'line_1' => '<string>',
'line_2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'zip_code' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-idempotency: <x-idempotency>"
],
]);
$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.onepay.la/v1/issuing/cards"
payload := strings.NewReader("{\n \"customer_id\": \"<string>\",\n \"wallet_id\": \"<string>\",\n \"nickname\": \"<string>\",\n \"type\": \"<string>\",\n \"address\": {\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"zip_code\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency", "<x-idempotency>")
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.onepay.la/v1/issuing/cards")
.header("x-idempotency", "<x-idempotency>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"<string>\",\n \"wallet_id\": \"<string>\",\n \"nickname\": \"<string>\",\n \"type\": \"<string>\",\n \"address\": {\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"zip_code\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onepay.la/v1/issuing/cards")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-idempotency"] = '<x-idempotency>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_id\": \"<string>\",\n \"wallet_id\": \"<string>\",\n \"nickname\": \"<string>\",\n \"type\": \"<string>\",\n \"address\": {\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"zip_code\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "9e4298cb-ad7b-40f0-929d-a68e20a561c9",
"status": "created",
"last_4": null,
"nickname": null,
"type": "physical",
"customer_id": "9e4298cb-a9a4-476d-8c7d-287c0f1e103b",
"wallet_id": "0195255e-3258-707e-bfaf-3f6807d12d60",
"customer": {
"id": "9e4298cb-a9a4-476d-8c7d-287c0f1e103b",
"first_name": "Rossie",
"last_name": "Rempel",
"email": "",
"phone": "+12259504339",
"document_type": "CC",
"document_number": "72827",
"created_at": "2025-02-20T21:58:05.000000Z",
"is_test": true
},
"address": {
"line_1": "125 Novella Turnpike",
"line_2": "40003 Lang Circle Suite 752",
"state": "Boylefurt",
"city": "Port Alessiaton",
"country": "Zambia"
},
"wallet": {
"id": "0195255e-3258-707e-bfaf-3f6807d12d60",
"balance": 0,
"label": "$0"
}
}
{
"message": "The customer id field is required. (and 7 more errors)",
"code": 10001,
"code_name": "validation_error",
"errors": {
"customer_id": [
"The customer id field is required."
],
"wallet_id": [
"The wallet id field is required."
],
"address": [
"The address field is required."
],
"address.line_1": [
"The address.line 1 field is required."
],
"address.city": [
"The address.city field is required."
],
"address.state": [
"The address.state field is required."
],
"address.zip_code": [
"The address.zip code field is required."
],
"address.country": [
"The address.country field is required."
]
}
}
{
"message": "No se puede generar la operación, genera un token de idempotencia y envíelo en los headers como x-idempotency",
"code": 10003,
"code_name": "idempotency_error"
}
Crear tarjetas
Crea una nueva tarjeta en tu cuenta.
POST
issuing
/
cards
Crear tarjetas
curl --request POST \
--url https://api.onepay.la/v1/issuing/cards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-idempotency: <x-idempotency>' \
--data '
{
"customer_id": "<string>",
"wallet_id": "<string>",
"nickname": "<string>",
"type": "<string>",
"address": {
"line_1": "<string>",
"line_2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"zip_code": "<string>"
}
}
'import requests
url = "https://api.onepay.la/v1/issuing/cards"
payload = {
"customer_id": "<string>",
"wallet_id": "<string>",
"nickname": "<string>",
"type": "<string>",
"address": {
"line_1": "<string>",
"line_2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"zip_code": "<string>"
}
}
headers = {
"x-idempotency": "<x-idempotency>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-idempotency': '<x-idempotency>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
customer_id: '<string>',
wallet_id: '<string>',
nickname: '<string>',
type: '<string>',
address: {
line_1: '<string>',
line_2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
zip_code: '<string>'
}
})
};
fetch('https://api.onepay.la/v1/issuing/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.onepay.la/v1/issuing/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([
'customer_id' => '<string>',
'wallet_id' => '<string>',
'nickname' => '<string>',
'type' => '<string>',
'address' => [
'line_1' => '<string>',
'line_2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'zip_code' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-idempotency: <x-idempotency>"
],
]);
$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.onepay.la/v1/issuing/cards"
payload := strings.NewReader("{\n \"customer_id\": \"<string>\",\n \"wallet_id\": \"<string>\",\n \"nickname\": \"<string>\",\n \"type\": \"<string>\",\n \"address\": {\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"zip_code\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency", "<x-idempotency>")
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.onepay.la/v1/issuing/cards")
.header("x-idempotency", "<x-idempotency>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"<string>\",\n \"wallet_id\": \"<string>\",\n \"nickname\": \"<string>\",\n \"type\": \"<string>\",\n \"address\": {\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"zip_code\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onepay.la/v1/issuing/cards")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-idempotency"] = '<x-idempotency>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_id\": \"<string>\",\n \"wallet_id\": \"<string>\",\n \"nickname\": \"<string>\",\n \"type\": \"<string>\",\n \"address\": {\n \"line_1\": \"<string>\",\n \"line_2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"zip_code\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "9e4298cb-ad7b-40f0-929d-a68e20a561c9",
"status": "created",
"last_4": null,
"nickname": null,
"type": "physical",
"customer_id": "9e4298cb-a9a4-476d-8c7d-287c0f1e103b",
"wallet_id": "0195255e-3258-707e-bfaf-3f6807d12d60",
"customer": {
"id": "9e4298cb-a9a4-476d-8c7d-287c0f1e103b",
"first_name": "Rossie",
"last_name": "Rempel",
"email": "",
"phone": "+12259504339",
"document_type": "CC",
"document_number": "72827",
"created_at": "2025-02-20T21:58:05.000000Z",
"is_test": true
},
"address": {
"line_1": "125 Novella Turnpike",
"line_2": "40003 Lang Circle Suite 752",
"state": "Boylefurt",
"city": "Port Alessiaton",
"country": "Zambia"
},
"wallet": {
"id": "0195255e-3258-707e-bfaf-3f6807d12d60",
"balance": 0,
"label": "$0"
}
}
{
"message": "The customer id field is required. (and 7 more errors)",
"code": 10001,
"code_name": "validation_error",
"errors": {
"customer_id": [
"The customer id field is required."
],
"wallet_id": [
"The wallet id field is required."
],
"address": [
"The address field is required."
],
"address.line_1": [
"The address.line 1 field is required."
],
"address.city": [
"The address.city field is required."
],
"address.state": [
"The address.state field is required."
],
"address.zip_code": [
"The address.zip code field is required."
],
"address.country": [
"The address.country field is required."
]
}
}
{
"message": "No se puede generar la operación, genera un token de idempotencia y envíelo en los headers como x-idempotency",
"code": 10003,
"code_name": "idempotency_error"
}
Headers
string
required
Token único para garantizar la idempotencia de la petición
Body
string
required
ID del cliente al que se le asignará la tarjeta. Crear cliente.
string
required
ID de la billetera al que se le asignará la tarjeta.
string
Apodo para la tarjeta.
string
required
Tipo de tarjeta.
object
required
Dirección de envío de la tarjeta.
{
"id": "9e4298cb-ad7b-40f0-929d-a68e20a561c9",
"status": "created",
"last_4": null,
"nickname": null,
"type": "physical",
"customer_id": "9e4298cb-a9a4-476d-8c7d-287c0f1e103b",
"wallet_id": "0195255e-3258-707e-bfaf-3f6807d12d60",
"customer": {
"id": "9e4298cb-a9a4-476d-8c7d-287c0f1e103b",
"first_name": "Rossie",
"last_name": "Rempel",
"email": "",
"phone": "+12259504339",
"document_type": "CC",
"document_number": "72827",
"created_at": "2025-02-20T21:58:05.000000Z",
"is_test": true
},
"address": {
"line_1": "125 Novella Turnpike",
"line_2": "40003 Lang Circle Suite 752",
"state": "Boylefurt",
"city": "Port Alessiaton",
"country": "Zambia"
},
"wallet": {
"id": "0195255e-3258-707e-bfaf-3f6807d12d60",
"balance": 0,
"label": "$0"
}
}
{
"message": "The customer id field is required. (and 7 more errors)",
"code": 10001,
"code_name": "validation_error",
"errors": {
"customer_id": [
"The customer id field is required."
],
"wallet_id": [
"The wallet id field is required."
],
"address": [
"The address field is required."
],
"address.line_1": [
"The address.line 1 field is required."
],
"address.city": [
"The address.city field is required."
],
"address.state": [
"The address.state field is required."
],
"address.zip_code": [
"The address.zip code field is required."
],
"address.country": [
"The address.country field is required."
]
}
}
{
"message": "No se puede generar la operación, genera un token de idempotencia y envíelo en los headers como x-idempotency",
"code": 10003,
"code_name": "idempotency_error"
}
Was this page helpful?
⌘I