Skip to content

Instantly share code, notes, and snippets.

@tallesairan
Last active October 27, 2020 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tallesairan/6a3b8ebefee7cb4f3f4bc9b96d54bcb3 to your computer and use it in GitHub Desktop.
Save tallesairan/6a3b8ebefee7cb4f3f4bc9b96d54bcb3 to your computer and use it in GitHub Desktop.
XPague Postbacks

XPague Postbacks

Documentação atualizada, acesse a nova versão em: XPague Docs

Tipo do postback em objectType

No momento os tipos de postbacks são objectType { 'transaction', 'cart' } sendo cart para recuperação de carrinhos, objeto usado em cart é o mesmo do Customer

Acessando schemas

Acesse https://jsonschema.net ou https://codebeautify.org/jsonviewer/c6a219 para ver a schema. é bem simples basta copiar o conteúdo dela e colar para uma inspeção

ambas recebem as mesmas requisições, as requisições antigas foram apagadas para evitar confusões

Delays

o delay para a transação ou recuperação de carrinho ser entregue e de 3 minutos após a ação, seja ela uma recuperação de carrinho ou uma transação

Status

Possíveis status "pending", "approved", "rejected" "in_process"

{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "http://painel.xpague.com/postback-schema-cart.json",
"type": "object",
"title": "XPague Recuperação de carrinho",
"description": "Schema recuperação de carrinho.",
"required": [
"objectType",
"product",
"customer"
],
"properties": {
"objectType": {
"$id": "#/properties/objectType",
"type": "string",
"title": "Tipo de postback",
"description": "na recuperação o tipo tem que ser cart.",
"default": "",
"examples": [
"cart"
]
},
"product": {
"$id": "#/properties/product",
"type": "object",
"title": "Objeto do produto",
"description": "",
"default": {},
"examples": [
{
"productShipping": "0",
"productCover": "https://painel.xpague.com/app/uploads/2019/11/facereverse.png",
"productTotal": "349.00",
"fillableUrl": "https://pagamento.xpague.com/id/?src=postback&ct=36",
"productPrice": "349.00",
"id": 145720,
"checkoutId": 145622,
"productName": "Femme Busto Kit 5",
"description": "Creme para limpeza facial",
"productThumbnail": "https://painel.xpague.com/app/uploads/2020/01/FemmeGel.png"
}
],
"required": [
"id",
"productName",
"description",
"productPrice",
"productShipping",
"productCover",
"productThumbnail",
"productTotal",
"fillableUrl"
],
"properties": {
"id": {
"$id": "#/properties/product/properties/id",
"type": "integer",
"title": "The Id Schema",
"description": "ID do produto.",
"default": 0,
"examples": [
145720
]
},
"productName": {
"$id": "#/properties/product/properties/productName",
"type": "string",
"title": "Nome do produto",
"description": "Nome do produto.",
"default": "",
"examples": [
"Femme Busto Kit 5"
]
},
"description": {
"$id": "#/properties/product/properties/description",
"type": "string",
"title": "Descrição do produto",
"description": "Descrição do produto",
"default": "",
"examples": [
"Creme para limpeza facial"
]
},
"productPrice": {
"$id": "#/properties/product/properties/productPrice",
"type": "string",
"title": "Preço do produto",
"description": "Preço do produto.",
"default": "",
"examples": [
"349.00"
]
},
"productShipping": {
"$id": "#/properties/product/properties/productShipping",
"type": "string",
"title": "Preço do frete",
"description": "Preço do frete",
"default": "",
"examples": [
"0"
]
},
"productCover": {
"$id": "#/properties/product/properties/productCover",
"type": "string",
"title": "Imagem de capa",
"description": "",
"default": "",
"examples": [
" https://painel.xpague.com/app/uploads/2020/01/FemmeGeFl.png"
]
},
"productThumbnail": {
"$id": "#/properties/product/properties/productThumbnail",
"type": "string",
"title": "Thumbnail do produto",
"description": "",
"default": "",
"examples": [
" https://painel.xpague.com/app/uploads/2020/01/FemmeGeFl.png"
]
},
"productTotal": {
"$id": "#/properties/product/properties/productTotal",
"type": "string",
"title": "Total do produto com frete",
"description": "",
"default": "",
"examples": [
"349.00"
]
},
"fillableUrl": {
"$id": "#/properties/product/properties/fillableUrl",
"type": "string",
"title": "The Fillableurl Schema",
"description": "",
"default": "",
"examples": [
"https://pagamento.xpague.com/id/?src=postback&ct=36"
]
}
}
},
"customer": {
"$id": "#/properties/customer",
"type": "object",
"readOnly": false,
"writeOnly": false,
"minProperties": 0,
"title": "Customer",
"description": "Cliente",
"default": {},
"examples": [
{
"doc": {
"raw": "00000000000",
"formatted": "000.000.000-00"
},
"phone": {
"formatted": "(21) 00000-0000",
"raw": "21000000000"
},
"address": {
"complementary": "",
"city": "Nilópolis",
"country": "br",
"state": "RJ",
"address": "Estrada Mirandela",
"neighborhood": "Centro",
"zipcode": "26520332",
"number": "700"
},
"docType": "cpf",
"name": "María Aparecida Murce"
}
],
"additionalProperties": true,
"required": [
"name",
"docType",
"doc",
"phone",
"address"
],
"properties": {
"name": {
"$id": "#/properties/customer/properties/name",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Name",
"description": "Nome",
"default": "",
"examples": [
"María Teste Teste"
]
},
"docType": {
"$id": "#/properties/customer/properties/docType",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Doctype",
"description": ".",
"default": "",
"examples": [
"cpf"
]
},
"doc": {
"$id": "#/properties/customer/properties/doc",
"type": "object",
"readOnly": false,
"writeOnly": false,
"minProperties": 0,
"title": "Doc",
"description": "CPF formatado e CPF sem máscara",
"default": {},
"examples": [
{
"formatted": "000.000.000-00",
"raw": "00000000000"
}
],
"additionalProperties": true,
"required": [
"raw",
"formatted"
],
"properties": {
"raw": {
"$id": "#/properties/customer/properties/doc/properties/raw",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Raw",
"description": ".",
"default": "",
"examples": [
"00000000000"
]
},
"formatted": {
"$id": "#/properties/customer/properties/doc/properties/formatted",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Formatted",
"description": ".",
"default": "",
"examples": [
"000.000.000-00"
]
}
}
},
"phone": {
"$id": "#/properties/customer/properties/phone",
"type": "object",
"readOnly": false,
"writeOnly": false,
"minProperties": 0,
"title": "Phone",
"description": ".",
"default": {},
"examples": [
{
"formatted": "(21) 00000-0000",
"raw": "21000000000"
}
],
"additionalProperties": true,
"required": [
"raw",
"formatted"
],
"properties": {
"raw": {
"$id": "#/properties/customer/properties/phone/properties/raw",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Raw",
"description": ".",
"default": "",
"examples": [
"21000000000"
]
},
"formatted": {
"$id": "#/properties/customer/properties/phone/properties/formatted",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Formatted",
"description": ".",
"default": "",
"examples": [
"(21) 00000-0000"
]
}
}
},
"address": {
"$id": "#/properties/customer/properties/address",
"type": "object",
"readOnly": false,
"writeOnly": false,
"minProperties": 0,
"title": "Address",
"description": "Objeto de endereço do cliente",
"default": {},
"examples": [
{
"complementary": "",
"city": "Nilópolis",
"country": "br",
"state": "RJ",
"address": "Estrada Mirandela",
"neighborhood": "Centro",
"zipcode": "26520332",
"number": "700"
}
],
"additionalProperties": true,
"required": [
"address",
"number",
"complementary",
"neighborhood",
"zipcode",
"city",
"state",
"country"
],
"properties": {
"address": {
"$id": "#/properties/customer/properties/address/properties/address",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Address",
"description": "endereço linha 1",
"default": "",
"examples": [
"Estrada Mirandela"
]
},
"number": {
"$id": "#/properties/customer/properties/address/properties/number",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Number",
"description": "Número",
"default": "",
"examples": [
"700",
"S/N"
]
},
"complementary": {
"$id": "#/properties/customer/properties/address/properties/complementary",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Complementary",
"description": "Complemento",
"default": "",
"examples": [
"Casa 01"
]
},
"neighborhood": {
"$id": "#/properties/customer/properties/address/properties/neighborhood",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Neighborhood",
"description": "Bairro",
"default": "",
"examples": [
"Centro"
]
},
"zipcode": {
"$id": "#/properties/customer/properties/address/properties/zipcode",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Zipcode",
"description": "CEP",
"default": "",
"examples": [
"26520332"
]
},
"city": {
"$id": "#/properties/customer/properties/address/properties/city",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "City",
"description": "Cidade",
"default": "",
"examples": [
"Nilópolis"
]
},
"state": {
"$id": "#/properties/customer/properties/address/properties/state",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "State",
"description": "Estado",
"default": "",
"examples": [
"RJ"
]
},
"country": {
"$id": "#/properties/customer/properties/address/properties/country",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Country",
"description": ".",
"default": "",
"examples": [
"br"
]
}
}
}
}
}
}
}
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "http://painel.xpague.com/postback-schema-transactions.json",
"type": "object",
"readOnly": false,
"writeOnly": false,
"minProperties": 0,
"title": "XPague postback",
"description": "XPague postback",
"additionalProperties": true,
"required": [
"objectType",
"transaction",
"customer"
],
"properties": {
"objectType": {
"$id": "#/properties/objectType",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Objecttype",
"description": "Tipo de postback transaction e relacionado a uma transação enquanto cart já é da recuperação de carrinho",
"default": "",
"examples": [
"transaction",
"cart"
]
},
"transaction": {
"$id": "#/properties/transaction",
"type": "object",
"readOnly": false,
"writeOnly": false,
"minProperties": 0,
"title": "Objeto da transação",
"description": "Tudo relacionado a transação está contido aqui",
"default": {},
"examples": [
{
"billet": "https://pagamento.xpague.com/b/208180?em=1",
"dateUpdated": "2020-03-20 14:19:27",
"barcodeRaw": "23791229286000471538392000046901482030000014900",
"barcode": "23791.22928 60004.715383 92000.046901 4 82030000014900",
"authorizationCode": "173575628",
"token": "cd033ef874716ba5a7c57cbab5f95029",
"billetPdf": "https://pagamento.xpague.com/b/208180?pd=1",
"orderType": "normal",
"statusDesc": "Pendente",
"billetExpire": "2020-03-23 03:00:00",
"total": "149.00",
"fillableUrl": "https://pagamento.xpague.com/id/185917?src=postback&fill=208180",
"items": [
{
"description": "Produto feito para mulheres que desejam aumentar o busto, ou até mesmo levantar o busto.",
"productThumbnail": "https://painel.xpague.com/app/uploads/2020/02/femmebusto-new-300x300.png",
"productShipping": "0",
"productCover": "https://painel.xpague.com/app/uploads/2020/02/femmebusto-1000x300.png",
"paymentMethods": [
"credit",
"billet"
],
"quantity": 1.0,
"productPrice": "149.00",
"id": 185917,
"checkoutId": 18881,
"productName": "Femme Busto Kit 1",
"url": "https://pagamento.xpague.com/id/185917?src=postback"
}
],
"paymentMethod": "billet",
"status": "pending",
"id": "208180",
"thanksPage": "https://pagamento.xpague.com/b/208180",
"dateCreated": "2020-03-20 11:19:26",
"transactionId": "173575628"
}
],
"additionalProperties": true,
"required": [
"id",
"status",
"statusDesc",
"orderType",
"paymentMethod",
"transactionId",
"authorizationCode",
"token",
"items",
"total",
"thanksPage",
"fillableUrl",
"dateCreated",
"dateUpdated",
"billet",
"billetPdf",
"barcode",
"barcodeRaw",
"billetExpire"
],
"properties": {
"id": {
"$id": "#/properties/transaction/properties/id",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Id",
"description": "id do pedido",
"default": "",
"examples": [
"208180"
]
},
"status": {
"$id": "#/properties/transaction/properties/status",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Status",
"description": "Status da transação",
"default": "",
"examples": [
"pending",
"approved",
"rejected",
"in_process"
]
},
"statusDesc": {
"$id": "#/properties/transaction/properties/statusDesc",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Statusdesc",
"description": "Descrição do status",
"default": "",
"examples": [
"Data de vencimento do cartão incorreta",
"Número do cartão incorreto"
]
},
"orderType": {
"$id": "#/properties/transaction/properties/orderType",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Ordertype",
"description": "Tipo do pedido.",
"default": "normal",
"examples": [
"normal",
"upsell"
]
},
"paymentMethod": {
"$id": "#/properties/transaction/properties/paymentMethod",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Paymentmethod",
"description": "Método de pagamento",
"default": "",
"examples": [
"billet",
"creidt"
]
},
"transactionId": {
"$id": "#/properties/transaction/properties/transactionId",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Transactionid",
"description": "Número da transação, apartir do processador de pagamentos",
"default": "",
"examples": [
"173575628"
]
},
"authorizationCode": {
"$id": "#/properties/transaction/properties/authorizationCode",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Authorizationcode",
"description": "Código de autorizaçao, apartir do processador de pagamentos",
"default": "",
"examples": [
"173575628"
]
},
"token": {
"$id": "#/properties/transaction/properties/token",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Token",
"description": "Token de sessão do cliente",
"default": "",
"examples": [
"cd033ef874716ba5a7c57cbab5f95029"
]
},
"items": {
"$id": "#/properties/transaction/properties/items",
"type": "array",
"readOnly": false,
"writeOnly": false,
"uniqueItems": false,
"minItems": 0,
"minContains": 1,
"title": "Items",
"description": "produtos no pedido",
"default": [],
"additionalItems": true,
"items": {
"$id": "#/properties/transaction/properties/items/items",
"type": "object",
"readOnly": false,
"writeOnly": false,
"minProperties": 0,
"title": "Items",
"description": "produtos no pedido",
"default": {},
"examples": [
{
"paymentMethods": [
"credit",
"billet"
],
"quantity": 1.0,
"productPrice": "149.00",
"id": 185917.0,
"productName": "Femme Busto Kit 1",
"url": "https://pagamento.xpague.com/id/185917?src=postback",
"description": "Produto feito para mulheres que desejam aumentar o busto, ou até mesmo levantar o busto.",
"productThumbnail": "https://painel.xpague.com/app/uploads/2020/02/femmebusto-new-300x300.png",
"productShipping": "0",
"productCover": "https://painel.xpague.com/app/uploads/2020/02/femmebusto-1000x300.png"
}
],
"additionalProperties": true,
"required": [
"id",
"productName",
"description",
"productPrice",
"productShipping",
"productCover",
"productThumbnail",
"quantity",
"paymentMethods",
"url"
],
"properties": {
"id": {
"$id": "#/properties/transaction/properties/items/items/properties/id",
"type": "integer",
"readOnly": false,
"writeOnly": false,
"title": "Id",
"description": "ID do produto",
"default": 0,
"examples": [
185917
]
},
"productName": {
"$id": "#/properties/transaction/properties/items/items/properties/productName",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "productName",
"description": "Nome do produto",
"default": "",
"examples": [
"Femme Busto Kit 1"
]
},
"description": {
"$id": "#/properties/transaction/properties/items/items/properties/description",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Descrição",
"description": "Descrição do produto",
"default": "",
"examples": [
"Produto feito para mulheres que desejam aumentar o busto, ou até mesmo levantar o busto."
]
},
"productPrice": {
"$id": "#/properties/transaction/properties/items/items/properties/productPrice",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Productprice",
"description": ".",
"default": "",
"examples": [
"149.00"
]
},
"productShipping": {
"$id": "#/properties/transaction/properties/items/items/properties/productShipping",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Productshipping",
"description": ".",
"default": "",
"examples": [
"0"
]
},
"productCover": {
"$id": "#/properties/transaction/properties/items/items/properties/productCover",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Productcover",
"description": "Imagem de capa do produto",
"default": "",
"examples": [
"https://painel.xpague.com/app/uploads/2020/02/femmebusto-1000x300.png"
]
},
"productThumbnail": {
"$id": "#/properties/transaction/properties/items/items/properties/productThumbnail",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Productthumbnail",
"description": "Thumbnail do produto",
"default": "",
"examples": [
"https://painel.xpague.com/app/uploads/2020/02/femmebusto-new-300x300.png"
]
},
"quantity": {
"$id": "#/properties/transaction/properties/items/items/properties/quantity",
"type": "integer",
"readOnly": false,
"writeOnly": false,
"title": "Quantity",
"description": "Quantidade",
"default": 0,
"examples": [
1
]
},
"paymentMethods": {
"$id": "#/properties/transaction/properties/items/items/properties/paymentMethods",
"type": "array",
"readOnly": false,
"writeOnly": false,
"uniqueItems": false,
"minItems": 0,
"minContains": 1,
"title": "PaymentMethods",
"description": "Métodos de pagamentos suportados no produto",
"default": [],
"additionalItems": true,
"items": {
"$id": "#/properties/transaction/properties/items/items/properties/paymentMethods/items",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Items",
"description": ".",
"default": "",
"examples": [
"credit",
"billet"
]
}
},
"url": {
"$id": "#/properties/transaction/properties/items/items/properties/url",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Url",
"description": "Url do checkout sem preencher as informações",
"default": "",
"examples": [
"https://pagamento.xpague.com/id/185917?src=postback"
]
}
}
}
},
"total": {
"$id": "#/properties/transaction/properties/total",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Total",
"description": "Total do pedido",
"default": "",
"examples": [
"149.00"
]
},
"thanksPage": {
"$id": "#/properties/transaction/properties/thanksPage",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Thankspage",
"description": "Página de obrigado",
"default": "",
"examples": [
"https://pagamento.xpague.com/b/208180"
]
},
"fillableUrl": {
"$id": "#/properties/transaction/properties/fillableUrl",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Fillableurl",
"description": "Página do checkout com as informações preenchidas",
"default": "",
"examples": [
"https://pagamento.xpague.com/id/185917?src=postback&fill=208180"
]
},
"dateCreated": {
"$id": "#/properties/transaction/properties/dateCreated",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Datecreated",
"description": "Data de criação do pedido",
"default": "",
"examples": [
"2020-03-20 11:19:26"
]
},
"dateUpdated": {
"$id": "#/properties/transaction/properties/dateUpdated",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Dateupdated",
"description": "Data de atualização do pedido",
"default": "",
"examples": [
"2020-03-20 14:19:27"
]
},
"billet": {
"$id": "#/properties/transaction/properties/billet",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Billet",
"description": "Url do boleto em html",
"default": "",
"examples": [
"https://pagamento.xpague.com/b/208180?em=1"
]
},
"billetPdf": {
"$id": "#/properties/transaction/properties/billetPdf",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Billetpdf",
"description": "URL do boleto em pdf",
"default": "",
"examples": [
"https://pagamento.xpague.com/b/208180?pd=1"
]
},
"barcode": {
"$id": "#/properties/transaction/properties/barcode",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Barcode",
"description": "Código de barras com máscara",
"default": "",
"examples": [
"23791.22928 60004.715383 92000.046901 4 82030000014900"
]
},
"barcodeRaw": {
"$id": "#/properties/transaction/properties/barcodeRaw",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Barcoderaw",
"description": "Código de barras sem máscara",
"default": "",
"examples": [
"23791229286000471538392000046901482030000014900"
]
},
"billetExpire": {
"$id": "#/properties/transaction/properties/billetExpire",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Billetexpire",
"description": "Expiração do boleto",
"default": "",
"examples": [
"2020-03-23 03:00:00"
]
}
}
},
"customer": {
"$id": "#/properties/customer",
"type": "object",
"readOnly": false,
"writeOnly": false,
"minProperties": 0,
"title": "Customer",
"description": "Cliente",
"default": {},
"examples": [
{
"doc": {
"raw": "00000000000",
"formatted": "000.000.000-00"
},
"phone": {
"formatted": "(21) 00000-0000",
"raw": "21000000000"
},
"address": {
"complementary": "",
"city": "Nilópolis",
"country": "br",
"state": "RJ",
"address": "Estrada Mirandela",
"neighborhood": "Centro",
"zipcode": "26520332",
"number": "700"
},
"docType": "cpf",
"name": "María Aparecida Murce"
}
],
"additionalProperties": true,
"required": [
"name",
"docType",
"doc",
"phone",
"address"
],
"properties": {
"name": {
"$id": "#/properties/customer/properties/name",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Name",
"description": "Nome",
"default": "",
"examples": [
"María Teste Teste"
]
},
"docType": {
"$id": "#/properties/customer/properties/docType",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Doctype",
"description": ".",
"default": "",
"examples": [
"cpf"
]
},
"doc": {
"$id": "#/properties/customer/properties/doc",
"type": "object",
"readOnly": false,
"writeOnly": false,
"minProperties": 0,
"title": "Doc",
"description": "CPF formatado e CPF sem máscara",
"default": {},
"examples": [
{
"formatted": "000.000.000-00",
"raw": "00000000000"
}
],
"additionalProperties": true,
"required": [
"raw",
"formatted"
],
"properties": {
"raw": {
"$id": "#/properties/customer/properties/doc/properties/raw",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Raw",
"description": ".",
"default": "",
"examples": [
"00000000000"
]
},
"formatted": {
"$id": "#/properties/customer/properties/doc/properties/formatted",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Formatted",
"description": ".",
"default": "",
"examples": [
"000.000.000-00"
]
}
}
},
"phone": {
"$id": "#/properties/customer/properties/phone",
"type": "object",
"readOnly": false,
"writeOnly": false,
"minProperties": 0,
"title": "Phone",
"description": ".",
"default": {},
"examples": [
{
"formatted": "(21) 00000-0000",
"raw": "21000000000"
}
],
"additionalProperties": true,
"required": [
"raw",
"formatted"
],
"properties": {
"raw": {
"$id": "#/properties/customer/properties/phone/properties/raw",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Raw",
"description": ".",
"default": "",
"examples": [
"21000000000"
]
},
"formatted": {
"$id": "#/properties/customer/properties/phone/properties/formatted",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Formatted",
"description": ".",
"default": "",
"examples": [
"(21) 00000-0000"
]
}
}
},
"address": {
"$id": "#/properties/customer/properties/address",
"type": "object",
"readOnly": false,
"writeOnly": false,
"minProperties": 0,
"title": "Address",
"description": "Objeto de endereço do cliente",
"default": {},
"examples": [
{
"complementary": "",
"city": "Nilópolis",
"country": "br",
"state": "RJ",
"address": "Estrada Mirandela",
"neighborhood": "Centro",
"zipcode": "26520332",
"number": "700"
}
],
"additionalProperties": true,
"required": [
"address",
"number",
"complementary",
"neighborhood",
"zipcode",
"city",
"state",
"country"
],
"properties": {
"address": {
"$id": "#/properties/customer/properties/address/properties/address",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Address",
"description": "endereço linha 1",
"default": "",
"examples": [
"Estrada Mirandela"
]
},
"number": {
"$id": "#/properties/customer/properties/address/properties/number",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Number",
"description": "Número",
"default": "",
"examples": [
"700",
"S/N"
]
},
"complementary": {
"$id": "#/properties/customer/properties/address/properties/complementary",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Complementary",
"description": "Complemento",
"default": "",
"examples": [
"Casa 01"
]
},
"neighborhood": {
"$id": "#/properties/customer/properties/address/properties/neighborhood",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Neighborhood",
"description": "Bairro",
"default": "",
"examples": [
"Centro"
]
},
"zipcode": {
"$id": "#/properties/customer/properties/address/properties/zipcode",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Zipcode",
"description": "CEP",
"default": "",
"examples": [
"26520332"
]
},
"city": {
"$id": "#/properties/customer/properties/address/properties/city",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "City",
"description": "Cidade",
"default": "",
"examples": [
"Nilópolis"
]
},
"state": {
"$id": "#/properties/customer/properties/address/properties/state",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "State",
"description": "Estado",
"default": "",
"examples": [
"RJ"
]
},
"country": {
"$id": "#/properties/customer/properties/address/properties/country",
"type": "string",
"readOnly": false,
"writeOnly": false,
"minLength": 0,
"title": "Country",
"description": ".",
"default": "",
"examples": [
"br"
]
}
}
}
}
}
}
}

