Structure of the content field
The content field contains a detailed arrangement of each element of the order. The fields of each element are the following:
Field | Value | Validation | Description |
---|---|---|---|
title * |
short text | Required,min:3,max:60 | Product or invoice name |
code |
[A-z][0-9] | Optional | Product or invoice code/number |
price * |
0.00 | Required,double | Unit Price |
qty * |
1 ... n | Required,int,unsigned | Product Quantity |
tax |
0.00 | Optional,double | Sales tax total in currency |
total * |
0.00 | Required,double | Total without sales tax times quantity in currency |
Example- elements of an order
[
{
"code" : "0000123",
"title" : "Camiseta Roja",
"description" : "Talla: XS",
"tax" : 9.99,
"price" : 99.99,
"qty" : 1,
"total" : 9.99
},
{
"code" : "0000123",
"title" : "Jeans Pepe",
"description" : "Talla: 32",
"tax" : 0.00,
"price" : 123.99,
"qty" : 1,
"total" : 123.99
},
...
]
Webhook Success URL
The success URL will run every time a charge has been successfully paid, the request is of type POST and its content is content-type: application/json.
The remote URL should deliver a code 200 response to indicate that the content was captured.
In case of a different response code or no response from the remote URL, the sending of data will be re-programmed with a 5 minute delay and a maximum of 3 attempts per send.
The format of the extra field is optional and can be scalable in structure.
Example- JSON Object of Success URL
{
"ref": "REF-0001-0006350867",
"uuid": "1dab5ed0",
"status": "paid",
"description": null,
"note": null,
"currency": "USD",
"tax_amount": 9.99,
"amount": 99.99,
"items": [{
"code" : "0000123",
"title" : "Camiseta Roja",
"description" : "Talla: XS",
"tax" : 9.99,
"price" : 99.99,
"qty" : 1,
"total" : 9.99
}],
"customer_name": "PEDRO PEREZ",
"customer_email": "pedro.perez@gmail.com",
"customer_phone": null,
"client_ip": "180.125.81.220",
"client_device": "android",
"created_at": "2017-09-25 03:09:47",
"paid_at": "2017-10-30 04:10:13",
"transaction_id": "7398009601",
"card_account": "4234 •••• •••• 1234",
"card_brand": "visa",
"card_type": "debit",
"company_name": "My Company",
"company_slug": "my_company",
"company_key": "7812290000",
"is_overdue": false,
"payment_url": "https://www.pixelpay.app/my_company/1dab5ed0/checkout",
"attach_url": null,
"extra": {
"codigoCliente" : "4782164",
"codigoNegocio" : "ATGSH-6712",
}
}
Webhook Error URL
The Error URL will run every time a charge fails or there is an Exception in the code delivering a message with the technical details ready to be reported to PixelPay’s tech support.
It delivers a structure of type json in the following format:
{
"success": false,
"message": "Fatal error: Maximum execution time of 30 seconds exceeded"
}
Comments
0 comments
Please sign in to leave a comment.