API
Skip to main content

Embed in mobile application

Checkout can be embedded into mobile applications using the "Webview" component and the "Deep linking" engine available in Android and iOS.

Useful references:

The process works as follows:

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

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

{
"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
}
]
}