Create Cheque
Create a cheque.
This endpoint allows you to create a new cheque with the specified details.
If you would like to create a digitalOnly cheque, the digitalOnly object with the watermark will need to be passed in. Feature is available on request, e-mail [email protected] for access.
Example request body:
{
"from": "contact_123",
"bankAccount": "bank_123",
"amount": 1000,
"currencyCode": "USD",
"number": 123456,
"size": "us_letter",
"digitalOnly": {
"watermark": "VOID"
}
}Parameters
An optional string describing this resource. Will be visible in the API and the dashboard.
An optional logo URL for the cheque. This will be placed next to the recipient address at the top left corner of the cheque. This needs to be a public link to an image file (e.g. a PNG or JPEG file).
These will be merged with the variables in the template or HTML you create this order with. The keys in this object should match the variable names in the template exactly as they are case-sensitive. Note that these do not apply to PDFs uploaded with the order.
The number of the cheque. If you don't provide this, it will automatically be set to an incrementing number starting from 1 across your entire account, ensuring that every cheque has a unique number.
Create Cheque
import os
from postgrid import PostGrid
client = PostGrid(
print_mail_api_key=os.environ.get("POSTGRID_PRINT_MAIL_API_KEY"), # This is the default and can be omitted
)
cheque = client.print_mail.cheques.create(
amount=1000,
bank_account="bank_123",
from_="contact_123",
to="contact_123",
currency_code="USD",
number=123456,
size="us_letter",
)
print(cheque.id){
"id": "cheque_123456",
"object": "cheque",
"status": "ready",
"live": false,
"to": {
"id": "contact_pxd7wnnD1xY6H6etKNvjb4",
"object": "contact",
"live": false,
"companyName": "PostGrid",
"addressLine1": "90 CANAL ST STE 600",
"city": "BOSTON",
"provinceOrState": "MA",
"postalOrZip": "90210-1234",
"countryCode": "US",
"skipVerification": false,
"forceVerifiedStatus": false,
"addressStatus": "verified",
"createdAt": "2022-02-16T15:08:41.052Z",
"updatedAt": "2022-02-16T15:08:41.052Z"
},
"from": {
"id": "contact_pxd7wnnD1xY6H6etKNvjb4",
"object": "contact",
"live": false,
"companyName": "PostGrid",
"addressLine1": "90 CANAL ST STE 600",
"city": "BOSTON",
"provinceOrState": "MA",
"postalOrZip": "90210-1234",
"countryCode": "US",
"skipVerification": false,
"forceVerifiedStatus": false,
"addressStatus": "verified",
"createdAt": "2022-02-16T15:08:41.052Z",
"updatedAt": "2022-02-16T15:08:41.052Z"
},
"bankAccount": "bank_123",
"amount": 1000,
"currencyCode": "USD",
"number": 123456,
"size": "us_letter",
"sendDate": "2020-11-12T23:23:47.974Z",
"createdAt": "2020-11-12T23:23:47.974Z",
"updatedAt": "2020-11-12T23:23:47.974Z",
"mailingClass": "first_class"
}Returns Examples
{
"id": "cheque_123456",
"object": "cheque",
"status": "ready",
"live": false,
"to": {
"id": "contact_pxd7wnnD1xY6H6etKNvjb4",
"object": "contact",
"live": false,
"companyName": "PostGrid",
"addressLine1": "90 CANAL ST STE 600",
"city": "BOSTON",
"provinceOrState": "MA",
"postalOrZip": "90210-1234",
"countryCode": "US",
"skipVerification": false,
"forceVerifiedStatus": false,
"addressStatus": "verified",
"createdAt": "2022-02-16T15:08:41.052Z",
"updatedAt": "2022-02-16T15:08:41.052Z"
},
"from": {
"id": "contact_pxd7wnnD1xY6H6etKNvjb4",
"object": "contact",
"live": false,
"companyName": "PostGrid",
"addressLine1": "90 CANAL ST STE 600",
"city": "BOSTON",
"provinceOrState": "MA",
"postalOrZip": "90210-1234",
"countryCode": "US",
"skipVerification": false,
"forceVerifiedStatus": false,
"addressStatus": "verified",
"createdAt": "2022-02-16T15:08:41.052Z",
"updatedAt": "2022-02-16T15:08:41.052Z"
},
"bankAccount": "bank_123",
"amount": 1000,
"currencyCode": "USD",
"number": 123456,
"size": "us_letter",
"sendDate": "2020-11-12T23:23:47.974Z",
"createdAt": "2020-11-12T23:23:47.974Z",
"updatedAt": "2020-11-12T23:23:47.974Z",
"mailingClass": "first_class"
}