Skip to main content
POST
/
v1
/
stores
/
{store}
/
payments
Create payment
curl --request POST \
  --url https://api.confiopagos.com/v1/stores/{store}/payments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amountCents": 5000000,
  "currencyCode": "COP",
  "title": "Juguete",
  "description": "Juguete increíble",
  "buyer": {
    "firstName": "Julián",
    "phoneNumber": "+573215786325",
    "lastName": "Pérez",
    "email": "santiago@example.com"
  },
  "correlationId": "36285414",
  "mediaAssets": [
    "https://fastly.picsum.photos/id/1074/1024/1024.jpg?hmac=usAeJI_o3wzbLAca-PMBgHQXXhSoMNP5cvoktlhiUzY",
    "https://fastly.picsum.photos/id/506/1024/1024.jpg?hmac=Wa93nuNDFEXWB_Fg4n2vcYT3sGcW7UBTjOAic46R9Gw",
    "https://fastly.picsum.photos/id/343/1024/1024.jpg?hmac=WC3PsYGjbqnsQhfu1J1l3PeAzmsGEiZPISXAenRc2Qc"
  ],
  "enabledPaymentMethods": [
    "PSE",
    "CARD",
    "NEQUI",
    "BANCOLOMBIA"
  ],
  "paymentType": "PRODUCT",
  "redirectUri": "https://example.com/payment-status",
  "courier": "Coordinadora",
  "trackingNumber": "453265",
  "disableBuyerNotification": false,
  "expirationMinutes": 4320,
  "discountPercentage": 0.1,
  "discountSource": "ty_page_cod_conversion"
}
'
import requests

url = "https://api.confiopagos.com/v1/stores/{store}/payments"

payload = {
"amountCents": 5000000,
"currencyCode": "COP",
"title": "Juguete",
"description": "Juguete increíble",
"buyer": {
"firstName": "Julián",
"phoneNumber": "+573215786325",
"lastName": "Pérez",
"email": "santiago@example.com"
},
"correlationId": "36285414",
"mediaAssets": ["https://fastly.picsum.photos/id/1074/1024/1024.jpg?hmac=usAeJI_o3wzbLAca-PMBgHQXXhSoMNP5cvoktlhiUzY", "https://fastly.picsum.photos/id/506/1024/1024.jpg?hmac=Wa93nuNDFEXWB_Fg4n2vcYT3sGcW7UBTjOAic46R9Gw", "https://fastly.picsum.photos/id/343/1024/1024.jpg?hmac=WC3PsYGjbqnsQhfu1J1l3PeAzmsGEiZPISXAenRc2Qc"],
"enabledPaymentMethods": ["PSE", "CARD", "NEQUI", "BANCOLOMBIA"],
"paymentType": "PRODUCT",
"redirectUri": "https://example.com/payment-status",
"courier": "Coordinadora",
"trackingNumber": "453265",
"disableBuyerNotification": False,
"expirationMinutes": 4320,
"discountPercentage": 0.1,
"discountSource": "ty_page_cod_conversion"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amountCents: 5000000,
currencyCode: 'COP',
title: 'Juguete',
description: 'Juguete increíble',
buyer: {
firstName: 'Julián',
phoneNumber: '+573215786325',
lastName: 'Pérez',
email: 'santiago@example.com'
},
correlationId: '36285414',
mediaAssets: [
'https://fastly.picsum.photos/id/1074/1024/1024.jpg?hmac=usAeJI_o3wzbLAca-PMBgHQXXhSoMNP5cvoktlhiUzY',
'https://fastly.picsum.photos/id/506/1024/1024.jpg?hmac=Wa93nuNDFEXWB_Fg4n2vcYT3sGcW7UBTjOAic46R9Gw',
'https://fastly.picsum.photos/id/343/1024/1024.jpg?hmac=WC3PsYGjbqnsQhfu1J1l3PeAzmsGEiZPISXAenRc2Qc'
],
enabledPaymentMethods: ['PSE', 'CARD', 'NEQUI', 'BANCOLOMBIA'],
paymentType: 'PRODUCT',
redirectUri: 'https://example.com/payment-status',
courier: 'Coordinadora',
trackingNumber: '453265',
disableBuyerNotification: false,
expirationMinutes: 4320,
discountPercentage: 0.1,
discountSource: 'ty_page_cod_conversion'
})
};

