Invoices

Use the /invoices resource to create, update, and send invoices and invoice reminders. To manage invoices, you can also list invoices, show details for invoices, delete draft invoices, and cancel sent invoices. You can also record payments for invoices to mark them as fully or partially paid, or record refunds for invoices to mark them as fully or partially refunded. You can create QR codes for invoices that can be scanned, viewed, and paid by a mobile phone.

The invoice object

Atributos

The invoice details which includes all information of the invoice like items, billing information.

idstring · máx: 30Solo lecturaOpcional

The ID of the invoice.

parent_idstring · máx: 30Solo lecturaOpcional

The parent ID to an invoice that defines the group invoice to which the invoice is related.

statusstring · enumSolo lecturaOpcional

The status of the invoice.

Valores posibles:
detailall ofRequerido

The details of the invoice. Includes the invoice number, date, payment terms, and audit metadata.

y
invoicerall ofOpcional

The invoicer information. Includes the business name, email, address, phone, fax, tax ID, additional notes, and logo URL.

y
y
additional_recipientsstring · ppaas_common_email_address_v2[] · máx: 100Opcional

An array of one or more CC: emails to which notifications are sent. If you omit this parameter, a notification is sent to all CC: email addresses that are part of the invoice.Note: Valid values are email addresses in the additional_recipients value associated with the invoice.

configurationall ofOpcional

The invoice configuration details. Includes partial payment, tip, and tax calculated after discount.

y

The invoice object

{
  "id": "text",
  "parent_id": "text",
  "status": "DRAFT",
  "detail": {
    "reference": "text",
    "currency_code": "text",
    "note": "text",
    "terms_and_conditions": "text",
    "memo": "text",
    "attachments": [
      {
        "id": "text",
        "reference_url": "https://example.com",
        "content_type": "text",
        "create_time": "text",
        "size": "text"
      }
    ],
    "invoice_number": "text",
    "invoice_date": "text",
    "payment_term": {
      "term_type": "DUE_ON_RECEIPT",
      "due_date": "text"
    },
    "metadata": {
      "create_time": "text",
      "created_by": "text",
      "last_update_time": "text",
      "last_updated_by": "text",
      "cancel_time": "text",
      "cancelled_by": "text",
      "first_sent_time": "text",
      "last_sent_time": "text",
      "last_sent_by": "text",
      "created_by_flow": "MULTIPLE_RECIPIENTS_GROUP",
      "recipient_view_url": "https://example.com",
      "invoicer_view_url": "https://example.com"
    }
  },
  "invoicer": {
    "business_name": "text",
    "name": {
      "prefix": "text",
      "given_name": "text",
      "surname": "text",
      "middle_name": "text",
      "suffix": "text",
      "alternate_full_name": "text",
      "full_name": "text"
    },
    "address": {
      "address_line_1": "text",
      "address_line_2": "text",
      "address_line_3": "text",
      "admin_area_4": "text",
      "admin_area_3": "text",
      "admin_area_2": "text",
      "admin_area_1": "text",
      "postal_code": "text",
      "country_code": "text",
      "address_details": {
        "street_number": "text",
        "street_name": "text",
        "street_type": "text",
        "delivery_service": "text",
        "building_name": "text",
        "sub_building": "text"
      }
    },
    "email_address": "text",
    "phones": [
      {
        "country_code": "text",
        "national_number": "text",
        "extension_number": "text",
        "phone_type": "FAX"
      }
    ],
    "website": "https://example.com",
    "tax_id": "text",
    "additional_notes": "text",
    "logo_url": "https://example.com"
  },
  "primary_recipients": [
    {
      "billing_info": {
        "business_name": "text",
        "name": {
          "prefix": "text",
          "given_name": "text",
          "surname": "text",
          "middle_name": "text",
          "suffix": "text",
          "alternate_full_name": "text",
          "full_name": "text"
        },
        "address": {
          "address_line_1": "text",
          "address_line_2": "text",
          "address_line_3": "text",
          "admin_area_4": "text",
          "admin_area_3": "text",
          "admin_area_2": "text",
          "admin_area_1": "text",
          "postal_code": "text",
          "country_code": "text",
          "address_details": {
            "street_number": "text",
            "street_name": "text",
            "street_type": "text",
            "delivery_service": "text",
            "building_name": "text",
            "sub_building": "text"
          }
        },
        "email_address": "text",
        "phones": [
          {
            "country_code": "text",
            "national_number": "text",
            "extension_number": "text",
            "phone_type": "FAX"
          }
        ],
        "additional_info": "text",
        "language": "text"
      },
      "shipping_info": {
        "business_name": "text",
        "name": {
          "prefix": "text",
          "given_name": "text",
          "surname": "text",
          "middle_name": "text",
          "suffix": "text",
          "alternate_full_name": "text",
          "full_name": "text"
        },
        "address": {
          "address_line_1": "text",
          "address_line_2": "text",
          "address_line_3": "text",
          "admin_area_4": "text",
          "admin_area_3": "text",
          "admin_area_2": "text",
          "admin_area_1": "text",
          "postal_code": "text",
          "country_code": "text",
          "address_details": {
            "street_number": "text",
            "street_name": "text",
            "street_type": "text",
            "delivery_service": "text",
            "building_name": "text",
            "sub_building": "text"
          }
        }
      }
    }
  ],
  "additional_recipients": [
    "text"
  ],
  "items": [
    {
      "id": "text",
      "name": "text",
      "description": "text",
      "quantity": "text",
      "unit_amount": {
        "currency_code": "text",
        "value": "text"
      },
      "tax": {
        "name": "text",
        "percent": "text",
        "amount": {
          "currency_code": "text",
          "value": "text"
        }
      },
      "item_date": "text",
      "discount": {
        "percent": "text",
        "amount": {
          "currency_code": "text",
          "value": "text"
        }
      },
      "unit_of_measure": "QUANTITY"
    }
  ],
  "configuration": {
    "tax_calculated_after_discount": true,
    "tax_inclusive": false,
    "allow_tip": false,
    "partial_payment": {
      "allow_partial_payment": false,
      "minimum_amount_due": {
        "currency_code": "text",
        "value": "text"
      }
    },
    "template_id": "PayPal system template"
  },
  "amount": {
    "currency_code": "text",
    "value": "text",
    "breakdown": {
      "item_total": {
        "currency_code": "text",
        "value": "text"
      },
      "discount": {
        "invoice_discount": {
          "percent": "text",
          "amount": {
            "currency_code": "text",
            "value": "text"
          }
        },
        "item_discount": {
          "currency_code": "text",
          "value": "text"
        }
      },
      "tax_total": {
        "currency_code": "text",
        "value": "text"
      },
      "shipping": {
        "amount": {
          "currency_code": "text",
          "value": "text"
        },
        "tax": {
          "name": "text",
          "percent": "text",
          "amount": {
            "currency_code": "text",
            "value": "text"
          }
        }
      },
      "custom": {
        "label": "text",
        "amount": {
          "currency_code": "text",
          "value": "text"
        }
      }
    }
  },
  "due_amount": {
    "currency_code": "text",
    "value": "text"
  },
  "gratuity": {
    "currency_code": "text",
    "value": "text"
  },
  "payments": {
    "paid_amount": {
      "currency_code": "text",
      "value": "text"
    },
    "transactions": [
      {
        "type": "PAYPAL",
        "payment_id": "text",
        "payment_date": "text",
        "method": "BANK_TRANSFER",
        "note": "text",
        "amount": {
          "currency_code": "text",
          "value": "text"
        },
        "shipping_info": {
          "business_name": "text",
          "name": {
            "prefix": "text",
            "given_name": "text",
            "surname": "text",
            "middle_name": "text",
            "suffix": "text",
            "alternate_full_name": "text",
            "full_name": "text"
          },
          "address": {
            "address_line_1": "text",
            "address_line_2": "text",
            "address_line_3": "text",
            "admin_area_4": "text",
            "admin_area_3": "text",
            "admin_area_2": "text",
            "admin_area_1": "text",
            "postal_code": "text",
            "country_code": "text",
            "address_details": {
              "street_number": "text",
              "street_name": "text",
              "street_type": "text",
              "delivery_service": "text",
              "building_name": "text",
              "sub_building": "text"
            }
          }
        }
      }
    ]
  },
  "refunds": {
    "refund_amount": {
      "currency_code": "text",
      "value": "text"
    },
    "transactions": [
      {
        "type": "PAYPAL",
        "refund_id": "text",
        "refund_date": "text",
        "amount": {
          "currency_code": "text",
          "value": "text"
        },
        "method": "BANK_TRANSFER"
      }
    ]
  },
  "links": [
    {
      "href": "text",
      "rel": "text",
      "method": "GET"
    }
  ]
}

