Confirm a PayIn in sandbox
curl --request POST \
--url https://api-empresas.staging.topup.com.co/production/api/v1/sandbox/payin/confirm \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'Token-Top: <api-key>' \
--data '
{
"transaction_id": "xiK9LSjwFyBYYRG",
"payment_method": "SPEI",
"status": "APPROVED"
}
'import requests
url = "https://api-empresas.staging.topup.com.co/production/api/v1/sandbox/payin/confirm"
payload = {
"transaction_id": "xiK9LSjwFyBYYRG",
"payment_method": "SPEI",
"status": "APPROVED"
}
headers = {
"Token-Top": "<api-key>",
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Token-Top': '<api-key>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify({transaction_id: 'xiK9LSjwFyBYYRG', payment_method: 'SPEI', status: 'APPROVED'})
};
fetch('https://api-empresas.staging.topup.com.co/production/api/v1/sandbox/payin/confirm', 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-empresas.staging.topup.com.co/production/api/v1/sandbox/payin/confirm",
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([
'transaction_id' => 'xiK9LSjwFyBYYRG',
'payment_method' => 'SPEI',
'status' => 'APPROVED'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json",
"Token-Top: <api-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-empresas.staging.topup.com.co/production/api/v1/sandbox/payin/confirm"
payload := strings.NewReader("{\n \"transaction_id\": \"xiK9LSjwFyBYYRG\",\n \"payment_method\": \"SPEI\",\n \"status\": \"APPROVED\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Token-Top", "<api-key>")
req.Header.Add("Authorization", "Basic <encoded-value>")
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-empresas.staging.topup.com.co/production/api/v1/sandbox/payin/confirm")
.header("Token-Top", "<api-key>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"transaction_id\": \"xiK9LSjwFyBYYRG\",\n \"payment_method\": \"SPEI\",\n \"status\": \"APPROVED\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-empresas.staging.topup.com.co/production/api/v1/sandbox/payin/confirm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Token-Top"] = '<api-key>'
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transaction_id\": \"xiK9LSjwFyBYYRG\",\n \"payment_method\": \"SPEI\",\n \"status\": \"APPROVED\"\n}"
response = http.request(request)
puts response.read_body{
"code": "01",
"status": "SUCCESS",
"message": "Transacción confirmada",
"data": {
"transaction_id": "xiK9LSjwFyBYYRG",
"payment_method": "SPEI",
"status": "APPROVED"
}
}
{
"code": "00",
"status": "ERROR",
"error": "STATUS_NOT_SUPPORTED",
"message": "That status is not valid for this payment method."
}
Sandbox Confirm
POST Confirm PayIn
Force a pending PayIn to APPROVED, REJECTED, or EXPIRED and trigger the merchant webhook. Staging and UAT only.
POST
/
api
/
v1
/
sandbox
/
payin
/
confirm
Confirm a PayIn in sandbox
curl --request POST \
--url https://api-empresas.staging.topup.com.co/production/api/v1/sandbox/payin/confirm \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'Token-Top: <api-key>' \
--data '
{
"transaction_id": "xiK9LSjwFyBYYRG",
"payment_method": "SPEI",
"status": "APPROVED"
}
'import requests
url = "https://api-empresas.staging.topup.com.co/production/api/v1/sandbox/payin/confirm"
payload = {
"transaction_id": "xiK9LSjwFyBYYRG",
"payment_method": "SPEI",
"status": "APPROVED"
}
headers = {
"Token-Top": "<api-key>",
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Token-Top': '<api-key>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify({transaction_id: 'xiK9LSjwFyBYYRG', payment_method: 'SPEI', status: 'APPROVED'})
};
fetch('https://api-empresas.staging.topup.com.co/production/api/v1/sandbox/payin/confirm', 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-empresas.staging.topup.com.co/production/api/v1/sandbox/payin/confirm",
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([
'transaction_id' => 'xiK9LSjwFyBYYRG',
'payment_method' => 'SPEI',
'status' => 'APPROVED'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json",
"Token-Top: <api-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-empresas.staging.topup.com.co/production/api/v1/sandbox/payin/confirm"
payload := strings.NewReader("{\n \"transaction_id\": \"xiK9LSjwFyBYYRG\",\n \"payment_method\": \"SPEI\",\n \"status\": \"APPROVED\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Token-Top", "<api-key>")
req.Header.Add("Authorization", "Basic <encoded-value>")
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-empresas.staging.topup.com.co/production/api/v1/sandbox/payin/confirm")
.header("Token-Top", "<api-key>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"transaction_id\": \"xiK9LSjwFyBYYRG\",\n \"payment_method\": \"SPEI\",\n \"status\": \"APPROVED\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-empresas.staging.topup.com.co/production/api/v1/sandbox/payin/confirm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Token-Top"] = '<api-key>'
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transaction_id\": \"xiK9LSjwFyBYYRG\",\n \"payment_method\": \"SPEI\",\n \"status\": \"APPROVED\"\n}"
response = http.request(request)
puts response.read_body{
"code": "01",
"status": "SUCCESS",
"message": "Transacción confirmada",
"data": {
"transaction_id": "xiK9LSjwFyBYYRG",
"payment_method": "SPEI",
"status": "APPROVED"
}
}
{
"code": "00",
"status": "ERROR",
"error": "STATUS_NOT_SUPPORTED",
"message": "That status is not valid for this payment method."
}
Force a pending PayIn to
APPROVED, REJECTED, or EXPIRED in staging or UAT. TumiPay then sends the merchant webhook. See Sandbox Confirm for supported methods, identifiers, and prerequisites.
Not available in production. Calls return
404 NOT_FOUND.cURL
curl --request POST 'https://api-empresas.staging.topup.com.co/production/api/v1/sandbox/payin/confirm' \
--header 'Authorization: Basic your_auth_key' \
--header 'Token-Top: your_auth_token' \
--header 'Content-Type: application/json' \
--data-raw '{
"transaction_id": "xiK9LSjwFyBYYRG",
"payment_method": "SPEI",
"status": "APPROVED"
}'
const response = await fetch(
'https://api-empresas.staging.topup.com.co/production/api/v1/sandbox/payin/confirm',
{
method: 'POST',
headers: {
'Authorization': 'Basic your_auth_key',
'Token-Top': 'your_auth_token',
'Content-Type': 'application/json'
},
body: JSON.stringify({
transaction_id: 'xiK9LSjwFyBYYRG',
payment_method: 'SPEI',
status: 'APPROVED'
})
}
);
const data = await response.json();
import requests
url = "https://api-empresas.staging.topup.com.co/production/api/v1/sandbox/payin/confirm"
headers = {
"Authorization": "Basic your_auth_key",
"Token-Top": "your_auth_token",
"Content-Type": "application/json"
}
payload = {
"transaction_id": "xiK9LSjwFyBYYRG",
"payment_method": "SPEI",
"status": "APPROVED"
}
response = requests.post(url, headers=headers, json=payload)
result = response.json()
{
"code": "01",
"status": "SUCCESS",
"message": "Transacción confirmada",
"data": {
"transaction_id": "xiK9LSjwFyBYYRG",
"payment_method": "SPEI",
"status": "APPROVED"
}
}
{
"code": "00",
"status": "ERROR",
"error": "STATUS_NOT_SUPPORTED",
"message": "That status is not valid for this payment method."
}
Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
TumiPay ticket, merchant reference, or external reference that belongs to the authenticated merchant.
Example:
"xiK9LSjwFyBYYRG"
Payment method enum name in uppercase (e.g. SPEI, BREB, BANK_TRANSFER). Do not use the portal label.
Example:
"SPEI"
Target status. Not every method supports every status.
Available options:
APPROVED, REJECTED, EXPIRED Example:
"APPROVED"