Customer Schema

#/properties/customer#/properties/customer

Cliente

Abstract Extensible Status Identifiable Custom Properties Additional Properties Access Restrictions Defined In
Can be instantiated No Unknown status No Forbidden Allowed none cart.schema.json*

customer Type

object (Customer)

customer Constraints

minimum number of properties: the minimum number of properties for this object is: 0

customer Default Value

The default value is:

{}

customer Examples

{
  "doc": {
    "raw": "00000000000",
    "formatted": "000.000.000-00"
  },
  "phone": {
    "formatted": "(21) 00000-0000",
    "raw": "21000000000"
  },
  "address": {
    "complementary": "",
    "city": "Nilópolis",
    "country": "br",
    "state": "RJ",
    "address": "Estrada Mirandela",
    "neighborhood": "Centro",
    "zipcode": "26520332",
    "number": "700"
  },
  "docType": "cpf",
  "name": "María Aparecida Murce"
}

Customer Properties

Property Type Required Nullable Defined by
name string Required cannot be null XPague Recuperação de carrinho
docType string Required cannot be null XPague Recuperação de carrinho
doc object Required cannot be null XPague Recuperação de carrinho
phone object Required cannot be null XPague Recuperação de carrinho
address object Required cannot be null XPague Recuperação de carrinho
Additional Properties Any Optional can be null

