Sign in

Create invoice template

documented

Create an invoice template.

POST /v1/invoicing/templatesInvoicingno implementation yet0 runs
No implementation yet. Run it to have the agent write one, or open a pull request with your own.

Seed example (keychains curl)

npx -y keychains@latest curl "https://api-m.sandbox.paypal.com/v1/invoicing/templates" \
  -X POST \
  -H "Authorization: Bearer {{OAUTH2_ACCESS_TOKEN}}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{ \
  "name": "{{$name}}", \
  "default": {{$default}}, \
  "unit_of_measure": "{{$unit_of_measure}}", \
  "template_data": { \
    "merchant_info": { \
      "email": "{{$merchant_email}}", \
      "first_name": "{{$merchant_first_name}}", \
      "last_name": "{{$merchant_last_name}}", \
      "business_name": "{{$merchant_business_name}}", \
      "phone": { \
        "country_code": "{{$merchant_phone_country_code}}", \
        "national_number": "{{$merchant_phone_number}}" \
      }, \
      "address": { \
        "line1": "{{$merchant_address_line1}}", \
        "city": "{{$merchant_city}}", \
        "state": "{{$merchant_state}}", \
        "postal_code": "{{$merchant_postal_code}}", \
        "country_code": "{{$merchant_country_code}}" \
      } \
    }, \
    "items": [ \
      { \
        "name": "{{$item_name}}", \
        "quantity": {{$item_quantity}}, \
        "unit_price": { \
          "currency": "{{$currency}}", \
          "value": "{{$item_unit_price}}" \
        }, \
        "tax": { \
          "name": "{{$item_tax_name}}", \
          "percent": {{$item_tax_percent}} \
        } \
      } \
    ], \
    "tax_calculated_after_discount": {{$tax_calculated_after_discount}}, \
    "tax_inclusive": {{$tax_inclusive}}, \
    "note": "{{$note}}", \
    "logo_url": "{{$logo_url}}" \
  }, \
  "settings": [ \
    {"field_name": "items.quantity", "display_preference": {"hidden": {{$hidden_items_quantity}}}}, \
    {"field_name": "items.date", "display_preference": {"hidden": {{$hidden_items_date}}}}, \
    {"field_name": "custom", "display_preference": {"hidden": {{$hidden_custom}}}} \
  ] \
}'
Create invoice template · PayPal · OpenIntegrations