Can I accept any currency in Telegram Bot API payments? - telegram-bot

I have a Telegram bot which sends invoices to users. The invoice is only sent when I specify my local currency uah in the request, in other cases when I specify any other currency like usd it just throws me a CURRENCY_INVALID error with 400 status code:
Unhandled rejection Error: ETELEGRAM: 400 Bad Request: CURRENCY_INVALID.
Can I use any other currency apart from my local one in my Telegram Bot API invoices? Do I need to change the payment provider for that?
I am using node-telegram-bot-api.

Related

Can we get data as Response using Post Method for API Testing using RestAssured Cucumber

Here is the full question :
As a Portfolio API, I should be able to retrieve details for a given Account and Account type from Balance API, so that i can pass over the same to the UI for the end users to view the same.
Scenario 1 - Verify the response when Portfolio API invokes the
POST /v1/accDetails endpoint for a given account details (Checking)
Given client has a valid auth token for the api
And Portfolio API has the following
Account Number 1234567890 (10 characters).
Account Type 'CHQ' (3 characters)
When Portfolio API sends a POST request to Balance API
Then Portfolio API will receive the response code as <00>
And response body will have the following (not limited to below fields)
Account Type, Account Number, Account ID, Account Name, Account Balance, Product TypABA Number, Interest Rate, Interest Earned to DateStatus.
Now my question is we can do this using GET Method but can we do this using POST method or not? When we use post that mean we are going to add something but I do not want to add any account. I just want to get account details.
Since you have only a few parameters to send via GET, the best approach is to use [GET].
We can use the [POST] if we really need it to do so.
But if you can use [GET] for that, then the best approach is to use [GET].
Also can refer: REST API using POST instead of GET.

I get error 400 when sending data to my API on flutter

when trying to send data to my Api i get error 400 with the following message :
{"errors":{"email":["Enter a valid email address."]}}
But when I introduce the same data manually directly on the API it works fine, what problem could I have?

Transaction history API is not sending payer email address?

I have requested for the transaction history by using paypal sync api and getting the successful response but response does not contain payer email address in payer_info object is this bug or i need some permissions to get the email address

Detect an invalid paypal email using MassPay Paypal API

I'm using MassPay Paypal API to make payments.
I was able to test it and is working pretty well using sandbox accounts.
The problem is I couldn't find a way to identify if the email that is going to receive money is a valid paypal email.
I tested it using a fake email and money was taken from the payer sandbox account even though the email (the one that should receive the money) doesn't have a paypal account associated, and the API response was as if it was a successful request.
I found this method to get the verification status of an account, but there is no much info in the documentation or any other info that helps me understand if this is what I'm looking for or how to apply it.
You will need an API operation called GetVerifiedStatus API Operation under PayPal adaptive accounts. Refer the below:
https://developer.paypal.com/docs/classic/api/adaptive-accounts/GetVerifiedStatus_API_Operation/
https://developer.paypal.com/docs/classic/adaptive-accounts/gs_AdaptiveAccounts/
Sample API request:
API end point: https://svcs.sandbox.paypal.com/AdaptiveAccounts/GetVerifiedStatus
requestEnvelope.errorLanguage = en_US&emailAddress = email#test.com&firstName = Firstname&lastName = Lastname&matchCriteria = NAME

Payout to unregistered user with API REST

I use the Paypal REST API to do single payout (https://developer.paypal.com/docs/api/#payouts). As receiver, I give an email address. All works as expected if I give an email corresponding to an existing Paypal sandbox account.
When I give an email that is not registered among my testing sandbox accounts, I would have expected than the receiver targeted by the payout would receive an email and be invited to create his Paypal account to claim his payout.
However, I got a "RECEIVER_UNREGISTERED: Receiver is unregistered (https://developer.paypal.com/webapps/developer/docs/api/#RECEIVER_UNREGISTERED)."
To give an email as receiver linked to an existing Paypal is it really mandatory ? If yes, what is your app workflow to send a Paypal Payout to unregistered Paypal users ?
Thanks !
When you do a payout to an non-registered email, the status of the payout become "Unclaimed".
If the user is registered on PayPal, you will normally get a "Success" transaction status.
The error messages only have an informative purpose :
"errors":{
"name":"RECEIVER_UNREGISTERED",
"message":"Receiver is unregistered",
"information_link":"https://developer.paypal.com/docs/api/payments.payouts-batch/#errors",
"details":{}
},
The Sandbox is an isolated environnement and emails from the sandbox environnement are not sent to the end-users. That's why your payout receiver are not receiving any email asking to create a Paypal account. Same scenario if you send money to a phone number instead of an email address.
Receivers have 30 days to claim their money. After 30 days, the money is refunded to the payee.
You can read more about the status on the Payout API documentation.