Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 2 Next »

Contratei a jornada white label. Como devo passar os parâmetros?

Depois que um aplicativo é criado, um Token é gerado. Siga os passos abaixo para iniciar a jornada da maneira certa.

Para acessar seu Client ID e Client Secret, você deve abrir a opção Configurações, dentro do seu Painel de Aplicação;

Basta copiar os parâmetros e copiá-los para a API Token para gerar a chamada necessária.

Como iniciar a jornada digital, usando o white label ITP

Depois de conseguir gerar o Token, conforme passo a passo do passo anterior, basta fazer um POST que retornará o link da jornada White label

Solicitação de início da Jornada Digital - utilizando DICT

curl --location 'https://onboard.smartkeys.celcoin.dev.fsapps.io/api/portal/onboard/v1/payment' \
--header 'Content-Type: application/json' \
--data '{
    "cpf": "40193135809",
    "name": "Fernando",
    "amount": "100.00",
    "paymentview": "deposit-confirmation",
    "paymenttype": "DICT"
  }'

Campos obrigatórios para preencher o pedido:

  • CPF – Campo obrigatório

  • Valor da transação - Required field

  • Visualização de pagamento - Campo obrigatório

  • Tipo de pagamento - Campo obrigatório

Especificidade para os campos Paymentview e Paymenttype

  • Paymentview Alternative Journey to User insert the CPF inside the Open Keys Whitelabel - deposit-confirmation-simple

  • Paymentview PIX Instantâneo - deposit-confirmation

  • Paymentview PIX Agendado - deposit-deposit-scheduling

  • Paymenttype by DICT -presents the data registered in the Application Panel, option Configure Journeys, field Receipt data

  • Paymenttype by MANU - it is necessary to pass the blocks “creditor” and “creditorAccount, as shown in the sketch below.

Example of Request with MANU

curl --location 'https://onboard.smartkeys.celcoin.dev.fsapps.io/api/portal/onboard/v1/payment' \
--header 'Content-Type: application/json' \
--data '{
    "cpf": "02981994166",
    "name": "Fernando",
    "amount": "0.15",
    "paymentview": "deposit-confirmation",
    "paymenttype": "MANU",
    "creditor": {
        "cpfCnpj": "16781564005",
        "name": "HOMOLOGACAO PIX",
        "personType": "PESSOA_NATURAL"
    },
    "creditorAccount": {
        "accountType": "CACC",
        "ispb": "92894922",
        "issuer": "0001",
        "number": "10173722"
    }
}'

Call Response

{
  "url": "https://smartkeys-wl.celcoin.dev.fsapps.io/select-institution?id=yL79m4Kzc7DI0WfL-QK..."
}

Note: if the call is made in a partial request, in the AJAX model, you must capture the POST return to redirect the client, via a window.

After redirect to this page, the client executes the consent creation/approval flow and at the end he is redirected to the Redirect URL (Callback page) registered into admin portal.

The redirect URI page will receive the following query string parameters:

  • ticket=eyJhbGciO…

  • state=HVLeXYgP6…

 

Para confirmar se o pagamento foi processado com sucesso (e o status do pagamento), você pode verificar o status do pagamento através do Webhook na Iniciação do Pagamento ou usando a API Pooling

Por exemplo, o parâmetro state traz o ID de consentimento , então você pode utilizar a API Get Pix by ConsentId , conforme abaixo:

curl --location 'https://api-smartkeys.celcoin.dev.fsapps.io/api/smart-keys/payment-consumer/v1/pix/consents/HVLeXYgP6…' \
--header 'Authorization: Bearer <PUT_HERE_THE_ACCESS_TOKEN>' \

A resposta é algo como abaixo:

{
    "data": {
        "paymentId": "9be63638-3ef9-4427...",
        "endToEndId": "E139358932023091...",
        "consentId": "urn:celcoin:1e308e7f-b705-...",
        "creationDateTime": "2023-09-12T19:11:38Z",
        "statusUpdateDateTime": "2023-09-12T19:11:42Z",
        "proxy": "55155...",
        "status": "ACSC",
        "localInstrument": "DICT",
        "cnpjInitiator": "1393589...",
        "payment": {
            "amount": "1.15",
            "currency": "BRL"
        },
        "remittanceInformation": "Pagamento Pix",
        "creditorAccount": {
            "accountType": "CACC",
            "ispb": "9289...",
            "issuer": "0...",
            "number": "101..."
        },
        "debtorAccount": {
            "ispb": "12345678",
            "issuer": "1774",
            "number": "1234567890",
            "accountType": "CACC"
        }
    },
    "links": {
        "self": "https://api.opb.celcoin.dev.fsapps.io/open-banking/payments/v2/pix/payments/9be63638-3ef9-..."
    },
    "meta": {
        "requestDateTime": "2023-09-12T19:11:56Z"
    }
}

 

O ID da jornada

O ID da jornada é o identificador único do fluxo whitelabel, que vincula o início da jornada com o consentimento e pagamento criado, pois no início deste fluxo o consentimento ainda não existe. É o código yL79m4Kzc7DI0WfL-QK...do nosso exemplo acima (resposta da resposta de criação de pagamento).

  • No labels