# Continua Api VirtuPay ## BUscar A listagem de Varias Contas ### https://developers.celcoin.com.br/docs/listar-contas https://github.com/medeirosfalante/celcoin-go-sdk/blob/master/boleto.go https://github.com/spagnol10/Infratech-Celcoin # Projeto C# virtupay ## C# #### Rodar o projeto http://localhost:5154/swagger ```cmd= { "clientCode": "a7e9ea3f-69e4-4599-92b4-6cb84444", "contactNumber": "+5521981990108", "documentNumber": "44564374000105", "businessEmail": "edson.dev@virtupay.com.br", "businessName": "ArqTreinamento", "tradingName": "Arq treinamento em Informatica Ltda", "companyType": "PJ", "owner": [ { "ownerType": "SOCIO", "documentNumber": "02295351782", "fullName": "Edson Belem", "phoneNumber": "+5521981990108", "email": "profedsonbelem@gmail.com.br", "motherName": "Clea Santos de Souza", "socialName": "BelemJr", "birthdate": "28-01-1973", "address": { "postalCode": "22795220", "street": "Rua Jose Carlos Nogueira Diniz", "number": "75", "addressComplement": "apto 703", "neighborhood": "Recreio dos Bandeirantes", "city": "Rio de Janeiro", "state": "RJ" }, "isPoliticallyExposedPerson": false } ], "businessAddress": { "postalCode": "22795220", "street": "Rua Jose Carlos Nogueira Diniz", "number": "75", "addressComplement": "apto 703", "neighborhood": "Recreio dos bandeirantes", "city": "Rio de Janeiro", "state": "RJ" }, "onboardingType": "BAAS" } ``` ```java= eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRfaWQiOiI3ZTcyNWVlOWI1LnZpcnR1dGVjaHByb2Nlc3NhZG9yYS5jZWxjb2luYXBpLnY1IiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbmFtZSI6InZpcnR1dGVjaHByb2Nlc3NhZG9yYSIsInRlbmFudF91c2VyIjoidzhXY0dWdU8zT3EzZk9TQmtpTnJPWk1VNnBEZU0zTGd1d1FBZFJsQllOekdFVXNqcTZqd3NxeVllWnhvamtpcUJBWFIyeHpaa2NibElHdDVGc1hrd0QySU0wY0dZUHdXeFBJZU1LZGwvMXRXYVdaTktrUWlsMjkwbUs3alRrb091dVRuM2FTZS9yTzZac3pJdHRiSnRCemd1VUpBZEZaZE9wU1pvVDdLYVhMR3FON1RpZzY5UUZreWR2QW5aZTBxRHcyOGtGdDBGOVE2WGVKVHNYamo1RTAxWURockFoTHNkT3cwVFRQSzB5ci92YVNoMmFQSHNUbXlNWlVCVGF3bDRtY1pKT2ZHMkxSSTkyNy82QmR2M3Y2R3hBdDVxSklUVEs3NVVQL1Z3VUJyUDl6cTBjWkcxa2hnMG04UDNsN1VJUytvNVJmR3h1VVNaT1haaUZxMzkxdWRKdzEyODZDUVFkNTBZek5jeTl1TVB6TENQWlVianM0Y2d0NFJvOUdsY0xNWG14OE5qRkpYM1VyTTNKSHloQkJ0Nlh1VUdOd2lGTTB1TGZqeTlFaE9YTTRpYmlsbDBwNEV4K21acEowVEduUEI1MFFYS0FzU1FkVEN6SUtqazJ3cVRzM09US0N3ZFlBUE9aTXpuRlc0QjYyYktLWXJvS1JTc3dGeFRlUU1WL0pnSHNKOGVDZDhhcTNBa0RObGNVTmFUeGhLVGpjclUramZUV01LMm5ia0dyUUxTVHhzQlQyaWVQZEc3TWxzWjg1NWV5WFpQMzVLRTVvRm0rYWI2KzNVNXV0bHJ4WEgwTXpVRkk2TGo0aUQ5cmE1ams0Zk9YNStoSnphTzA4TDZFRTBvczllZEJTTnZDT3BZQ3ZQQlBUN0J2Qk5UWTNiRFp5R3RtektRSVptb1IweE5oTXA1OVprRWxsOFRSd3YvVnJCYmh5YVhmc2tCNnM0dDhSY1pRPT0iLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3VzZXJkYXRhIjoiNzczZWZkZDQwOTM5NDEzZDg3ZmEiLCJleHAiOjE3MjUyNTk2ODEsImlzcyI6IkNlbGNvaW5BUEkiLCJhdWQiOiJDZWxjb2luQVBJIn0.gRSOmKlgvNrViHGmXGTnJO-gAqfWk9qUeQ142iB5yxM ``` { "client_id": "7e725ee9b5.virtutechprocessadora.celcoinapi.v5", "grant_type": "client_credentials", "client_secret": "32a06238835544b8bbd823f0a9c036e36e271bd9a75d4349a1604904b428a488" } Accessos https://www.bcb.gov.br/estabilidadefinanceira/participantespix?modalAberto=regulamentacao_pix https://developers.celcoin.com.br/docs/pix-implanta%C3%A7%C3%A3o https://developers.celcoin.com.br/docs/transferencia-para-uma-chave-pix ### Importante Estrutura de Teste ```cmd= dotnet add package xunit dotnet add package xunit.runner.visualstudio dotnet add package FluentAssertions ``` ## Estrtutura Json ```cmd= dotnet add package Newtonsoft.Json dotnet test dotnet clean dotnet restore dotnet restore dotnet ef migrations add InitialCreate dotnet ef database update taskkill /F /PID 23124 tasklist | findstr projetoApiBankOne ``` ### Atualizar o dotnet ```cmd= dotnet workload update dotnet ef migrations add InitialCreate dotnet ef database update dotnet clean dotnet restore dotnet add package xunit dotnet add package xunit.runner.visualstudio dotnet add package Microsoft.NET.Test.Sdk dotnet add package Swashbuckle.AspNetCore dotnet add package Microsoft.EntityFrameworkCore dotnet add package Pomelo.EntityFrameworkCore.MySql dotnet add package Swashbuckle.AspNetCore dotnet add package FluentAssertions dotnet add package xunit dotnet add package xunit.runner.visualstudio dotnet tool install --global dotnet-ef dotnet restore dotnet tool install --global dotnet-ef dotnet ef migrations add InitialCreate dotnet ef database update dotnet add package RestSharp --version 107.0.2 ### dotnet ef migrations add newMigrationss dotnet ef database update taskkill /F /PID dotnet dev-certs https --trust dotnet new webapi -n ProjetoApiSimples # Adicionando novos projetos dotnet build dotnet ef migrations add MigrationName dotnet ef database update dotnet ef database update #### dotnet ef migrations add AddExposition dotnet ef migrations add InitialCreate --verbose dotnet ef database update ``` ## Adicionando versões mais estáveis ```cmd= ## Versao estavek do dotnet dotnet tool install --global dotnet-ef dotnet add package Microsoft.AspNetCore.Mvc.NewtonsoftJson dotnet clean dotnet restore dotnet build dotnet run ## Producao dotnet publish -c Release ## Verificar Dependencias dotnet restore --force ```cmd= dotnet add package xunit dotnet add package xunit.runner.visualstudio dotnet add package FluentAssertions ``` ## Estrtutura Json ```cmd= dotnet add package Newtonsoft.Json dotnet test dotnet clean dotnet restore dotnet restore dotnet ef migrations add InitialCreate dotnet ef database update taskkill /F /PID 23124 tasklist | findstr projetoApiBankOne ``` ### Atualizar o dotnet ```cmd= dotnet workload update dotnet ef migrations add InitialCreate dotnet ef database update dotnet clean dotnet restore dotnet add package xunit dotnet add package xunit.runner.visualstudio dotnet add package Microsoft.NET.Test.Sdk dotnet add package Swashbuckle.AspNetCore dotnet add package Microsoft.EntityFrameworkCore dotnet add package Pomelo.EntityFrameworkCore.MySql dotnet add package Swashbuckle.AspNetCore dotnet add package FluentAssertions dotnet add package xunit dotnet add package xunit.runner.visualstudio dotnet tool install --global dotnet-ef dotnet restore dotnet tool install --global dotnet-ef dotnet ef migrations add InitialCreate dotnet ef database update dotnet add package RestSharp --version 107.0.2 ### dotnet ef migrations add newMigrationss dotnet ef database update taskkill /F /PID dotnet dev-certs https --trust dotnet new webapi -n ProjetoApiSimples # Adicionando novos projetos dotnet build dotnet ef migrations add MigrationName dotnet ef database update dotnet ef database update #### dotnet ef migrations add AddExposition dotnet ef migrations add InitialCreate --verbose dotnet ef database update ``` ## Adicionando versões mais estáveis ```cmd= ## Versao estavek do dotnet dotnet tool install --global dotnet-ef dotnet add package Microsoft.AspNetCore.Mvc.NewtonsoftJson dotnet clean dotnet restore dotnet build dotnet run ## Producao dotnet publish -c Release ## Verificar Dependencias dotnet restore --force ``` ```dontnet= ## curl curl --request GET \ --url 'https://sandbox.openfinance.celcoin.dev/baas-accountmanager/v1/account/fetch-all?DateFrom=2022-07-21&DateTo=2022-07-28' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer {{token}}' ## json { "version": "1.0.0", "status": "SUCCESS", "totalItems": 3, "currentPage": 1, "totalPages": 1, "dateFrom": "22/10/2022 00:00:00", "dateTo": "28/10/2022 23:59:59", "subAccounts": [ { "statusAccount": "ATIVO", "documentNumber": "25400754015", "phoneNumber": "+5512981175704", "email": "email4@email.com", "motherName": "Nome Sobrenome", "fullName": "Nome Sobrenome", "socialName": "Nome", "birthDate": "31-12-1984", "address": { "postalCode": "06455030", "street": "Rua das Andorinhas", "number": "343", "addressComplement": "proximo a lanchonete do zeca", "neighborhood": "Rua das Maravilhas", "city": "Sao Paulo", "state": "SP", "longitude": null, "latitude": null }, "isPoliticallyExposedPerson": false, "createDate": "2022-10-25T20:33:34", "closeDate": "2022-10-25T20:33:47", "closeReason": "Motivo X" }, { "statusAccount": "ATIVO", "documentNumber": "25400754015", "phoneNumber": "+5512981175704", "email": "email4@email.com", "motherName": "Nome Sobrenome", "fullName": "Nome Sobrenome", "socialName": "Nome", "birthDate": "31-12-1984", "address": { "postalCode": "06455030", "street": "Rua das Andorinhas", "number": "343", "addressComplement": "proximo a lanchonete do zeca", "neighborhood": "Rua das Maravilhas", "city": "Sao Paulo", "state": "SP", "longitude": null, "latitude": null }, "isPoliticallyExposedPerson": false, "createDate": "2022-10-25T20:33:54", "closeDate": "2022-10-25T20:34:06", "closeReason": "Desejo encerrar a conta..." } ] } ### Erro { "version": "1.0.0", "status": "ERROR", "error": { "errorCode": "CIE999", "message": "Ocorreu um erro interno durante a chamada da api.." } } ``` ## Transacao ```dotnet= curl --request POST \ --url https://sandbox.openfinance.celcoin.dev/v5/transactions/billpayments/authorize \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data ' { "barCode": { "type": 0, "digitable": "23793381286008301352856000063307789840000150000" }, "assignor": "teste", "registerData": { "documentRecipient": "ué", "documentPayer": "string", "payDueDate": "string", "nextBusinessDay": "2022-03-15T18:41:37.243Z", "dueDateRegister": "2022-03-15T18:41:37.243Z", "allowChangeValue": true, "recipient": "string", "payer": "string", "discountValue": 0, "interestValueCalculated": 0, "maxValue": 0, "minValue": 0, "fineValueCalculated": 0, "originalValue": 0, "totalUpdated": 0, "totalWithDiscount": 0, "totalWithAdditional": 0 ``` ### Classe // <auto-generated /> // // To parse this JSON data, add NuGet 'Newtonsoft.Json' then do: // // using CodeBeautify; // // var welcome4 = Welcome4.FromJson(jsonString); namespace CodeBeautify { using System; using System.Collections.Generic; using System.Globalization; using Newtonsoft.Json; using Newtonsoft.Json.Converters; public partial class Welcome4 { [JsonProperty("version")] public string Version { get; set; } [JsonProperty("status")] public string Status { get; set; } [JsonProperty("totalItems")] public long TotalItems { get; set; } [JsonProperty("currentPage")] public long CurrentPage { get; set; } [JsonProperty("totalPages")] public long TotalPages { get; set; } [JsonProperty("dateFrom")] public string DateFrom { get; set; } [JsonProperty("dateTo")] public string DateTo { get; set; } [JsonProperty("subAccounts")] public SubAccount[] SubAccounts { get; set; } } public partial class SubAccount { [JsonProperty("statusAccount")] public string StatusAccount { get; set; } [JsonProperty("documentNumber")] public string DocumentNumber { get; set; } [JsonProperty("phoneNumber")] public string PhoneNumber { get; set; } [JsonProperty("email")] public string Email { get; set; } [JsonProperty("motherName")] public string MotherName { get; set; } [JsonProperty("fullName")] public string FullName { get; set; } [JsonProperty("socialName")] public string SocialName { get; set; } [JsonProperty("birthDate")] public string BirthDate { get; set; } [JsonProperty("address")] public Address Address { get; set; } [JsonProperty("isPoliticallyExposedPerson")] public bool IsPoliticallyExposedPerson { get; set; } [JsonProperty("createDate")] public DateTimeOffset CreateDate { get; set; } [JsonProperty("closeDate")] public DateTimeOffset CloseDate { get; set; } [JsonProperty("closeReason")] public string CloseReason { get; set; } } public partial class Address { [JsonProperty("postalCode")] public string PostalCode { get; set; } [JsonProperty("street")] public string Street { get; set; } [JsonProperty("number")] [JsonConverter(typeof(ParseStringConverter))] public long Number { get; set; } [JsonProperty("addressComplement")] public string AddressComplement { get; set; } [JsonProperty("neighborhood")] public string Neighborhood { get; set; } [JsonProperty("city")] public string City { get; set; } [JsonProperty("state")] public string State { get; set; } [JsonProperty("longitude")] public object Longitude { get; set; } [JsonProperty("latitude")] public object Latitude { get; set; } } public partial class Welcome4 { public static Welcome4 FromJson(string json) => JsonConvert.DeserializeObject<Welcome4>(json, CodeBeautify.Converter.Settings); } public static class Serialize { public static string ToJson(this Welcome4 self) => JsonConvert.SerializeObject(self, CodeBeautify.Converter.Settings); } internal static class Converter { public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings { MetadataPropertyHandling = MetadataPropertyHandling.Ignore, DateParseHandling = DateParseHandling.None, Converters = { new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal } }, }; } internal class ParseStringConverter : JsonConverter { public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?); public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer) { if (reader.TokenType == JsonToken.Null) return null; var value = serializer.Deserialize<string>(reader); long l; if (Int64.TryParse(value, out l)) { return l; } throw new Exception("Cannot unmarshal type long"); } public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer) { if (untypedValue == null) { serializer.Serialize(writer, null); return; } var value = (long)untypedValue; serializer.Serialize(writer, value.ToString()); return; } public static readonly ParseStringConverter Singleton = new ParseStringConverter(); } } ############### Adicional public class Address { public string postalCode { get; set; } public string street { get; set; } public string number { get; set; } public string addressComplement { get; set; } public string neighborhood { get; set; } public string city { get; set; } public string state { get; set; } public object longitude { get; set; } public object latitude { get; set; } } public class Root { public string version { get; set; } public string status { get; set; } public int totalItems { get; set; } public int currentPage { get; set; } public int totalPages { get; set; } public string dateFrom { get; set; } public string dateTo { get; set; } public List<SubAccount> subAccounts { get; set; } } public class SubAccount { public string statusAccount { get; set; } public string documentNumber { get; set; } public string phoneNumber { get; set; } public string email { get; set; } public string motherName { get; set; } public string fullName { get; set; } public string socialName { get; set; } public string birthDate { get; set; } public Address address { get; set; } public bool isPoliticallyExposedPerson { get; set; } public DateTime createDate { get; set; } public DateTime closeDate { get; set; } public string closeReason { get; set; } } ############## Adicional public class Address { public string postalCode { get; set; } public string street { get; set; } public string number { get; set; } public string addressComplement { get; set; } public string neighborhood { get; set; } public string city { get; set; } public string state { get; set; } public IList< undefined > longitude { get; set; } public IList< undefined > latitude { get; set; } } public class SubAccounts { public string statusAccount { get; set; } public string documentNumber { get; set; } public string phoneNumber { get; set; } public string email { get; set; } public string motherName { get; set; } public string fullName { get; set; } public string socialName { get; set; } public string birthDate { get; set; } public Address address { get; set; } public bool isPoliticallyExposedPerson { get; set; } public DateTime createDate { get; set; } public DateTime closeDate { get; set; } public string closeReason { get; set; } } public class Application { public string version { get; set; } public string status { get; set; } public int totalItems { get; set; } public int currentPage { get; set; } public int totalPages { get; set; } public string dateFrom { get; set; } public string dateTo { get; set; } public IList<SubAccounts> subAccounts { get; set; } } ``` ## Tabela |Code| Message| |----|---------| |CBE066| Limite sua busca entre 1 a 200.| |CBE067| Página informada não contem contas.| |CBE068| dateFrom não pode ser maior que dateTo.| |CBE076| dateFrom e dateTo são obrigatórios para busca das contas.| |CBE079| Consulta conta não permitida.Diferença entre dateFrom e dateTo não pode ultrapassar 7 dias.| |CBE039| Account invalido.| |CBE040| DocumentNumber invalido.| |CBE041| Account possui tamanho maximo de 20 caracteres.| |CBE042| DocumentNumber possui tamanho maximo de 14 caracteres.| |CBE080| Page invalido.| |CBE088| Limit invalido.| ## Consultar Saldo Disponivel ### https://developers.celcoin.com.br/docs/consultar-saldo-1 ```dontet= ## Curl curl --location --request GET 'https://sandbox.openfinance.celcoin.dev/baas-walletreports/v1/wallet/balance?DocumentNumber=25400754015&Account=1234' \ --header 'accept: application/json' \ --header 'authorization: Bearer {{token}}' ## Ok { "status": "SUCCESS", "version": "1.0.0", "body": { "amount": 1.1 } } ## Error { "status": "SUCCESS", "version": "1.0.0", "body": { "amount": 1.1 } } ``` |Code| Message| |----|---------| |CBE073| É necessário informar pelo menos um dos campos: account, ou documentNumber. |CBE039| Account invalido.| |CBE040| DocumentNumber invalido.| |CBE041| Account possui tamanho maximo de 20 caracteres.| |CBE042| DocumentNumber possui tamanho maximo de 14 caracteres.| |CBE089| Consulta não permitida, Conta esta bloqueada.| |CBE090| Consulta não permitida.Conta esta encerrada.| ## Consultar Extrato ```dotnet ## curl curl --location --request GET 'https://sandbox.openfinance.celcoin.dev/baas-walletreports/v1/wallet/movement?Account=300539137798&DateFrom=2022-10-26&DateTo=2022-10-28&DocumentNumber&Limit&Page' \ --header 'accept: application/json' \ --header 'authorization: Bearer {{token}}' ## Saida { "status": "SUCCESS", "version": "1.0.0", "totalItems": 200, "currentPage": 1, "totalPages": 10, "dateFrom": "2022-01-01", "dateTo": "2022-01-02", "body": { "account": "300151", "documentNumber": "34335125070", "movements": [ { "id": "aa99877c-6205-45ce-8fd8-18173fdd782a", "clientCode": "7a2a4ea2-ee65-4b3d-8e1d-311dd45d3017", "description": "Recebimento Pix", "createDate": "2022-08-31T17:19:55", "lastUpdateDate": "2022-08-31T17:19:55", "amount": 10.12, "status": "Saldo Liberado", "balanceType": "CREDIT", "movementType": "PIXPAYMENTIN" } ] } } ## ERROR { "status": "ERROR", "version": "1.0.0", "error": { "errorCode": "CBE039", "message": "Account invalido.." } } #### Classe C# namespace QuickType { using System; using System.Collections.Generic; using System.Globalization; using Newtonsoft.Json; using Newtonsoft.Json.Converters; public partial class Welcome { [JsonProperty("status")] public string Status { get; set; } [JsonProperty("version")] public string Version { get; set; } [JsonProperty("totalItems")] public long TotalItems { get; set; } [JsonProperty("currentPage")] public long CurrentPage { get; set; } [JsonProperty("totalPages")] public long TotalPages { get; set; } [JsonProperty("dateFrom")] public DateTimeOffset DateFrom { get; set; } [JsonProperty("dateTo")] public DateTimeOffset DateTo { get; set; } [JsonProperty("body")] public Body Body { get; set; } } public partial class Body { [JsonProperty("account")] [JsonConverter(typeof(ParseStringConverter))] public long Account { get; set; } [JsonProperty("documentNumber")] public string DocumentNumber { get; set; } [JsonProperty("movements")] public Movement[] Movements { get; set; } } public partial class Movement { [JsonProperty("id")] public Guid Id { get; set; } [JsonProperty("clientCode")] public Guid ClientCode { get; set; } [JsonProperty("description")] public string Description { get; set; } [JsonProperty("createDate")] public DateTimeOffset CreateDate { get; set; } [JsonProperty("lastUpdateDate")] public DateTimeOffset LastUpdateDate { get; set; } [JsonProperty("amount")] public double Amount { get; set; } [JsonProperty("status")] public string Status { get; set; } [JsonProperty("balanceType")] public string BalanceType { get; set; } [JsonProperty("movementType")] public string MovementType { get; set; } } } ## ``` status da Transação Status Descrição Saldo Liberado Transação Concluída Saldo Bloqueado Transação Pendente, Aguardando Confirmação Tipos de Movimentação Disponível movementType Descrição PIXPAYMENTIN Credito referente a um cash-in Pix PIXPAYMENTOUT Debito referente a um cash-out Pix TEFTRANSFERIN Credito referente a um cash-in de transferência interna TEFTRANSFEROUT Debito referente a um cash-out de transferência interna ## Consultar ## Trasnferencia ### https://developers.celcoin.com.br/reference/realizar-uma-transferencia-entre-contas ```dontnet= amount double required Valor da transação. clientRequestId string required Identificador único gerado pelo cliente. debitParty object required debitParty object creditParty object required creditParty object description string | null ``` ## Consultar Transferência Consultar status de uma transferência interna (PRoblema na Documentação) ## WebHook https://developers.celcoin.com.br/docs/gerenciamento-de-webhook ## ## VirtuPay WebHook ```json= curl --location --request GET 'https://sandbox.openfinance.celcoin.dev/baas-webhookmanager/v1/webhook/templates?Page=1&Limit=200&LimitPerPage=200&Entity=pix-payment-out&Status=CONFIRMED' \ --header 'accept: application/json' \ --header 'Authorization: {{token}}' ``` ## Json Resposta ```json= { "body":{ "totalItems":18, "currentPage":1, "limitPerPage":200, "totalPages":1, "entityList":[ { "entity":"spb-transfer-out", "webhookTemplates":[ { "entity":"spb-transfer-out", "createTimestamp":"2023-07-14T00:09:42.995873", "status":"ERROR", "body":{ "clientFinality":"110", "amount":0.01, "debitParty":{ "bank":"13935893", "taxId":"46463721000", "accountType":"CC", "name":"teste", "personType":"F", "branch":"0001", "account":"300123" }, "clientCode":"9bed3141-ad08-4082-ae3b-8cedb7551eca", "id":"773ecd22-3447-49c2-a661-e9ba61bda4b9", "creditParty":{ "bank":"123456", "taxId":"46463721000", "accountType":"CC", "name":"teste", "personType":"F", "branch":"0001", "account":"300123" } }, "error":{ "errorCode":"404", "message":"SPB not found" } }, { "entity":"spb-transfer-out", "createTimestamp":"2023-07-24T17:02:47.0824409", "status":"CONFIRMED", "body":{ "clientFinality":"10", "numCtrlStr":"STR20230724034501234", "amount":750, "debitParty":{ "bank":"13935893", "taxId":"46463721000", "accountType":"CC", "name":"teste", "personType":"J", "branch":"0001", "account":"300123" }, "clientCode":"78d96006-c535-46e3-93a6-d8c85a6000bc", "description":"Pagamento", "id":"7e172eef-f05e-429e-ae36-401310a204cd", "creditParty":{ "bank":"00360305", "taxId":"46463721000", "accountType":"CC", "name":"teste", "personType":"F", "branch":"0001", "account":"300123" } } } ] }, { "entity":"spb-transfer-in", "webhookTemplates":[ { "entity":"spb-transfer-in", "createTimestamp":"2023-07-27T09:10:29.5587634", "status":"CONFIRMED", "body":{ "numCtrlSTR":"1393589324514991234", "amount":872.03, "debitParty":{ "bank":"16501555", "taxId":"46463721000", "accountType":"PG", "name":"teste", "personType":"J", "account":"300123" }, "id":"e2726e30-c318-4e1f-b284-e37c14e6c4b2", "clientfinality":"10", "creditParty":{ "bank":"13935893", "taxId":"46463721000", "accountType":"CC", "name":"teste", "personType":"J", "branch":"1", "account":"300123" } } } ] } ] }, "status":"SUCCESS", "version":"1.0.0" } ``` ## Chaves ```cmd= E-MAIL: testepix@celcoin.com.br CPF: 07348103006 CNPJ: 77372523000193 EVP(chave aleatória): ebb1b59d-95a3-43f8-9104-29e140ebbf2a PHONE: +551191283435 ``` ## Chaves de Pagamento ```cmd= https://developers.celcoin.com.br/docs/receber-um-pix-cash-in-por-qr-code-dinamico-immediate ## Chave Curl curl --location --request POST 'https://sandbox.openfinance.celcoin.dev/pix/v1/location' \ --header 'accept: application/json' \ --header 'Content-Type: application/json-patch+json' \ --header 'Authorization: Bearer {access_token}' \ --data-raw '{ "clientRequestId": "9b26edb7cf254db09f5449c94bf13abc", "type": "COB", "merchant": { "postalCode": "01201005", "city": "Barueri", "merchantCategoryCode": "0000", "name": "Celcoin Pagamentos" } }' ``` ## Models Anotoções de Validação ```dotnet= [Required] // Indica que esse campo é obrigatório [StringLength(36, MinimumLength = 36)] // Define o tamanho da string como 36 caracteres (UUID) public string ClientCode { get; set; } [Required] // Indica que esse campo é obrigatório [RegularExpression(@"^\d{11}$", ErrorMessage = "DocumentNumber deve conter 11 dígitos.")] // Valida um CPF (11 dígitos) public string DocumentNumber { get; set; } [Required] // Indica que esse campo é obrigatório [StringLength(20)] // Define o comprimento máximo da string public string Status { get; set; } [Required] // Indica que esse campo é obrigatório public DateTime CreatedAt { get; set; } ```