API
Skip to main content

Embed in mobile application

The checkout can be embedded in mobile applications using the "Webview" component and the "Deep linking" mechanism available on Android and iOS.

Useful references:

The process works as follows:

  1. (Back-end) Generate the checkout link using the /checkouts resource;
  2. (Application) Open the previously obtained link in the Android/iOS webview;
  3. (Webview) Wait for the user to complete the payment;
  4. (Application) The user has returned to the application;
  5. (Back-end) Check the status of the checkout via the API;
  6. (Application) Display the application view accordingly;

The parameter redirects of type action must contain the URL "Deep link" will invoke the application after payment.

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": "default" // <== Incorporado
},
"redirects": [
{
"type": "action",
"url": "https://www.myapp.com" // <== URL deep Link
}
]
}