A integração com a API da easypay permite consultar facilmente dados de pagamentos, receber notificações e gerar referências de pagamento.
Aceitar pagamentos nunca foi tão fácil.
A easypay oferece uma interface única e elegante que abstrai dezenas de integrações empresariais.
Conecte-se através de uma única API.
Crie experiências móveis nativas.
Aceite pagamentos em qualquer canal.
Conecte pagamentos às suas plataformas.
curl -i -X GET \ 'https://api.prod.easypay.pt/2.0/checkout/{id}' \ -H 'AccountId: YOUR_API_KEY_HERE' \ -H 'ApiKey: YOUR_API_KEY_HERE'
/** * Requires libcurl */ const id = "YOUR_id_PARAMETER"; $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_HTTPHEADER => [ "AccountId: YOUR_API_KEY_HERE", "ApiKey: YOUR_API_KEY_HERE" ], CURLOPT_PORT => "", CURLOPT_URL => "https://api.prod.easypay.pt/2.0/checkout/" . id, CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $error = curl_error($curl); curl_close($curl); if ($error) { echo "cURL Error #:" . $error; } else { echo $response; }
import fetch from 'node-fetch'; async function run() { const id = 'YOUR_id_PARAMETER'; const resp = await fetch( `https://api.prod.easypay.pt/2.0/checkout/${id}`, { method: 'GET', headers: { AccountId: 'YOUR_API_KEY_HERE', ApiKey: 'YOUR_API_KEY_HERE' } } ); const data = await resp.text(); console.log(data); } run();
import requests id = "YOUR_id_PARAMETER" url = "https://api.prod.easypay.pt/2.0/checkout/" + id headers = { "AccountId": "YOUR_API_KEY_HERE", "ApiKey": "YOUR_API_KEY_HERE" } response = requests.get(url, headers=headers) data = response.json() print(data)
using System; using System.Net.Http; using System.Threading.Tasks; public class Program { public static async Task Main() { System.Net.Http.HttpClient client = new() { DefaultRequestHeaders = { {"AccountId", "YOUR_API_KEY_HERE"}, {"ApiKey", "YOUR_API_KEY_HERE"}, } }; var Id = "YOUR_id_PARAMETER"; using HttpResponseMessage request = await client.GetAsync("https://api.prod.easypay.pt/2.0/checkout/" + Id); string response = await request.Content.ReadAsStringAsync(); Console.WriteLine(response); } }
import org.apache.http.util.EntityUtils; import org.apache.http.NameValuePair; import org.apache.http.client.HttpClient; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.message.BasicNameValuePair; import org.apache.http.entity.StringEntity; import org.json.JSONObject; import org.json.JSONArray; import java.util.ArrayList; import java.util.List; import org.apache.http.entity.mime.MultipartEntity; import org.apache.http.entity.mime.content.StringBody; public class App { public static void main(String[] args ) throws java.io.IOException { HttpClient httpClient = HttpClientBuilder.create().build(); String id = "YOUR_id_PARAMETER"; HttpGet request = new HttpGet("https://api.prod.easypay.pt/2.0/checkout/" + id); request.setHeader("AccountId", "YOUR_API_KEY_HERE"); request.setHeader("ApiKey", "YOUR_API_KEY_HERE"); String response = EntityUtils.toString(httpClient.execute(request).getEntity()); System.out.println(response); } }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { id := "YOUR_id_PARAMETER"; reqUrl := "https://api.prod.easypay.pt/2.0/checkout/" + id req, err := http.NewRequest("GET", reqUrl, nil) if err != nil { panic(err) } req.Header.Add("AccountId", "YOUR_API_KEY_HERE") req.Header.Add("ApiKey", "YOUR_API_KEY_HERE") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { panic(err) } fmt.Println(res) fmt.Println(string(body)) }
Pontual, Frequente ou Subscrição, a nossa API está pronta para um ou todos os tipos de pagamento.
Torne-se parceiro easypay e aproveite benefícios exclusivos e condições especiais.
Integre-se com a API da easypay para aproveitar todos os seus recursos e funcionalidades, potenciando qualquer tipo de negócio.