For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo
Resources
Log inGet a demo
Get startedAPI referenceImplementation
Get startedAPI referenceImplementation
    • Overview
          • The Payment object
          • GET/payments
          • POST/payments
          • GET/payments/{id}
          • PATCH/payments/{id}
          • GET/payments/line-items/remote-field-classes
          • GET/payments/meta/patch/{id}
          • GET/payments/meta/post
          • GET/payments/remote-field-classes
UnifiedAgent HandlerGateway
UnifiedAgent HandlerGateway
Resources
Log inGet a demo
Common ModelsPayments

/payments/{id}

GET
/accounting/v1/payments/:id
GET
/api/accounting/v1/payments/:id
$curl -G https://api.merge.dev/api/accounting/v1/payments/id \
> -H "X-Account-Token: X-Account-Token" \
> -H "Authorization: Bearer <token>" \
> --data-urlencode expand=tracking_categories,applied_to_lines,contact,account,company,accounting_period,payment_method
200Retrieved
1{
2 "id": "b26fd49a-cbae-470a-a8f8-bcbc119e0390",
3 "remote_id": "987300",
4 "created_at": "2021-09-15T00:00:00Z",
5 "modified_at": "2021-10-16T00:00:00Z",
6 "transaction_date": "2020-03-31T00:00:00Z",
7 "contact": "5b3c1341-a20f-4e51-b72c-f3830a16c97b",
8 "account": "d6e687d6-0c36-48a1-8114-35324b5cb38f",
9 "payment_method": "9394320-8864-2343-4343-9008789",
10 "currency": "FKP",
11 "exchange_rate": "2.9",
12 "company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
13 "total_amount": 50,
14 "type": "ACCOUNTS_PAYABLE",
15 "tracking_categories": [
16 "b38c59b0-a9d7-4740-b1ee-5436c6751e3d",
17 "9b840d2-686a-465a-8a8e-7b028498f8e4",
18 "a47e11b6-c73b-4a0c-be31-130fc48177fa"
19 ],
20 "accounting_period": "b38c59b0-a9d7-4740-b1ee-5436c6751e3d",
21 "applied_to_lines": [
22 {
23 "remote_id": "234",
24 "applied_amount": "25",
25 "applied_date": "2020-03-31T00:00:00Z",
26 "related_object_id": "a47e11b6-c73b-4a0c-be31-130fc48177fa",
27 "related_object_type": "INVOICE"
28 },
29 {
30 "remote_id": "235",
31 "applied_amount": "25",
32 "applied_date": "2020-03-31T00:00:00Z",
33 "related_object_id": "9b96a886-29a5-452b-8733-2a1e03497cf4",
34 "related_object_type": "CREDIT_NOTE"
35 }
36 ],
37 "remote_updated_at": "2020-03-31T00:00:00Z",
38 "remote_was_deleted": true,
39 "field_mappings": {
40 "organization_defined_targets": {
41 "custom_key": "custom_value"
42 },
43 "linked_account_defined_targets": {
44 "custom_key": "custom_value"
45 }
46 },
47 "remote_data": [
48 {
49 "path": "/actions",
50 "data": null
51 }
52 ],
53 "remote_fields": [
54 {
55 "remote_field_class": {
56 "id": "string",
57 "display_name": "string",
58 "remote_key_name": "string",
59 "description": "string",
60 "is_custom": true,
61 "is_common_model_field": true,
62 "is_required": true,
63 "field_type": "string",
64 "field_format": "string",
65 "field_choices": [
66 "string"
67 ],
68 "item_schema": {
69 "item_type": "string",
70 "item_format": "string",
71 "item_choices": [
72 "string"
73 ]
74 }
75 },
76 "value": "string"
77 }
78 ]
79}

Returns a Payment object with the given id.

Field support by integration

See all supported fields

Use the /linked-accounts endpoint to pull platform support information

Was this page helpful?
Previous

/payments

Next

/payments/{id}

Built with

Authentication

AuthorizationBearer

Token-based authentication with required prefix “Bearer”

Path parameters

idstringRequiredformat: "uuid"

Headers

X-Account-TokenstringRequired
Token identifying the end user.

Query parameters

expandenumOptional
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_remote_databooleanOptional

Whether to include the original data Merge fetched from the third-party to produce these models.

include_remote_fieldsbooleanOptional
Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
include_shell_databooleanOptional

Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

Response

idstringRead-onlyformat: "uuid"
remote_idstring or null

The third-party API ID of the matching object.

created_atdatetimeRead-only
The datetime that this object was created by Merge.
modified_atdatetimeRead-only
The datetime that this object was modified by Merge.
transaction_datedatetime or null
The payment's transaction date.
contactstring or nullformat: "uuid"
The supplier, or customer involved in the payment.
accountstring or nullformat: "uuid"

The supplier’s or customer’s account in which the payment is made.

payment_methodstring or nullformat: "uuid"
The method which this payment was made by.
currencyenum or null
The payment's currency. The currency code in ISO 4217 format.
exchange_ratestring or nullformat: "decimal"
The payment's exchange rate.
companystring or nullformat: "uuid"
The company the payment belongs to.
total_amountdouble or null
The total amount of money being paid to the supplier, or customer, after taxes.
typeenum or null

The type of the invoice.

  • ACCOUNTS_PAYABLE - ACCOUNTS_PAYABLE
  • ACCOUNTS_RECEIVABLE - ACCOUNTS_RECEIVABLE
Allowed values:
tracking_categorieslist of strings
accounting_periodstring or nullformat: "uuid"
The accounting period that the Payment was generated in.
applied_to_lineslist of objects

A list of “Payment Applied to Lines” objects.

remote_updated_atdatetime or null
When the third party's payment entry was updated.
remote_was_deletedbooleanRead-only

Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. Learn more.

field_mappingsobject or nullRead-only
remote_datalist of objects or nullRead-only
remote_fieldslist of objectsRead-only