name

Nome

name

name Type

string (Name)

name Constraints

minimum length: the minimum number of characters for this string is: 0

name Examples

"María Teste Teste"

docType

.

docType

docType Type

string (Doctype)

docType Constraints

minimum length: the minimum number of characters for this string is: 0

docType Examples

"cpf"

doc

CPF formatado e CPF sem máscara

doc

doc Type

object (Doc)

doc Constraints

minimum number of properties: the minimum number of properties for this object is: 0

doc Default Value

The default value is:

{}

doc Examples

{
  "formatted": "000.000.000-00",
  "raw": "00000000000"
}

phone

.

phone

phone Type

object (Phone)

phone Constraints

minimum number of properties: the minimum number of properties for this object is: 0

phone Default Value

The default value is:

{}

phone Examples

{
  "formatted": "(21) 00000-0000",
  "raw": "21000000000"
}

address

Objeto de endereço do cliente

address

address Type

object (Address)

address Constraints

minimum number of properties: the minimum number of properties for this object is: 0

address Default Value

The default value is:

{}

address Examples

{
  "complementary": "",
  "city": "Nilópolis",
  "country": "br",
  "state": "RJ",
  "address": "Estrada Mirandela",
  "neighborhood": "Centro",
  "zipcode": "26520332",
  "number": "700"
}

