Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

The topics explained on this page are:


What are Invoices?

Invoices are charges for some service provided by GPC to a client for which it has to be paid for. It’s a simple interface where you can provide card data, cardholder’s information and upload images with proper agreements about the payment.

Invoices inside our system

Once the user has submitted a new invoice, the following will happen inside our system:

  1. First, you’ll need to upload the images at:
    POST https://sales-pci.tryemanagecrm.com/api/invoices/images

  2. You’ll get the “imageGroupId” and pass it to the invoice creation itself at:
    POST https://sales-pci.tryemanagecrm.com/api/invoices

  3. The system will return the ID for the new invoice and a status message about the operation.

Sample payload to submit a new invoice

{
    "InvoiceNumber": "INVOICE_006",
    "Amount": 66.36,
    "CurrencyCode": "USD",
    "IsTest": true,
    "ImageGroupId": "a5052561-db48-4317-a5d1-c7e921ae0eb9",
    "Payment": {
        "MidId": 177,
        "Name": "Eduardo Teste Testador",
        "CardNumber": "4000000000000010",
        "Expiration": "01/2026",
        "Cvv": "123"
    },
    "Address": {
        "FirstName": "Eduardo",
        "LastName": "Soares",
        "Address1": "767 5th Ave",
        "Address2": "",
        "City": "New York",
        "ZipCode": "10153-0023",
        "State": "NY",
        "CountryCode": "US",
        "PhoneNumber": "+1 312-336-0001"
    }
}

Invoices have their own storage inside our databases

Invoices do not share the common tables and workflows as regular orders inside our system do. Instead, they have a particular set of tables:

  • InvoiceLogs: store the whole request/response for the invoice creation

  • Invoices: store the basic information about the invoice

  • InvoiceReceipts: store all the information regarding the payment performed by the Payments API for that invoice

  • InvoiceImages: store the images associated with the invoice.

  • No labels