• 最終編集日時: 28 January 2021

支払いAPI (/ coupa_pay/payments)

Coupa Pay請求書支払APIを使用すると、ERP会計システムを使用して支払明細を会計処理し、調整することができます。

概要

Coupa Pay Invoice Paymentsは、Payments APIエンドポイントに送信されたGET要求を使用して、ERPなどの別のシステムによってCoupaから取得できます: https :// api<your_instance_name>/coupa_pay/payments 

ERPへの会計処理のために請求書支払がエクスポートされると、その支払はPUTコールを使用して「エクスポート済み」: trueとしてマークされる必要があるため、2回目の取得は行われません。  

サポートされているAPI操作:

  • 取得 
  • PUT (エクスポートされたマークのみ)

データの取得/更新に使用するAPIキーには、../api/coupa_pay/paymentsデータのインデックス作成、表示、更新の権限が必要です。

支払いデータは、ペイロード内のすべてのフィールドで照会できます。典型的なクエリパラメータは次のとおりです。

  • ? exported = false
  • ? payment - partner [issuing - bank] = < Bank_Name >
  • ? status = approved
  • ? status [in] = payment_initiated, completed_with_errors
  • ? pay_to_account [type] = CoupaPay:: SupplierPaymentAccount (経費支払いではなく請求書支払いのみを取得するため)
  • ? updated - at [gt] < date - time >(メモ: update - atを使用して、すべての支払いステータスの変更がキャプチャされていることを確認してください)

 

クエリパラメーターは、次のような呼び出しステートメントに組み合わせることができます。

  • API GET 

    • https :// < your_instance_name >/api/coupa_pay/payments? status [in] = completed_successfully, completed_with_errors&exported = false&payment partner [issuing - bank] = XYZBank & pay_to_account [type] = CoupaPay:: SupplierPaymentAccount

      • これにより、承認されているがまだエクスポートされていないXYZBank発行者支払パートナーの「completed_successfully」および「completed_with_errors」のステータスの請求書支払が返されます。

エクスポートされた支払いは、正常にフェッチされた後、エクスポート済みとしてマークする必要があります。以下のような呼び出しでそれを行うことができます:

  • APIはhttps ://< your_instance_name >/ api/coupa_pay/payments /< ID >? exported = trueまたは

  • APIはhttps ://< your_instance_name >/ api/coupa_pay/payments /< ID >を次のようなペイロードに置きました。

    • <coupa-pay-payment><exported>true</exported></coupa-pay-payment>

要素

名前 説明 必須 一意 許容値 In アウト データタイプ
iD Coupaの一意の支払い識別子 はい     はい 整数
created - at CoupaがYYY - MM - DDTHH: MM: SS + HH: MMZの形式で自動的に作成しました   はい 日時
updated - at CoupaがYYY - MM - DDTHH: MM: SS + HH: MMZの形式で自動的に作成しました   はい 日時
line - num 明細番号
 
    はい 整数
external - ref - id 支払いプロバイダーによって設定された参照ID     はい 整数
ステータス 支払ステータス(payment_initiated; payment_in_progress, completed_successfully; completed_with_errors) 下書き、承認済み、支払い開始、payment_in_progress、completed_successfully、completed_with_errors   はい string
exported

ラインは以前にサードパーティシステムにエクスポートされていましたか?連携によって新しい値を見つけるために使用されます。

true、false   はい boolean
last - exported - at 次の形式のタイムスタンプ:YYYY - MM - DDTHH: MM: SS + HH: MMZ     日時
payment - batch - id 支払バッチ識別子

請求書Coupa ID
請求書番号
合計金額
通貨
支払元勘定科目の詳細
支払先勘定科目の詳細
      整数
pay - from - total         小数
pay - to - total         小数
reporting - pay - from - total         小数
reporting - pay - to - total          
exchange - rate          
error - text         string
payment - details キーデータ要素

payment - details/payment - detail/created - at

支払作成日

 

payment - details/payment - detail/updated - at

支払更新日

 

