Pular para o conteúdo

Get payment request

Retrieves the full state of a payment request by its paymentRequestId. Call this endpoint after the end user is redirected back to your redirectUri — the callback query string carries the request ID as paymentLinkId, which you pass here on the path.

Look for status: CONSUMIDO at the request level and status: PAGO on each entry of payments[] to confirm the happy path. PENDENTE is expected for payments scheduled to settle in the future.

GET/api/v1/payments/requests/{paymentRequestId}

Get payment request

Returns payment request details, including the list of payments inside it and their individual statuses.

Auth: Bearer Token

Parâmetros de path

1 campo
paymentRequestId
pathstring

ID of the payment request. This is the `id` returned by Create a consent and the `paymentLinkId` query parameter in the redirect callback.

curl --request GET \
  --url 'https://embedded-payment-manager.hml.linaob.com.br/api/v1/payments/requests/payment123' \
  --header 'Authorization: Bearer <SEU_TOKEN>'

Response

200Payment request retrieved successfully.
Response body
object
  • dataobjectrequired

    Payment request details.

    • idstringrequired

      ID of the payment request.

    • createDateTimestringrequired· date-time

      Creation date and time of the payment request.

    • lastChangedDateTimestringrequired· date-time

      Last modification date and time of the payment request.

    • externalCommentstringrequired· nullable

      External comment associated with the payment request.

    • externalIdstringrequired· nullable

      External ID of the payment request (the `externalId` you sent in the consent body).

    • cpfCnpjstringrequired· nullable

      Payer CPF or CNPJ.

    • redirectUristringrequired· nullable

      Redirect URI used for the payment flow.

    • tenantIdstringrequired

      Tenant ID associated with the payment request.

    • consentIdstringrequired· nullable

      Consent ID linked to the payment request.

    • valuenumberrequired

      Total payment value in BRL.

    • statusstringrequired

      Request-level status. One of `PENDENTE`, `EM_PROCESSAMENTO`, `CONSUMIDO`, `EXPIRADO`, `CANCELADO`, `ERRO_NA_DETENTORA`, `ERRO`.

    • creditorobjectrequired

      Creditor (receiver) details.

    • debitorobjectrequired· nullable

      Debtor (payer) account details. Null when not provided at consent creation.

    • typestringrequired· nullable

      Payment request type. One of `NOW`, `SINGLE`, `DAILY`, `WEEKLY`, `MONTHLY`, `CUSTOM`.

    • paymentsarray of objectsrequired

      Payments that belong to this request.

  • messagestring

    Response message.

  • typestring

    Response type. One of `error`, `warning`, `info`, `success`.

  • statusCodeinteger· nullable

    HTTP status code carried inside the envelope.

200 · Payment request retrieved successfully.
{
  "data": {
    "id": "payment123",
    "createDateTime": "2024-06-01T12:00:00Z",
    "lastChangedDateTime": "2024-06-02T12:00:00Z",
    "externalComment": "Payment processed",
    "externalId": "ext123",
    "cpfCnpj": "12345678901234",
    "redirectUri": "https://your-app.example.com/payments/callback",
    "tenantId": "tenant123",
    "consentId": "consent123",
    "value": 1500.5,
    "status": "CONSUMIDO",
    "creditor": {
      "name": "John Doe",
      "personType": "PESSOA_NATURAL",
      "cpfCnpj": "12345678901234",
      "accountNumber": "1234567890",
      "accountIssuer": "0001",
      "accountIspb": "12345678",
      "accountType": "CACC"
    },
    "debitor": {
      "accountNumber": "9876543210",
      "accountIssuer": "0001",
      "accountIspb": "87654321",
      "accountType": "CACC"
    },
    "type": "NOW",
    "payments": [
      {
        "id": "pay_abc",
        "dueDate": "2024-06-01T12:00:00Z",
        "externalComment": null,
        "txId": "tx_xyz",
        "externalPaymentId": "ext123",
        "status": "PAGO"
      }
    ]
  },
  "message": "OK",
  "type": "success",
  "statusCode": 200
}

Next steps