Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetCardListResponsePayload probably has incorrect type #9

Open
killmenot opened this issue Oct 18, 2024 · 3 comments
Open

GetCardListResponsePayload probably has incorrect type #9

killmenot opened this issue Oct 18, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@killmenot
Copy link

Hi,

here it's described as:

export type GetCardListResponsePayload = BaseResponsePayload & ICardInfo[];

but in the reality the response is described as:

export type GetCardListResponsePayload = BaseResponsePayload | ICardInfo[];
@jfkz jfkz added the bug Something isn't working label Oct 29, 2024
@jfkz
Copy link
Owner

jfkz commented Nov 12, 2024

Any references for that?

@killmenot
Copy link
Author

I will back with the reference / test data soon (later this week). Had no time to dig to it before

@killmenot
Copy link
Author

Here are the samples of request and response to API + reference to API

Error

curl --location 'https://securepay.tinkoff.ru/v2/GetCardList' \
--header 'Content-Type: application/json' \
--data '{
    "CustomerKey": "1234567",
    "TerminalKey": "1234567890",
    "Token": "a16fb31befe5032227534e58d774d41295b9e496ee16501fc23341a6a1d7b4f6"
  }'
{
  "Success": false,
  "ErrorCode": "204",
  "Message": "Неверные параметры.",
  "Details": "Неверный токен. Проверьте пару TerminalKey/SecretKey."
}

Success

curl --location 'https://securepay.tinkoff.ru/v2/GetCardList' \
--header 'Content-Type: application/json' \
--data '{
    "CustomerKey": "1234567",
    "TerminalKey": "1234567890",
    "Token": "45d8b2d2fd54fdc7479bd0d6df9d3e3ded6fc48ba758e69b11dd3538698637d5"
  }'
[
  {
    "CardId": "123456789",
    "Pan": "430000******0777",
    "Status": "A",
    "RebillId": "1122334455",
    "CardType": 0,
    "ExpDate": "1112"
  }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants