curl --request GET \
--url https://api.fintoc.com/v1/payment_intents \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v1/payment_intents"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.fintoc.com/v1/payment_intents', 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.fintoc.com/v1/payment_intents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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://api.fintoc.com/v1/payment_intents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://api.fintoc.com/v1/payment_intents")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/payment_intents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "pi_BO381oEATXonG6bj",
"object": "payment_intent",
"amount": 100000,
"business_profile": null,
"created_at": "2021-10-15T15:23:11.474Z",
"currency": "CLP",
"customer": null,
"customer_email": "jon.snow@example.com",
"error_reason": null,
"expires_at": null,
"invoices": [],
"metadata": {
"order_id": "9182"
},
"mode": "live",
"next_action": null,
"payment_method": null,
"payment_type": "bank_transfer",
"payment_type_options": {},
"recipient_account": {
"holder_id": "111111111",
"institution_id": "cl_banco_de_chile",
"number": "123456789",
"type": "checking_account"
},
"reference_id": "90123712",
"sender_account": {
"holder_id": "111111111",
"institution_id": "cl_banco_estado",
"number": "123456789",
"type": "checking_account"
},
"split": null,
"split_applied": null,
"status": "succeeded",
"transaction_date": "2021-10-15T15:24:15.474Z",
"widget_token": null
}
]{
"error": {
"type": "invalid_request_error",
"code": "invalid_enum",
"param": "status",
"message": "Invalid status: pending. Must be one of 'succeeded', 'rejected', 'failed', 'created', 'in_progress' or 'expired'.",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}List payment intents
Returns a paginated list of the payment intents of your organization, in the live or test mode of the API key used.
curl --request GET \
--url https://api.fintoc.com/v1/payment_intents \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v1/payment_intents"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.fintoc.com/v1/payment_intents', 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.fintoc.com/v1/payment_intents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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://api.fintoc.com/v1/payment_intents"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://api.fintoc.com/v1/payment_intents")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/payment_intents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "pi_BO381oEATXonG6bj",
"object": "payment_intent",
"amount": 100000,
"business_profile": null,
"created_at": "2021-10-15T15:23:11.474Z",
"currency": "CLP",
"customer": null,
"customer_email": "jon.snow@example.com",
"error_reason": null,
"expires_at": null,
"invoices": [],
"metadata": {
"order_id": "9182"
},
"mode": "live",
"next_action": null,
"payment_method": null,
"payment_type": "bank_transfer",
"payment_type_options": {},
"recipient_account": {
"holder_id": "111111111",
"institution_id": "cl_banco_de_chile",
"number": "123456789",
"type": "checking_account"
},
"reference_id": "90123712",
"sender_account": {
"holder_id": "111111111",
"institution_id": "cl_banco_estado",
"number": "123456789",
"type": "checking_account"
},
"split": null,
"split_applied": null,
"status": "succeeded",
"transaction_date": "2021-10-15T15:24:15.474Z",
"widget_token": null
}
]{
"error": {
"type": "invalid_request_error",
"code": "invalid_enum",
"param": "status",
"message": "Invalid status: pending. Must be one of 'succeeded', 'rejected', 'failed', 'created', 'in_progress' or 'expired'.",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}Parámetros de consulta
Respuesta
Paginated list of payment intents. The Link and X-Total-Count headers carry the pagination information.
Options specific to the payment type. For card payments, the object contains a card object. For cash payments, the object contains a cash object with the reference_number, barcode_url, voucher_url, and notification_preferences of the payment. For bank transfers, the object is empty.
Show child attributes
Show child attributes
{}
Status of the payment intent. One of created (the customer has not started the payment), in_progress (the customer is paying), succeeded (the money reached the recipient account), rejected (the institution rejected the transfer), failed (the payment could not be completed), expired (the payment intent expired before being paid), or pending (the final status is not yet known; only used if your organization has the pending status enabled).
created, failed, succeeded, rejected, in_progress, pending, expired "succeeded"
¿Esta página le ayudó?