payment - details/payment - detail/source - transaction - id

請求書Coupa ID

 

payment - details/payment - detail/source - transaction - refe

rence

請求書番号

ERPに支払いを記録する請求書番号

payment - details/payment - detail/payment - total

合計金額

支払金額

payment - details/payment - detail/currency/code

通貨

お支払いの通貨

JSONでのpayment - details配列の例:
        "payment - details ":
           
                [{" id ": 848
                ," created - at ":"2020 -06 -01 T 09:42:43 - 07:00 ",
" updated - at ":"2020 -06 -01 T 09:42:43 - 07:00 ",
" payment - id ":"776 ",
" payable - id ": 940,
                "payable - type ":"CoupaPay::請求書
"," source - transaction - id ": 940 ," source
                - transaction - type ":"InvoiceHeader ",
" source - transaction - reference ":"100223 ",
"トランザクション合計":"20000.00 ",
" discount - total ":"0.00 ",
" adjustment - total ":"0.00 ",
" payment - total ":"20000.00
                "," currency ":
                    {" id ": 1
                    ," code ":"USD ",
" DECIMALS ": 2
},
                "PAYABLE - ALLOCATIONS ": [],
" CREATED - BY ": {
"id ": 115,
" login ":"Aninvoiceadmin ",
" employee - number ": "",
                    "firstname ":"Ahmad ",
" lastname ":"Sadeddin ",
" fullname ":"Ahmad Sadeddin ",
" email ": "support@coupa.com "," salesforce
                    - id ": null,
                    "avatar - thumb - url ": null
},
" updated - by
                    ": {" id ": 115,
                    "login ":"Aninvoiceadmin ",
" employee - number ": "",
                    "firstname ":"Ahmad ",
" lastname ":"Sadeddin ",
" fullname ":"Ahmad Sadeddin ",
" email ": "support@coupa.com "," salesforce
                    - id ": null,
                    "avatar - thumb - url ": null
               
           
}}]
    array
pay - from - account
JSONでのアカウントからの支払いの配列の例:
        "pay - from - account
            ": {" id ": 654
            ," created - at ":"2020 -08 -04 T 12:23:10 - 07:00 ",
" updated - at ":"2020 -08 -04 T 12:23:10 - 07:00 ",
" coupa - pay - id ": 665,
            "account - name ":"Conferma - WEXバーチャルカード",
" source - name ": null,
            "account - kind ":" virtual
_card ", "payment -
            option ": null," status ":
            "active ",
