Credit/Debit Card
Checkout creation with the following data:
- Language: Português
- Page layout: web
- Amount: 5€
- Payment method: Cartão de Crédito/Débito (CC)
- Product code: REFPRODUTO_1
- Descripción del producto: Computador
- Customer:
- Customer number: 1
- First name: José
- Last name: Silva
- Phone: 351#961234567
- Email: jose.silva@email.com
- Invoicing address:
- Country: Portugal
- City: Lisboa
- Address: Rua Domingos Monteiro nº 7 A,
- Postcode: 1050-074
- Redirects:
- After successful payment: https://www.url-apos-sucesso.dominio
- After payment cancellation: https://www.url-apos-cancelamento.dominio
- Back button: https://www.url-voltar.dominio
- Request
- Response
POST /checkouts
{
"payment": {
"amount": 500,
"code": "REFPRODUTO_1",
"summary": "Computador",
"customer": {
"customerId": "1",
"firstName": "José",
"lastName": "Silva",
"phoneNumber": "351#961234567",
"email": "jose.silva@email.com"
},
"billingAddress": {
"country": "PT",
"city": "Lisboa",
"street1": "Rua Domingos Monteiro nº 7 A",
"postCode": "1050-074"
},
"paymentMethod": {
"code": "CC" // <== Método de pagamento
}
},
"page": {
"language": "PT",
"layout": "web"
},
"redirects": [
{
"type": "success",
"url": "https://www.url-apos-sucesso.dominio"
},
{
"type": "cancel",
"url": "https://www.url-apos-cancelamento.dominio"
},
{
"type": "back",
"url": "https://www.url-voltar.dominio"
}
]
}
{
"apiVersion": "1.0",
"date": "2022-01-03T14:16:17+00:00",
"success": true,
"data": {
"id": "pyKP1B9IaK9J47wTSNB4mUnv2h4DJW8HzomddMp1",
"createdAt": "2022-01-03 14:16:17",
"checkoutUrl": "https://paypay.pt/paypay/referencia/referencia_c/pay/4d0757e6d4db52fae248e1a2e9f10a1e8cdb0a25/paypay/pyKP1B9IaK9J47wTSNB4mUnv2h4DJW8HzomddMp1",
"paymentId": "42690",
"stateDetails": {
"state": "PaymentReady",
"timestamp": "2022-01-03T14:16:17+00:00"
}
}
}
id
that identifies the checkout to the API.
The
checkoutUrl
is the link to access the page and complete the payment.
The
paymentId
is the payment identifier.
When accessing the
checkoutUrl
the following page is displayed:
