API hit problem with Credit Card

hardikarora
New Community Member

Hi,
I am using Paypal API for payment and I am able to make payment through paypal wallet balance but when I am using payment through credit card in API hit then this type of error is coming " System.HttpResponse[Status=Internal Server Error, StatusCode=500] ".
My code is 
" curl -v -X POST https://api.sandbox.paypal.com/v1/payments/payment \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token" \ -d '{ "intent": "sale", "payer": { "payment_method": "paypal" }, "transactions": [{ "amount": { "total": "30.11", "currency": "USD", "details": { "subtotal": "30.00", "tax": "0.07", "shipping": "0.03", "handling_fee": "1.00", "shipping_discount": "-1.00", "insurance": "0.01" } }, "description": "This is the payment transaction description.", "custom": "EBAY_EMS_90048630024435", "invoice_number": "48787589673", "payment_options": { "allowed_payment_method": "INSTANT_FUNDING_SOURCE" }, "soft_descriptor": "ECHI5786786", "item_list": { "items": [{ "name": "hat", "description": "Brown color hat", "quantity": "5", "price": "3", "tax": "0.01", "sku": "1", "currency": "USD" }, { "name": "handbag", "description": "Black color hand bag", "quantity": "1", "price": "15", "tax": "0.02", "sku": "product34", "currency": "USD" }], "shipping_address": { "recipient_name": "Hello World", "line1": "4thFloor", "line2": "unit#34", "city": "SAn Jose", "country_code": "US", "postal_code": "95131", "phone": "011862212345678", "state": "CA" } } }], "note_to_payer": "Contact us for any questions on your order.", "redirect_urls": { "return_url": "https://example.com", "cancel_url": "https://example.com" } }' "

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.