Additional Properties

Additional properties are allowed and do not have to follow a specific schema

Objeto do produto Schema

#/properties/product#/properties/product
Abstract Extensible Status Identifiable Custom Properties Additional Properties Access Restrictions Defined In
Can be instantiated No Unknown status No Forbidden Allowed none cart.schema.json*

product Type

object ([Objeto do produto])

product Default Value

The default value is:

{}

product Examples

{
  "productShipping": "0",
  "productCover": "https://painel.xpague.com/app/uploads/2019/11/facereverse.png",
  "productTotal": "349.00",
  "fillableUrl": "https://pagamento.xpague.com/id/?src=postback&ct=36",
  "productPrice": "349.00",
  "id": 145720,
  "checkoutId"=>99188,
  "productName": "Femme Busto Kit 5",
  "description": "Creme para limpeza facial",
  "productThumbnail": "https://painel.xpague.com/app/uploads/2020/01/FemmeGel.png"
}

Objeto do produto Properties

Property Type Required Nullable Defined by
id integer Required cannot be null XPague Recuperação de carrinho
checkoutId(#checkoutId) Código do checkout Required cannot be null
productName string Required cannot be null XPague Recuperação de carrinho
description string Required cannot be null XPague Recuperação de carrinho
productPrice string Required cannot be null XPague Recuperação de carrinho
productShipping string Required cannot be null XPague Recuperação de carrinho
productCover string Required cannot be null XPague Recuperação de carrinho
productThumbnail string Required cannot be null XPague Recuperação de carrinho
productTotal string Required cannot be null XPague Recuperação de carrinho
fillableUrl string Required cannot be null XPague Recuperação de carrinho

id

ID do produto.

id

id Type

integer (The Id Schema)

id Examples

145720

productName

Nome do produto.

productName

productName Type

string (Nome do produto)

productName Examples

"Femme Busto Kit 5"

description

Descrição do produto

description

description Type

string (Descrição do produto)

description Examples

"Creme para limpeza facial"

productPrice

Preço do produto.

productPrice

productPrice Type

string (Preço do produto)

productPrice Examples

"349.00"

productShipping

Preço do frete

productShipping

productShipping Type

string (Preço do frete)

productShipping Examples

"0"

productCover

productCover

productCover Type

string (Imagem de capa)

productCover Examples

" https://painel.xpague.com/app/uploads/2020/01/FemmeGeFl.png"

productThumbnail

productThumbnail

productThumbnail Type

string (Thumbnail do produto)

productThumbnail Examples

" https://painel.xpague.com/app/uploads/2020/01/FemmeGeFl.png"

productTotal

productTotal

productTotal Type

string (Total do produto com frete)

productTotal Examples

"349.00"

fillableUrl

fillableUrl

fillableUrl Type

string (The Fillableurl Schema)

fillableUrl Examples

"https://pagamento.xpague.com/id/?src=postback&ct=36"

Objeto da transação Schema

#/properties/transaction#/properties/transaction

Tudo relacionado a transação está contido aqui

Abstract Extensible Status Identifiable Custom Properties Additional Properties Access Restrictions Defined In
Can be instantiated No Unknown status No Forbidden Allowed none transaction.schema.json*

transaction Type

object (Objeto da transação)

transaction Constraints

minimum number of properties: the minimum number of properties for this object is: 0

transaction Default Value

The default value is:

{}

transaction Examples

{
  "billet": "https://pagamento.xpague.com/b/208180?em=1",
  "dateUpdated": "2020-03-20 14:19:27",
  "barcodeRaw": "23791229286000471538392000046901482030000014900",
  "barcode": "23791.22928 60004.715383 92000.046901 4 82030000014900",
  "authorizationCode": "173575628",
  "token": "cd033ef874716ba5a7c57cbab5f95029",
  "billetPdf": "https://pagamento.xpague.com/b/208180?pd=1",
  "orderType": "normal",
  "statusDesc": "Pendente",
  "billetExpire": "2020-03-23 03:00:00",
  "total": "149.00",
  "fillableUrl": "https://pagamento.xpague.com/id/185917?src=postback&fill=208180",
  "items": [
    {
      "description": "Produto feito para mulheres que desejam aumentar o busto, ou até mesmo levantar o busto.",
      "productThumbnail": "https://painel.xpague.com/app/uploads/2020/02/femmebusto-new-300x300.png",
      "productShipping": "0",
      "productCover": "https://painel.xpague.com/app/uploads/2020/02/femmebusto-1000x300.png",
      "paymentMethods": [
        "credit",
        "billet"
      ],
      "quantity": 1,
      "productPrice": "149.00",
      "id": 185917,
      "checkoutId": 2123123,
      "productName": "Femme Busto Kit 1",
      "url": "https://pagamento.xpague.com/id/185917?src=postback"
    }
  ],
  "paymentMethod": "billet",
  "status": "pending",
  "id": "208180",
  "thanksPage": "https://pagamento.xpague.com/b/208180",
  "dateCreated": "2020-03-20 11:19:26",
  "transactionId": "173575628"
}

Objeto da transação Properties

Property Type Required Nullable Defined by
id string Required cannot be null XPague postback
status string Required cannot be null XPague postback
statusDesc string Required cannot be null XPague postback
orderType string Required cannot be null XPague postback
paymentMethod string Required cannot be null XPague postback
transactionId string Required cannot be null XPague postback
authorizationCode string Required cannot be null XPague postback
token string Required cannot be null XPague postback
items array Required cannot be null XPague postback
total string Required cannot be null XPague postback
thanksPage string Required cannot be null XPague postback
fillableUrl string Required cannot be null XPague postback
dateCreated string Required cannot be null XPague postback
dateUpdated string Required cannot be null XPague postback
billet string Required cannot be null XPague postback
billetPdf string Required cannot be null XPague postback
barcode string Required cannot be null XPague postback
barcodeRaw string Required cannot be null XPague postback
billetExpire string Required cannot be null XPague postback
Additional Properties Any Optional can be null

id

id do pedido

id

id Type

string (Id)

id Constraints

minimum length: the minimum number of characters for this string is: 0

id Examples

"208180"

status

Status da transação

status

status Type

string (Status)

status Constraints

minimum length: the minimum number of characters for this string is: 0

status Examples

"pending"
"approved"
"rejected"
"in_process"

statusDesc

Descrição do status

statusDesc

statusDesc Type

string (Statusdesc)

statusDesc Constraints

minimum length: the minimum number of characters for this string is: 0

statusDesc Examples

"Data de vencimento do cartão incorreta"
"Número do cartão incorreto"

orderType

Tipo do pedido.

orderType

orderType Type

string (Ordertype)

orderType Constraints

minimum length: the minimum number of characters for this string is: 0

orderType Default Value

The default value is:

"normal"

orderType Examples

"normal"
"upsell"

paymentMethod

Método de pagamento

paymentMethod

paymentMethod Type

string (Paymentmethod)

paymentMethod Constraints

minimum length: the minimum number of characters for this string is: 0

paymentMethod Examples

"billet"
"creidt"

transactionId

Número da transação, apartir do processador de pagamentos

transactionId

transactionId Type

string (Transactionid)

transactionId Constraints

minimum length: the minimum number of characters for this string is: 0

transactionId Examples

"173575628"

authorizationCode

Código de autorizaçao, apartir do processador de pagamentos

authorizationCode

authorizationCode Type

string (Authorizationcode)

authorizationCode Constraints

minimum length: the minimum number of characters for this string is: 0

authorizationCode Examples

"173575628"

token

Token de sessão do cliente

token

token Type

string (Token)

token Constraints

minimum length: the minimum number of characters for this string is: 0

token Examples

"cd033ef874716ba5a7c57cbab5f95029"

items

produtos no pedido

items

items Type

object[] (Items)

items Constraints

minimum number of items: the minimum number of items for this array is: 0

items Default Value

The default value is:

[]

total

Total do pedido

total

total Type

string (Total)

total Constraints

minimum length: the minimum number of characters for this string is: 0

total Examples

"149.00"

thanksPage

Página de obrigado

thanksPage

thanksPage Type

string (Thankspage)

thanksPage Constraints

minimum length: the minimum number of characters for this string is: 0

thanksPage Examples

"https://pagamento.xpague.com/b/208180"

fillableUrl

Página do checkout com as informações preenchidas

fillableUrl

fillableUrl Type

string (Fillableurl)

fillableUrl Constraints

minimum length: the minimum number of characters for this string is: 0

fillableUrl Examples

"https://pagamento.xpague.com/id/185917?src=postback&fill=208180"

dateCreated

Data de criação do pedido

dateCreated

dateCreated Type

string (Datecreated)

dateCreated Constraints

minimum length: the minimum number of characters for this string is: 0

dateCreated Examples

"2020-03-20 11:19:26"

dateUpdated

Data de atualização do pedido

dateUpdated

dateUpdated Type

string (Dateupdated)

dateUpdated Constraints

minimum length: the minimum number of characters for this string is: 0

dateUpdated Examples

"2020-03-20 14:19:27"

billet

Url do boleto em html

billet

billet Type

string (Billet)

billet Constraints

minimum length: the minimum number of characters for this string is: 0

billet Examples

"https://pagamento.xpague.com/b/208180?em=1"

billetPdf

URL do boleto em pdf

billetPdf

billetPdf Type

string (Billetpdf)

billetPdf Constraints

minimum length: the minimum number of characters for this string is: 0

billetPdf Examples

"https://pagamento.xpague.com/b/208180?pd=1"

barcode

Código de barras com máscara

barcode

barcode Type

string (Barcode)

barcode Constraints

minimum length: the minimum number of characters for this string is: 0

barcode Examples

"23791.22928 60004.715383 92000.046901 4 82030000014900"

barcodeRaw

Código de barras sem máscara

barcodeRaw

barcodeRaw Type

string (Barcoderaw)

barcodeRaw Constraints

minimum length: the minimum number of characters for this string is: 0

barcodeRaw Examples

"23791229286000471538392000046901482030000014900"

billetExpire

Expiração do boleto

billetExpire

billetExpire Type

string (Billetexpire)

billetExpire Constraints

minimum length: the minimum number of characters for this string is: 0

billetExpire Examples

"2020-03-23 03:00:00"

Additional Properties

Additional properties are allowed and do not have to follow a specific schema

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment