Hello @mintellity,
I will advise you to send "payment_method": "paypal" as payment method.
As we can see in the flow below that in a case of Payment upon Invoice, the response of the execute payment request will indicates the following variable : "instruction_type": "PAY_UPON_INVOICE""
Here is a sample of flow :
Request Body:
{
"redirect_urls": {
"cancel_url": "http://www.mypage.de/index.php?s=119&a=return&r=false",
"return_url": "http://www.mypage.de/index.php?s=119&a=return&r=true"
},
"experience_profile_id": "XX-XXXX-XXXX-XXXX-XXXX",
"intent": "sale",
"payer": {
"payment_method": "paypal"
},
"transactions": [
{
"item_list": {
"items": [
{
"currency": "EUR",
"price": "3.95",
"name": "Lucky Paw",
"quantity": 50
},
{
"currency": "EUR",
"price": "17",
"name": "Lucky Tail",
"quantity": 1
}
]
},
"amount": {
"currency": "EUR",
"total": "214.50",
"details": {
"shipping_discount": "0",
"handling_fee": "0",
"subtotal": "214.50",
"tax": "0",
"shipping": "0"
}
},
"description": "Payment"
}
]
} -------------------------------------
Response Body:
{
"links": [
{
"href": "https://api.paypal.com/v1/payments/payment/PAY-1111111111111111111111111",
"method": "GET",
"rel": "self"
},
{
"href": "https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-11111111111111111111",
"method": "REDIRECT",
"rel": "approval_url"
},
{
"href": "https://api.paypal.com/v1/payments/payment/PAY-1111111111111111111111111/execute",
"method": "POST",
"rel": "execute"
}
],
"payer": {
"payment_method": "paypal"
},
"transactions": [
{
"item_list": {
"items": [
{
"currency": "EUR",
"price": "3.95",
"name": "Lucky Paw",
"quantity": 50
},
{
"currency": "EUR",
"price": "17.00",
"name": "Lucky Tail",
"quantity": 1
}
]
},
"related_resources": [],
"amount": {
"currency": "EUR",
"total": "214.50",
"details": {
"subtotal": "214.50",
"handling_fee": "0.00",
"tax": "0.00",
"shipping": "0.00",
"shipping_discount": "0.00"
}
},
"description": "Payment"
}
],
"state": "created",
"experience_profile_id": "XX-XXXX-XXXX-XXXX-XXXX",
"create_time": "2018-02-15T20:15:42Z",
"intent": "sale",
"id": "PAY-111111111111111111111111111"
} ----------------- Execute Payment -----------
Response Headers:
Date: Thu, 15 Feb 2018 12:18:07 PST
Paypal-Debug-Id: 11111111111111
APPLICATION_ID: APP-1111111111111111111
Content-Language: *
CALLER_ACCT_NUM: 11111111111111
Request Body:
{
"payer_id": "11111111111111",
"transactions": [
{
"amount": {
"currency": "EUR",
"total": "214.50",
"details": {
"shipping_discount": "0",
"handling_fee": "0",
"subtotal": "214.50",
"tax": "0",
"shipping": "0"
}
}
}
]
}
Response Body:
{
"links": [
{
"href": "https://api.paypal.com/v1/payments/payment/PAY-1111111111111111111111111",
"method": "GET",
"rel": "self"
}
],
"payer": {
"payment_method": "paypal",
"status": "UNVERIFIED",
"payer_info": {
"first_name": "Finlee",
"last_name": "Tanks",
"payer_id": "1111111111111",
"billing_address": {
"city": "Berlin",
"line2": "",
"line1": "Michaelkirchplatz 24",
"state": "",
"postal_code": "10179",
"country_code": "DE"
},
"country_code": "DE",
"shipping_address": {
"city": "Berlin",
"line1": "******",
"recipient_name": "Finlee Tanks",
"state": "",
"postal_code": "10179",
"country_code": "DE"
},
"email": "my.buyer@mail.de"
}
},
"transactions": [
{
"item_list": {
"items": [
{
"currency": "EUR",
"price": "3.95",
"name": "Lucky Paw",
"quantity": 50
},
{
"currency": "EUR",
"price": "17.00",
"name": "Lucky Tail",
"quantity": 1
}
],
"shipping_address": {
"city": "Berlin",
"line1": "******",
"recipient_name": "Finlee Tanks",
"state": "",
"postal_code": "10179",
"country_code": "DE"
}
},
"related_resources": [
{
"sale": {
"protection_eligibility_type": "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE",
"update_time": "2018-02-15T20:18:06Z",
"links": [
{
"href": "https://api.paypal.com/v1/payments/sale/11111111111111111",
"method": "GET",
"rel": "self"
},
{
"href": "https://api.paypal.com/v1/payments/sale/11111111111111111/refund",
"method": "POST",
"rel": "refund"
},
{
"href": "https://api.paypal.com/v1/payments/payment/PAY-1111111111111111111111111",
"method": "GET",
"rel": "parent_payment"
},
{
"href": "https://api.paypal.com/v1/payments/payment/PAY-1111111111111111111111111/payment-instruction",
"method": "GET",
"rel": "payment_instruction"
}
],
"receipt_id": "1808455015873704",
"protection_eligibility": "ELIGIBLE",
"state": "completed",
"parent_payment": "PAY-1111111111111111111111111",
"amount": {
"currency": "EUR",
"total": "214.50",
"details": {
"subtotal": "214.50"
}
},
"create_time": "2018-02-15T20:18:06Z",
"payment_mode": "INSTANT_TRANSFER",
"id": "11111111111111111",
"transaction_fee": {
"currency": "EUR",
"value": "4.19"
}
}
}
],
"description": "Payment",
"payee": {
"merchant_id": "1111111111111",
"email": "info@mypage.de"
},
"amount": {
"currency": "EUR",
"total": "214.50",
"details": {
"tax": "0.00",
"handling_fee": "0.00",
"subtotal": "214.50",
"shipping": "0.00",
"shipping_discount": "0.00"
}
},
"invoice_number": "111111"
}
],
"cart": "2HH24344NX5288311",
"payment_instruction": {
"reference_number": "11111111111111111",
"links": [
{
"href": "https://api.paypal.com/v1/payments/payment/PAY-1111111111111111111111111/payment-instruction",
"method": "GET",
"rel": "self"
}
],
"recipient_banking_instruction": {
"bank_identifier_code": "111111111111",
"bank_name": "Deutsche Bank",
"account_holder_name": "PayPal Europe",
"international_bank_account_number": "DE1111111111111111111111"
},
"payment_due_date": "2018-03-17",
"amount": {
"currency": "EUR",
"value": "214.50"
},
"instruction_type": "PAY_UPON_INVOICE"
},
"state": "approved",
"create_time": "2018-02-15T20:18:07Z",
"intent": "sale",
"id": "PAY-1111111111111111111111111"
}
... View more