Consultar checkout
curl --request GET \
--url https://api.pagstack.com/v1/checkouts/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pagstack.com/v1/checkouts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pagstack.com/v1/checkouts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "<string>",
"object": "checkout",
"livemode": true,
"status": "open",
"url": "<string>",
"amount": 0,
"description": "<string>",
"payment_methods": [
"pix"
],
"external_id": "<string>",
"buyer": {
"name": "<string>",
"email": "<string>",
"tax_id": "<string>",
"phone": "<string>"
},
"success_url": "<string>",
"cancel_url": "<string>",
"transaction_id": "<string>",
"plan": "<string>",
"subscription_id": "<string>",
"bucket": {
"id": "<string>",
"name": "<string>",
"slug": "<string>"
},
"tracking": {},
"order_bump": {
"productId": "<string>",
"name": "<string>",
"amount": 0,
"accepted": true
},
"allow_coupons": true,
"coupon": {
"id": "<string>",
"code": "<string>"
},
"metadata": {},
"expires_at": "<string>",
"completed_at": "<string>",
"created_at": "<string>"
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}Checkout
Consultar checkout
Devolve um checkout pelo ID.
Consultar checkout
curl --request GET \
--url https://api.pagstack.com/v1/checkouts/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pagstack.com/v1/checkouts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pagstack.com/v1/checkouts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"id": "<string>",
"object": "checkout",
"livemode": true,
"status": "open",
"url": "<string>",
"amount": 0,
"description": "<string>",
"payment_methods": [
"pix"
],
"external_id": "<string>",
"buyer": {
"name": "<string>",
"email": "<string>",
"tax_id": "<string>",
"phone": "<string>"
},
"success_url": "<string>",
"cancel_url": "<string>",
"transaction_id": "<string>",
"plan": "<string>",
"subscription_id": "<string>",
"bucket": {
"id": "<string>",
"name": "<string>",
"slug": "<string>"
},
"tracking": {},
"order_bump": {
"productId": "<string>",
"name": "<string>",
"amount": 0,
"accepted": true
},
"allow_coupons": true,
"coupon": {
"id": "<string>",
"code": "<string>"
},
"metadata": {},
"expires_at": "<string>",
"completed_at": "<string>",
"created_at": "<string>"
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}Autorizações
Resposta
Sucesso.
Checkout: página de pagamento hospedada pela Pagstack.