" document - types ": [" invoice
            "],
            "currency
                ": {" id ": 1,
" code ":"USD ",
" DECIMALS ": 2
},
            "PAYMENT - PARTNER ": {" id
                ": 14,
" created - at ":"2020 -08 -04 T 12:14:45 - 07:00 ",
" updated - at ":"2021 -01 -21 T 09:25:52 - 08:00
                "," name ":「Conferma - WEX」、
「発行銀行」:"WEX ",
"タイプ":"CoupaPay:: VirtualCardPartner ",
" payment - partner - type ": "conferma
                "," notes ": null,
                "configuration ": {
" expiry - days ":"30 ",
" tolerance - pct ":"0.0 ",
" fx - tolerance - pct ":"5.0 ",
" invoice - tolerance - pct ":"0.0
                "},
" support - contact ": {
"id ": 52,
" login ": "support@coupa.com ",
" employee - number ": null,
                    "firstname ":"Himica ",
" lastname ":"Kumar ",
" fullname ":"Himica Kumar ",
" email ": "support@coupa.com "," salesforce
                    - id ": null,
                    "avatar - thumb - url ": null
},
" currency ": {
"id ": 1,
" code ":"USD ",
" DECIMALS ": 2
},
                "account - types ":
                   
                        [{" id ": 4,
" created - at ":"2020 -04 -25 T 02:45:03 - 07:00 ",
" updated - at ":"2020 -08 -04 T 12:17:37 - 07:00
                        "," NAME ":"Ace Corporate ",
" active ": true,
                        "legal - entity - name ":
                        ""," dynamic - flag ": false,
                        "currency ": {
" id ": 1,
                            "code ":"USD ",
" DECIMALS ": 2
},
                        "PRIMARY - CONTACT ": {" id
                            ": 182,
" created - at ":"2020 -04 -25 T 02:45:03 - 07:00 ",
" updated - at ":"2020 -08 -04 T 12:17:37 - 07:00
                            "," email ": "support@coupa.com ",
" name - prefix ": null,
                            "name - suffix ": null,
" name - additional ": null,
                            "name - given ":
" qweqq ", "name - family ":
" qweqwe ", "name -
                            fullname ": null,
" notes ": null, "active ": true,
" phone - work ": null,
                            "phone -
                            mobile ": null,
" phone - fax ": null,
                            "purposes ": []," created -
                                by ": {" id ": 49,
                                "login ":" az - releaser
                                ", "employee - number ": ",
" firstname ": "az - releaser ",
" lastname ": "az - releaser ",
" fullname ": "az - releaser azz - releaser
                                "," email ": ": "support@coupa.com
                                "," salesforce - id ": null,
                                "avatar - thumb -
                            url ": null
},
" updated - by ": "79
" login ": "himicakumar "," employee
                                - number ": ", "first
" name ": ": ""Himica ",
" lastname ":"Kumar ",
" fullname ":"Himica Kumar ",
" email ": "support@coupa.com "," salesforce -
                                id ": null,
                                "avatar - thumb - url ": null
                           
}},
" primary - address
                            ": {" id ": 335,
                            "created - at ":"2020 -04 -25 T 02:45:03 - 07:00 ",
" updated - at ":"2020 -08 -04 T 12:17:37 - 07:00
                           
                            "," name ":"," location - code ":
                            null ," street 1 ":" aasda
                            "," street 2
                            ":""," city ":" asdas "," state
                            ":""," postal - code ":" asd
                            "," attention ": null ," active
                            ": true ," business -
                            group - name ":
                            null ," vat -
                            number ": null
                            ," local - tax - number
                            ": null ," country
                                ":{" id ": 223
                                ," code ":"US ",
" NAME ":"United States
                            "}," vat
                            - country ": null,
                            "content - groups ": [],
" purposes ": [], "tax -
                            registration ": []," created - by
                            ": {" id ":
                                49, "login ":
" az - release ", "employee -
                                number ": ""," firstname ":
                                "az - release "," lastname ":
                                "az - release "," fullname ":
                                "az - release az - release
                                "," email ": "support@coupa.com ","
                                salesforce - id ": null,
                                "avatar - thumb - url
                            ": null
}," updated
                                - by ": {" id ": 79,
                                "login ":" himicakumar
                                ", "employee - number ":
                                "," firstname ":"Himica ",
" lastname ":"Kumar ",
" fullname ":"Himica Kumar ",
" email ": "support@coupa.com "," salesforce -
                                id ": "null ",
" avatar - thumb -
                            url
                        ":
                        "created - by ": {"
                            id ": 49,
" login ": "az - release "," employee
                            - number ": "", "firstname ":
" az - release ", "lastname ":
" az - release ", "fullname
                            ":" az - release az - release
                            ", "email ":" support@coupa.com ",
                            "salesforce - id ":" null ",
                            "avatar - thumb
                        - url
                        ":" null ",
                            "updated - by ": {" id ": 79,
" login ": "himicakumar
                            "," employee - number ":
                            ", "firstname ":"Himica ",
" lastname ":"Kumar ",
" fullname ":"Himica Kumar ",
" email ": "support@coupa.com "," salesforce
                            - id ": null,
                            "avatar - thumb -
                       
                    url ":
                null}}],
" created - by
                    ": {" id ": 52,
                    "login ":"Himica.Kumar@coupa.com ",
" employee - number ": null,
                    "firstname ":"Himica ",
