Pular para o conteúdo

Get payment by external ID

Retrieves the full state of a payment request by the externalId your application sent in Create payment. Use this when you want to reconcile by your own identifier instead of the Lina-issued paymentRequestId.

The response shape matches Get payment request.

GET/api/v1/payments/external/{externalId}

Get payment by external ID

Returns the payment request identified by the externalId you sent when creating the payment.

Auth: Bearer Token

Parâmetros de path

1 campo
externalId
pathstring

Your own identifier — the same value sent as `externalId` in the Create payment body.

curl --request GET \
  --url 'https://embedded-payment-manager.hml.linaob.com.br/api/v1/payments/external/ext123' \
  --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.

    • 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 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": null,
    "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