API Sipago
  • API Sipago
  • Guía de inicio rápido
  • Reference
    • API Reference
      • Movimientos
      • Depósitos
      • Link de Pago
      • QR
Con tecnología de GitBook
En esta página
  1. Reference
  2. API Reference

Link de Pago

Generá una orden de pago.

Generar link de pago

POST /api/paymentButtonsToken

Headers

Key
Value

Content-Type

application/json

apikey

su_api_key

X-TRACE-ID

uuidv4()

X-VERSION

1

Request Body

Name
Type
Description

number

monto del link de pago

string

descripción sobre la venta o producto

Response

// response.successUrl será su link de pago

{
    "success": "OK",
    "successUrl": "string",
    "whatsappUrl": "string",
    "facebookUrl": "string"
}
// Si no se envía 'amount'

{
    "statusText": "Bad Request",
    "jsonSchemaValidation": true,
    "validations": {
        "body": [
            {
                "keyword": "string",
                "dataPath": "string",
                "schemaPath": "string",
                "params": {
                    "missingProperty": "string"
                },
                "message": "string"
            }
        ]
    }
}
// Si apikey no es enviado en el Headers: 
{"message":"Missing API key found in request"}

// Si apikey es enviada de forma errónea:
{"message":"Invalid API key in request"}
// Error de parámetros

{
   "status": 500,
   "message": "status 500",
   "timestamp": "2024-05-28T12:30:04Z"
}

Aquí algunos ejemplos de peticiones:

curl --location 'http://api-gwt.sipago.online/services/api/paymentButtonsToken' \
--header 'apikey: su_api_key' \
--header 'X-TRACE-ID: uuidv4()' \
--header 'X-VERSION: 1' \
--header 'Content-Type: application/json' \
--data '{"amount": 100, "description": "coca-cola"}'
const axios = require('axios');
let data = JSON.stringify({
  "amount": 100,
  "description": "coca-cola"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'http://api-gwt.sipago.online/services/api/paymentButtonsToken',
  headers: { 
    'apikey': 'su_api_key', 
    'X-TRACE-ID': 'uuid', 
    'X-VERSION': '100', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
import requests
import json

url = "http://api-gwt.sipago.online/services/api/paymentButtonsToken"

payload = json.dumps({
  "amount": 100,
  "description": "coca-cola"
})
headers = {
  'apikey': 'su_api_key',
  'X-TRACE-ID': 'uuid',
  'X-VERSION': '100',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
AnteriorDepósitosSiguienteQR

Última actualización hace 9 meses

amount
description