How can I check the sample email sent by PayPal Invoice API - paypal

I'm trying to check how the paypal invoice looks like when it send email to the payer, however, the api doesn't seem to send the email. In the api response, there's a Invoice Url, I was able to see it but it requires the payer to login. Does the API send an email to payer's email or not?

From the PayPal Invoice API docs:
To use the Invoicing API to request payment, you start by making one of the Invoicing API calls to PayPal. Your customer receives the invoice via email and clicks on an included link to view the invoice on PayPal's website. Customers who have a PayPal account can log into their PayPal accounts to pay the invoice. Customers can also pay using a check, debit, or credit card.
(https://developer.paypal.com/docs/classic/invoicing/gs_Invoicing/)
As long as the "ack" field in the JSON response from the API shows "success" as value, an email will be sent by the buyer. He or she has to click the link and login to complete the payment.
Example JSON response:
{
"responseEnvelope": {
"timestamp": "2011-06-16T:12:30.861-07:00",
"ack": "Success",
"correlationId": "78733df04b1f0",
"build": "1942837"
},
"invoiceID": "INV2-C4AK-UU3J-5SCL-9KZY",
"invoiceNumber": "1192",
"invoiceURL": "invoiceURL"
}
so the answer to your question is YES;

Try sending yourself (or another account you control) an invoice. This will give you an idea of what the invoice looks like.

Related

Paypal Missing Payer Address with Orders API V2 / Sandbox

I am setting up a payment integration with PayPal Checkout Buttons and Paypal Orders API V2, which I test in the sandbox environment (no fancy shop system in use).
When an order is paid and status is completed, the Paypal Orders API V2 returns a valid response, but I do not completely receive the payer address from my sandbox buyer account.
Payer looks like this:
"payer": {
"name": {
"given_name": "<given_name>",
"surname": "<surname>"
},
"email_address": "<email>",
"payer_id": "HEU6X43KU231",
"address": {
"country_code": "DE"
}
}
but the payer definition says that the payer should also contain:
address_line_1,
address_line_2,
admin_area_1,
postal code
I would like to use this information to send an invoice to the customer after payment is completed.
First, I thought, the address information is not available in my sandbox buyer account, because you do not find this information in the paypal dashboard (in the details of the respective sandbox account), but the address information is available at https://www.sandbox.paypal.com/businessprofile/settings/address
The whole thing would work with a shipping address, but this look like conceptual mismatch. My order item has the "category": 'DIGITAL_GOODS' and I've set the "shipping_preference": 'NO_SHIPPING', because I sell a digital product, which is automatically delivered after the payment process.
As a workaround I could also ask for the address information in the dialog in our part of the order process (in our GUI, before checkout), and prefill the paypal payment dialog with the userdata entered in our GUI, but in terms of user experience I would prefer to use the paypal data.
Does someone have a clue how to receive the payer address data?
Thanks a lot in advance
I will get the documentation clarified.
But to just answer your question, by default the address of the payer is not shared, just the country_code - to get the complete payer.address you will need to call your account manager or merchant support and they can enable it for your account if you meet their criteria.

How do i connect a third party paypal account by using email id and send invoice on behalf

i am integrating Paypal with our platform for multiple merchants. Here a Merchant just need to enter his Paypal email Id, and here i just need to validate his First Name and Last Name to be matched with Paypal account and the entered names in our platform.
And then i should be able to send invoices On behalf of Merchant from our platform to their customers.
I am looking for below.
1) How do i validate Merchant email id with paypal
2) After validating how do i be able to send Invoices on behalf of
Merchants.
FYI, I just find similar setup functionality here. i would need something like this.
You can validate the merchant PayPal account using GetVerifiedStatus API:
requestEnvelope.errorLanguage = en_US&emailAddress = teatemail#test.com&&firstName = Firstname&lastName = Lastname&matchCriteria = NAME
After validation, you can get the API call permissions after that you can run the invoicing API for sending invoices.
After a long time analyzing, i was able to find that to have above functionality , i have to use AdaptivePayment method of Paypal for generating invoice from our side and sending a link for payment and invoice page to customer in mail.
But before doing this i have to validate email id of merchant using GetVerifiedStatus API as mentioned by PP_Punna.
So the following steps are needed to :
1) Validate merchant email Id with first name and last name using GetVerifiedStatus API.
2) Generate a PayKey using AdaptivePayment method (PAY) by mentioning the receiver email id as Merchant email id which was validated in first step and create url like
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_ap-payment&paykey=[PayKey]. and put it under paypal button.

Paypal Restfull API, setting receiver email address

I can receive payment using paypal rest api on my website, but how can i get these payments received by someother paypal email address.
Like people add their products on my page and once their product is sold, as soon the buyers pays, i want the money to be credited in seller's paypal account instead of my paypal account. where can i mention the seller paypal address in rest api cal so that money goes to him after the sale
secondly paypal sends the transaction time in following format
2013-03-01T22:34:35Z
what is the timezone of this time?
Here's a post I wrote about setting the receiver of a payment with the REST APIs: https://devblog.paypal.com/setting-payee/. In essence, you just add something like the following to your transaction object:
payee: {
email: 'payee#test.com'
}
Also, the time zone should be GMT that is being returned.

Confused about merchantEmail and payerEmail on PayPal Invoicing API

Below is an example of payload to send to PayPal API to create payment to another merchant behalf. The example is taken from PayPal documentation page
# ** Payload **
{
"requestEnvelope":
{
"errorLanguage":"en_US" # Language of returned errors
},
"invoice":
{
"merchantEmail":"receiver#example.com", # Receiver/Merchant e-ddress
"payerEmail":"sender#example.com", # Sender/Buyer e-dress
"currencyCode":"USD",
"paymentTerms":"DueOnReceipt",
"itemList":
{
"item":[{
"name":"BananaPlant",
"quantity":"1",
"unitPrice":"38.95"
},
{
"name":"PeachTree",
"quantity":"2",
"unitPrice":"14.95"
}]
}
}
}
I am confused about the field merchantEmail and payerEmail. Which is what? Is the merchant email my email or for the party I am creating invoice for? in the comment #Receiver/Merchant e-address made me more confused. Is it for the email who will be receive and pay the invoice?
For the sake of conversion. Lets use following example for answers:
api_user#domain.com is the user who calling the api to create invoice for merchants behalf.
merchant#domain.com is the user whom behalf api_user#domain.com creating Invoices.
user#domain.com is the user who is being charged.
Can anyone clarify?
To Clarify for You
merchantEmail is the email of the account that will be receiving the invoice aka seller.
payerEmail is the email of the account that is sending payment/buying the good.
The api_user#domain.com is the account specifying the API Credential set. Usually referred to as the API Username.

DNN and PayPal, how to sent email to customer after payment has been made

In my DNN website, using Paypal's Checkout button, when user has click the buy button and sent to Paypal. Make a payment and then redirect back to my site.
Question:
How can I get that customer email address (from Paypal) so that i can sent a conformation email to him/her from my DNN website?
thanks.
Two ways; you can either call the GetTransactionDetails API and supply the TRANSACTIONID as a parameter. 'EMAIL' will contain the buyer's (PayPal) email address.
Or you can use PayPal IPN to get notified through POST whenever a payment / action has been made.
GetTransactionDetails API doc is at https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_GetTransactionDetails
You can also have a look at TransactionSearch for past transactions.
In case you want to use IPN, just supply NOTIFYURL in your SetExpressCheckout and DoExpressCheckoutPayment call if you're using Express Checkout, or if you're using Website Payments Standard.
Remember to send the POST back to PayPal for validation at paypal.com/cgi-bin/webscr?cmd=_notify-validate and check for a VERIFIED / INVALID response.
Some sample code and docs for IPN is available at https://www.paypal.com/ipn/