I've recently started building a paypal invoice bot and I have gotten to the point of actually creating a draft invoice.
I have a paypal business account, I have the ability to generate the next invoice number.
Whenever I try to run my paypal invoice json payload, I am greeted with a "400 Bad Request" error which after research, i've found is due to malformed payload data that the server cannot process correctly.
If anyone has some example payload data that they know for sure works, I'd greatly appreciate assistance.
Edit:
For anyone wondering, here is my current payload:
Edit: fixed
I have a paypal business account, I have the ability to generate the next invoice number.
Whenever I try to run my paypal invoice json payload, I am greeted with a "400 Bad Request" error which after research, i've found is due to malformed payload data that the server cannot process correctly.
If anyone has some example payload data that they know for sure works, I'd greatly appreciate assistance.
Edit:
For anyone wondering, here is my current payload:
Code:
{
"detail": {
"invoice_number": "{INVOICE_NUMBER}",
"invoice_date": "{DATE}",
"currency_code": "USD",
"note": "{NOTE}",
"term": "{TERMS}"
},
"invoicer": {
"name": {
"given_name": "{FIRST_NAME}",
"surname": "{LAST_NAME}"
},
"email_address": "{EMAIL}",
"website": "{WEBSITE}"
},
"items": [
{
"name": "{ITEM}",
"quantity": "1",
"unit_amount": {
"currency_code": "USD",
"value": "{PRICE}"
},
"tax": {
"name": "Handling Fees",
"percent": "10"
},
"unit_of_measure": "QUANTITY"
}
],
"configuration": {
"partial_payment": {
"allow_partial_payment": false,
"minimum_amount_due": {
"currency_code": "USD",
"value": "0.00"
}
},
"allow_tip": false,
"tax_calculated_after_discount": true,
"tax_inclusive": false
}
}
Edit: fixed
- Type
- Requesting
Last edited:
