Skip to end of metadata
Go to start of metadata

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

Compare with Current View Page History

« Previous Version 4 Next »

I hired the white label journey. How should I pass the parameters?

Once an application is created, a Token is generated. Follow the steps below to start the journey in the right way.

To access your Client ID and Client Secret, you must open the Settings option, within your Application Panel;

Just copy the parameters and copy them into the Token API to generate the necessary call.

How to start the digital journey, using the ITP white label

Once you managed to generate the Token, according to the step by step of the previous step, just make a POST that will return the white label journey link

Request for starting the Digital Journey - using 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"
  }'

Mandatory fields to fill in the request:

  • CPF - Required field

  • Valor da transação - Required field

  • Paymentview - Required field

  • Paymenttype - Required field

Specificity for Paymentview and Paymenttype fields

  • 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…

 

To confirm that the payment was processed successfully (and the payment status) you may check the payment status through the Webhook on Payment Initiation or using the Pooling API

For example, the state parameter brings the consent ID, so you may use the Get Pix by ConsentId API, like below:

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>' \

The response is something like below:

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

The Journey ID

The journey ID is the unique identifier for the whitelabel flow, that links the beginning of the journey with the consent and payment createds, since at the beginning of this flow the consent still does not exist. It is the code yL79m4Kzc7DI0WfL-QK... from our example above (response from payment creation response).

  • No labels