" lastname ":"Kumar ",
" fullname ":"Himica Kumar ",
" email ": "support@coupa.com "," salesforce
                    - id ": null,
                    "avatar - thumb - url ":
                null
}," updated
                    - by ": {" id ": 88,
                    "login ":" himicareleaser
                    ", "employee - number ":
                    ""," firstname ":"Himica ",
" lastname ":"Kumar ",
" fullname ":"Himica Kumar ",
" email ": "support@coupa.com "," salesforce
                    - id ": null,
                    "avatar - thumb - url ":
            null
               
}}," account - types
            ": [], "created -
                by ": {" id ": 79,
" login ": "himicakumar
                "," employee - number ":
                "", "firstname ":"Himica ",
" lastname ":"Kumar ",
" fullname ":"Himica Kumar ",
" email ": "support@coupa.com "," salesforce
                - id ": null,
                "avatar - thumb - url ":
            null
}," updated
                - by ": {" id ": 79,
                "login ":" himicakumar
                ", "employee - number ":
                ""," firstname ":"Himica ",
" lastname ":"Kumar ",
" fullname ":"Himica Kumar ",
" email ": "support@coupa.com "," salesforce -
                id ": null,
                "avatar - thumb - url ": null
           
}},
    array
pay - to - account
JSONのPay - to - Account配列の例:
        "pay - to - account
            ": {" id ": 1446
            ," created - at ":"2020 -10 -14 T 14:59:21 - 07:00 ",
" updated - at ":"2020 -10 -15 T 13:24:49 - 07:00 ",
" coupa - pay - id ": 1458,
            "account - name ":"Virtual Card lou*******************@ cou ******"," source - name ": "cpaui
            "," account - kind ": "virtual
_card "," payment - option ": "email
            "," status ": "inactive ",
" document - types ": [" invoice
            "], "
virtual - card - days -
                valid ": null,
" include - cvv - in -
            cxml ": null,
            "connect - remit - to - address - id ": null,
           
" currency ": null,
                "supplier ": {" id ": 1538,
" name ":"Supplier Inc .",
" display - name ": "",
                "number ": null,
" status ": "active ",
" primary - contact ": {
"id ": 1551,
" created - at ":"2020 -10 -14 T 14:45:30 - 07:00 ",
" updated - at ":"2020 -10 -14 T 14:45:30 - 07:00 ",
" EMAIL ": "",
                    "NAME - PREFIX ": NULL,
" NAME - SUFFIX ": NULL,
                    "NAME -
                    ADDITIONAL ": NULL," NAME -
                    GIVEN ": "", "NAME - FAMILY
                    ": ""," NAME - FULLNAME
                    ": NULL,
                    "NOTES ": NULL," ACTIVE ": TRUE,
                    "PHONE - WORK
                    ": NULL,
" PHONE - MOBILE ": NULL,
                    "PHONE - FAX ": NULL,
" PUES ":[], "CREATED
                        - BY ":{" ID ": 171,
" LOGIN ":"LT_Batch ",
" employee - number ": "",
                        "firstname ":"Louis ",
" lastname ":"Tayson ",
" fullname ":"Louis Tayson ",
" email ": "support@coupa.com "," salesforce
                        - id ": null,
                        "avatar - thumb - url ": null
},
" updated - by
                        ": {" id ": 171,
                        "login ":"LT_Batch ",
" employee - number ": "",
                        "firstname ":"Louis ",
" lastname ":"Tayson ",
" fullname ":"Louis Tayson ",
" email ": "support@coupa.com "," salesforce -
                        id ": null,
                        "avatar - thumb - url ": null
                   
}},
" primary - address
                    ": {" id ": 3030,
                    "created - at ":"2020 -10 -14 T 14:45:30 - 07:00 ",
" updated - at ":"2020 -10 -14 T 14:45:30 - 07:00 ",
" name ": null,
                    "location - code ": null,
" street 1 ": null,
                    "street 2 ": null,
" city ": null,
                    "state ": null,
" postal - code ": null,
                    "attention ": null,
" active ": true,
                    "business - group - name ": null,
