curl --request GET \
--url https://api.fintoc.com/v1/payment_intents/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v1/payment_intents/{id}"
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/{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.fintoc.com/v1/payment_intents/{id}",
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/{id}"
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/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/payment_intents/{id}")
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": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}{
"error": {
"type": "invalid_request_error",
"code": "missing_resource",
"param": "id",
"message": "No such payment_intent: pi_BO381oEATXonG6bj",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}Get a payment intent
Retrieves the payment intent identified by id, in the live or test mode of the API key used. widget_token is always null outside creation.
curl --request GET \
--url https://api.fintoc.com/v1/payment_intents/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.fintoc.com/v1/payment_intents/{id}"
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/{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.fintoc.com/v1/payment_intents/{id}",
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/{id}"
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/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/payment_intents/{id}")
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": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}{
"error": {
"type": "invalid_request_error",
"code": "missing_resource",
"param": "id",
"message": "No such payment_intent: pi_BO381oEATXonG6bj",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}Respuesta
The payment intent. widget_token is always null outside creation.
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ó?