Introduction
Welcome to the PayPortal API!
PayPortal is an integration driven platform for online payments developed in the heart of Silicon Valley catering to customers from startups to Fortune 500 companies. It is easy to set up, customizable and provides a PCI and GDPR compliant ecosystem.
We have language bindings in Shell, and Python! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.
Base URL
"https://payportal.org/api/admin/"
Accounts
Account objects allow you to perform recurring charges, and to track multiple charges, that are associated with the same customer. The API allows you to create, delete, and update your customers. You can retrieve individual customers as well as a list of all your customers.
List Accounts
curl --location --request GET "https://payportal.org/api/admin/accounts" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data ""
The above command returns JSON structured like this:
{
"count": 396,
"results": [
{
"id": 1,
"portal_id": 1,
"account_name": "Sample Account Name",
"in_account_id": null,
"in_updated_at": null,
"account_owner": "Full Name",
"account_owner_email": "[email protected]",
"invoice_prefix": "",
"billing_address": {
"city": "<city>",
"country": "<country>",
"latitude": null,
"longitude": null,
"state": "<state>",
"street": "<Address>"
},
"account_number": "98888",
"autopay_only": false,
"is_autopay": false,
"contacts": [
{
"id": 3,
"portal_id": 1,
"is_deleted": false,
"created_at": "2019-02-16T03:49:15.000Z",
"updated_at": "2019-02-16T03:49:15.000Z",
"account_id": 69,
"name": "Full Name",
"email": "[email protected]",
"is_active": true,
"is_enrolled": false
}
]
},
{
"id": 2,
"portal_id": 1,
"account_name": "Sample Account Name2",
"in_account_id": "001e0000015oJj8AAE",
"in_updated_at": "2018-04-17T06:01:25.000Z",
"account_owner": "Sample Account Owner",
"account_owner_email": "[email protected]",
"invoice_prefix": null,
"billing_address": {
"city": "<city>",
"country": "<country>",
"latitude": null,
"longitude": null,
"state": "<state>",
"street": "<Address>"
},
"account_number": "98888",
"autopay_only": false,
"is_autopay": false,
"contacts": []
}
]
}
This endpoint retrieves all the accounts for the current Admin.
HTTP Request
GET /api/admin/accounts
Attribute | Description |
---|---|
created | A filter on the list based on the object created field. The value can be a string with an integer Unix timestamp. |
limit | Integer to define the number of items to be returned in the response. |
modified | A filter on the list based on the object modified field. The value can be a string with an integer Unix timestamp. |
offset | A filter on the list based on the offset field. The value can be a number. |
order | An order filter specifies how to sort the results: ascending (ASC) or descending (DESC) based on the specified property. |
Get a Specific Account
curl --location --request PATCH "https://payportal.org/api/admin/accounts/{{account_id}}" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data ""
The above command returns JSON structured like this:
{
"id": 1,
"portal_id": 1,
"account_name": "Sample Account Name",
"in_account_id": null,
"in_updated_at": null,
"account_owner": "Full Name",
"account_owner_email": "[email protected]",
"invoice_prefix": "",
"billing_address": {
"city": "<city>",
"country": "<country>",
"latitude": null,
"longitude": null,
"state": "<state>",
"street": "<Address>"
},
"account_number": "98888",
"autopay_only": false,
"is_autopay": false,
"contacts": [
{
"id": 3,
"portal_id": 1,
"is_deleted": false,
"created_at": "2019-02-16T03:49:15.000Z",
"updated_at": "2019-02-16T03:49:15.000Z",
"account_id": 69,
"name": "Full Name",
"email": "[email protected]",
"is_active": true,
"is_enrolled": false
}
]
}
This endpoint retrieves a specific Account by ID.
HTTP Request
GET /api/admin/accounts/{{account_id}}
URL Parameters
Parameter | Description |
---|---|
account_id | The ID of the Account to retrieve |
Add a new Account
curl --location --request POST "https://payportal.org/api/admin/accounts/" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data "{
\"account_name\": \"Sample Account Name\",
\"account_owner\": \"Full Name\",
\"account_owner_email\": \"[email protected]\",
\"invoice_prefix\": \"PST\",
\"billing_address\": {
\"city\": \"<city>\",
\"country\": \"<Country>\",
\"geocodeAccuracy\": null,
\"latitude\": null,
\"longitude\": null,
\"postalCode\": \"<Postalcode>\",
\"state\": \"<State>\",
\"street\": \"<Street>\"
},
\"account_number\": \"<number>\",
\"autopay_only\": false,
\"contacts\": [
{
\"name\": \"Full Name\",
\"email\": \"[email protected]\"
}
]
}"
The above command returns JSON structured like this:
{
"id": 1,
"portal_id": 1,
"account_name": "Sample Account Name",
"in_account_id": null,
"in_updated_at": null,
"account_owner": "Full Name",
"account_owner_email": "[email protected]",
"invoice_prefix": "",
"billing_address": {
"city": "<city>",
"country": "<country>",
"latitude": null,
"longitude": null,
"state": "<state>",
"street": "<Address>"
},
"account_number": "98888",
"autopay_only": false,
"is_autopay": false,
"contacts": [
{
"id": 3,
"portal_id": 1,
"is_deleted": false,
"created_at": "2019-02-16T03:49:15.000Z",
"updated_at": "2019-02-16T03:49:15.000Z",
"account_id": 69,
"name": "Full Name",
"email": "[email protected]",
"is_active": true,
"is_enrolled": false
}
]
}
This endpoint adds a new Account.
HTTP Request
POST /api/admin/accounts
Arguments
Key | Value |
---|---|
"account_name" | "Sample Account Name" |
"account_owner" | "Full Name" |
"account_owner_email" | "[email protected]" |
"invoice_prefix" | "PST" |
"billing_address" | { "city": "city", "country": "Country","geocodeAccuracy": null, "latitude": null, "longitude": null, "postalCode": "Postalcode", "state": "State", "street": "Street"}, |
"account_number" | "number", |
"autopay_only" | false, |
"contacts" | {"name": "Full Name", "email": "[email protected]"} |
Update an existing Account by account_id
curl --location --request POST "https://payportal.org/api/admin/accounts/" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data "{
\"account_name\": \"Sample Account Name\",
\"account_owner\": \"Full Name\",
\"account_owner_email\": \"[email protected]\",
\"invoice_prefix\": \"PST\",
\"billing_address\": {
\"city\": \"<city>\",
\"country\": \"<Country>\",
\"geocodeAccuracy\": null,
\"latitude\": null,
\"longitude\": null,
\"postalCode\": \"<Postalcode>\",
\"state\": \"<State>\",
\"street\": \"<Street>\"
},
\"account_number\": \"<number>\",
\"autopay_only\": false,
\"contacts\": [
{
\"name\": \"Full Name\",
\"email\": \"[email protected]\"
},
{
\"name\": \"New Full Name\",
\"email\": \"[email protected]\"
}
]
}"
The above command returns JSON structured like this:
{
"id": 1,
"portal_id": 1,
"account_name": "Sample Account Name",
"in_account_id": null,
"in_updated_at": null,
"account_owner": "Full Name",
"account_owner_email": "[email protected]",
"invoice_prefix": "",
"billing_address": {
"city": "<city>",
"country": "<country>",
"latitude": null,
"longitude": null,
"state": "<state>",
"street": "<Address>"
},
"account_number": "98888",
"autopay_only": false,
"is_autopay": false,
"contacts": [
{
"id": 3,
"portal_id": 1,
"is_deleted": false,
"created_at": "2019-02-16T03:49:15.000Z",
"updated_at": "2019-02-16T03:49:15.000Z",
"account_id": 69,
"name": "Full Name",
"email": "[email protected]",
"is_active": true,
"is_enrolled": false
},
{
"id": 4,
"portal_id": 1,
"is_deleted": false,
"created_at": "2019-02-16T03:49:15.000Z",
"updated_at": "2019-02-16T03:49:15.000Z",
"account_id": 69,
"name": "New Full Name",
"email": "[email protected]",
"is_active": true,
"is_enrolled": false
}
]
}
This endpoint adds a new Account.
HTTP Request
PATCH /api/admin/accounts/{{account_id}}
Arguments
Key | Value |
---|---|
"account_name" | "Sample Account Name" |
"account_owner" | "Full Name" |
"account_owner_email" | "[email protected]" |
"invoice_prefix" | "PST" |
"billing_address" | { "city": "city", "country": "Country","geocodeAccuracy": null, "latitude": null, "longitude": null, "postalCode": "Postalcode", "state": "State", "street": "Street"} |
"account_number" | "number" |
"autopay_only" | false |
"contacts" | [ {"name": "Full Name", "email": "[email protected]"}, {"name": "New Full Name","email": "[email protected]"} ] |
Delete an existing Account using account_id
curl --location --request DELETE "https://payportal.org/api/admin/accounts/{{account_id}}" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data ""
This endpoint deletes a specific account with ID account_id.
HTTP Request
DELETE /api/admin/accounts/{{account_id}}
URL Parameters
Parameter | Description |
---|---|
account_id | The ID of the Account to be Deleted |
Products
List Products
curl --location --request GET "https://payportal.org/api/admin/products" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data ""
The above command returns JSON structured like this:
{
"count": 2,
"results": [
{
"id": 1,
"in_product_id": null,
"product_name": "Product Name",
"product_description": "Product Description",
"price": 299500,
"product_code": "LL-SUB-SAAS-ARR",
"product_quantity": 1,
"currency": "$",
"is_active": true,
"tax_code": "SW000000",
"tax_description": ""
},
{
"id": 2,
"in_product_id": null,
"product_name": "LeadLander",
"product_description": "test purposes only",
"price": 5000,
"product_code": "INVU6YF8X2HN8",
"product_quantity": 1,
"currency": "$",
"is_active": true,
"tax_code": "19000",
"tax_description": null
}
]
}
This endpoint retrieves all the products for the current Admin.
Attribute | Description |
---|---|
created | A filter on the list based on the object created field. The value can be a string with an integer Unix timestamp. |
limit | Integer to define the number of items to be returned in the response. |
modified | A filter on the list based on the object modified field. The value can be a string with an integer Unix timestamp. |
offset | A filter on the list based on the offset field. The value can be a number. |
order | An order filter specifies how to sort the results: ascending (ASC) or descending (DESC) based on the specified property. |
HTTP Request
GET /api/admin/products
Get a Specific product
curl --location --request PATCH "https://payportal.org/api/admin/products/{{product_id}}" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data ""
The above command returns JSON structured like this:
{
"id": 10,
"in_product_id": null,
"product_name": "Product",
"product_description": "Sample Product Description",
"price": 299500,
"product_code": "PT-AAA-AAAA-AAA",
"product_quantity": 1,
"currency": "$",
"is_active": false,
"tax_code": "SX000000",
"tax_description": null
}
This endpoint retrieves a specific product by ID.
HTTP Request
GET /api/admin/products/{{product_id}}
URL Parameters
Parameter | Description |
---|---|
product_id | The ID of the product to retrieve |
Add a new product
curl --location --request POST "https://payportal.org/api/admin/products/" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data "{
\"product_name\": \"Product Name 2\",
\"product_description\": \"Sample Product Description\",
\"price\": 299500,
\"product_code\": \"PT-SUB-SAAS-ARZ\",
\"product_quantity\": 1,
\"currency\": \"$\",
\"tax_code\": \"SY000000\",
\"tax_description\": \"L\"
}"
> The above command returns JSON structured like this:
```json
{
"id": 26,
"product_name": "Product Name 2",
"product_description": "Sample Product Description",
"price": 299500,
"product_code": "PT-SUB-SAAS-ARZ",
"product_quantity": 1,
"currency": "$",
"tax_code": "SY000000"
}
This endpoint adds a new product.
HTTP Request
POST /api/admin/products
Arguments
Key | Value |
---|---|
"product_name" | "Product Name 2", |
"product_description" | "Sample Product Description", |
"price" | 299500, |
"product_code" | "PT-SUB-SAAS-ARZ", |
"product_quantity" | 1, |
"currency" | "$", |
"tax_code" | "SY000000" |
Update an existing product by product_id
curl --location --request PATCH "https://payportal.org/api/admin/products/{{product_id}}" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data "{
\"product_name\": \"New Product Name 2\",
\"product_description\": \"Sample Product Description\",
\"price\": 299500,
\"product_code\": \"PT-SUB-SAAS-ARZ\",
\"product_quantity\": 1,
\"currency\": \"$\",
\"tax_code\": \"SY000000\",
\"tax_description\": \"L\"
}"
The above command returns No content (status-code: 204)
HTTP Request
PATCH /api/admin/products/{{product_id}}
URL Parameters
Parameter | Description |
---|---|
product_id | The ID of the product to retrieve |
Arguments
Key | Value |
---|---|
"product_name" | "New Product Name 2" |
"product_description" | "Sample Product Description", |
"price" | 299500, |
"product_code" | "PT-SUB-SAAS-ARZ", |
"product_quantity" | 1, |
"currency" | "$", |
"tax_code" | "SY000000" |
Delete an existing product using product_id
curl --location --request DELETE "https://payportal.org/api/admin/products/{{product_id}}" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data "{
\"portal_id\": 1,
\"account_id\": \"\",
\"invoice_prefix\": \"OM\",
\"account_owner\": \"<account_owner>\",
\"account_owner_email\": \"[email protected]\",
\"billing_address\": \"<Billing Address>\",
\"autopay\": false
}"
The above command returns No content (status-code: 204)
This endpoint deletes a specific product with ID {{product_id}} associated with the owner logged in.
HTTP Request
DELETE /api/admin/products/{{product_id}}
URL Parameters
Parameter | Description |
---|---|
product_id | The ID of the product to be Deleted |
Arguments
Key | Value |
---|---|
"portal_id" | 1 |
"account_id" | 5364 |
"invoice_prefix" | "invoice prefix" |
"account_owner" | "account_owner" |
"account_owner_email" | "[email protected]" |
"billing_address" | "Billing Address" |
"autopay" | false |
Invoices
List invoices for the admin user
curl --location --request GET "https://payportal.org/api/admin/invoices" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data ""
The above command returns JSON structured like this:
{
"count": 1,
"results": [
{
"id": 12,
"portal_id": 12,
"account_id": 2,
"number": "LLDEMO0002",
"products": [
{
"price": 299500,
"tax_code": "SW054000",
"portal_id": 1,
"currency_id": 1,
"product_code": "LL-SUB-SAAS-ARR",
"product_name": "Web Analytics Annual Subscription",
"tax_description": "",
"product_quantity": 1,
"product_description": "Simple, easy to use and better than Google Analytics"
}
],
"currency": "$",
"price": 299500,
"quantity": 1,
"net_amount": 299500,
"discount": 0,
"tax": 5000,
"total": 304500,
"salesperson": "[email protected]",
"contract_start_date": null,
"contract_end_date": null,
"payment_due_date": "2019-04-02T00:00:00.000Z",
"forgiven": false,
"paid": false,
"custom": {
"Customer_ID__c": "CUST-00124",
"GL_Account_ID__c": "4000",
"Overpayment_Location_ID__c": "LL",
"Overpayment_Department_ID__c": 50000
}
}
]
}
This endpoint retrieves all the invoices for the current Admin.
Attribute | Description |
---|---|
created | A filter on the list based on the object created field. The value can be a string with an integer Unix timestamp. |
limit | Integer to define the number of items to be returned in the response. |
modified | A filter on the list based on the object modified field. The value can be a string with an integer Unix timestamp. |
offset | A filter on the list based on the offset field. The value can be a number. |
order | An order filter specifies how to sort the results: ascending (ASC) or descending (DESC) based on the specified property. |
HTTP Request
GET /api/admin/invoices
Add a new invoice
curl --location --request POST "https://payportal.org/api/admin/invoices" \
--header "Authorization: Bearer {{admin_oauth}}" \
--header "Content-Type: application/json" \
--data "{
\"account_id\": 1,
\"number\": \"LL0000002\",
\"products\": [
{
\"price\": 299500,
\"tax_code\": \"SW054000\",
\"portal_id\": 1,
\"currency_id\": 1,
\"product_code\": \"LL-SUB-SAAS-ARR\",
\"product_name\": \"Web Analytics Annual Subscription\",
\"tax_description\": \"\",
\"product_quantity\": 1,
\"product_description\": \"Simple, easy to use and better than Google Analytics\"
}
],
\"currency\": \"$\",
\"price\": 24958,
\"quantity\": 1,
\"net_amount\": 29950,
\"discount\": 833,
\"tax\": 1667,
\"total\": 25792,
\"payment_due_date\": \"2018-10-01T05:09:18.000Z\",
\"forgiven\": false,
\"paid\": false
}"
The above command returns JSON structured like this:
{
"id": 14,
"portal_id": 14,
"account_id": 1,
"number": "LL0000002",
"products": [
{
"price": 299500,
"tax_code": "SW054000",
"portal_id": 1,
"currency_id": 1,
"product_code": "LL-SUB-SAAS-ARR",
"product_name": "Web Analytics Annual Subscription",
"tax_description": "",
"product_quantity": 1,
"product_description": "Simple, easy to use and better than Google Analytics"
}
],
"currency": "$",
"price": 24958,
"quantity": 1,
"net_amount": 29950,
"discount": 833,
"tax": 1667,
"total": 25792,
"payment_due_date": "2018-10-01T05:09:18.000Z",
"forgiven": false,
"paid": false
}
This endpoint adds a new invoice for the logged in admin user.
HTTP Request
POST /api/admin/invoices
Update an existing product by product_id
curl --location --request PATCH "https://payportal.org/api/admin/invoices/{{invoice_id}}" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data "{
\"account_id\": 1,
\"number\": \"LL0000022\",
\"products\": \"[{\\\"price\\\": 299500, \\\"tax_code\\\": \\\"SW054000\\\", \\\"portal_id\\\": 1, \\\"currency_id\\\": 1, \\\"product_code\\\": \\\"LL-SUB-SAAS-ARR\\\", \\\"product_name\\\": \\\"Web Analytics Annual Subscription\\\", \\\"tax_description\\\": \\\"\\\", \\\"product_quantity\\\": 1, \\\"product_description\\\": \\\"Simple, easy to use and better than Google Analytics\\\"}]\",
\"currency\": \"$\",
\"price\": 24958,
\"quantity\": 1,
\"net_amount\": 29950,
\"discount\": 833,
\"tax\": 1667,
\"total\": 25792,
\"payment_due_date\": \"2018-10-01T05:09:18.000Z\",
\"forgiven\": false,
\"paid\": false
}"
The above command returns No content (status-code: 204)
HTTP Request
PATCH /api/admin//invoices/{{invoice_id}}
URL Parameters
Parameter | Description |
---|---|
invoice_id | The ID of the invoice to be updated which can be obtained by using List invoices API |
Delete an existing product using product_id
curl --location --request DELETE "https://payportal.org/api/admin/invoices/{{invoice_id}}" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data "{
\"portal_id\": 1,
\"account_id\": \"\",
\"invoice_prefix\": \"OM\",
\"account_owner\": \"postman_admin\",
\"account_owner_email\": \"[email protected]\",
\"billing_address\": \"123 Main Street, Cupertino, CA, 95050\",
\"autopay\": false
}"
The above command returns No content (status-code: 204)
This endpoint deletes a specific invoice with ID {{invoice_id}} associated with the owner logged in.
HTTP Request
DELETE /api/admin//invoices/{{invoice_id}}
URL Parameters
Parameter | Description |
---|---|
invoice_id | The ID of the invoice to be updated which can be obtained by using List invoices API |
Arguments
Key | Value |
---|---|
"portal_id" | 1 |
"account_id" | 5364 |
"invoice_prefix" | "invoice prefix" |
"account_owner" | "account_owner" |
"account_owner_email" | "[email protected]" |
"billing_address" | "Billing Address" |
"autopay" | false |
Subscriptions
List Subscriptions
curl --location --request GET "https://payportal.org/api/admin/subscriptions/{{subscription_id}}" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data ""
The above command returns JSON structured like this:
{
"count": 1,
"results": [
{
"id": 1,
"portal_id": 1,
"account": {
"id": 1,
"portal_id": 2,
"account_name": "Acme Inc.",
"account_owner": "Adithya Murali",
"account_owner_email": "[email protected]",
"invoice_prefix": "ACM",
"billing_address": {
"city": "Santa Clara",
"country": "United States",
"geocodeAccuracy": null,
"latitude": null,
"longitude": null,
"postal_code": "95050",
"state": "CA",
"street": "1900 Lafayette Street, Suite # 200"
},
"account_number": "12333",
"autopay_only": false,
"is_autopay": false,
"is_active": true
},
"product": {
"id": 1,
"product_name": "Web Analytics Annual Subscription",
"product_description": "Simple, easy to use and better than Google Analytics",
"price": 299500,
"product_code": "LL-SUB-SAAS-ARR",
"product_quantity": 1,
"currency": "$",
"is_active": true,
"tax_code": "SW054000",
"tax_description": ""
},
"account_id": 1,
"product_id": 1,
"currency": "$",
"price": 299500,
"discount": 10000,
"net_amount": 299500,
"tax": 20000,
"total": 309500,
"quantity": 1,
"contract_start_date": "2018-08-01T05:09:18.000Z",
"contract_end_date": "2019-08-01T05:09:18.000Z",
"billing_frequency": {
"id": 5,
"name": "monthly"
}
}
]
}
This endpoint retrieves all the subscriptions for the current Admin.
Attribute | Description |
---|---|
created | A filter on the list based on the object created field. The value can be a string with an integer Unix timestamp. |
limit | Integer to define the number of items to be returned in the response. |
modified | A filter on the list based on the object modified field. The value can be a string with an integer Unix timestamp. |
offset | A filter on the list based on the offset field. The value can be a number. |
order | An order filter specifies how to sort the results: ascending (ASC) or descending (DESC) based on the specified property. |
HTTP Request
GET /api/admin/subscriptions
Get specific Subscription by ID
curl --location --request GET "https://payportal.org/api/admin/subscriptions/{{subscription_id}}" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data ""
> The above command returns JSON structured like this:
```json
{
"count": 1,
"results": [
{
"id": 1,
"portal_id": 1,
"account": {
"id": 1,
"portal_id": 2,
"account_name": "Acme Inc.",
"account_owner": "Adithya Murali",
"account_owner_email": "[email protected]",
"invoice_prefix": "ACM",
"billing_address": {
"city": "Santa Clara",
"country": "United States",
"geocodeAccuracy": null,
"latitude": null,
"longitude": null,
"postal_code": "95050",
"state": "CA",
"street": "1900 Lafayette Street, Suite # 200"
},
"account_number": "12333",
"autopay_only": false,
"is_autopay": false,
"is_active": true
},
"product": {
"id": 1,
"product_name": "Web Analytics Annual Subscription",
"product_description": "Simple, easy to use and better than Google Analytics",
"price": 299500,
"product_code": "LL-SUB-SAAS-ARR",
"product_quantity": 1,
"currency": "$",
"is_active": true,
"tax_code": "SW054000",
"tax_description": ""
},
"account_id": 1,
"product_id": 1,
"currency": "$",
"price": 299500,
"discount": 10000,
"net_amount": 299500,
"tax": 20000,
"total": 309500,
"quantity": 1,
"contract_start_date": "2018-08-01T05:09:18.000Z",
"contract_end_date": "2019-08-01T05:09:18.000Z",
"billing_frequency": {
"id": 5,
"name": "monthly"
}
}
]
}
This endpoint retrieves specific subscription for the current Admin.
HTTP Request
GET /api/admin/subscriptions/{{subscription_id}}
URL Parameters
Parameter | Description |
---|---|
subscription_id | The ID of the subscription to be retrieved |
Add a new Subscription
curl --location --request POST "https://payportal.org/api//admin/subscriptions" \
--header "Authorization: Bearer {{admin_oauth}}" \
--header "Content-Type: application/json" \
--data "{
\"account_id\": 1,
\"product_id\": 1,
\"quantity\": 1,
\"currency\": \"$\",
\"price\": 299500,
\"discount\": 10000,
\"net_amount\": 289500,
\"tax\": 10000,
\"total\": 309500,
\"contract_start_date\": \"2019-08-01T05:09:18.000Z\",
\"contract_end_date\": \"2019-08-01T05:09:18.000Z\",
\"billing_frequency\": {
\"id\": 5
}
}"
The above command returns JSON structured like this:
{
"id": 3,
"portal_id": 1,
"account": {
"id": 1,
"portal_id": 2,
"account_name": "Acme Inc.",
"account_owner": "Adithya Murali",
"account_owner_email": "[email protected]",
"invoice_prefix": "ACM",
"billing_address": {
"city": "Santa Clara",
"country": "United States",
"geocodeAccuracy": null,
"latitude": null,
"longitude": null,
"postal_code": "95050",
"state": "CA",
"street": "1900 Lafayette Street, Suite # 200"
},
"account_number": "12333",
"autopay_only": false,
"is_autopay": false,
"is_active": true
},
"product": {
"id": 1,
"product_name": "Web Analytics Annual Subscription",
"product_description": "Simple, easy to use and better than Google Analytics",
"price": 299500,
"product_code": "LL-SUB-SAAS-ARR",
"product_quantity": 1,
"currency": "$",
"is_active": true,
"tax_code": "SW054000",
"tax_description": ""
},
"account_id": 1,
"product_id": 1,
"currency": "$",
"price": 299500,
"discount": 10000,
"net_amount": 289500,
"tax": 10000,
"total": 309500,
"quantity": 1,
"contract_start_date": "2019-08-01T05:09:18.000Z",
"contract_end_date": "2019-08-01T05:09:18.000Z",
"billing_frequency": {
"id": 5,
"name": "monthly"
}
}
This endpoint adds a new subscription for the logged in admin user.
HTTP Request
POST /api/admin/subscriptions
Delete an existing subscription using subscription_id
curl --location --request DELETE "https://payportal.org/api/admin/subscriptions/{{subscription_id}}" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data "{
\"portal_id\": 1,
\"account_id\": \"\",
\"invoice_prefix\": \"OM\",
\"account_owner\": \"postman_admin\",
\"account_owner_email\": \"[email protected]\",
\"billing_address\": \"123 Main Street, Cupertino, CA, 95050\",
\"autopay\": false
}"
The above command returns No content (status-code: 204)
This endpoint deletes a specific subscription with ID {{subscription_id}} associated with the owner logged in.
HTTP Request
DELETE /api/admin//subscriptions/{{subscription_id}}
URL Parameters
Parameter | Description |
---|---|
subscription_id | The ID of the subscription to be updated which can be obtained by using List subscriptions API |
Arguments
Key | Value |
---|---|
"portal_id" | 1 |
"account_id" | 5364 |
"invoice_prefix" | "invoice prefix" |
"account_owner" | "account_owner" |
"account_owner_email" | "[email protected]" |
"billing_address" | "Billing Address" |
"autopay" | false |
Transactions
List Transactions
curl --location --request GET "https://payportal.org/api/admin/transactions" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data ""
The above command returns JSON structured like this:
{
"count": 2,
"results": [
{
"id": 2,
"portal_id": 2,
"account_id": 1,
"contact_id": 1,
"invoice_id": 8,
"status": "AUTHORIZED",
"products": [
{
"price": 299500,
"tax_code": "SW054000",
"portal_id": 1,
"currency_id": 1,
"product_code": "LL-SUB-SAAS-ARR",
"product_name": "Web Analytics Annual Subscription",
"tax_description": "",
"product_quantity": 1,
"product_description": "Simple, easy to use and better than Google Analytics"
}
],
"invoice_number": "AV0000008",
"currency": {
"id": 1,
"name": "USD",
"prefix": "$"
},
"price": 299500,
"quantity": 1,
"net_amount": 299500,
"discount": 10000,
"tax": 20000,
"total": 309500,
"paid_amount": 309500,
"refund": 0,
"salesperson": "Brett Nathan",
"contract_start_date": "2018-08-01T05:09:18.000Z",
"contract_end_date": "2019-08-01T05:09:18.000Z",
"payment_due_date": "2019-03-01T00:00:00.000Z",
"charge_message": "SUCCESS",
"charge_date": "2019-03-17T20:57:39.000Z",
"is_autopay": false,
"payee_name": "build",
"payee_email": "[email protected]",
"source": "CARD",
"method": {
"id": 2,
"autopay": true,
"card_type": "DISCOVER",
"created_at": "2019-03-17T20:57:09.000Z",
"card_expiry": "5/2021",
"card_number": "************1117",
"merchant_id": 2,
"card_exp_year": 2021,
"saved_card_id": "lDmaN7X9RtKPFwdGTRd5-w",
"card_exp_month": 5,
"card_payee_name": "Customer1",
"card_fingerprint": "YXI62n_rTCcyvvYhHKm2"
}
}
]
}
This endpoint retrieves all the transactions for the current Admin.
Attribute | Description |
---|---|
created | A filter on the list based on the object created field. The value can be a string with an integer Unix timestamp. |
limit | Integer to define the number of items to be returned in the response. |
modified | A filter on the list based on the object modified field. The value can be a string with an integer Unix timestamp. |
offset | A filter on the list based on the offset field. The value can be a number. |
order | An order filter specifies how to sort the results: ascending (ASC) or descending (DESC) based on the specified property. |
HTTP Request
GET /api/admin/transactions
Integrations
List Integrations
curl --location --request GET "https://payportal.org/api/admin/integrations" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data ""
The above command returns JSON structured like this:
[
{
"id": 1,
"name": "Salesforce",
"logo": "https://storage.googleapis.com/payportal-static/Salesforce.png",
"url": "/integrations/salesforce",
"is_future": false
},
{
"id": 2,
"name": "Intacct",
"logo": "https://storage.googleapis.com/payportal-static/sage-intacct.png",
"url": "/integrations/intacct",
"is_future": false
},
{
"id": 3,
"name": "Quickbooks",
"logo": "https://storage.googleapis.com/payportal-static/intuit-quickbooks-preferred.png",
"url": "/integrations/quickbooks",
"is_future": true
}
]
This endpoint retrieves all the integrations for the current Admin.
HTTP Request
GET /api/admin/integrations
Salesforce
List all integrations with Salesforce
curl --location --request GET "https://payportal.org/api/admin/integrations/salesforce" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data ""
The above command returns JSON structured like this:
[
{
"id": 1,
"portal_id": 1,
"name": "Salesforce Sandbox",
"url": "https://cs15.salesforce.com",
"username": "[email protected]",
"password": "**********************************",
"created_at": "2019-03-15T19:24:49.000Z",
"updated_at": "2019-03-15T19:24:49.000Z"
},
{
"id": 2,
"portal_id": 1,
"name": "Test 2 Instance",
"url": "https://cs15.salesforce.com",
"username": "[email protected]",
"password": "**********************************",
"created_at": "2019-03-15T19:24:49.000Z",
"updated_at": "2019-03-15T19:24:49.000Z"
}
]
This endpoint retrieves all the integrations with Salesforce for the current Admin.
HTTP Request
GET /api/admin/integrations/salesforce
Get specific integration with Salesforce
curl --location --request GET "https://payportal.org/api/admin/integrations/salesforce/{{sfinstance_id}}" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data ""
The above command returns JSON structured like this:
{
"id": 1,
"portal_id": 1,
"name": "Salesforce Sandbox",
"url": "https://cs15.salesforce.com",
"username": "[email protected]",
"password": "**********************************",
"created_at": "2019-03-15T19:24:49.000Z",
"updated_at": "2019-03-15T19:24:49.000Z"
}
This endpoint retrieves the specific integration with Salesforce for the current Admin.
HTTP Request
GET /api/admin/integrations/salesforce/{{sfinstance_id}}
Add a new instance for Salesforce
curl --location --request POST "https://payportal.org/api/admin/integrations/salesforce" \
--header "Authorization: Bearer {{admin_oauth}}" \
--header "Content-Type: application/json" \
--data "{
\"name\": \"Test 2 Instance\",
\"url\": \"https://cs15.salesforce.com\",
\"username\": \"[email protected]\",
\"password\": \"12345\"
}"
The above command returns JSON structured like this:
{
"id": 3,
"portal_id": 1,
"name": "Test 2 Instance",
"url": "https://cs15.salesforce.com",
"username": "[email protected]",
"password": "*****",
"created_at": "2019-03-15T19:25:13.882Z",
"updated_at": "2019-03-15T19:25:13.885Z"
}
This endpoint adds a new instance with Salesforce for the current Admin.
HTTP Request
POST /api/admin/integrations/salesforce
Update an existing instance of Salesforce
curl --location --request PATCH "https://payportal.org/api/admin/integrations/salesforce/{{sfinstance_id}}" \
--header "Authorization: Bearer {{admin_oauth}}" \
--header "Content-Type: application/json" \
--data "{
\"name\": \"Test Instance\",
\"url\": \"https://cs15.salesforce.com\",
\"username\": \"[email protected]\",
\"password\": \"12345\"
}"
The above command returns No content (status-code: 204)
This endpoint updates an existing instance with Salesforce for the current Admin.
HTTP Request
PATCH /api/admin/integrations/salesforce/{{sfinstance_id}}
Delete an existing instance of Salesforce
curl --location --request DELETE "https://payportal.org/api/admin/integrations/salesforce/{{sfinstance_id}}" \
--header "Authorization: Bearer {{admin_oauth}}" \
--header "Content-Type: application/json" \
--data "{
\"name\": \"Test Instance\",
\"url\": \"https://cs15.salesforce.com\",
\"username\": \"[email protected]\",
\"password\": \"12345\"
}"
The above command returns No content (status-code: 204)
This endpoint updates an existing instance with Salesforce for the current Admin.
HTTP Request
DELETE /api/admin/integrations/salesforce/{{sfinstance_id}}
Intacct
List all integrations with Intacct
curl --location --request GET "https://payportal.org/api/admin/integrations/intacct" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data ""
The above command returns JSON structured like this:
[
{
"id": 1,
"portal_id": 1,
"name": "Zeta Intacct Sandbox updated",
"sender_id": "Zeta MetricsMPP",
"sender_password": "****************",
"company_id": "Zeta MetricsMPP-DEV",
"user_id": "Guest",
"user_password": "***************"
},
{
"id": 2,
"portal_id": 1,
"name": "Test 1 Intacct Instance",
"sender_id": "Guest",
"sender_password": "****************",
"company_id": "Zeta MetricsMPP-DEV",
"user_id": "Guest",
"user_password": "****************"
}
]
This endpoint retrieves all the integrations with intacct for the current Admin.
HTTP Request
GET /api/admin/integrations/intacct
Get specific integration with intacct
curl --location --request GET "https://payportal.org/api/admin/integrations/intacct/{{{intacctinstance_id}}" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data ""
The above command returns JSON structured like this:
{
"id": 2,
"portal_id": 1,
"name": "Test 1 Intacct Instance",
"sender_id": "Guest",
"sender_password": "****************",
"company_id": "Zeta MetricsMPP-DEV",
"user_id": "Guest",
"user_password": "****************"
}
This endpoint retrieves the specific integration with intacct for the current Admin.
HTTP Request
GET /api/admin/integrations/intacct/{{{intacctinstance_id}}
Add a new instance for Intacct
curl --location --request POST "https://payportal.org/api/admin/integrations/intacct" \
--header "Authorization: Bearer {{admin_oauth}}" \
--header "Content-Type: application/json" \
--data "{
\"name\": \"Test 3 Intacct Instance\",
\"sender_id\": \"Guest2\",
\"sender_password\": \"su~@ZX\\\";9J*p,!#b\",
\"company_id\": \"Zeta MetricsMPP-DEV\",
\"user_id\": \"Guest\",
\"user_password\": \"su~@ZX\\\";9J*p,!#b\"
}"
The above command returns JSON structured like this:
{
"id": 3,
"portal_id": 1,
"name": "Test 3 Intacct Instance",
"sender_id": "Guest2",
"sender_password": "****************",
"company_id": "Zeta MetricsMPP-DEV",
"user_id": "Guest",
"user_password": "****************"
}
This endpoint adds a new instance with intacct for the current Admin.
HTTP Request
POST /api/admin/integrations/intacct
Update an existing instance of Intacct
curl --location --request PATCH "https://payportal.org/api/admin/integrations/Intacct/{{intacctinstance_id}}" \
--header "Authorization: Bearer {{admin_oauth}}" \
--header "Content-Type: application/json" \
--data "{
\"name\": \"Test 2 Intacct Instance\"
}"
The above command returns No content (status-code: 204)
This endpoint updates an existing instance with Intacct for the current Admin.
HTTP Request
PATCH /api/admin/integrations/salesforce/{{sfinstance_id}}
Delete an existing instance of Intacct
curl --location --request DELETE "https://payportal.org/api/admin/integrations/Intacct/{{intacctinstance_id}}" \
--header "Authorization: Bearer {{admin_oauth}}" \
--header "Content-Type: application/json" \
--data ""
The above command returns No content (status-code: 204)
This endpoint deletes an existing instance with Intacct for the current Admin.
HTTP Request
DELETE /api/admin/integrations/salesforce/{{sfinstance_id}}
Payportal Resources
Objects
List all the Resources of Payportal
curl --location --request GET "https://payportal.org/api/admin/payportal/objects" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data ""
The above command returns JSON structured like this:
[
{
"id": 1,
"name": "Account",
"description": "Sync all accounts in PayPortal with external application",
"get_records": "/service/accounts",
"pull_callback": "/service/accounts/pull",
"push_create_callback": "/service/accounts/push",
"push_update_callback": "/service/accounts/push"
},
{
"id": 2,
"name": "Contact",
"description": "Sync all contacts in PayPortal with external application",
"get_records": "/service/contacts",
"pull_callback": "/service/contacts/pull",
"push_create_callback": "/service/contacts/push",
"push_update_callback": "/service/contacts/push"
},
{
"id": 3,
"name": "Invoice",
"description": "Sync all invoices in PayPortal with external application",
"get_records": "/service/invoices",
"pull_callback": "/service/invoices/pull",
"push_create_callback": "/service/invoices/push",
"push_update_callback": "/service/invoices/push"
},
{
"id": 4,
"name": "Transaction",
"description": "Sync all transactions in PayPortal with external application",
"get_records": "/service/transactions",
"pull_callback": "/service/transactions/pull",
"push_create_callback": "/service/transactions/push",
"push_update_callback": "/service/transactions/push"
}
]
This endpoint provides list of payportal resources.
HTTP Request
GET /api/admin/payportal/objects
Schema
Get schema of a specific resource
curl --location --request GET "https://payportal.org/api/admin/payportal/schema?filter%5Bwhere%5D%5Bppobject_id%5D={{ppobject_id}}" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data ""
The above command returns JSON structured like this:
[
{
"id": 1,
"field": "in_instance_id",
"description": "Unique id of account in external system",
"label": "Id",
"is_required": true
},
{
"id": 2,
"field": "account_name",
"description": "Account name in external system",
"label": "Account Name",
"is_required": true
},
{
"id": 3,
"field": "account_number",
"description": "Account number in external system (optional)",
"label": "Account Number",
"is_required": false
},
{
"id": 4,
"field": "account_owner",
"description": "Account Owner or Salesperson",
"label": "Account Owner",
"is_required": true
}
]
This endpoint provides schema of a specific payportal resources.
HTTP Request
GET /api/admin/payportal/schema?filter%5Bwhere%5D%5Bppobject_id%5D={{ppobject_id}}
Gateways
Get List of available gateways
curl --location --request GET "https://payportal.org/api/admin/gateways" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data ""
The above command returns JSON structured like this:
[
{
"id": 1,
"name": "Affinipay",
"token_url": "https://api.chargeio.com/v1/tokens",
"support_card": true,
"support_bank": true,
"support_plaid": false
},
{
"id": 2,
"name": "Stripe",
"token_url": "https://api.stripe.com/v1/tokens",
"support_card": true,
"support_bank": false,
"support_plaid": false
}
]
This endpoint provides a list of available gateways.
HTTP Request
GET /api/admin/gateways
Pipelines
List all the Pipelines
curl --location --request GET "https://payportal.org/api/admin/pipelines" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data ""
The above command returns JSON structured like this:
{
"count": 2,
"results": [
{
"id": 1,
"portal_id": 1,
"module": "Salesforce",
"integration": {
"id": 1,
"name": "Salesforce",
"logo": "https://storage.googleapis.com/payportal-static/Salesforce.png",
"url": "/integrations/salesforce",
"is_future": false
},
"mode": "PULL",
"pp_object": {
"id": 1,
"name": "Account",
"description": "Sync all accounts in PayPortal with external application",
"get_records": "/service/accounts",
"pull_callback": "/service/accounts/pull",
"push_create_callback": "/service/accounts/push",
"push_update_callback": "/service/accounts/push"
},
"external_object": "Account",
"instance": {
"id": 1,
"portal_id": 1,
"is_deleted": false,
"created_at": "2019-03-17T22:56:00.000Z",
"updated_at": "2019-03-17T22:56:00.000Z",
"name": "Test Instance",
"url": "https://cs15.salesforce.com",
"username": "[email protected]",
"password": "12345"
},
"mappings": [
{
"id": 1,
"external": "Id",
"read_only": false,
"is_custom": false,
"pull_modifier": "data => data.substring(0, 15)",
"push_modifier": null,
"pp_field": {
"id": 1,
"field": "in_instance_id",
"description": "Unique id of account in external system",
"label": "Id",
"is_required": true
}
},
{
"id": 2,
"external": "Name",
"read_only": false,
"is_custom": false,
"pull_modifier": null,
"push_modifier": null,
"pp_field": {
"id": 2,
"field": "account_name",
"description": "Account name in external system",
"label": "Account Name",
"is_required": true
}
}
],
"pull_status": "FAILURE",
"last_pull": "2019-03-15T16:54:36.000Z",
"push_status": null,
"last_push": null,
"is_active": true,
"created_at": "2019-03-15T19:24:49.000Z",
"updated_at": "2019-03-17T22:46:13.000Z"
},
{
"id": 2,
"portal_id": 1,
"module": "Salesforce",
"integration": {
"id": 1,
"name": "Salesforce",
"logo": "https://storage.googleapis.com/payportal-static/Salesforce.png",
"url": "/integrations/salesforce",
"is_future": false
},
"mode": "PULL",
"pp_object": {
"id": 2,
"name": "Contact",
"description": "Sync all contacts in PayPortal with external application",
"get_records": "/service/contacts",
"pull_callback": "/service/contacts/pull",
"push_create_callback": "/service/contacts/push",
"push_update_callback": "/service/contacts/push"
},
"external_object": "Contact",
"instance": {
"id": 1,
"portal_id": 1,
"is_deleted": false,
"created_at": "2019-03-17T22:56:00.000Z",
"updated_at": "2019-03-17T22:56:00.000Z",
"name": "Test Instance",
"url": "https://cs15.salesforce.com",
"username": "[email protected]",
"password": "12345"
},
"mappings": [
{
"id": 3,
"external": "Id",
"read_only": false,
"is_custom": false,
"pull_modifier": "data => data.substring(0, 15)",
"push_modifier": null,
"pp_field": {
"id": 13,
"field": "in_instance_id",
"description": "Unique id of account in external system",
"label": "Id",
"is_required": true
}
},
{
"id": 4,
"external": "Account.Id",
"read_only": false,
"is_custom": false,
"pull_modifier": "data => data.substring(0, 15)",
"push_modifier": null,
"pp_field": {
"id": 14,
"field": "in_contact_account_id",
"description": "Unique id of account for the contact in external system",
"label": "Contact's Account Id",
"is_required": true
}
}
],
"pull_status": "FAILURE",
"last_pull": "2019-03-07T21:47:07.000Z",
"push_status": null,
"last_push": null,
"is_active": true,
"created_at": "2019-03-15T19:24:49.000Z",
"updated_at": "2019-03-17T22:46:14.000Z"
}
]
}
This endpoint provides list of all the pipelines.
HTTP Request
GET /api/admin/pipelines
Get specific Pipeline with ID
curl --location --request GET "{{protocol}}://{{gateway}}/api/{{portal2}}/admin/pipelines/{{pipeline_id}}" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data ""
The above command returns JSON structured like this:
{
"id": 6,
"portal_id": 1,
"module": "Salesforce",
"integration": {
"id": 1,
"name": "Salesforce",
"logo": "https://storage.googleapis.com/payportal-static/Salesforce.png",
"url": "/integrations/salesforce",
"is_future": false
},
"mode": "PUSH",
"pp_object": {
"id": 1,
"name": "Account",
"description": "Sync all accounts in PayPortal with external application",
"get_records": "/service/accounts",
"pull_callback": "/service/accounts/pull",
"push_create_callback": "/service/accounts/push",
"push_update_callback": "/service/accounts/push"
},
"external_object": "Account",
"instance": {
"id": 1,
"portal_id": 1,
"is_deleted": false,
"created_at": "2019-03-20T19:13:56.000Z",
"updated_at": "2019-03-20T19:13:56.000Z",
"name": "Salesforce Sandbox",
"url": "https://cs15.salesforce.com",
"username": "[email protected]",
"password": "omega1900ThIz182Ldq3EYIUzkyontB9ja"
},
"mappings": [
{
"id": 75,
"external": "LastModifiedDate",
"read_only": false,
"is_custom": false,
"pull_modifier": null,
"push_modifier": null,
"pp_field": {
"id": 2,
"field": "account_name",
"description": "Account name in external system",
"label": "Account Name",
"is_required": true
}
},
{
"id": 76,
"external": "Name",
"read_only": false,
"is_custom": false,
"pull_modifier": null,
"push_modifier": null,
"pp_field": {
"id": 3,
"field": "account_number",
"description": "Account number in external system (optional)",
"label": "Account Number",
"is_required": false
}
},
{
"id": 74,
"external": "AccountNumber",
"read_only": false,
"is_custom": false,
"pull_modifier": null,
"push_modifier": null,
"pp_field": {
"id": 4,
"field": "account_owner",
"description": "Account Owner or Salesperson",
"label": "Account Owner",
"is_required": true
}
}
],
"pull_status": null,
"last_pull": null,
"push_status": null,
"last_push": null,
"is_active": false,
"created_at": "2019-03-21T05:16:50.000Z",
"updated_at": "2019-03-21T05:16:50.000Z"
}
This endpoint returns pipeline corresponding to the {{pipeline_id}}.
HTTP Request
GET /api/admin/pipelines/{{pipeline_id}}
Add New Pipeline
curl --location --request POST "{{protocol}}://{{gateway}}/api/{{portal2}}/admin/pipelines" \
--header "Authorization: Bearer {{admin_oauth}}" \
--header "Content-Type: application/json" \
--data "{
\"mode\": \"PUSH\",
\"external_object\": \"Account\",
\"integration\": {
\"id\": 1,
\"name\": \"Salesforce\",
\"logo\": \"https://storage.googleapis.com/payportal-static/Salesforce.png\",
\"url\": \"/integrations/salesforce\",
\"is_future\": false
},
\"instance\": {
\"id\": 1,
\"portal_id\": 1,
\"is_deleted\": false,
\"created_at\": \"2018-11-25T01:27:02.000Z\",
\"updated_at\": \"2018-11-25T01:27:02.000Z\",
\"name\": \"Test Instance\",
\"url\": \"https://cs15.salesforce.com\",
\"username\": \"[email protected]\",
\"password\": \"omega1900ThIz182Ldq3EYIUzkyontB9ja\"
},
\"pp_object\": {
\"id\": 1,
\"name\": \"Account\",
\"pull_callback\": \"/service/accounts/push/update\",
\"push_create_callback\": \"/service/accounts/push/create\",
\"push_update_callback\": \"/service/accounts/push/update\"
},
\"mappings\": [
{
\"external\": \"Id\",
\"pp_field\": {
\"id\": 1
}
},
{
\"external\": \"LastModifiedDate\",
\"pp_field\": {
\"id\": 2
}
},
{
\"external\": \"Name\",
\"pp_field\": {
\"id\": 3
}
},
{
\"external\": \"AccountNumber\",
\"pp_field\": {
\"id\": 4
}
}
]
}"
The above command returns JSON structured like this:
{
"id": 8,
"portal_id": 1,
"module": "Salesforce",
"integration": {
"id": 1,
"name": "Salesforce",
"logo": "https://storage.googleapis.com/payportal-static/Salesforce.png",
"url": "/integrations/salesforce",
"is_future": false
},
"mode": "PUSH",
"pp_object": {
"id": 1,
"name": "Account",
"pull_callback": "/service/accounts/push/update",
"push_create_callback": "/service/accounts/push/create",
"push_update_callback": "/service/accounts/push/update"
},
"external_object": "Account",
"instance": {
"id": 1,
"portal_id": 1,
"name": "Test Instance"
},
"mappings": [
{
"id": 117,
"external": "Id",
"read_only": false,
"is_custom": false,
"pp_field": {
"id": 1,
"field": "in_instance_id",
"description": "Unique id of account in external system",
"label": "Id",
"is_required": true
}
},
{
"id": 116,
"external": "LastModifiedDate",
"read_only": false,
"is_custom": false,
"pp_field": {
"id": 2,
"field": "account_name",
"description": "Account name in external system",
"label": "Account Name",
"is_required": true
}
},
{
"id": 112,
"external": "Name",
"read_only": false,
"is_custom": false,
"pp_field": {
"id": 3,
"field": "account_number",
"description": "Account number in external system (optional)",
"label": "Account Number",
"is_required": false
}
},
{
"id": 120,
"external": "AccountNumber",
"read_only": false,
"is_custom": false,
"pp_field": {
"id": 4,
"field": "account_owner",
"description": "Account Owner or Salesperson",
"label": "Account Owner",
"is_required": true
}
}
],
"created_at": "2019-03-22T03:36:42.957Z",
"updated_at": "2019-03-22T03:36:42.957Z"
}
This endpoint adds a new Account.
HTTP Request
POST /api/admin/pipelines
Update an existing Pipeline
curl --location --request PATCH "{{protocol}}://{{gateway}}/api/{{portal2}}/admin/pipelines/{{pipeline_id}}" \
--header "Authorization: Bearer {{admin_oauth}}" \
--header "Content-Type: application/json" \
--data "{
\"mode\": \"PULL\",
\"external_object\": \"Account\",
\"integration\": {
\"id\": 1,
\"name\": \"Salesforce\",
\"logo\": \"https://storage.googleapis.com/payportal-static/Salesforce.png\",
\"url\": \"/integrations/salesforce\",
\"is_future\": false
},
\"instance\": {
\"id\": 1,
\"portal_id\": 1,
\"is_deleted\": false,
\"created_at\": \"2018-11-25T01:27:02.000Z\",
\"updated_at\": \"2018-11-25T01:27:02.000Z\",
\"name\": \"Test Instance\",
\"url\": \"https://cs15.salesforce.com\",
\"username\": \"[email protected]\",
\"password\": \"omega1900ThIz182Ldq3EYIUzkyontB9ja\"
},
\"pp_object\": {
\"id\": 1,
\"name\": \"Account\",
\"pull_callback\": \"/service/accounts/push/update\",
\"push_create_callback\": \"/service/accounts/push/create\",
\"push_update_callback\": \"/service/accounts/push/update\"
},
\"mappings\": [
{
\"external\": \"Id\",
\"pp_field\": {
\"id\": 1
}
},
{
\"external\": \"LastModifiedDate\",
\"pp_field\": {
\"id\": 2
}
},
{
\"external\": \"Name\",
\"pp_field\": {
\"id\": 3
}
},
{
\"external\": \"AccountNumber\",
\"pp_field\": {
\"id\": 4
}
}
]
}"
The above command returns No content (status-code: 204)
This endpoint updates an existing instance with Intacct for the current Admin.
HTTP Request
PATCH /api/admin/pipelines/{{pipeline_id}}
Delete an existing pipeline by ID
curl --location --request DELETE "{{protocol}}://{{gateway}}/api/{{portal2}}/admin/pipelines/{{pipeline_id}}" \
--header "Authorization: Bearer {{admin_oauth}}" \
--data ""
The above command returns No content (status-code: 204)
This endpoint deletes an pipeline corresponding to the {{pipeline_id}}.
HTTP Request
DELETE /api/admin/pipelines/{{pipeline_id}}
Errors
Payportal uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.). Codes in the 5xx range indicate an error with payportal's servers (these are rare).
Some 4xx errors that could be handled programmatically (e.g., a card is declined) include an error code that briefly explains the error reported.
Error Code | Meaning
---------- | -------
400 | Bad Request -- Your request is invalid.
401 | Unauthorized -- Your API key is wrong.
402 | Payment Required
403 | Forbidden -- The information requested is hidden for administrators only.
404 | Not Found -- The requested information could not be found.
405 | Method Not Allowed -- You tried to access information with an invalid method.
406 | Not Acceptable -- You requested a format that is not json.
410 | Gone -- The information requested has been removed from our servers.
422 | Unsupported -- Unprocessable Entity
429 | Too Many Requests
500 | Internal Server Error -- We had a problem with our server. Try again later.
503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later.
Attributes
Attribute | Description |
---|---|
type (string) | The type of error returned. One of api_connection_error, api_error, authentication_error, card_error, idempotency_error, invalid_request_error, or rate_limit_error |
charge (string) | For card errors, the ID of the failed charge. |
code (string) | For some errors that could be handled programmatically, a short string indicating the error code reported. |
decline_code (string) | For card errors resulting from a card issuer decline, a short string indicating the card issuer’s reason for the decline if they provide one. |
doc_url (string) | A URL to more information about the error code reported. |
message (string) | A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. |
param (string) | If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. |
source (hash) | The source object for errors returned on a request involving a source. |
Handling errors
Our API libraries raise exceptions for many reasons, such as a failed charge, invalid parameters, authentication errors, and network unavailability. We recommend writing code that gracefully handles all possible API exceptions.