Skip to content

Cadastro

Matheus Miranda edited this page Aug 10, 2023 · 4 revisions

Criar conta

var body = new PagBankBody();
var client = new PagBankClient();
client.WithBaseUrl(BaseUrl.Sandbox);
client.WithMethod(PagBankMethod.Post);
client.WithJsonBody(body);
client.WithToken("your-token");
client.WithClientId("your-client-id");
client.WithClientSecret("your-client-secret");
client.WithResource("accounts");
var response = await client.ExecuteAsync();

Consultar conta

var client = new PagBankClient();
client.WithBaseUrl(BaseUrl.Sandbox);
client.WithMethod(PagBankMethod.Get);
client.AddOrUpdateHeader("x-client-token", "your-x-client-token");
client.WithToken("your-token");
client.WithResource("accounts/ACCO_XXXXXXXXXXXX");
var response = await client.ExecuteAsync();
Clone this wiki locally