" vat -
                    number ": null,
                    "local - tax - number ": null,
" country ": null,
                    "vat - country ": null,
" content - groups ": [],
                    "purposes ": []," tax - registration
                    ": [], "created -
                        by ": {" id ": 171,
" login ":"LT_Batch ",
" employee - number ": "",
                        "firstname ":"Louis ",
" lastname ":"Tayson ",
" fullname ":"Louis Tayson ",
" email ": "support@coupa.com "," salesforce
                        - id ": null,
                        "avatar - thumb - url ": null
},
" updated - by
                        ": {" id ": 171,
                        "login ":"LT_Batch ",
" employee - number ": "",
                        "firstname ":"Louis ",
" lastname ":"Tayson ",
" fullname ":"Louis Tayson ",
" email ": "support@coupa.com "," salesforce -
                        id ": null,
                        "avatar - thumb - url ": null
                   
               
}},
" remit - to - address
                ": {" id ": 3031,
                "created - at ":"2020 -10 -14 T 14:47:17 - 07:00 ",
" updated - at ":"2020 -10 -14 T 15:03:41 - 07:00
                "," remit - to - code ": "cpay -
                brta -2818 "," name ": null,
                "street 1 ":"Test ",
" street 2 ": null,
                "city ":"Test City ",
" state ":"Colorado ",
" postal - code ":"80303 ",
" active ": false, "vat - number
                ": null," local - tax
                - number ": null,
                "external - src - ref ":"2818 ",
" external - src - name ":"Coupa Pay ",
" country ": {
"id ": 223,
" code ":"US ",
" NAME ":"United States
                "},"
                vat - country ": null,
                "tax - registration ": [],
" created - by ": {
"id ": 171,
" login ":"LT_Batch ",
" employee - number ": "",
                    "firstname ":"Louis ",
" lastname ":"Tayson ",
" fullname ":"Louis Tayson ",
" email ": "support@coupa.com "," salesforce
                    - id ": null,
                    "avatar - thumb - url ": null
},
" updated - by
                    ": {" id ": 171,
                    "login ":"LT_Batch ",
" employee - number ": "",
                    "firstname ":"Louis ",
" lastname ":"Tayson ",
" fullname ":"Louis Tayson ",
" email ": "support@coupa.com "," salesforce
                    - id ": null,
                    "avatar - thumb - url ": null
               
           
}}," created - by
                ": {" id ": 171,
                "login ":"LT_Batch ",
" employee - number ": "",
                "firstname ":"Louis ",
" lastname ":"Tayson ",
" fullname ":"Louis Tayson ",
" email ": "support@coupa.com "," salesforce
                - id ": null,
                "avatar - thumb - url ": null
},
" updated - by
                ": {" id ": 171,
                "login ":"LT_Batch ",
" employee - number ": "",
                "firstname ":"Louis ",
" lastname ":"Tayson ",
" fullname ":"Louis Tayson ",
" email ": "support@coupa.com "," salesforce -
                id ": null,
                "avatar - thumb - url ": null
           
}},
    array
pay - from - currency          
ペイ・ツー・カレンシー          
reporting - currency          
受取人
JSONの受取人配列の例:
        "PAYEE
            ":{" ID ": 1638
            ," NAME ":"Supplier Name Inc .",
" display - name ":"Supplier Name ",
" number ": null,
            "status ":" active ",
            "primary - contact ": {
" id ": 1551,
                "created - at ":"2020 -10 -14 T 14:45:30 - 07:00 ",
" updated - at ":"2020 -10 -14 T 14:45:30 - 07:00 ",
" EMAIL ": "",
                "NAME - PREFIX ": NULL,
" NAME - SUFFIX ": NULL,
                "NAME -
                ADDITIONAL ": NULL," NAME -
                GIVEN ": "", "NAME - FAMILY
                ": ""," NAME - FULLNAME
                ": NULL,
                "NOTES ": NULL," ACTIVE ": TRUE,
                "PHONE - WORK
                ": NULL,
" PHONE - MOBILE ": NULL,
                "PHONE - FAX ": NULL,
" PUES ":[], "CREATED
                    - BY ":{" ID ": 171,
" LOGIN ":"LT + batch ",
" employee - number ": "",
                    "firstname ":"Lesley ",
" lastname ":"Taylor ",
" fullname ":"Lesley Taylor ",
" email ": "support@coupa.com "," salesforce
                    - id ": null,
                    "avatar - thumb - url ": null
},
" updated - by
                    ": {" id ": 171,
                    "login ":"LT + batch ",
