Payments & Billing
Webshare has 2 main objects for managing payment & billing:
- Payment Method:
The payment method used in the payment process. Currently always is a credit/debit card. - Transaction:
The transaction created when a payment is completed.
Payment Method
The payment method used in the payment process. Currently always is a credit/debit card.
Payment method object
The current payment method is limited to card transactions, however, additional payment options such as PayPal may be introduced in the future.
Attributes | Type | Description |
---|---|---|
id | string | Unique identifier of the payment method instance. |
brand | string | Brand of the card. Could be |
last4 | string | Last 4 digits of the card. |
expiration_year | number | Expiration year of the card. |
expiration_month | number | Expiration month of the card. |
created_at | string | The timestamp of when the payment method was created. |
In JSON format
{
"id": 1,
"brand": "visa",
"last4": "4242",
"name": null,
"expiration_year": 2023,
"expiration_month": 6,
"created_at": "2022-06-14T11:58:10.246406-07:00",
"updated_at": "2022-06-14T11:58:10.246406-07:00"
}
Transaction
The transaction created when a payment is completed.
Transaction object
Attributes | Type | Description |
---|---|---|
id | string | Unique identifier of the transaction instance. |
status | string | Status of the object. Can be |
payment_method | object | Nested payment method instance. |
reason | string | The reason of this transaction. |
amount | number | The amount of the transaction in USD. |
refund_amount | number | The amount refunded in USD. |
refund_date | string | The date the last refund was issued. May be |
created_at | string | The timestamp of when this instance was created. |
updated_at | string | The timestamp when this instance was last updated. |
In JSON format
{
"id": 1,
"status": "completed",
"payment_method": {
"id": 1,
"brand": "visa",
"last4": "4242",
"name": null,
"expiration_year": 2023,
"expiration_month": 6,
"created_at": "2022-06-14T11:58:10.246406-07:00",
"updated_at": "2022-06-14T11:58:10.246406-07:00"
},
"reason": "Upgraded from Free Plan to 100 Proxies with 250 GB bandwidth.",
"amount": 1.0,
"refund_amount": 0.0,
"refund_date": null,
"created_at": "2022-06-14T11:58:10.246406-07:00",
"updated_at": "2022-06-14T11:58:10.246406-07:00"
}
Pending Payments
[]
Pending payment object
Attributes | Type | Description |
---|---|---|
id | string | Unique identifier of the pending payment object. |
status | string | Current state of the pending payment. Can be |
failure_reason | string | Set to a user-friendly string if a status is |
payment_method | object | Nested payment method instance. |
plan | object | Nested plan instance. |
transaction | object | Nested transaction instance. Only set if the status is |
is_renewal | boolean | Whether the payment should be used to renew the subscription or immediately change it. |
term | string | Term of the payment. Can be |
created_at | string | The timestamp on when the pending payment was created |
updated_at | string | The timestamp when the pending payment was last updated. |
completed_at | string | The timestamp when the pending payment status was last updated. |
In JSON format
{
"id": 1,
"status": "pending",
"failure_reason": null,
"payment_method": 2,
"plan": 2,
"transaction": null,
"is_renewal": false,
"term": "monthly",
"created_at": "2022-06-14T11:58:10.246406-07:00",
"updated_at": "2022-06-14T11:58:10.246406-07:00",
"completed_at": null
}