Actualizar tarjetas
curl --request PUT \
--url https://api.onepay.la/v1/issuing/cards/{card_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-idempotency: <x-idempotency>' \
--data '
{
"nickname": "<string>",
"status": "<string>"
}
'import requests
url = "https://api.onepay.la/v1/issuing/cards/{card_id}"
payload = {
"nickname": "<string>",
"status": "<string>"
}
headers = {
"x-idempotency": "<x-idempotency>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'x-idempotency': '<x-idempotency>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({nickname: '<string>', status: '<string>'})
};
fetch('https://api.onepay.la/v1/issuing/cards/{card_id}', 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/{card_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'nickname' => '<string>',
'status' => '<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/{card_id}"
payload := strings.NewReader("{\n \"nickname\": \"<string>\",\n \"status\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.onepay.la/v1/issuing/cards/{card_id}")
.header("x-idempotency", "<x-idempotency>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nickname\": \"<string>\",\n \"status\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onepay.la/v1/issuing/cards/{card_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-idempotency"] = '<x-idempotency>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"nickname\": \"<string>\",\n \"status\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "9e28925d-2495-48bb-8740-dc0f5454d738",
"status": "created",
"last_4": null,
"nickname": null,
"customer": {
"id": "9e28925c-7543-496f-abff-ed973137ab7c",
"first_name": "Carmela",
"last_name": "Rice",
"email": "",
"phone": "+17408135335",
"document_type": "CC",
"document_number": "554637",
"created_at": "2025-02-07T23:28:34.000000Z",
"is_test": true
},
"address": {
"line": "5630 Schulist Stravenue Suite 568",
"line_2": "20276 Jordi Villages Apt. 981",
"state": "Coleman Rice V",
"city": "Dakotamouth",
"country": "LS"
},
"wallet": {
"id": "0194e2be-5ef6-7080-8bb6-ab629957edde",
"balance": 0,
"label": "$0"
}
}
{
"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"
}
Actualizar tarjetas
Actualiza una tarjeta existente.
PUT
issuing
/
cards
/
{card_id}
Actualizar tarjetas
curl --request PUT \
--url https://api.onepay.la/v1/issuing/cards/{card_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-idempotency: <x-idempotency>' \
--data '
{
"nickname": "<string>",
"status": "<string>"
}
'import requests
url = "https://api.onepay.la/v1/issuing/cards/{card_id}"
payload = {
"nickname": "<string>",
"status": "<string>"
}
headers = {
"x-idempotency": "<x-idempotency>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'x-idempotency': '<x-idempotency>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({nickname: '<string>', status: '<string>'})
};
fetch('https://api.onepay.la/v1/issuing/cards/{card_id}', 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/{card_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'nickname' => '<string>',
'status' => '<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/{card_id}"
payload := strings.NewReader("{\n \"nickname\": \"<string>\",\n \"status\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.onepay.la/v1/issuing/cards/{card_id}")
.header("x-idempotency", "<x-idempotency>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nickname\": \"<string>\",\n \"status\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onepay.la/v1/issuing/cards/{card_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-idempotency"] = '<x-idempotency>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"nickname\": \"<string>\",\n \"status\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "9e28925d-2495-48bb-8740-dc0f5454d738",
"status": "created",
"last_4": null,
"nickname": null,
"customer": {
"id": "9e28925c-7543-496f-abff-ed973137ab7c",
"first_name": "Carmela",
"last_name": "Rice",
"email": "",
"phone": "+17408135335",
"document_type": "CC",
"document_number": "554637",
"created_at": "2025-02-07T23:28:34.000000Z",
"is_test": true
},
"address": {
"line": "5630 Schulist Stravenue Suite 568",
"line_2": "20276 Jordi Villages Apt. 981",
"state": "Coleman Rice V",
"city": "Dakotamouth",
"country": "LS"
},
"wallet": {
"id": "0194e2be-5ef6-7080-8bb6-ab629957edde",
"balance": 0,
"label": "$0"
}
}
{
"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
Path
string
required
ID de la tarjeta emitida que actualizarás. Crear tarjeta.
Body
string
Apodo para la tarjeta.
string
Estado de la tarjeta.
{
"id": "9e28925d-2495-48bb-8740-dc0f5454d738",
"status": "created",
"last_4": null,
"nickname": null,
"customer": {
"id": "9e28925c-7543-496f-abff-ed973137ab7c",
"first_name": "Carmela",
"last_name": "Rice",
"email": "",
"phone": "+17408135335",
"document_type": "CC",
"document_number": "554637",
"created_at": "2025-02-07T23:28:34.000000Z",
"is_test": true
},
"address": {
"line": "5630 Schulist Stravenue Suite 568",
"line_2": "20276 Jordi Villages Apt. 981",
"state": "Coleman Rice V",
"city": "Dakotamouth",
"country": "LS"
},
"wallet": {
"id": "0194e2be-5ef6-7080-8bb6-ab629957edde",
"balance": 0,
"label": "$0"
}
}
{
"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