Create Payment Link
curl --request POST \
--url https://api.fintoc.com/v1/payment_links \
--header 'Content-Type: application/json' \
--data '
{
"amount": 123,
"currency": "mxn",
"metadata": "<string>",
"checkout": {
"description": "<string>"
},
"customer_email": "<string>",
"expires_after_seconds": 123,
"recipient_account": {
"holder_id": "183917137",
"number": "123456",
"type": "checking_account",
"institution_id": "cl_banco_de_chile"
},
"business_profile": {
"name": "<string>",
"tax_id": "<string>",
"category": "<string>"
}
}
'import requests
url = "https://api.fintoc.com/v1/payment_links"
payload = {
"amount": 123,
"currency": "mxn",
"metadata": "<string>",
"checkout": { "description": "<string>" },
"customer_email": "<string>",
"expires_after_seconds": 123,
"recipient_account": {
"holder_id": "183917137",
"number": "123456",
"type": "checking_account",
"institution_id": "cl_banco_de_chile"
},
"business_profile": {
"name": "<string>",
"tax_id": "<string>",
"category": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 123,
currency: 'mxn',
metadata: '<string>',
checkout: {description: '<string>'},
customer_email: '<string>',
expires_after_seconds: 123,
recipient_account: {
holder_id: '183917137',
number: '123456',
type: 'checking_account',
institution_id: 'cl_banco_de_chile'
},
business_profile: {name: '<string>', tax_id: '<string>', category: '<string>'}
})
};
fetch('https://api.fintoc.com/v1/payment_links', 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_links",
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([
'amount' => 123,
'currency' => 'mxn',
'metadata' => '<string>',
'checkout' => [
'description' => '<string>'
],
'customer_email' => '<string>',
'expires_after_seconds' => 123,
'recipient_account' => [
'holder_id' => '183917137',
'number' => '123456',
'type' => 'checking_account',
'institution_id' => 'cl_banco_de_chile'
],
'business_profile' => [
'name' => '<string>',
'tax_id' => '<string>',
'category' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"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://api.fintoc.com/v1/payment_links"
payload := strings.NewReader("{\n \"amount\": 123,\n \"currency\": \"mxn\",\n \"metadata\": \"<string>\",\n \"checkout\": {\n \"description\": \"<string>\"\n },\n \"customer_email\": \"<string>\",\n \"expires_after_seconds\": 123,\n \"recipient_account\": {\n \"holder_id\": \"183917137\",\n \"number\": \"123456\",\n \"type\": \"checking_account\",\n \"institution_id\": \"cl_banco_de_chile\"\n },\n \"business_profile\": {\n \"name\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"category\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.fintoc.com/v1/payment_links")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123,\n \"currency\": \"mxn\",\n \"metadata\": \"<string>\",\n \"checkout\": {\n \"description\": \"<string>\"\n },\n \"customer_email\": \"<string>\",\n \"expires_after_seconds\": 123,\n \"recipient_account\": {\n \"holder_id\": \"183917137\",\n \"number\": \"123456\",\n \"type\": \"checking_account\",\n \"institution_id\": \"cl_banco_de_chile\"\n },\n \"business_profile\": {\n \"name\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"category\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/payment_links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 123,\n \"currency\": \"mxn\",\n \"metadata\": \"<string>\",\n \"checkout\": {\n \"description\": \"<string>\"\n },\n \"customer_email\": \"<string>\",\n \"expires_after_seconds\": 123,\n \"recipient_account\": {\n \"holder_id\": \"183917137\",\n \"number\": \"123456\",\n \"type\": \"checking_account\",\n \"institution_id\": \"cl_banco_de_chile\"\n },\n \"business_profile\": {\n \"name\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"category\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body"{\n \"id\": \"plink_K2zwNNSxPyx8w3GZ\",\n \"object\": \"payment_link\",\n \"amount\": 120900,\n \"currency\": \"MXN\",\n \"status\": \"active\",\n \"created_at\": \"2024-08-02T20:28:13Z\",\n \"expires_at\": null,\n \"mode\": \"test\",\n \"url\": \"https://pay.fintoc.com/plink_K2zwNNSxPyx8w3GZ\",\n \"metadata\": {},\n \"customer_email\": null,\n \"checkout\": {\n \"description\": null\n }\n}""{}"Payment links
Create Payment Link
POST
/
payment_links
Create Payment Link
curl --request POST \
--url https://api.fintoc.com/v1/payment_links \
--header 'Content-Type: application/json' \
--data '
{
"amount": 123,
"currency": "mxn",
"metadata": "<string>",
"checkout": {
"description": "<string>"
},
"customer_email": "<string>",
"expires_after_seconds": 123,
"recipient_account": {
"holder_id": "183917137",
"number": "123456",
"type": "checking_account",
"institution_id": "cl_banco_de_chile"
},
"business_profile": {
"name": "<string>",
"tax_id": "<string>",
"category": "<string>"
}
}
'import requests
url = "https://api.fintoc.com/v1/payment_links"
payload = {
"amount": 123,
"currency": "mxn",
"metadata": "<string>",
"checkout": { "description": "<string>" },
"customer_email": "<string>",
"expires_after_seconds": 123,
"recipient_account": {
"holder_id": "183917137",
"number": "123456",
"type": "checking_account",
"institution_id": "cl_banco_de_chile"
},
"business_profile": {
"name": "<string>",
"tax_id": "<string>",
"category": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 123,
currency: 'mxn',
metadata: '<string>',
checkout: {description: '<string>'},
customer_email: '<string>',
expires_after_seconds: 123,
recipient_account: {
holder_id: '183917137',
number: '123456',
type: 'checking_account',
institution_id: 'cl_banco_de_chile'
},
business_profile: {name: '<string>', tax_id: '<string>', category: '<string>'}
})
};
fetch('https://api.fintoc.com/v1/payment_links', 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_links",
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([
'amount' => 123,
'currency' => 'mxn',
'metadata' => '<string>',
'checkout' => [
'description' => '<string>'
],
'customer_email' => '<string>',
'expires_after_seconds' => 123,
'recipient_account' => [
'holder_id' => '183917137',
'number' => '123456',
'type' => 'checking_account',
'institution_id' => 'cl_banco_de_chile'
],
'business_profile' => [
'name' => '<string>',
'tax_id' => '<string>',
'category' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"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://api.fintoc.com/v1/payment_links"
payload := strings.NewReader("{\n \"amount\": 123,\n \"currency\": \"mxn\",\n \"metadata\": \"<string>\",\n \"checkout\": {\n \"description\": \"<string>\"\n },\n \"customer_email\": \"<string>\",\n \"expires_after_seconds\": 123,\n \"recipient_account\": {\n \"holder_id\": \"183917137\",\n \"number\": \"123456\",\n \"type\": \"checking_account\",\n \"institution_id\": \"cl_banco_de_chile\"\n },\n \"business_profile\": {\n \"name\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"category\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.fintoc.com/v1/payment_links")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123,\n \"currency\": \"mxn\",\n \"metadata\": \"<string>\",\n \"checkout\": {\n \"description\": \"<string>\"\n },\n \"customer_email\": \"<string>\",\n \"expires_after_seconds\": 123,\n \"recipient_account\": {\n \"holder_id\": \"183917137\",\n \"number\": \"123456\",\n \"type\": \"checking_account\",\n \"institution_id\": \"cl_banco_de_chile\"\n },\n \"business_profile\": {\n \"name\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"category\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v1/payment_links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 123,\n \"currency\": \"mxn\",\n \"metadata\": \"<string>\",\n \"checkout\": {\n \"description\": \"<string>\"\n },\n \"customer_email\": \"<string>\",\n \"expires_after_seconds\": 123,\n \"recipient_account\": {\n \"holder_id\": \"183917137\",\n \"number\": \"123456\",\n \"type\": \"checking_account\",\n \"institution_id\": \"cl_banco_de_chile\"\n },\n \"business_profile\": {\n \"name\": \"<string>\",\n \"tax_id\": \"<string>\",\n \"category\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body"{\n \"id\": \"plink_K2zwNNSxPyx8w3GZ\",\n \"object\": \"payment_link\",\n \"amount\": 120900,\n \"currency\": \"MXN\",\n \"status\": \"active\",\n \"created_at\": \"2024-08-02T20:28:13Z\",\n \"expires_at\": null,\n \"mode\": \"test\",\n \"url\": \"https://pay.fintoc.com/plink_K2zwNNSxPyx8w3GZ\",\n \"metadata\": {},\n \"customer_email\": null,\n \"checkout\": {\n \"description\": null\n }\n}""{}"v1 · Base URL https://api.fintoc.com/v1Cuerpo
application/json
Respuesta
200
¿Esta página le ayudó?