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}

Beta
PATCH
/accounting/v1/payments/:id
PATCH
/api/accounting/v1/payments/:id
$curl -X PATCH https://api.merge.dev/api/accounting/v1/payments/id \
> -H "X-Account-Token: X-Account-Token" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "model": {}
>}'
200Updated
1{
2 "model": {
3 "id": "b26fd49a-cbae-470a-a8f8-bcbc119e0390",
4 "remote_id": "987300",
5 "created_at": "2021-09-15T00:00:00Z",
6 "modified_at": "2021-10-16T00:00:00Z",
7 "transaction_date": "2020-03-31T00:00:00Z",
8 "contact": "5b3c1341-a20f-4e51-b72c-f3830a16c97b",
9 "account": "d6e687d6-0c36-48a1-8114-35324b5cb38f",
10 "payment_method": "9394320-8864-2343-4343-9008789",
11 "currency": "FKP",
12 "exchange_rate": "2.9",
13 "company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
14 "total_amount": 50,
15 "type": "ACCOUNTS_PAYABLE",
16 "tracking_categories": [
17 "b38c59b0-a9d7-4740-b1ee-5436c6751e3d",
18 "9b840d2-686a-465a-8a8e-7b028498f8e4",
19 "a47e11b6-c73b-4a0c-be31-130fc48177fa"
20 ],
21 "accounting_period": "b38c59b0-a9d7-4740-b1ee-5436c6751e3d",
22 "applied_to_lines": [
23 {
24 "remote_id": "234",
25 "applied_amount": "25",
26 "applied_date": "2020-03-31T00:00:00Z",
27 "related_object_id": "a47e11b6-c73b-4a0c-be31-130fc48177fa",
28 "related_object_type": "INVOICE"
29 },
30 {
31 "remote_id": "235",
32 "applied_amount": "25",
33 "applied_date": "2020-03-31T00:00:00Z",
34 "related_object_id": "9b96a886-29a5-452b-8733-2a1e03497cf4",
35 "related_object_type": "CREDIT_NOTE"
36 }
37 ],
38 "remote_updated_at": "2020-03-31T00:00:00Z",
39 "remote_was_deleted": true,
40 "field_mappings": {
41 "organization_defined_targets": {
42 "custom_key": "custom_value"
43 },
44 "linked_account_defined_targets": {
45 "custom_key": "custom_value"
46 }
47 },
48 "remote_data": [
49 {
50 "path": "/actions",
51 "data": null
52 }
53 ],
54 "remote_fields": [
55 {
56 "remote_field_class": {
57 "id": "string",
58 "display_name": "string",
59 "remote_key_name": "string",
60 "description": "string",
61 "is_custom": true,
62 "is_common_model_field": true,
63 "is_required": true,
64 "field_type": "string",
65 "field_format": "string",
66 "field_choices": [
67 "string"
68 ],
69 "item_schema": {
70 "item_type": "string",
71 "item_format": "string",
72 "item_choices": [
73 "string"
74 ]
75 }
76 },
77 "value": "string"
78 }
79 ]
80 },
81 "warnings": [
82 {
83 "title": "Unrecognized Field",
84 "detail": "An unrecognized field, age, was passed in with request data.",
85 "problem_type": "UNRECOGNIZED_FIELD",
86 "source": {
87 "pointer": "/age"
88 },
89 "block_merge_link": true,
90 "raw_error": "string",
91 "error_code": 1
92 }
93 ],
94 "errors": [
95 {
96 "title": "Missing Required Field",
97 "detail": "custom_fields is a required field on model.",
98 "problem_type": "MISSING_REQUIRED_FIELD",
99 "source": {
100 "pointer": "/model/custom_fields"
101 },
102 "block_merge_link": true,
103 "raw_error": "string",
104 "error_code": 1
105 }
106 ],
107 "logs": [
108 {
109 "log_id": "99433219-8017-4acd-bb3c-ceb23d663832",
110 "dashboard_view": "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832",
111 "log_summary": {
112 "url": "www.exampleintegration.com/api/v1/exampleapi",
113 "method": "POST",
114 "status_code": 200
115 }
116 }
117 ]
118}

Updates 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/{id}

Next

/payments/line-items/remote-field-classes

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

is_debug_modebooleanOptional

Whether to include debug fields (such as log file links) in the response.

run_asyncbooleanOptional

Whether or not third-party updates should be run asynchronously.

Request

This endpoint expects an object.
modelobjectRequired

Description

The Payment object represents general payments made towards a specific transaction.

Usage Example

Fetch from the GET Payment endpoint and view an invoice’s payment.

Response

modelobject

Description

The Payment object represents general payments made towards a specific transaction.

Usage Example

Fetch from the GET Payment endpoint and view an invoice’s payment.

warningslist of objects
errorslist of objects
logslist of objects