Postbacks
Nossos Postbacks foram criados para ajudar desenvolvedores, produtores e empresas a consumir de nossos serviços e automatizar seus sistemas
o primeiro passo e entender como é a estrutura dos postbacks no nossos postbacks contamos com a seguinte estrutura:
Abandono de carrinho
Duas schemas responsáveis pela estrutura do abandono de carrinho
Customer Schema
Dados do cliente, usados em transações e recuperação de carrinho
#/properties/customer#/properties/customer
Cliente
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
- is required
- Type:
string
(Name) - cannot be null
- defined in: XPague Recuperação de carrinho
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
- is required
- Type:
string
(Doctype) - cannot be null
- defined in: XPague Recuperação de carrinho
docType Type
string
(Doctype)
docType Constraints
minimum length: the minimum number of characters for this string is: 1
docType Examples
"cpf"
doc
CPF formatado e CPF sem máscara
doc
- is required
- Type:
object
(Doc) - cannot be null
- defined in: XPague Recuperação de carrinho
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
- is required
- Type:
object
(Phone) - cannot be null
- defined in: XPague Recuperação de carrinho
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
- is required
- Type:
object
(Address) - cannot be null
- defined in: XPague Recuperação de carrinho
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"
}
propriedades do produto, usadas em transações em recuperação de carrinho
#/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://assets.xpague.com/fffff.png",
"productTotal": "349.00",
"fillableUrl": "https://pagamento.xpague.com/id/?src=postback&ct=36",
"productPrice": "349.00",
"id": 145720,
"checkoutId":99188,
"productName": "FB 5",
"description": "lorem ipsum",
"productThumbnail": "https://assets.xpague.com/fffff.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
- is required
- Type:
integer
(The Id Schema) - cannot be null
- defined in: XPague Recuperação de carrinho
id Type
integer
(The Id Schema)
id Examples
145720
productName
Nome do produto.
productName
- is required
- Type:
string
(Nome do produto) - cannot be null
- defined in: XPague Recuperação de carrinho
productName Type
string
(Nome do produto)
productName Examples
"Femme Busto Kit 5"
description
Descrição do produto
description
- is required
- Type:
string
(Descrição do produto) - cannot be null
- defined in: XPague Recuperação de carrinho
description Type
string
(Descrição do produto)
description Examples
"Creme para limpeza facial"
productPrice
Preço do produto.
productPrice
- is required
- Type:
string
(Preço do produto) - cannot be null
- defined in: XPague Recuperação de carrinho
productPrice Type
string
(Preço do produto)
productPrice Examples
"349.00"
productShipping
Preço do frete
productShipping
- is required
- Type:
string
(Preço do frete) - cannot be null
- defined in: XPague Recuperação de carrinho
productShipping Type
string
(Preço do frete)
productShipping Examples
"0"
productCover
productCover
- is required
- Type:
string
(Imagem de capa) - cannot be null
- defined in: XPague Recuperação de carrinho
productCover Type
string
(Imagem de capa)
productCover Examples
" https://painel.xpague.com/app/uploads/2020/01/FemmeGeFl.png"
productThumbnail
productThumbnail
- is required
- Type:
string
(Thumbnail do produto) - cannot be null
- defined in: XPague Recuperação de carrinho
productThumbnail Type
string
(Thumbnail do produto)
productThumbnail Examples
" https://painel.xpague.com/app/uploads/2020/01/FemmeGeFl.png"
productTotal
productTotal
- is required
- Type:
string
(Total do produto com frete) - cannot be null
- defined in: XPague Recuperação de carrinho
ProductTotal Type
string
(Total do produto com frete)
productTotal Examples
"349.00"
fillableUrl
url do checkout preenchido
fillableUrl
- is required
- Type:
string
(The Fillableurl Schema) - cannot be null
- defined in: XPague Recuperação de carrinho
fillableUrl Type
string
(The Fillableurl Schema)
fillableUrl Examples
"https://pagamento.xpague.com/id/?src=postback&ct=36"
por enquanto é só.
Transação Schema
#/properties/transaction#/properties/transaction
Tudo relacionado a transação está contido aqui
transaction Examples
{
"objectType": "transaction",
"transaction": {
"id": "2278715",
"status": "pending",
"statusDesc": "Pendente",
"orderType": "normal",
"paymentMethod": "billet",
"transactionId": "111333333",
"authorizationCode": "111333333",
"token": "qvdh7o4h74brcvtc4l2kgtof6q",
"items": [
{
"id": 185917, // id produto
"checkoutId": 145694, // id checkout
"productName": "FB1",
"description": "Descrição produto.",
"productPrice": "189.00",
"productShipping": 0,
"productCover": "https://static.xpague.com/qvdh7o4h74brcvtc4l2kgtof6qfb.jpg",
"productThumbnail": "https://static.xpague.com/qvdh7o4h74brcvtc4l2kgtof6qfb.jpg",
"quantity": 1,
"paymentMethods": [
"credit",
"billet"
],
"url": "https://pagamento.xpague.com/id/185917?src=postback"
}
],
"total": "189.00",
"thanksPage": "https://pagamento.xpague.com/b/678715", // pagina obrigado
"fillableUrl": "https://pagamento.xpague.com/id/185917?fill=678715", // pagina do checkout com informações preenchidas
"dateCreated": "2020-08-11 13:01:03",
"dateUpdated": "2020-09-10 13:06:18",
"billet": "https://pagamento.xpague.com/b/678715?em=1", // boleto html
"billetPdf": "https://pagamento.xpague.com/b/678715?pd=1", // boleto pdf
"barcode": "23793.38029 60834.110821 53006.333305 7 83470000018900", // linha digitável
"barcodeRaw": "23793380296083411082153006333305783470000018900",
"billetExpire": "2020-08-14 13:01:03" // expiração boleto
},
"customer": {
"name": "lorem ipsum dolor",
"email": "loremlps@gmail.com",
"docType": "cpf",
"doc": {
"raw": "2213021211",
"formatted": "22.130.212-11"
},
"phone": {
"raw": "2211230640",
"formatted": "(22) 1222-0640"
},
"address": {
"address": "Av 25 de março ",
"number": "2211",
"complementary": "922211",
"neighborhood": "Centro",
"zipcode": "11111111",
"city": "São Paulo",
"state": "SP",
"country": "br"
},
"token": "qvdh7o4h74brcvtc4l2kgtof6q"
}
}
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
status
Status da transação
status
- is required
- Type:
string
(Status) - cannot be null
- defined in: XPague postback
Status Examples
"pending"
"approved"
"rejected"
"cancelled" // um mês após a expiração
"in_process"
statusDesc
Descrição do status
statusDesc
- is required
- Type:
string
(Statusdesc) - cannot be null
- defined in: XPague postback
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
- is required
- Type:
string
(Ordertype) - cannot be null
- defined in: XPague postback
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" // upsell
"callsell" /// televendas
paymentMethod
Método de pagamento
paymentMethod
- is required
- Type:
string
(Paymentmethod) - cannot be null
- defined in: XPague postback
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
- is required
- Type:
string
(Transactionid) - cannot be null
- defined in: XPague postback
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
- is required
- Type:
string
(Authorizationcode) - cannot be null
- defined in: XPague postback
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
- is required
- Type:
string
(Token) - cannot be null
- defined in: XPague postback
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
- is required
- Type:
object[]
(Items) - cannot be null
- defined in: XPague postback
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
- is required
- Type:
string
(Total) - cannot be null
- defined in: XPague postback
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
- is required
- Type:
string
(Thankspage) - cannot be null
- defined in: XPague postback
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
- is required
- Type:
string
(Fillableurl) - cannot be null
- defined in: XPague postback
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
- is required
- Type:
string
(Datecreated) - cannot be null
- defined in: XPague postback
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
- is required
- Type:
string
(Dateupdated) - cannot be null
- defined in: XPague postback
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
- is required
- Type:
string
(Billet) - cannot be null
- defined in: XPague postback
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
- is required
- Type:
string
(Billetpdf) - cannot be null
- defined in: XPague postback
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
- is required
- Type:
string
(Barcode) - cannot be null
- defined in: XPague postback
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
- is required
- Type:
string
(Barcoderaw) - cannot be null
- defined in: XPague postback
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
- is required
- Type:
string
(Billetexpire) - cannot be null
- defined in: XPague postback
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"