" employee - number ": "",
                    "firstname ":"Lesley ",
" lastname ":"Taylor ",
" fullname ":"Lesley Taylor ",
" email ": "support@coupa.com "," salesforce -
                    id ": null,
                    "avatar - thumb - url ": null
               
}},
" primary - address
                ": {" id ": 3030,
                "created - at ":"2020 -10 -14 T 14:45:30 - 07:00 ",
" updated - at ":"2020 -10 -14 T 14:45:30 - 07:00 ",
" name ": null,
                "location - code ": null,
" street 1 ": null,
                "street 2 ": null,
" city ": null,
                "state ": null,
" postal - code ": null,
                "attention ": null,
" active ": true,
                "business - group - name ": null,
" vat -
                number ": null,
                "local - tax - number ": null,
" country ": null,
                "vat - country ": null,
" content - groups ": [],
                "purposes ": []," tax - registration
                ": [], "created -
                    by ": {" id ": 171,
" login ":"LT + batch ",
" employee - number ": "",
                    "firstname ":"Lesley ",
" lastname ": "taylor ",
" fullname ":"Lesley taylor ",
" email ": "support@coupa.com "," salesforce
                    - id ": null,
                    "avatar - thumb - url ": null
},
" updated - by
                    ": {" id ": 171,
                    "login ":"LT + batch ",
" employee - number ": "",
                    "firstname ":"Lesley ",
" lastname ": "taylor ",
" fullname ":"Lesley taylor ",
" email ": "support@coupa.com "," salesforce
                    - id ": null,
                    "avatar - thumb -
               
           
        url ": null}}},
    サプライヤー配列
payment - batch
JSONでの支払いバッチ配列の例:
        "payment - batch
            ": {" id ": 232
            ," created - at ":"2020 -10 -14 T 15:42:15 - 07:00 ",
" updated - at ":"2020 -10 -14 T 15:42:48 - 07:00
            "," status ":" approved
            "," description ": null
            ," created - by
                ":{" id ": 171
                ," login ":"LT + batch ",
" employee - number ": "",
                "firstname ":"Lesley ",
" lastname ":"Taylor ",
" fullname ":"Lesley Taylor ",
" email ": "support@coupa.com "," salesforce
                - id ": null,
                "avatar - thumb - url ": null
},
" updated - by
                ": {" id ": 170,
                "login ":"LT + releaseaser
                "," employee - number ": "",
                "firstname ":"Lesley ",
" lastname ":"Taylor ",
" fullname ":"Lesley Taylor ",
" email ": "support@coupa.com "," salesforce -
                id ": null,
                "avatar - thumb - url ": null
           
}},
    payment - batch配列
digital - check              
created - by 作成したユーザー         はい ユーザー
更新者: 更新したユーザー         はい ユーザー

 

 

関連アイテム


Coupa Core API

CoupaのRESTful APIは、お客様のデータをCoupaプラットフォームで読み取り、編集し、統合するための堅牢なアクセスを提供します。

APIの開始

Coupa APIの使用に関する一般情報、およびCSVの使用を検討するタイミング。

OAuth 2.0およびOIDCへの移行

Coupaは従来のAPIキーを廃止し、OAuth 2.0 / OIDCの使用を必要としています。R34以降、新しいAPIキーは発行されず、R35ではAPIキーはサポートされなくなります。

リソース

参照データ、トランザクションデータ、共有リソースなど、オブジェクトのタイプ別にAPIエンドポイントを整理しました。