curl --request POST \
--url https://sandbox-rampa.mesadepagos.com/api/v2/transactions/card/payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"externalReference": "ORDER-CARD-1001",
"amount": 100.5,
"currency": "BOB",
"country": "BO",
"card": {
"cardType": "001",
"holderName": "Juan Perez",
"number": "4111111111111111",
"expirationMonth": "12",
"expirationYear": "2028",
"cvv": "123"
},
"customer": {
"firstName": "Juan",
"lastName": "Perez",
"email": "juan.perez@example.com",
"locality": "La Paz",
"phoneNumber": "+59171234567",
"postalCode": "0201"
},
"description": "Pago orden 1001"
}
'import requests
url = "https://sandbox-rampa.mesadepagos.com/api/v2/transactions/card/payments"
payload = {
"externalReference": "ORDER-CARD-1001",
"amount": 100.5,
"currency": "BOB",
"country": "BO",
"card": {
"cardType": "001",
"holderName": "Juan Perez",
"number": "4111111111111111",
"expirationMonth": "12",
"expirationYear": "2028",
"cvv": "123"
},
"customer": {
"firstName": "Juan",
"lastName": "Perez",
"email": "juan.perez@example.com",
"locality": "La Paz",
"phoneNumber": "+59171234567",
"postalCode": "0201"
},
"description": "Pago orden 1001"
}
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({
externalReference: 'ORDER-CARD-1001',
amount: 100.5,
currency: 'BOB',
country: 'BO',
card: {
cardType: '001',
holderName: 'Juan Perez',
number: '4111111111111111',
expirationMonth: '12',
expirationYear: '2028',
cvv: '123'
},
customer: {
firstName: 'Juan',
lastName: 'Perez',
email: 'juan.perez@example.com',
locality: 'La Paz',
phoneNumber: '+59171234567',
postalCode: '0201'
},
description: 'Pago orden 1001'
})
};
fetch('https://sandbox-rampa.mesadepagos.com/api/v2/transactions/card/payments', 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://sandbox-rampa.mesadepagos.com/api/v2/transactions/card/payments",
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([
'externalReference' => 'ORDER-CARD-1001',
'amount' => 100.5,
'currency' => 'BOB',
'country' => 'BO',
'card' => [
'cardType' => '001',
'holderName' => 'Juan Perez',
'number' => '4111111111111111',
'expirationMonth' => '12',
'expirationYear' => '2028',
'cvv' => '123'
],
'customer' => [
'firstName' => 'Juan',
'lastName' => 'Perez',
'email' => 'juan.perez@example.com',
'locality' => 'La Paz',
'phoneNumber' => '+59171234567',
'postalCode' => '0201'
],
'description' => 'Pago orden 1001'
]),
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://sandbox-rampa.mesadepagos.com/api/v2/transactions/card/payments"
payload := strings.NewReader("{\n \"externalReference\": \"ORDER-CARD-1001\",\n \"amount\": 100.5,\n \"currency\": \"BOB\",\n \"country\": \"BO\",\n \"card\": {\n \"cardType\": \"001\",\n \"holderName\": \"Juan Perez\",\n \"number\": \"4111111111111111\",\n \"expirationMonth\": \"12\",\n \"expirationYear\": \"2028\",\n \"cvv\": \"123\"\n },\n \"customer\": {\n \"firstName\": \"Juan\",\n \"lastName\": \"Perez\",\n \"email\": \"juan.perez@example.com\",\n \"locality\": \"La Paz\",\n \"phoneNumber\": \"+59171234567\",\n \"postalCode\": \"0201\"\n },\n \"description\": \"Pago orden 1001\"\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://sandbox-rampa.mesadepagos.com/api/v2/transactions/card/payments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"externalReference\": \"ORDER-CARD-1001\",\n \"amount\": 100.5,\n \"currency\": \"BOB\",\n \"country\": \"BO\",\n \"card\": {\n \"cardType\": \"001\",\n \"holderName\": \"Juan Perez\",\n \"number\": \"4111111111111111\",\n \"expirationMonth\": \"12\",\n \"expirationYear\": \"2028\",\n \"cvv\": \"123\"\n },\n \"customer\": {\n \"firstName\": \"Juan\",\n \"lastName\": \"Perez\",\n \"email\": \"juan.perez@example.com\",\n \"locality\": \"La Paz\",\n \"phoneNumber\": \"+59171234567\",\n \"postalCode\": \"0201\"\n },\n \"description\": \"Pago orden 1001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-rampa.mesadepagos.com/api/v2/transactions/card/payments")
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 \"externalReference\": \"ORDER-CARD-1001\",\n \"amount\": 100.5,\n \"currency\": \"BOB\",\n \"country\": \"BO\",\n \"card\": {\n \"cardType\": \"001\",\n \"holderName\": \"Juan Perez\",\n \"number\": \"4111111111111111\",\n \"expirationMonth\": \"12\",\n \"expirationYear\": \"2028\",\n \"cvv\": \"123\"\n },\n \"customer\": {\n \"firstName\": \"Juan\",\n \"lastName\": \"Perez\",\n \"email\": \"juan.perez@example.com\",\n \"locality\": \"La Paz\",\n \"phoneNumber\": \"+59171234567\",\n \"postalCode\": \"0201\"\n },\n \"description\": \"Pago orden 1001\"\n}"
response = http.request(request)
puts response.read_body{
"transactionId": "550e8400-e29b-41d4-a716-446655440100",
"externalReference": "ORDER-CARD-1001",
"type": "cardPayment",
"status": "pendingConfirmation",
"amount": "100.50",
"currency": "BOB",
"country": "BO",
"authorization": {
"requiresConfirmation": true,
"confirmationMethod": "otp",
"expiresAt": "2026-06-02T18:30:00.000Z"
},
"message": "Card payment created. Confirmation is required."
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 401,
"message": "Unauthorized"
}Crear pago con tarjeta
Próximamente. Crea una transacción de pago con tarjeta. Envía los datos de la tarjeta y devuelve una transacción pendiente de confirmación.
curl --request POST \
--url https://sandbox-rampa.mesadepagos.com/api/v2/transactions/card/payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"externalReference": "ORDER-CARD-1001",
"amount": 100.5,
"currency": "BOB",
"country": "BO",
"card": {
"cardType": "001",
"holderName": "Juan Perez",
"number": "4111111111111111",
"expirationMonth": "12",
"expirationYear": "2028",
"cvv": "123"
},
"customer": {
"firstName": "Juan",
"lastName": "Perez",
"email": "juan.perez@example.com",
"locality": "La Paz",
"phoneNumber": "+59171234567",
"postalCode": "0201"
},
"description": "Pago orden 1001"
}
'import requests
url = "https://sandbox-rampa.mesadepagos.com/api/v2/transactions/card/payments"
payload = {
"externalReference": "ORDER-CARD-1001",
"amount": 100.5,
"currency": "BOB",
"country": "BO",
"card": {
"cardType": "001",
"holderName": "Juan Perez",
"number": "4111111111111111",
"expirationMonth": "12",
"expirationYear": "2028",
"cvv": "123"
},
"customer": {
"firstName": "Juan",
"lastName": "Perez",
"email": "juan.perez@example.com",
"locality": "La Paz",
"phoneNumber": "+59171234567",
"postalCode": "0201"
},
"description": "Pago orden 1001"
}
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({
externalReference: 'ORDER-CARD-1001',
amount: 100.5,
currency: 'BOB',
country: 'BO',
card: {
cardType: '001',
holderName: 'Juan Perez',
number: '4111111111111111',
expirationMonth: '12',
expirationYear: '2028',
cvv: '123'
},
customer: {
firstName: 'Juan',
lastName: 'Perez',
email: 'juan.perez@example.com',
locality: 'La Paz',
phoneNumber: '+59171234567',
postalCode: '0201'
},
description: 'Pago orden 1001'
})
};
fetch('https://sandbox-rampa.mesadepagos.com/api/v2/transactions/card/payments', 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://sandbox-rampa.mesadepagos.com/api/v2/transactions/card/payments",
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([
'externalReference' => 'ORDER-CARD-1001',
'amount' => 100.5,
'currency' => 'BOB',
'country' => 'BO',
'card' => [
'cardType' => '001',
'holderName' => 'Juan Perez',
'number' => '4111111111111111',
'expirationMonth' => '12',
'expirationYear' => '2028',
'cvv' => '123'
],
'customer' => [
'firstName' => 'Juan',
'lastName' => 'Perez',
'email' => 'juan.perez@example.com',
'locality' => 'La Paz',
'phoneNumber' => '+59171234567',
'postalCode' => '0201'
],
'description' => 'Pago orden 1001'
]),
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://sandbox-rampa.mesadepagos.com/api/v2/transactions/card/payments"
payload := strings.NewReader("{\n \"externalReference\": \"ORDER-CARD-1001\",\n \"amount\": 100.5,\n \"currency\": \"BOB\",\n \"country\": \"BO\",\n \"card\": {\n \"cardType\": \"001\",\n \"holderName\": \"Juan Perez\",\n \"number\": \"4111111111111111\",\n \"expirationMonth\": \"12\",\n \"expirationYear\": \"2028\",\n \"cvv\": \"123\"\n },\n \"customer\": {\n \"firstName\": \"Juan\",\n \"lastName\": \"Perez\",\n \"email\": \"juan.perez@example.com\",\n \"locality\": \"La Paz\",\n \"phoneNumber\": \"+59171234567\",\n \"postalCode\": \"0201\"\n },\n \"description\": \"Pago orden 1001\"\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://sandbox-rampa.mesadepagos.com/api/v2/transactions/card/payments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"externalReference\": \"ORDER-CARD-1001\",\n \"amount\": 100.5,\n \"currency\": \"BOB\",\n \"country\": \"BO\",\n \"card\": {\n \"cardType\": \"001\",\n \"holderName\": \"Juan Perez\",\n \"number\": \"4111111111111111\",\n \"expirationMonth\": \"12\",\n \"expirationYear\": \"2028\",\n \"cvv\": \"123\"\n },\n \"customer\": {\n \"firstName\": \"Juan\",\n \"lastName\": \"Perez\",\n \"email\": \"juan.perez@example.com\",\n \"locality\": \"La Paz\",\n \"phoneNumber\": \"+59171234567\",\n \"postalCode\": \"0201\"\n },\n \"description\": \"Pago orden 1001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-rampa.mesadepagos.com/api/v2/transactions/card/payments")
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 \"externalReference\": \"ORDER-CARD-1001\",\n \"amount\": 100.5,\n \"currency\": \"BOB\",\n \"country\": \"BO\",\n \"card\": {\n \"cardType\": \"001\",\n \"holderName\": \"Juan Perez\",\n \"number\": \"4111111111111111\",\n \"expirationMonth\": \"12\",\n \"expirationYear\": \"2028\",\n \"cvv\": \"123\"\n },\n \"customer\": {\n \"firstName\": \"Juan\",\n \"lastName\": \"Perez\",\n \"email\": \"juan.perez@example.com\",\n \"locality\": \"La Paz\",\n \"phoneNumber\": \"+59171234567\",\n \"postalCode\": \"0201\"\n },\n \"description\": \"Pago orden 1001\"\n}"
response = http.request(request)
puts response.read_body{
"transactionId": "550e8400-e29b-41d4-a716-446655440100",
"externalReference": "ORDER-CARD-1001",
"type": "cardPayment",
"status": "pendingConfirmation",
"amount": "100.50",
"currency": "BOB",
"country": "BO",
"authorization": {
"requiresConfirmation": true,
"confirmationMethod": "otp",
"expiresAt": "2026-06-02T18:30:00.000Z"
},
"message": "Card payment created. Confirmation is required."
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}{
"statusCode": 401,
"message": "Unauthorized"
}Authorizations
JWT obtenido desde /v2/auth/login
Body
Datos necesarios para iniciar el pago con tarjeta.
Referencia externa única enviada por el partner.
1 - 100"ORDER-CARD-1001"
Monto fiat a cobrar.
x >= 0Must be a multiple of 0.01100.5
Moneda fiat del pago.
BOB, USD "BOB"
País donde se procesa el pago.
BO "BO"
Datos de la tarjeta usada para iniciar el pago.
Show child attributes
Show child attributes
Datos del cliente pagador.
Show child attributes
Show child attributes
Descripción visible para conciliación.
200"Pago orden 1001"
Response
Pago con tarjeta creado exitosamente.
Identificador único de la transacción.
"550e8400-e29b-41d4-a716-446655440100"
Referencia externa enviada por el partner.
"ORDER-CARD-1001"
Tipo de transacción creada.
cardPayment "cardPayment"
Estado inicial de la transacción.
pendingConfirmation, processingTransaction, completedTransaction, failedTransaction "pendingConfirmation"
Monto cobrado.
"100.50"
Moneda del pago.
"BOB"
Código del país.
"BO"
Datos de autorización requeridos para confirmar el pago.
Show child attributes
Show child attributes
Mensaje descriptivo del estado.
"Card payment created. Confirmation is required."