fetch('https://api.confiopagos.com/v1/stores/{store}/payments', 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.confiopagos.com/v1/stores/{store}/payments",
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([
'amountCents' => 5000000,
'currencyCode' => 'COP',
'title' => 'Juguete',
'description' => 'Juguete increíble',
'buyer' => [
'firstName' => 'Julián',
'phoneNumber' => '+573215786325',
'lastName' => 'Pérez',
'email' => 'santiago@example.com'
],
'correlationId' => '36285414',
'mediaAssets' => [
'https://fastly.picsum.photos/id/1074/1024/1024.jpg?hmac=usAeJI_o3wzbLAca-PMBgHQXXhSoMNP5cvoktlhiUzY',
'https://fastly.picsum.photos/id/506/1024/1024.jpg?hmac=Wa93nuNDFEXWB_Fg4n2vcYT3sGcW7UBTjOAic46R9Gw',
'https://fastly.picsum.photos/id/343/1024/1024.jpg?hmac=WC3PsYGjbqnsQhfu1J1l3PeAzmsGEiZPISXAenRc2Qc'
],
'enabledPaymentMethods' => [
'PSE',
'CARD',
'NEQUI',
'BANCOLOMBIA'
],
'paymentType' => 'PRODUCT',
'redirectUri' => 'https://example.com/payment-status',
'courier' => 'Coordinadora',
'trackingNumber' => '453265',
'disableBuyerNotification' => false,
'expirationMinutes' => 4320,
'discountPercentage' => 0.1,
'discountSource' => 'ty_page_cod_conversion'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.confiopagos.com/v1/stores/{store}/payments"

payload := strings.NewReader("{\n \"amountCents\": 5000000,\n \"currencyCode\": \"COP\",\n \"title\": \"Juguete\",\n \"description\": \"Juguete increíble\",\n \"buyer\": {\n \"firstName\": \"Julián\",\n \"phoneNumber\": \"+573215786325\",\n \"lastName\": \"Pérez\",\n \"email\": \"santiago@example.com\"\n },\n \"correlationId\": \"36285414\",\n \"mediaAssets\": [\n \"https://fastly.picsum.photos/id/1074/1024/1024.jpg?hmac=usAeJI_o3wzbLAca-PMBgHQXXhSoMNP5cvoktlhiUzY\",\n \"https://fastly.picsum.photos/id/506/1024/1024.jpg?hmac=Wa93nuNDFEXWB_Fg4n2vcYT3sGcW7UBTjOAic46R9Gw\",\n \"https://fastly.picsum.photos/id/343/1024/1024.jpg?hmac=WC3PsYGjbqnsQhfu1J1l3PeAzmsGEiZPISXAenRc2Qc\"\n ],\n \"enabledPaymentMethods\": [\n \"PSE\",\n \"CARD\",\n \"NEQUI\",\n \"BANCOLOMBIA\"\n ],\n \"paymentType\": \"PRODUCT\",\n \"redirectUri\": \"https://example.com/payment-status\",\n \"courier\": \"Coordinadora\",\n \"trackingNumber\": \"453265\",\n \"disableBuyerNotification\": false,\n \"expirationMinutes\": 4320,\n \"discountPercentage\": 0.1,\n \"discountSource\": \"ty_page_cod_conversion\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
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.confiopagos.com/v1/stores/{store}/payments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amountCents\": 5000000,\n \"currencyCode\": \"COP\",\n \"title\": \"Juguete\",\n \"description\": \"Juguete increíble\",\n \"buyer\": {\n \"firstName\": \"Julián\",\n \"phoneNumber\": \"+573215786325\",\n \"lastName\": \"Pérez\",\n \"email\": \"santiago@example.com\"\n },\n \"correlationId\": \"36285414\",\n \"mediaAssets\": [\n \"https://fastly.picsum.photos/id/1074/1024/1024.jpg?hmac=usAeJI_o3wzbLAca-PMBgHQXXhSoMNP5cvoktlhiUzY\",\n \"https://fastly.picsum.photos/id/506/1024/1024.jpg?hmac=Wa93nuNDFEXWB_Fg4n2vcYT3sGcW7UBTjOAic46R9Gw\",\n \"https://fastly.picsum.photos/id/343/1024/1024.jpg?hmac=WC3PsYGjbqnsQhfu1J1l3PeAzmsGEiZPISXAenRc2Qc\"\n ],\n \"enabledPaymentMethods\": [\n \"PSE\",\n \"CARD\",\n \"NEQUI\",\n \"BANCOLOMBIA\"\n ],\n \"paymentType\": \"PRODUCT\",\n \"redirectUri\": \"https://example.com/payment-status\",\n \"courier\": \"Coordinadora\",\n \"trackingNumber\": \"453265\",\n \"disableBuyerNotification\": false,\n \"expirationMinutes\": 4320,\n \"discountPercentage\": 0.1,\n \"discountSource\": \"ty_page_cod_conversion\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.confiopagos.com/v1/stores/{store}/payments")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amountCents\": 5000000,\n \"currencyCode\": \"COP\",\n \"title\": \"Juguete\",\n \"description\": \"Juguete increíble\",\n \"buyer\": {\n \"firstName\": \"Julián\",\n \"phoneNumber\": \"+573215786325\",\n \"lastName\": \"Pérez\",\n \"email\": \"santiago@example.com\"\n },\n \"correlationId\": \"36285414\",\n \"mediaAssets\": [\n \"https://fastly.picsum.photos/id/1074/1024/1024.jpg?hmac=usAeJI_o3wzbLAca-PMBgHQXXhSoMNP5cvoktlhiUzY\",\n \"https://fastly.picsum.photos/id/506/1024/1024.jpg?hmac=Wa93nuNDFEXWB_Fg4n2vcYT3sGcW7UBTjOAic46R9Gw\",\n \"https://fastly.picsum.photos/id/343/1024/1024.jpg?hmac=WC3PsYGjbqnsQhfu1J1l3PeAzmsGEiZPISXAenRc2Qc\"\n ],\n \"enabledPaymentMethods\": [\n \"PSE\",\n \"CARD\",\n \"NEQUI\",\n \"BANCOLOMBIA\"\n ],\n \"paymentType\": \"PRODUCT\",\n \"redirectUri\": \"https://example.com/payment-status\",\n \"courier\": \"Coordinadora\",\n \"trackingNumber\": \"453265\",\n \"disableBuyerNotification\": false,\n \"expirationMinutes\": 4320,\n \"discountPercentage\": 0.1,\n \"discountSource\": \"ty_page_cod_conversion\"\n}"

response = http.request(request)
puts response.read_body
{
  "amountCents": 5000000,
  "currencyCode": "COP",
  "title": "Juguete",
  "description": "Juguete increíble",
  "buyer": {
    "firstName": "Julián",
    "phoneNumber": "+573215786325",
    "lastName": "Pérez",
    "email": "santiago@example.com"
  },
  "name": "stores/01JNRRDZDPH40DB2YRW329BFXM/payments/01JNRVWWHH68E76V3TMFFT6GHJ",
  "status": "AWAITING_PAYMENT",
  "organization": "organizations/01JNRR1NY8MDX4XCGG0N4F06X3",
  "url": "https://checkout.confiopagos.com/p/01JNV8CSHNN933B09T5MTNK89V",
  "createTime": "2024-01-15T10:30:00Z",
  "updateTime": "2024-01-15T10:30:00Z",
  "expireTime": "2024-01-18T10:30:00Z",
  "correlationId": "36285414",
  "mediaAssets": [
    "https://fastly.picsum.photos/id/1074/1024/1024.jpg?hmac=usAeJI_o3wzbLAca-PMBgHQXXhSoMNP5cvoktlhiUzY",
    "https://fastly.picsum.photos/id/506/1024/1024.jpg?hmac=Wa93nuNDFEXWB_Fg4n2vcYT3sGcW7UBTjOAic46R9Gw",
    "https://fastly.picsum.photos/id/343/1024/1024.jpg?hmac=WC3PsYGjbqnsQhfu1J1l3PeAzmsGEiZPISXAenRc2Qc"
  ],
  "enabledPaymentMethods": [
    "PSE",
    "CARD",
    "NEQUI",
    "BANCOLOMBIA"
  ],
  "paymentType": "PRODUCT",
  "redirectUri": "https://example.com/payment-status",
  "courier": "Coordinadora",
  "trackingNumber": "453265",
  "disableBuyerNotification": false,
  "discountPercentage": 0.1,
  "discountSource": "ty_page_cod_conversion"
}
{
"error": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

store
string
required
Example:

"01G65Z755AFWAKHE12NY0CQ9FH"

Body

application/json
amountCents
number
required

Amount in cents

Required range: x >= 1000000
Example:

5000000

currencyCode
string
required

Currency code

Example:

"COP"

title
string
required

Payment title

Example:

"Juguete"

description
string
required

Payment description (at least 24 characters)

Example:

"Juguete increíble"

buyer
object
required
correlationId
string

Your internal payment/order ID for tracking and correlation. Use this to match Confío payments with your system's orders.

Example:

"36285414"

mediaAssets
string<uri>[]

Media assets links (required when paymentType is PRODUCT, max 6 items). Each URL must be a publicly accessible URL from a public server (e.g., your CDN, cloud storage, or any public web server). Allowed formats: PNG, JPEG, JPEG XL, WebP, AVIF, GIF, ICO, SVG, HEIC, BMP, TIFF. Maximum file size: 100MB per file.

Maximum array length: 6
Example:
[
"https://fastly.picsum.photos/id/1074/1024/1024.jpg?hmac=usAeJI_o3wzbLAca-PMBgHQXXhSoMNP5cvoktlhiUzY",
"https://fastly.picsum.photos/id/506/1024/1024.jpg?hmac=Wa93nuNDFEXWB_Fg4n2vcYT3sGcW7UBTjOAic46R9Gw",
"https://fastly.picsum.photos/id/343/1024/1024.jpg?hmac=WC3PsYGjbqnsQhfu1J1l3PeAzmsGEiZPISXAenRc2Qc"
]
enabledPaymentMethods
enum<string>[]

Optional list of payment methods to enable for this payment. If omitted, all available methods are shown.

Available options:
PSE,
CARD,
BANCOLOMBIA,
NEQUI
Example:
["PSE", "CARD", "NEQUI", "BANCOLOMBIA"]
paymentType
enum<string>
default:PRODUCT

Payment type: 'PRODUCT' or 'SERVICE', default is 'PRODUCT'

Available options:
PRODUCT,
SERVICE
Example:

"PRODUCT"

redirectUri
string<uri>

Redirect URI after payment creation

Example:

"https://example.com/payment-status"

courier
string

Name of the courier service used for delivery (optional)

Example:

"Coordinadora"

trackingNumber
string

Courier tracking number for delivery (optional)

Example:

"453265"

disableBuyerNotification
boolean
default:false

Disable WhatsApp notification to buyer on payment creation. By default, a notification is sent to the buyer's WhatsApp when a payment is created. Set to true to disable this notification.

Example:

false

expirationMinutes
integer

Optional payment expiration in minutes. If omitted, the default expiration is 3 days. Must be between 60 minutes and 43200 minutes (30 days).

Required range: 60 <= x <= 43200
Example:

4320

discountPercentage
number

Discount percentage applied to the payment as decimal (0-1, e.g., 0.35 for 35%).

Required range: 0 <= x <= 1
Example:

0.1

discountSource
string

The source of the discount (e.g., 'ty_page_cod_conversion', 'promo_code', 'referral')

Example:

"ty_page_cod_conversion"

Response

Successfully processed creation.

amountCents
number
required

Amount in cents

Required range: x >= 1000000
Example:

5000000

currencyCode
string
required

Currency code

Example:

"COP"

title
string
required

Payment title

Example:

"Juguete"

description
string
required

Payment description (at least 24 characters)

Example:

"Juguete increíble"

buyer
object
required
name
string
required

Payment's resource name

Example:

"stores/01JNRRDZDPH40DB2YRW329BFXM/payments/01JNRVWWHH68E76V3TMFFT6GHJ"

status
enum<string>
required

Payment status

Available options:
STATUS_UNSPECIFIED,
AWAITING_PAYMENT,
PAYMENT_IN_PROGRESS,
FUNDED,
DELIVERING,
UNDER_REVIEW,
APPROVED,
DISPUTED,
REFUNDED,
EXPIRED,
CANCELED,
FAILED
Example:

"AWAITING_PAYMENT"

organization
string
required

Organization's resource name

Example:

"organizations/01JNRR1NY8MDX4XCGG0N4F06X3"

url
string
required

Payment link

Example:

"https://checkout.confiopagos.com/p/01JNV8CSHNN933B09T5MTNK89V"

createTime
string
required

Creation timestamp

Example:

"2024-01-15T10:30:00Z"

updateTime
string
required

Last update timestamp

Example:

"2024-01-15T10:30:00Z"

expireTime
string
required

Payment expiration timestamp

Example:

"2024-01-18T10:30:00Z"

correlationId
string

Your internal payment/order ID for tracking and correlation. Use this to match Confío payments with your system's orders.

Example:

"36285414"

mediaAssets
string<uri>[]

Media assets links (required when paymentType is PRODUCT, max 6 items). Each URL must be a publicly accessible URL from a public server (e.g., your CDN, cloud storage, or any public web server). Allowed formats: PNG, JPEG, JPEG XL, WebP, AVIF, GIF, ICO, SVG, HEIC, BMP, TIFF. Maximum file size: 100MB per file.

Maximum array length: 6
Example:
[
"https://fastly.picsum.photos/id/1074/1024/1024.jpg?hmac=usAeJI_o3wzbLAca-PMBgHQXXhSoMNP5cvoktlhiUzY",
"https://fastly.picsum.photos/id/506/1024/1024.jpg?hmac=Wa93nuNDFEXWB_Fg4n2vcYT3sGcW7UBTjOAic46R9Gw",
"https://fastly.picsum.photos/id/343/1024/1024.jpg?hmac=WC3PsYGjbqnsQhfu1J1l3PeAzmsGEiZPISXAenRc2Qc"
]
enabledPaymentMethods
enum<string>[]

Optional list of payment methods to enable for this payment. If omitted, all available methods are shown.

Available options:
PSE,
CARD,
BANCOLOMBIA,
NEQUI
Example:
["PSE", "CARD", "NEQUI", "BANCOLOMBIA"]
paymentType
enum<string>
default:PRODUCT

Payment type: 'PRODUCT' or 'SERVICE', default is 'PRODUCT'

Available options:
PRODUCT,
SERVICE
Example:

"PRODUCT"

redirectUri
string<uri>

Redirect URI after payment creation

Example:

"https://example.com/payment-status"

courier
string

Name of the courier service used for delivery (optional)

Example:

"Coordinadora"

trackingNumber
string

Courier tracking number for delivery (optional)

Example:

"453265"

disableBuyerNotification
boolean
default:false

Disable WhatsApp notification to buyer on payment creation. By default, a notification is sent to the buyer's WhatsApp when a payment is created. Set to true to disable this notification.

Example:

false

discountPercentage
number

Discount percentage applied to the payment as decimal (0-1, e.g., 0.35 for 35%).

Required range: 0 <= x <= 1
Example:

0.1

discountSource
string

The source of the discount (e.g., 'ty_page_cod_conversion', 'promo_code', 'referral')

Example:

"ty_page_cod_conversion"