Get the CLABE of a one-time payment
curl --request GET \
--url https://demo-api-harmony.compago.com/api/developer/v1/one-time-payment/{id}/bank-transfer \
--header 'x-api-key: <api-key>'import requests
url = "https://demo-api-harmony.compago.com/api/developer/v1/one-time-payment/{id}/bank-transfer"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://demo-api-harmony.compago.com/api/developer/v1/one-time-payment/{id}/bank-transfer', 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://demo-api-harmony.compago.com/api/developer/v1/one-time-payment/{id}/bank-transfer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <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"
"net/http"
"io"
)
func main() {
url := "https://demo-api-harmony.compago.com/api/developer/v1/one-time-payment/{id}/bank-transfer"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://demo-api-harmony.compago.com/api/developer/v1/one-time-payment/{id}/bank-transfer")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo-api-harmony.compago.com/api/developer/v1/one-time-payment/{id}/bank-transfer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "AWAITING_TRANSFER",
"rail": "SPEI",
"clabe": "738180000000012345",
"clabeLast4": "2345",
"bank": "FINTOC",
"beneficiary": "Sharepay SA de CV",
"concept": "Compra Mueblería Sol 3F2A1B",
"amount": 12000,
"amountReceived": 0,
"amountDue": 12000,
"currency": "MXN",
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"paidAt": "2023-11-07T05:31:56Z",
"paymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}One-time payments
Get the CLABE
The newest CLABE the one-time payment was given, in whatever state it is now. Poll it to show the customer that the transfer arrived.
GET
/
developer
/
v1
/
one-time-payment
/
{id}
/
bank-transfer
Get the CLABE of a one-time payment
curl --request GET \
--url https://demo-api-harmony.compago.com/api/developer/v1/one-time-payment/{id}/bank-transfer \
--header 'x-api-key: <api-key>'import requests
url = "https://demo-api-harmony.compago.com/api/developer/v1/one-time-payment/{id}/bank-transfer"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://demo-api-harmony.compago.com/api/developer/v1/one-time-payment/{id}/bank-transfer', 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://demo-api-harmony.compago.com/api/developer/v1/one-time-payment/{id}/bank-transfer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <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"
"net/http"
"io"
)
func main() {
url := "https://demo-api-harmony.compago.com/api/developer/v1/one-time-payment/{id}/bank-transfer"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://demo-api-harmony.compago.com/api/developer/v1/one-time-payment/{id}/bank-transfer")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo-api-harmony.compago.com/api/developer/v1/one-time-payment/{id}/bank-transfer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "AWAITING_TRANSFER",
"rail": "SPEI",
"clabe": "738180000000012345",
"clabeLast4": "2345",
"bank": "FINTOC",
"beneficiary": "Sharepay SA de CV",
"concept": "Compra Mueblería Sol 3F2A1B",
"amount": 12000,
"amountReceived": 0,
"amountDue": 12000,
"currency": "MXN",
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"paidAt": "2023-11-07T05:31:56Z",
"paymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}Respuesta
Success.
The CLABE of a one-time payment: what your own screen shows the customer to pay by SPEI.
Where the CLABE stands. AWAITING_TRANSFER: it takes money and the payment is not paid yet. PAID: the transfer arrived and became a payment. EXPIRED: nothing arrived before expiresAt. CANCELLED: the payment was paid another way, or stopped being payable, before anything arrived. RETURNED: what arrived went back to whoever sent it, for example part of the price when the CLABE expired.
Opciones disponibles:
AWAITING_TRANSFER, PAID, EXPIRED, CANCELLED, RETURNED