List invoices

get

Lists invoices. To filter the invoices that appear in the response, you can specify one or more optional query parameters.

Autorizaciones
Parámetros de consulta
pageinteger · mín: 1 · máx: 1000Opcional

The page number to be retrieved, for the list of templates. So, a combination of page=1 and page_size=20 returns the first 20 templates. A combination of page=2 and page_size=20 returns the next 20 templates.

Default: 1
page_sizeinteger · mín: 1 · máx: 100Opcional

The maximum number of templates to return in the response.

Default: 20
total_requiredbooleanOpcional

Indicates whether the to show total_pages and total_items in the response.

Default: false
fieldsstringOpcional

The fields to return in the response. Value is all or none. To return only the template name, ID, and default attributes, specify none.

Default: allPattern: (?i)^(all|none)$
Respuestas
200
A successful request returns the HTTP `200 OK` status code and a JSON response body that lists invoices with details.
get
GET /v2/invoicing/invoices HTTP/1.1
Host: api-m.sandbox.paypal.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "total_pages": 1,
  "total_items": 1,
  "items": [
    {
      "id": "text",
      "parent_id": "text",
      "status": "DRAFT",
      "detail": {
        "reference": "text",
        "currency_code": "text",
        "note": "text",
        "terms_and_conditions": "text",
        "memo": "text",
        "attachments": [
          {
            "id": "text",
            "reference_url": "https://example.com",
            "content_type": "text",
            "create_time": "text",
            "size": "text"
          }
        ],
        "invoice_number": "text",
        "invoice_date": "text",
        "payment_term": {
          "term_type": "DUE_ON_RECEIPT",
          "due_date": "text"
        },
        "metadata": {
          "create_time": "text",
          "created_by": "text",
          "last_update_time": "text",
          "last_updated_by": "text",
          "cancel_time": "text",
          "cancelled_by": "text",
          "first_sent_time": "text",
          "last_sent_time": "text",
          "last_sent_by": "text",
          "created_by_flow": "MULTIPLE_RECIPIENTS_GROUP",
          "recipient_view_url": "https://example.com",
          "invoicer_view_url": "https://example.com"
        }
      },
      "invoicer": {
        "business_name": "text",
        "name": {
          "prefix": "text",
          "given_name": "text",
          "surname": "text",
          "middle_name": "text",
          "suffix": "text",
          "alternate_full_name": "text",
          "full_name": "text"
        },
        "address": {
          "address_line_1": "text",
          "address_line_2": "text",
          "address_line_3": "text",
          "admin_area_4": "text",
          "admin_area_3": "text",
          "admin_area_2": "text",
          "admin_area_1": "text",
          "postal_code": "text",
          "country_code": "text",
          "address_details": {
            "street_number": "text",
            "street_name": "text",
            "street_type": "text",
            "delivery_service": "text",
            "building_name": "text",
            "sub_building": "text"
          }
        },
        "email_address": "text",
        "phones": [
          {
            "country_code": "text",
            "national_number": "text",
            "extension_number": "text",
            "phone_type": "FAX"
          }
        ],
        "website": "https://example.com",
        "tax_id": "text",
        "additional_notes": "text",
        "logo_url": "https://example.com"
      },
      "primary_recipients": [
        {
          "billing_info": {
            "business_name": "text",
            "name": {
              "prefix": "text",
              "given_name": "text",
              "surname": "text",
              "middle_name": "text",
              "suffix": "text",
              "alternate_full_name": "text",
              "full_name": "text"
            },
            "address": {
              "address_line_1": "text",
              "address_line_2": "text",
              "address_line_3": "text",
              "admin_area_4": "text",
              "admin_area_3": "text",
              "admin_area_2": "text",
              "admin_area_1": "text",
              "postal_code": "text",
              "country_code": "text",
              "address_details": {
                "street_number": "text",
                "street_name": "text",
                "street_type": "text",
                "delivery_service": "text",
                "building_name": "text",
                "sub_building": "text"
              }
            },
            "email_address": "text",
            "phones": [
              {
                "country_code": "text",
                "national_number": "text",
                "extension_number": "text",
                "phone_type": "FAX"
              }
            ],
            "additional_info": "text",
            "language": "text"
          },
          "shipping_info": {
            "business_name": "text",
            "name": {
              "prefix": "text",
              "given_name": "text",
              "surname": "text",
              "middle_name": "text",
              "suffix": "text",
              "alternate_full_name": "text",
              "full_name": "text"
            },
            "address": {
              "address_line_1": "text",
              "address_line_2": "text",
              "address_line_3": "text",
              "admin_area_4": "text",
              "admin_area_3": "text",
              "admin_area_2": "text",
              "admin_area_1": "text",
              "postal_code": "text",
              "country_code": "text",
              "address_details": {
                "street_number": "text",
                "street_name": "text",
                "street_type": "text",
                "delivery_service": "text",
                "building_name": "text",
                "sub_building": "text"
              }
            }
          }
        }
      ],
      "additional_recipients": [
        "text"
      ],
      "items": [
        {
          "id": "text",
          "name": "text",
          "description": "text",
          "quantity": "text",
          "unit_amount": {
            "currency_code": "text",
            "value": "text"
          },
          "tax": {
            "name": "text",
            "percent": "text",
            "amount": {
              "currency_code": "text",
              "value": "text"
            }
          },
          "item_date": "text",
          "discount": {
            "percent": "text",
            "amount": {
              "currency_code": "text",
              "value": "text"
            }
          },
          "unit_of_measure": "QUANTITY"
        }
      ],
      "configuration": {
        "tax_calculated_after_discount": true,
        "tax_inclusive": false,
        "allow_tip": false,
        "partial_payment": {
          "allow_partial_payment": false,
          "minimum_amount_due": {
            "currency_code": "text",
            "value": "text"
          }
        },
        "template_id": "PayPal system template"
      },
      "amount": {
        "currency_code": "text",
        "value": "text",
        "breakdown": {
          "item_total": {
            "currency_code": "text",
            "value": "text"
          },
          "discount": {
            "invoice_discount": {
              "percent": "text",
              "amount": {
                "currency_code": "text",
                "value": "text"
              }
            },
            "item_discount": {
              "currency_code": "text",
              "value": "text"
            }
          },
          "tax_total": {
            "currency_code": "text",
            "value": "text"
          },
          "shipping": {
            "amount": {
              "currency_code": "text",
              "value": "text"
            },
            "tax": {
              "name": "text",
              "percent": "text",
              "amount": {
                "currency_code": "text",
                "value": "text"
              }
            }
          },
          "custom": {
            "label": "text",
            "amount": {
              "currency_code": "text",
              "value": "text"
            }
          }
        }
      },
      "due_amount": {
        "currency_code": "text",
        "value": "text"
      },
      "gratuity": {
        "currency_code": "text",
        "value": "text"
      },
      "payments": {
        "paid_amount": {
          "currency_code": "text",
          "value": "text"
        },
        "transactions": [
          {
            "type": "PAYPAL",
            "payment_id": "text",
            "payment_date": "text",
            "method": "BANK_TRANSFER",
            "note": "text",
            "amount": {
              "currency_code": "text",
              "value": "text"
            },
            "shipping_info": {
              "business_name": "text",
              "name": {
                "prefix": "text",
                "given_name": "text",
                "surname": "text",
                "middle_name": "text",
                "suffix": "text",
                "alternate_full_name": "text",
                "full_name": "text"
              },
              "address": {
                "address_line_1": "text",
                "address_line_2": "text",
                "address_line_3": "text",
                "admin_area_4": "text",
                "admin_area_3": "text",
                "admin_area_2": "text",
                "admin_area_1": "text",
                "postal_code": "text",
                "country_code": "text",
                "address_details": {
                  "street_number": "text",
                  "street_name": "text",
                  "street_type": "text",
                  "delivery_service": "text",
                  "building_name": "text",
                  "sub_building": "text"
                }
              }
            }
          }
        ]
      },
      "refunds": {
        "refund_amount": {
          "currency_code": "text",
          "value": "text"
        },
        "transactions": [
          {
            "type": "PAYPAL",
            "refund_id": "text",
            "refund_date": "text",
            "amount": {
              "currency_code": "text",
              "value": "text"
            },
            "method": "BANK_TRANSFER"
          }
        ]
      },
      "links": [
        {
          "href": "text",
          "rel": "text",
          "method": "GET"
        }
      ]
    }
  ],
  "links": [
    {
      "href": "text",
      "rel": "text",
      "method": "GET"
    }
  ]
}

Create draft invoice

post

Creates a draft invoice. To move the invoice from a draft to payable state, you must send the invoice. In the JSON request body, include invoice details including merchant information. The invoice object must include an items array.

Note: The merchant that you specify in an invoice must have a PayPal account in good standing.

.

Autorizaciones
Cuerpo

The invoice details which includes all information of the invoice like items, billing information.

idstring · máx: 30Solo lecturaOpcional

The ID of the invoice.

parent_idstring · máx: 30Solo lecturaOpcional

The parent ID to an invoice that defines the group invoice to which the invoice is related.

statusstring · enumSolo lecturaOpcional

The status of the invoice.

Valores posibles:
detailall ofRequerido

The details of the invoice. Includes the invoice number, date, payment terms, and audit metadata.

y
invoicerall ofOpcional

The invoicer information. Includes the business name, email, address, phone, fax, tax ID, additional notes, and logo URL.

y
y
additional_recipientsstring · ppaas_common_email_address_v2[] · máx: 100Opcional

An array of one or more CC: emails to which notifications are sent. If you omit this parameter, a notification is sent to all CC: email addresses that are part of the invoice.Note: Valid values are email addresses in the additional_recipients value associated with the invoice.

configurationall ofOpcional

The invoice configuration details. Includes partial payment, tip, and tax calculated after discount.

y
Respuestas
201
A successful request returns the HTTP `201 Created` status code. A JSON response body that shows invoice details is returned if you set prefer=return=representation.
post
POST /v2/invoicing/invoices HTTP/1.1
Host: api-m.sandbox.paypal.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 2870

{
  "id": "INV2-C82X-JNN9-Y6S5-CNXW",
  "status": "DRAFT",
  "detail": {
    "invoice_number": "#123",
    "reference": "deal-refernce-update",
    "invoice_date": "2018-11-12",
    "currency_code": "USD",
    "note": "Thank you for your business.",
    "term": "No refunds after 30 days.",
    "memo": "This is a long contract",
    "payment_term": {
      "term_type": "NET_10",
      "due_date": "2018-11-22"
    }
  },
  "invoicer": {
    "name": {
      "given_name": "David",
      "surname": "Larusso"
    },
    "address": {
      "address_line_1": "1234 First Street",
      "address_line_2": "337673 Hillside Court",
      "admin_area_2": "Anytown",
      "admin_area_1": "CA",
      "postal_code": "98765",
      "country_code": "US"
    },
    "email_address": "[email protected]",
    "phones": [
      {
        "country_code": "001",
        "national_number": "4085551234",
        "phone_type": "MOBILE"
      }
    ],
    "website": "www.test.com",
    "tax_id": "ABcNkWSfb5ICTt73nD3QON1fnnpgNKBy-Jb5SeuGj185MNNw6g",
    "logo_url": "https://example.com/logo.PNG",
    "additional_notes": "2-4"
  },
  "primary_recipients": [
    {
      "billing_info": {
        "name": {
          "given_name": "Stephanie",
          "surname": "Meyers"
        },
        "address": {
          "address_line_1": "1234 Main Street",
          "admin_area_2": "Anytown",
          "admin_area_1": "CA",
          "postal_code": "98765",
          "country_code": "US"
        },
        "email_address": "[email protected]",
        "phones": [
          {
            "country_code": "001",
            "national_number": "4884551234",
            "phone_type": "HOME"
          }
        ],
        "additional_info_value": "add-info"
      },
      "shipping_info": {
        "name": {
          "given_name": "Stephanie",
          "surname": "Meyers"
        },
        "address": {
          "address_line_1": "1234 Main Street",
          "admin_area_2": "Anytown",
          "admin_area_1": "CA",
          "postal_code": "98765",
          "country_code": "US"
        }
      }
    }
  ],
  "items": [
    {
      "name": "Yoga Mat",
      "description": "Elastic mat to practice yoga.",
      "quantity": "1",
      "unit_amount": {
        "currency_code": "USD",
        "value": "50.00"
      },
      "tax": {
        "name": "Sales Tax",
        "percent": "7.25",
        "amount": {
          "currency_code": "USD",
          "value": "3.27"
        }
      },
      "discount": {
        "percent": "5",
        "amount": {
          "currency_code": "USD",
          "value": "2.5"
        }
      },
      "unit_of_measure": "QUANTITY"
    },
    {
      "name": "Yoga t-shirt",
      "quantity": "1",
      "unit_amount": {
        "currency_code": "USD",
        "value": "10.00"
      },
      "tax": {
        "name": "Sales Tax",
        "percent": "7.25",
        "amount": {
          "currency_code": "USD",
          "value": "0.34"
        }
      },
      "discount": {
        "amount": {
          "currency_code": "USD",
          "value": "5.00"
        }
      },
      "unit_of_measure": "QUANTITY"
    }
  ],
  "configuration": {
    "partial_payment": {
      "allow_partial_payment": true,
      "minimum_amount_due": {
        "currency_code": "USD",
        "value": "20.00"
      }
    },
    "allow_tip": true,
    "tax_calculated_after_discount": true,
    "tax_inclusive": false,
    "template_id": "TEMP-19V05281TU309413B"
  },
  "amount": {
    "currency_code": "USD",
    "value": "74.21",
    "breakdown": {
      "item_total": {
        "currency_code": "USD",
        "value": "60.00"
      },
      "custom": {
        "label": "Packing Charges",
        "amount": {
          "currency_code": "USD",
          "value": "10.00"
        }
      },
      "shipping": {
        "amount": {
          "currency_code": "USD",
          "value": "10.00"
        },
        "tax": {
          "name": "Sales Tax",
          "percent": "7.25",
          "amount": {
            "currency_code": "USD",
            "value": "0.73"
          }
        }
      },
      "discount": {
        "item_discount": {
          "currency_code": "USD",
          "value": "-7.50"
        },
        "invoice_discount": {
          "percent": "5",
          "amount": {
            "currency_code": "USD",
            "value": "-2.63"
          }
        }
      },
      "tax_total": {
        "currency_code": "USD",
        "value": "4.34"
      }
    }
  }
}
{
  "detail": {
    "invoice_number": "#123",
    "reference": "deal-ref",
    "invoice_date": "2018-11-12",
    "currency_code": "USD",
    "note": "Thank you for your business.",
    "term": "No refunds after 30 days.",
    "memo": "This is a long contract",
    "payment_term": {
      "term_type": "NET_10",
      "due_date": "2018-11-22"
    }
  },
  "invoicer": {
    "name": {
      "given_name": "David",
      "surname": "Larusso"
    },
    "address": {
      "address_line_1": "1234 First Street",
      "address_line_2": "337673 Hillside Court",
      "admin_area_2": "Anytown",
      "admin_area_1": "CA",
      "postal_code": "98765",
      "country_code": "US"
    },
    "email_address": "[email protected]",
    "phones": [
      {
        "country_code": "001",
        "national_number": "4085551234",
        "phone_type": "MOBILE"
      }
    ],
    "website": "www.test.com",
    "tax_id": "ABcNkWSfb5ICTt73nD3QON1fnnpgNKBy- Jb5SeuGj185MNNw6g",
    "logo_url": "https://example.com/logo.PNG",
    "additional_notes": "2-4"
  },
  "primary_recipients": [
    {
      "billing_info": {
        "name": {
          "given_name": "Stephanie",
          "surname": "Meyers"
        },
        "address": {
          "address_line_1": "1234 Main Street",
          "admin_area_2": "Anytown",
          "admin_area_1": "CA",
          "postal_code": "98765",
          "country_code": "US"
        },
        "email_address": "[email protected]",
        "phones": [
          {
            "country_code": "001",
            "national_number": "4884551234",
            "phone_type": "HOME"
          }
        ],
        "additional_info_value": "add-info"
      },
      "shipping_info": {
        "name": {
          "given_name": "Stephanie",
          "surname": "Meyers"
        },
        "address": {
          "address_line_1": "1234 Main Street",
          "admin_area_2": "Anytown",
          "admin_area_1": "CA",
          "postal_code": "98765",
          "country_code": "US"
        }
      }
    }
  ],
  "items": [
    {
      "name": "Yoga Mat",
      "description": "Elastic mat to practice yoga.",
      "quantity": "1",
      "unit_amount": {
        "currency_code": "USD",
        "value": "50.00"
      },
      "tax": {
        "name": "Sales Tax",
        "percent": "7.25"
      },
      "discount": {
        "percent": "5"
      },
      "unit_of_measure": "QUANTITY"
    },
    {
      "name": "Yoga t-shirt",
      "quantity": "1",
      "unit_amount": {
        "currency_code": "USD",
        "value": "10.00"
      },
      "tax": {
        "name": "Sales Tax",
        "percent": "7.25"
      },
      "discount": {
        "amount": {
          "currency_code": "USD",
          "value": "5.00"
        }
      },
      "unit_of_measure": "QUANTITY"
    }
  ],
  "configuration": {
    "partial_payment": {
      "allow_partial_payment": true,
      "minimum_amount_due": {
        "currency_code": "USD",
        "value": "20.00"
      }
    },
    "allow_tip": true,
    "tax_calculated_after_discount": true,
    "tax_inclusive": false,
    "template_id": "TEMP-19V05281TU309413B"
  },
  "amount": {
    "breakdown": {
      "custom": {
        "label": "Packing Charges",
        "amount": {
          "currency_code": "USD",
          "value": "10.00"
        }
      },
      "shipping": {
        "amount": {
          "currency_code": "USD",
          "value": "10.00"
        },
        "tax": {
          "name": "Sales Tax",
          "percent": "7.25"
        }
      },
      "discount": {
        "invoice_discount": {
          "percent": "5"
        }
      }
    }
  }
}

Send invoice

post

Sends or schedules an invoice, by ID, to be sent to a customer. The action depends on the invoice issue date:

  • If the invoice issue date is current or in the past, sends the invoice immediately.

  • If the invoice issue date is in the future, schedules the invoice to be sent on that date.

To suppress the merchant's email notification, set the send_to_invoicer body parameter to false. To send the invoice through a share link and not through PayPal, set the send_to_recipient parameter to false in the notification object. The send_to_recipient parameter does not apply to a future issue date because the invoice is scheduled to be sent through PayPal on that date.

Notes:

  • After you send an invoice, resending it has no effect.

  • To send a notification for updates, update the invoice and set the send_to_recipient body parameter to true.

Autorizaciones
Parámetros de ruta
invoice_idstringRequerido

The ID of the draft invoice to delete.

Cuerpo

The email or SMS notification to send to the invoicer or payer on sending an invoice.

subjectstring · máx: 4000Opcional

The subject of the email that is sent as a notification to the recipient.

notestring · máx: 4000Opcional

A note to the payer.

send_to_invoicerbooleanOpcional

Indicates whether to send a copy of the email to the merchant.

Default: false
send_to_recipientbooleanOpcional

Indicates whether to send a copy of the email to the recipient.

Default: true
additional_recipientsstring · ppaas_common_email_address_v2[] · máx: 100Opcional

An array of one or more CC: emails to which notifications are sent. If you omit this parameter, a notification is sent to all CC: email addresses that are part of the invoice.Note: Valid values are email addresses in the additional_recipients value associated with the invoice.

Respuestas
200
A successful request returns the HTTP `200 OK` when the invoice issue date is current date.
post
POST /v2/invoicing/invoices/{invoice_id}/send HTTP/1.1
Host: api-m.sandbox.paypal.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 25

{
  "send_to_invoicer": true
}
{
  "href": "text",
  "rel": "text",
  "method": "GET"
}

Send invoice reminder

post

Sends a reminder to the payer about an invoice, by ID. In the JSON request body, include a notification object that defines the subject of the reminder and other details.

Autorizaciones
Parámetros de ruta
invoice_idstringRequerido

The ID of the draft invoice to delete.

Cuerpo

The email or SMS notification to send to the invoicer or payer on sending an invoice.

subjectstring · máx: 4000Opcional

The subject of the email that is sent as a notification to the recipient.

notestring · máx: 4000Opcional

A note to the payer.

send_to_invoicerbooleanOpcional

Indicates whether to send a copy of the email to the merchant.

Default: false
send_to_recipientbooleanOpcional

Indicates whether to send a copy of the email to the recipient.

Default: true
additional_recipientsstring · ppaas_common_email_address_v2[] · máx: 100Opcional

An array of one or more CC: emails to which notifications are sent. If you omit this parameter, a notification is sent to all CC: email addresses that are part of the invoice.Note: Valid values are email addresses in the additional_recipients value associated with the invoice.

Respuestas
204
A successful request returns the HTTP `204 No Content` status code with no JSON response body.
post
POST /v2/invoicing/invoices/{invoice_id}/remind HTTP/1.1
Host: api-m.sandbox.paypal.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 289

{
  "subject": "Reminder: Payment due for the invoice #ABC-123",
  "note": "Please pay before the due date to avoid incurring late payment charges which will be adjusted in the next bill generated.",
  "send_to_invoicer": true,
  "additional_recipients": [
    "[email protected]",
    "[email protected]"
  ]
}

Sin contenido

Cancel sent invoice

post

Cancels a sent invoice, by ID, and, optionally, sends a notification about the cancellation to the payer, merchant, and CC: emails.

Autorizaciones
Parámetros de ruta
invoice_idstringRequerido

The ID of the draft invoice to delete.

Cuerpo

The email or SMS notification to send to the invoicer or payer on sending an invoice.

subjectstring · máx: 4000Opcional

The subject of the email that is sent as a notification to the recipient.

notestring · máx: 4000Opcional

A note to the payer.

send_to_invoicerbooleanOpcional

Indicates whether to send a copy of the email to the merchant.

Default: false
send_to_recipientbooleanOpcional

Indicates whether to send a copy of the email to the recipient.

Default: true
additional_recipientsstring · ppaas_common_email_address_v2[] · máx: 100Opcional

An array of one or more CC: emails to which notifications are sent. If you omit this parameter, a notification is sent to all CC: email addresses that are part of the invoice.Note: Valid values are email addresses in the additional_recipients value associated with the invoice.

Respuestas
204
A successful request returns the HTTP `204 No Content` status code with no JSON response body.
post
POST /v2/invoicing/invoices/{invoice_id}/cancel HTTP/1.1
Host: api-m.sandbox.paypal.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 157

{
  "subject": "Invoice Cancelled",
  "note": "Cancelling the invoice",
  "send_to_invoicer": true,
  "send_to_recipient": true,
  "additional_recipients": [
    "[email protected]"
  ]
}

Sin contenido

Record payment for invoice

post

Records a payment for the invoice. If no payment is due, the invoice is marked as PAID. Otherwise, the invoice is marked as PARTIALLY PAID.

Autorizaciones
Parámetros de ruta
invoice_idstringRequerido

The ID of the draft invoice to delete.

Cuerpo

The payment details of the invoice. Includes payment type, method, date, discount, and transaction type.

typestring · enumSolo lecturaOpcional

The payment type in an invoicing flow which can be PayPal or an external cash or check payment.

Valores posibles:
payment_idstring · máx: 22Opcional

The ID for a PayPal payment transaction. Required for the PAYPAL payment type.

payment_datestring · ppaas_date_notime_v2 · mín: 10 · máx: 10Opcional

The date when the invoice was paid, in Internet date and time format. For example, yyyy-MM-dd z.

Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$
methodstring · enumRequerido

The payment mode or method through which the invoicer can accept the payment.

Valores posibles:
notestring · máx: 2000Opcional

A note associated with an external cash or check payment.

shipping_infoall ofOpcional

The recipient's shipping information. Includes the user's contact information, which includes name and address.

y
Respuestas
200
A successful request returns the HTTP `200 Created` status code and a reference to the recorded payment.
post
POST /v2/invoicing/invoices/{invoice_id}/payments HTTP/1.1
Host: api-m.sandbox.paypal.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 103

{
  "method": "BANK_TRANSFER",
  "payment_date": "2018-05-01",
  "amount": {
    "currency_code": "USD",
    "value": "10.00"
  }
}
{
  "payment_id": "text"
}

Delete external payment

delete

Deletes an external payment, by invoice ID and transaction ID.

Autorizaciones
Parámetros de ruta
invoice_idstringRequerido

The ID of the draft invoice to delete.

transaction_idstringRequerido

The ID of the external refund transaction to delete.

Respuestas
204
A successful request returns the HTTP `204 No Content` status code with no JSON response body.
delete
DELETE /v2/invoicing/invoices/{invoice_id}/payments/{transaction_id} HTTP/1.1
Host: api-m.sandbox.paypal.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

Sin contenido

Record refund for invoice

post

Records a refund for the invoice. If all payments are refunded, the invoice is marked as REFUNDED. Otherwise, the invoice is marked as PARTIALLY REFUNDED.

Autorizaciones
Parámetros de ruta
invoice_idstringRequerido

The ID of the draft invoice to delete.

Cuerpo

The refund details of the invoice. Includes the refund type, date, amount, and method.

typestring · enumSolo lecturaOpcional

The PayPal refund type. Indicates whether the refund was paid through PayPal or externally in the invoicing flow. The record refund method supports the EXTERNAL refund type. The PAYPAL refund type is supported for backward compatibility.

Valores posibles:
refund_idstring · máx: 22Solo lecturaOpcional

The ID for a PayPal payment transaction. Required for the PAYPAL payment type.

refund_datestring · ppaas_date_notime_v2 · mín: 10 · máx: 10Opcional

The date when the invoice was refunded, in Internet date format. For example, 2014-02-27.

Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$
methodstring · enumRequerido

The payment mode or method through which the invoicer can accept the payments.

Valores posibles:
Respuestas
200
A successful request returns the HTTP `200 Created` status code and a reference to the recorded refund.
post
POST /v2/invoicing/invoices/{invoice_id}/refunds HTTP/1.1
Host: api-m.sandbox.paypal.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 101

{
  "method": "BANK_TRANSFER",
  "refund_date": "2018-05-21",
  "amount": {
    "currency_code": "USD",
    "value": "5.00"
  }
}
{
  "refund_id": "text"
}

Delete external refund

delete

Deletes an external refund, by invoice ID and transaction ID.

Autorizaciones
Parámetros de ruta
invoice_idstringRequerido

The ID of the draft invoice to delete.

transaction_idstringRequerido

The ID of the external refund transaction to delete.

Respuestas
204
A successful request returns the HTTP `204 No Content` status code with no JSON response body.
delete
DELETE /v2/invoicing/invoices/{invoice_id}/refunds/{transaction_id} HTTP/1.1
Host: api-m.sandbox.paypal.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

Sin contenido

Generate QR code

post

Generates a QR code for an invoice, by ID. The QR code is a PNG image in Base64-encoded format that corresponds to the invoice ID. You can generate a QR code for an invoice and add it to a paper or PDF invoice. When customers use their mobile devices to scan the QR code, they are redirected to the PayPal mobile payment flow where they can view the invoice and pay online with PayPal or a credit card. Before you get a QR code, you must create an invoice and send an invoice to move the invoice from a draft to payable state. Do not include an email address if you do not want the invoice emailed.

Autorizaciones
Parámetros de ruta
invoice_idstringRequerido

The ID of the draft invoice to delete.

Cuerpo

The configuration for a QR code.

widthinteger · mín: 150 · máx: 500Opcional

The width, in pixels, of the QR code image. Value is from 150 to 500.

Default: 500
heightinteger · mín: 150 · máx: 500Opcional

The height, in pixels, of the QR code image. Value is from 150 to 500.

Default: 500
actionstring · máx: 7Opcional

The type of URL for which to generate a QR code. Valid values are pay and details.

Default: payPattern: (?i)^(pay|details)$
Respuestas
200
A successful request returns the HTTP `200 OK` status code and a JSON response body that shows the QR code as a PNG image.
post
POST /v2/invoicing/invoices/{invoice_id}/generate-qr-code HTTP/1.1
Host: api-m.sandbox.paypal.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 26

{
  "width": 400,
  "height": 400
}

Sin contenido

Generate invoice number

post

Generates the next invoice number that is available to the merchant. The next invoice number uses the prefix and suffix from the last invoice number and increments the number by one. For example, the next invoice number after INVOICE-1234 is INVOICE-1235.

Autorizaciones
Respuestas
200
A successful request returns the HTTP `200 OK` status code and a JSON response body that shows the next invoice number.
application/json
post
POST /v2/invoicing/generate-next-invoice-number HTTP/1.1
Host: api-m.sandbox.paypal.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "invoice_number": "text"
}

Show invoice details

get

Shows details for an invoice, by ID.

Autorizaciones
Parámetros de ruta
invoice_idstringRequerido

The ID of the draft invoice to delete.

Respuestas
200
A successful request returns the HTTP `200 OK` status code and a JSON response body that shows invoice details.
application/json
get
GET /v2/invoicing/invoices/{invoice_id} HTTP/1.1
Host: api-m.sandbox.paypal.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "id": "text",
  "parent_id": "text",
  "status": "DRAFT",
  "detail": {
    "reference": "text",
    "currency_code": "text",
    "note": "text",
    "terms_and_conditions": "text",
    "memo": "text",
    "attachments": [
      {
        "id": "text",
        "reference_url": "https://example.com",
        "content_type": "text",
        "create_time": "text",
        "size": "text"
      }
    ],
    "invoice_number": "text",
    "invoice_date": "text",
    "payment_term": {
      "term_type": "DUE_ON_RECEIPT",
      "due_date": "text"
    },
    "metadata": {
      "create_time": "text",
      "created_by": "text",
      "last_update_time": "text",
      "last_updated_by": "text",
      "cancel_time": "text",
      "cancelled_by": "text",
      "first_sent_time": "text",
      "last_sent_time": "text",
      "last_sent_by": "text",
      "created_by_flow": "MULTIPLE_RECIPIENTS_GROUP",
      "recipient_view_url": "https://example.com",
      "invoicer_view_url": "https://example.com"
    }
  },
  "invoicer": {
    "business_name": "text",
    "name": {
      "prefix": "text",
      "given_name": "text",
      "surname": "text",
      "middle_name": "text",
      "suffix": "text",
      "alternate_full_name": "text",
      "full_name": "text"
    },
    "address": {
      "address_line_1": "text",
      "address_line_2": "text",
      "address_line_3": "text",
      "admin_area_4": "text",
      "admin_area_3": "text",
      "admin_area_2": "text",
      "admin_area_1": "text",
      "postal_code": "text",
      "country_code": "text",
      "address_details": {
        "street_number": "text",
        "street_name": "text",
        "street_type": "text",
        "delivery_service": "text",
        "building_name": "text",
        "sub_building": "text"
      }
    },
    "email_address": "text",
    "phones": [
      {
        "country_code": "text",
        "national_number": "text",
        "extension_number": "text",
        "phone_type": "FAX"
      }
    ],
    "website": "https://example.com",
    "tax_id": "text",
    "additional_notes": "text",
    "logo_url": "https://example.com"
  },
  "primary_recipients": [
    {
      "billing_info": {
        "business_name": "text",
        "name": {
          "prefix": "text",
          "given_name": "text",
          "surname": "text",
          "middle_name": "text",
          "suffix": "text",
          "alternate_full_name": "text",
          "full_name": "text"
        },
        "address": {
          "address_line_1": "text",
          "address_line_2": "text",
          "address_line_3": "text",
          "admin_area_4": "text",
          "admin_area_3": "text",
          "admin_area_2": "text",
          "admin_area_1": "text",
          "postal_code": "text",
          "country_code": "text",
          "address_details": {
            "street_number": "text",
            "street_name": "text",
            "street_type": "text",
            "delivery_service": "text",
            "building_name": "text",
            "sub_building": "text"
          }
        },
        "email_address": "text",
        "phones": [
          {
            "country_code": "text",
            "national_number": "text",
            "extension_number": "text",
            "phone_type": "FAX"
          }
        ],
        "additional_info": "text",
        "language": "text"
      },
      "shipping_info": {
        "business_name": "text",
        "name": {
          "prefix": "text",
          "given_name": "text",
          "surname": "text",
          "middle_name": "text",
          "suffix": "text",
          "alternate_full_name": "text",
          "full_name": "text"
        },
        "address": {
          "address_line_1": "text",
          "address_line_2": "text",
          "address_line_3": "text",
          "admin_area_4": "text",
          "admin_area_3": "text",
          "admin_area_2": "text",
          "admin_area_1": "text",
          "postal_code": "text",
          "country_code": "text",
          "address_details": {
            "street_number": "text",
            "street_name": "text",
            "street_type": "text",
            "delivery_service": "text",
            "building_name": "text",
            "sub_building": "text"
          }
        }
      }
    }
  ],
  "additional_recipients": [
    "text"
  ],
  "items": [
    {
      "id": "text",
      "name": "text",
      "description": "text",
      "quantity": "text",
      "unit_amount": {
        "currency_code": "text",
        "value": "text"
      },
      "tax": {
        "name": "text",
        "percent": "text",
        "amount": {
          "currency_code": "text",
          "value": "text"
        }
      },
      "item_date": "text",
      "discount": {
        "percent": "text",
        "amount": {
          "currency_code": "text",
          "value": "text"
        }
      },
      "unit_of_measure": "QUANTITY"
    }
  ],
  "configuration": {
    "tax_calculated_after_discount": true,
    "tax_inclusive": false,
    "allow_tip": false,
    "partial_payment": {
      "allow_partial_payment": false,
      "minimum_amount_due": {
        "currency_code": "text",
        "value": "text"
      }
    },
    "template_id": "PayPal system template"
  },
  "amount": {
    "currency_code": "text",
    "value": "text",
    "breakdown": {
      "item_total": {
        "currency_code": "text",
        "value": "text"
      },
      "discount": {
        "invoice_discount": {
          "percent": "text",
          "amount": {
            "currency_code": "text",
            "value": "text"
          }
        },
        "item_discount": {
          "currency_code": "text",
          "value": "text"
        }
      },
      "tax_total": {
        "currency_code": "text",
        "value": "text"
      },
      "shipping": {
        "amount": {
          "currency_code": "text",
          "value": "text"
        },
        "tax": {
          "name": "text",
          "percent": "text",
          "amount": {
            "currency_code": "text",
            "value": "text"
          }
        }
      },
      "custom": {
        "label": "text",
        "amount": {
          "currency_code": "text",
          "value": "text"
        }
      }
    }
  },
  "due_amount": {
    "currency_code": "text",
    "value": "text"
  },
  "gratuity": {
    "currency_code": "text",
    "value": "text"
  },
  "payments": {
    "paid_amount": {
      "currency_code": "text",
      "value": "text"
    },
    "transactions": [
      {
        "type": "PAYPAL",
        "payment_id": "text",
        "payment_date": "text",
        "method": "BANK_TRANSFER",
        "note": "text",
        "amount": {
          "currency_code": "text",
          "value": "text"
        },
        "shipping_info": {
          "business_name": "text",
          "name": {
            "prefix": "text",
            "given_name": "text",
            "surname": "text",
            "middle_name": "text",
            "suffix": "text",
            "alternate_full_name": "text",
            "full_name": "text"
          },
          "address": {
            "address_line_1": "text",
            "address_line_2": "text",
            "address_line_3": "text",
            "admin_area_4": "text",
            "admin_area_3": "text",
            "admin_area_2": "text",
            "admin_area_1": "text",
            "postal_code": "text",
            "country_code": "text",
            "address_details": {
              "street_number": "text",
              "street_name": "text",
              "street_type": "text",
              "delivery_service": "text",
              "building_name": "text",
              "sub_building": "text"
            }
          }
        }
      }
    ]
  },
  "refunds": {
    "refund_amount": {
      "currency_code": "text",
      "value": "text"
    },
    "transactions": [
      {
        "type": "PAYPAL",
        "refund_id": "text",
        "refund_date": "text",
        "amount": {
          "currency_code": "text",
          "value": "text"
        },
        "method": "BANK_TRANSFER"
      }
    ]
  },
  "links": [
    {
      "href": "text",
      "rel": "text",
      "method": "GET"
    }
  ]
}

Fully update invoice

put

Fully updates an invoice, by ID. In the JSON request body, include a complete invoice object. This call does not support partial updates.

Autorizaciones
Parámetros de ruta
invoice_idstringRequerido

The ID of the draft invoice to delete.

Parámetros de consulta
send_to_recipientbooleanOpcional

Indicates whether to send the invoice update notification to the recipient.

Default: true
send_to_invoicerbooleanOpcional

Indicates whether to send the invoice update notification to the merchant.

Default: true
Cuerpo

The invoice details which includes all information of the invoice like items, billing information.

idstring · máx: 30Solo lecturaOpcional

The ID of the invoice.

parent_idstring · máx: 30Solo lecturaOpcional

The parent ID to an invoice that defines the group invoice to which the invoice is related.

statusstring · enumSolo lecturaOpcional

The status of the invoice.

Valores posibles:
detailall ofRequerido

The details of the invoice. Includes the invoice number, date, payment terms, and audit metadata.

y
invoicerall ofOpcional

The invoicer information. Includes the business name, email, address, phone, fax, tax ID, additional notes, and logo URL.

y
y
additional_recipientsstring · ppaas_common_email_address_v2[] · máx: 100Opcional

An array of one or more CC: emails to which notifications are sent. If you omit this parameter, a notification is sent to all CC: email addresses that are part of the invoice.Note: Valid values are email addresses in the additional_recipients value associated with the invoice.

configurationall ofOpcional

The invoice configuration details. Includes partial payment, tip, and tax calculated after discount.

y
Respuestas
200
A successful request returns the HTTP `200 OK` status code. A JSON response body that shows invoice details is returned if you set prefer=return=representation.
put
PUT /v2/invoicing/invoices/{invoice_id} HTTP/1.1
Host: api-m.sandbox.paypal.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 3539

{
  "detail": {
    "reference": "text",
    "currency_code": "text",
    "note": "text",
    "terms_and_conditions": "text",
    "memo": "text",
    "attachments": [
      {
        "id": "text",
        "reference_url": "https://example.com",
        "content_type": "text",
        "create_time": "text",
        "size": "text"
      }
    ],
    "invoice_number": "text",
    "invoice_date": "text",
    "payment_term": {
      "term_type": "DUE_ON_RECEIPT",
      "due_date": "text"
    }
  },
  "invoicer": {
    "business_name": "text",
    "name": {
      "prefix": "text",
      "given_name": "text",
      "surname": "text",
      "middle_name": "text",
      "suffix": "text",
      "alternate_full_name": "text",
      "full_name": "text"
    },
    "address": {
      "address_line_1": "text",
      "address_line_2": "text",
      "address_line_3": "text",
      "admin_area_4": "text",
      "admin_area_3": "text",
      "admin_area_2": "text",
      "admin_area_1": "text",
      "postal_code": "text",
      "country_code": "text",
      "address_details": {
        "street_number": "text",
        "street_name": "text",
        "street_type": "text",
        "delivery_service": "text",
        "building_name": "text",
        "sub_building": "text"
      }
    },
    "email_address": "text",
    "phones": [
      {
        "country_code": "text",
        "national_number": "text",
        "extension_number": "text",
        "phone_type": "FAX"
      }
    ],
    "website": "https://example.com",
    "tax_id": "text",
    "additional_notes": "text",
    "logo_url": "https://example.com"
  },
  "primary_recipients": [
    {
      "billing_info": {
        "business_name": "text",
        "name": {
          "prefix": "text",
          "given_name": "text",
          "surname": "text",
          "middle_name": "text",
          "suffix": "text",
          "alternate_full_name": "text",
          "full_name": "text"
        },
        "address": {
          "address_line_1": "text",
          "address_line_2": "text",
          "address_line_3": "text",
          "admin_area_4": "text",
          "admin_area_3": "text",
          "admin_area_2": "text",
          "admin_area_1": "text",
          "postal_code": "text",
          "country_code": "text",
          "address_details": {
            "street_number": "text",
            "street_name": "text",
            "street_type": "text",
            "delivery_service": "text",
            "building_name": "text",
            "sub_building": "text"
          }
        },
        "email_address": "text",
        "phones": [
          {
            "country_code": "text",
            "national_number": "text",
            "extension_number": "text",
            "phone_type": "FAX"
          }
        ],
        "additional_info": "text",
        "language": "text"
      },
      "shipping_info": {
        "business_name": "text",
        "name": {
          "prefix": "text",
          "given_name": "text",
          "surname": "text",
          "middle_name": "text",
          "suffix": "text",
          "alternate_full_name": "text",
          "full_name": "text"
        },
        "address": {
          "address_line_1": "text",
          "address_line_2": "text",
          "address_line_3": "text",
          "admin_area_4": "text",
          "admin_area_3": "text",
          "admin_area_2": "text",
          "admin_area_1": "text",
          "postal_code": "text",
          "country_code": "text",
          "address_details": {
            "street_number": "text",
            "street_name": "text",
            "street_type": "text",
            "delivery_service": "text",
            "building_name": "text",
            "sub_building": "text"
          }
        }
      }
    }
  ],
  "additional_recipients": [
    "text"
  ],
  "items": [
    {
      "name": "text",
      "description": "text",
      "quantity": "text",
      "unit_amount": {
        "currency_code": "text",
        "value": "text"
      },
      "tax": {
        "name": "text",
        "percent": "text"
      },
      "item_date": "text",
      "discount": {
        "percent": "text",
        "amount": {
          "currency_code": "text",
          "value": "text"
        }
      },
      "unit_of_measure": "QUANTITY"
    }
  ],
  "configuration": {
    "tax_calculated_after_discount": true,
    "tax_inclusive": false,
    "allow_tip": false,
    "partial_payment": {
      "allow_partial_payment": false,
      "minimum_amount_due": {
        "currency_code": "text",
        "value": "text"
      }
    },
    "template_id": "PayPal system template"
  },
  "amount": {
    "currency_code": "text",
    "value": "text",
    "breakdown": {
      "item_total": {
        "currency_code": "text",
        "value": "text"
      },
      "discount": {
        "invoice_discount": {
          "percent": "text",
          "amount": {
            "currency_code": "text",
            "value": "text"
          }
        },
        "item_discount": {
          "currency_code": "text",
          "value": "text"
        }
      },
      "tax_total": {
        "currency_code": "text",
        "value": "text"
      },
      "shipping": {
        "amount": {
          "currency_code": "text",
          "value": "text"
        },
        "tax": {
          "name": "text",
          "percent": "text"
        }
      },
      "custom": {
        "label": "text",
        "amount": {
          "currency_code": "text",
          "value": "text"
        }
      }
    }
  },
  "payments": {},
  "refunds": {}
}
{
  "id": "text",
  "parent_id": "text",
  "status": "DRAFT",
  "detail": {
    "reference": "text",
    "currency_code": "text",
    "note": "text",
    "terms_and_conditions": "text",
    "memo": "text",
    "attachments": [
      {
        "id": "text",
        "reference_url": "https://example.com",
        "content_type": "text",
        "create_time": "text",
        "size": "text"
      }
    ],
    "invoice_number": "text",
    "invoice_date": "text",
    "payment_term": {
      "term_type": "DUE_ON_RECEIPT",
      "due_date": "text"
    },
    "metadata": {
      "create_time": "text",
      "created_by": "text",
      "last_update_time": "text",
      "last_updated_by": "text",
      "cancel_time": "text",
      "cancelled_by": "text",
      "first_sent_time": "text",
      "last_sent_time": "text",
      "last_sent_by": "text",
      "created_by_flow": "MULTIPLE_RECIPIENTS_GROUP",
      "recipient_view_url": "https://example.com",
      "invoicer_view_url": "https://example.com"
    }
  },
  "invoicer": {
    "business_name": "text",
    "name": {
      "prefix": "text",
      "given_name": "text",
      "surname": "text",
      "middle_name": "text",
      "suffix": "text",
      "alternate_full_name": "text",
      "full_name": "text"
    },
    "address": {
      "address_line_1": "text",
      "address_line_2": "text",
      "address_line_3": "text",
      "admin_area_4": "text",
      "admin_area_3": "text",
      "admin_area_2": "text",
      "admin_area_1": "text",
      "postal_code": "text",
      "country_code": "text",
      "address_details": {
        "street_number": "text",
        "street_name": "text",
        "street_type": "text",
        "delivery_service": "text",
        "building_name": "text",
        "sub_building": "text"
      }
    },
    "email_address": "text",
    "phones": [
      {
        "country_code": "text",
        "national_number": "text",
        "extension_number": "text",
        "phone_type": "FAX"
      }
    ],
    "website": "https://example.com",
    "tax_id": "text",
    "additional_notes": "text",
    "logo_url": "https://example.com"
  },
  "primary_recipients": [
    {
      "billing_info": {
        "business_name": "text",
        "name": {
          "prefix": "text",
          "given_name": "text",
          "surname": "text",
          "middle_name": "text",
          "suffix": "text",
          "alternate_full_name": "text",
          "full_name": "text"
        },
        "address": {
          "address_line_1": "text",
          "address_line_2": "text",
          "address_line_3": "text",
          "admin_area_4": "text",
          "admin_area_3": "text",
          "admin_area_2": "text",
          "admin_area_1": "text",
          "postal_code": "text",
          "country_code": "text",
          "address_details": {
            "street_number": "text",
            "street_name": "text",
            "street_type": "text",
            "delivery_service": "text",
            "building_name": "text",
            "sub_building": "text"
          }
        },
        "email_address": "text",
        "phones": [
          {
            "country_code": "text",
            "national_number": "text",
            "extension_number": "text",
            "phone_type": "FAX"
          }
        ],
        "additional_info": "text",
        "language": "text"
      },
      "shipping_info": {
        "business_name": "text",
        "name": {
          "prefix": "text",
          "given_name": "text",
          "surname": "text",
          "middle_name": "text",
          "suffix": "text",
          "alternate_full_name": "text",
          "full_name": "text"
        },
        "address": {
          "address_line_1": "text",
          "address_line_2": "text",
          "address_line_3": "text",
          "admin_area_4": "text",
          "admin_area_3": "text",
          "admin_area_2": "text",
          "admin_area_1": "text",
          "postal_code": "text",
          "country_code": "text",
          "address_details": {
            "street_number": "text",
            "street_name": "text",
            "street_type": "text",
            "delivery_service": "text",
            "building_name": "text",
            "sub_building": "text"
          }
        }
      }
    }
  ],
  "additional_recipients": [
    "text"
  ],
  "items": [
    {
      "id": "text",
      "name": "text",
      "description": "text",
      "quantity": "text",
      "unit_amount": {
        "currency_code": "text",
        "value": "text"
      },
      "tax": {
        "name": "text",
        "percent": "text",
        "amount": {
          "currency_code": "text",
          "value": "text"
        }
      },
      "item_date": "text",
      "discount": {
        "percent": "text",
        "amount": {
          "currency_code": "text",
          "value": "text"
        }
      },
      "unit_of_measure": "QUANTITY"
    }
  ],
  "configuration": {
    "tax_calculated_after_discount": true,
    "tax_inclusive": false,
    "allow_tip": false,
    "partial_payment": {
      "allow_partial_payment": false,
      "minimum_amount_due": {
        "currency_code": "text",
        "value": "text"
      }
    },
    "template_id": "PayPal system template"
  },
  "amount": {
    "currency_code": "text",
    "value": "text",
    "breakdown": {
      "item_total": {
        "currency_code": "text",
        "value": "text"
      },
      "discount": {
        "invoice_discount": {
          "percent": "text",
          "amount": {
            "currency_code": "text",
            "value": "text"
          }
        },
        "item_discount": {
          "currency_code": "text",
          "value": "text"
        }
      },
      "tax_total": {
        "currency_code": "text",
        "value": "text"
      },
      "shipping": {
        "amount": {
          "currency_code": "text",
          "value": "text"
        },
        "tax": {
          "name": "text",
          "percent": "text",
          "amount": {
            "currency_code": "text",
            "value": "text"
          }
        }
      },
      "custom": {
        "label": "text",
        "amount": {
          "currency_code": "text",
          "value": "text"
        }
      }
    }
  },
  "due_amount": {
    "currency_code": "text",
    "value": "text"
  },
  "gratuity": {
    "currency_code": "text",
    "value": "text"
  },
  "payments": {
    "paid_amount": {
      "currency_code": "text",
      "value": "text"
    },
    "transactions": [
      {
        "type": "PAYPAL",
        "payment_id": "text",
        "payment_date": "text",
        "method": "BANK_TRANSFER",
        "note": "text",
        "amount": {
          "currency_code": "text",
          "value": "text"
        },
        "shipping_info": {
          "business_name": "text",
          "name": {
            "prefix": "text",
            "given_name": "text",
            "surname": "text",
            "middle_name": "text",
            "suffix": "text",
            "alternate_full_name": "text",
            "full_name": "text"
          },
          "address": {
            "address_line_1": "text",
            "address_line_2": "text",
            "address_line_3": "text",
            "admin_area_4": "text",
            "admin_area_3": "text",
            "admin_area_2": "text",
            "admin_area_1": "text",
            "postal_code": "text",
            "country_code": "text",
            "address_details": {
              "street_number": "text",
              "street_name": "text",
              "street_type": "text",
              "delivery_service": "text",
              "building_name": "text",
              "sub_building": "text"
            }
          }
        }
      }
    ]
  },
  "refunds": {
    "refund_amount": {
      "currency_code": "text",
      "value": "text"
    },
    "transactions": [
      {
        "type": "PAYPAL",
        "refund_id": "text",
        "refund_date": "text",
        "amount": {
          "currency_code": "text",
          "value": "text"
        },
        "method": "BANK_TRANSFER"
      }
    ]
  },
  "links": [
    {
      "href": "text",
      "rel": "text",
      "method": "GET"
    }
  ]
}

Delete invoice

delete

Deletes a draft or scheduled invoice, by ID. Deletes invoices in the draft or scheduled state only. For invoices that have already been sent, you can cancel the invoice. After you delete a draft or scheduled invoice, you can no longer use it or show its details. However, you can reuse its invoice number.

Autorizaciones
Parámetros de ruta
invoice_idstringRequerido

The ID of the draft invoice to delete.

Respuestas
204
A successful request returns the HTTP `204 No Content` status code with no JSON response body.
delete
DELETE /v2/invoicing/invoices/{invoice_id} HTTP/1.1
Host: api-m.sandbox.paypal.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

Sin contenido

¿Te fue útil?