{ "operationId": "invoice.create", "title": "Create an invoice", "description": "Create an invoice", "runnable": true, "user": { "scopes": [ "https://uri.paypal.com/services/invoicing" ] }, "credentials": { "oauth": { "clientId": "stage2managed", "clientSecret": "secret", "path": "/v1/oauth2/token" }, "login": {}, "openIdConnect": {} }, "request": { "path": "v1/invoicing/invoices/", "method": "POST", "headers": { "X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}" }, "body": {"merchant_info": { "email": "jaypatel512-facilitator@hotmail.com", "first_name": "Dennis", "last_name": "Doctor", "business_name": "Medical Professionals, LLC", "phone": { "country_code": "001", "national_number": "5032141716" }, "address": { "line1": "1234 Main St.", "city": "Portland", "state": "OR", "postal_code": "97217", "country_code": "US" } }, "billing_info": [ { "email": "example@example.com" } ], "items": [ { "name": "Sutures", "quantity": 100, "unit_price": { "currency": "USD", "value": "5.00" } } ], "note": "Medical Invoice 16 Jul, 2013 PST", "payment_term": { "term_type": "NET_45" }, "shipping_info": { "first_name": "Sally", "last_name": "Patient", "business_name": "Not applicable", "phone": { "country_code": "001", "national_number": "5039871234" }, "address": { "line1": "1234 Main St.", "city": "Portland", "state": "OR", "postal_code": "97217", "country_code": "US" } } } }, "response": { "status": "201 Created", "headers": {}, "body": { "id": "INV2-RF6D-L66T-D7H2-CRU7", "number": "ABCD4971", "status": "DRAFT", "merchant_info": { "email": "ppaas_default@paypal.com", "first_name": "Dennis", "last_name": "Doctor", "business_name": "Medical Professionals, LLC", "phone": { "country_code": "1", "national_number": "5032141234" }, "address": { "line1": "1234 Main St.", "city": "Portland", "state": "OR", "postal_code": "97217", "country_code": "US" } }, "billing_info": [ { "email": "email@example.com" } ], "shipping_info": { "first_name": "Sally", "last_name": "Patient", "business_name": "Not applicable", "phone": { "country_code": "1", "national_number": "5039871234" }, "address": { "line1": "1234 Broad St.", "city": "Portland", "state": "OR", "postal_code": "97216", "country_code": "US" } }, "items": [ { "name": "Sutures", "quantity": 100, "unit_price": { "currency": "USD", "value": "5.00" } } ], "invoice_date": "2014-02-27 PST", "payment_term": { "term_type": "NET_45", "due_date": "2015-04-13 PDT" }, "tax_calculated_after_discount": false, "tax_inclusive": false, "note": "Medical Invoice 16 Jul, 2013 PST", "total_amount": { "currency": "USD", "value": "500.00" } } } }