{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-products/payments-odl/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Configure fees","description":"User guides, API reference, and support resources.","siteUrl":"https://docs.ripple.com/products/custody","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"configure-fees","__idx":0},"children":["Configure fees"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This topic covers several tutorials with steps you must take to set and verify the following fees:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#sending-fee"},"children":["Sending fee"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#receiving-fee"},"children":["Receiving fee"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#partner-fee"},"children":["Partner fee"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#account-fee"},"children":["Account fee"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#payout-method-fee"},"children":["Payout method fee"]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"success","name":"Tip"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For conceptual details about RippleNet fees, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/products/payments-odl/api-docs/ripplenet/best-practices/fees"},"children":["Fees"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"scenario","__idx":1},"children":["Scenario"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All of the tutorials in this topic refer to an example set of RippleNet instances, one in San Francisco (SF) and one in London. The sending SF instance handles FX conversion and holds a nostro relationship account on the London instance."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following diagram shows the example instances, and their account liquidity and peer relationship:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/fees-tutorial-two-node-path.833161c685ad4911665dab25dc932a17caee93db1a8e4a39196ebf0fba14681a.7135dee1.svg","alt":"RippleNet Fees with Two Instance Path"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The FX conversion takes place in San Francisco, converting ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}," USD to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0.77"]}," GBP."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This tutorial assumes access and basic familiarity with the RippleNet API."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"sending-fee","__idx":2},"children":["Sending fee"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Follow the steps in this tutorial to configure a fee on your RippleNet that collects value from a payment transfer when the account acts as the sending account to another account on your server's ledger."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sending-fee-details","__idx":3},"children":["Sending fee details"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set a fee that will be collected by an account on your instance with the following configuration details:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The account acts in the sending role of transfers to other accounts on the instance."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Your RippleNet instance initiates the payment, acting as the first instance in the RippleNet payment."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The currency is in USD."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The fee applies only to regular (non-return) payments."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The fee collected is flat value (not percentage of payment)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The amount of the fee is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"request","__idx":4},"children":["Request"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here is the API request for the sending fee:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"POST /v4/config/fees\nHost: sf-bank.ripplenet.com\nContent-Type: application/json\nAuthorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlFUazFNa1V3TkVGQ04wVTNPRFl4TlRCRE0wRTROVVl6UlVJMk9UUXpNalpHUXpJM1JUbEZRZyJ9.ey\n\n{\n  \"currency_code\": \"USD\",\n  \"fee_type\": \"FLAT_RATE\",\n  \"node_type\": \"INITIAL\",\n  \"payment_type\": \"REGULAR\",\n  \"role_type\": \"SENDING\",\n  \"value\": 5.00\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"response--200-","__idx":5},"children":["Response (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]},")"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The successful response indicates you set the fee for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}," USD. RippleNet assigns a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["feeId"]}," for this fee for reference."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also review the details of the fee by calling Get fee by ID and passing the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["feeId"]}," as a path parameter."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"value\": \"5.00\",\n    \"currency_code\": \"USD\",\n    \"role_type\": \"SENDING\",\n    \"payment_type\": \"REGULAR\",\n    \"node_type\": \"INITIAL\",\n    \"fee_type\": \"FLAT_RATE\",\n    \"partner_name\": null,\n    \"account_name\": null,\n    \"upper_limit\": null,\n    \"lower_limit\": null,\n    \"feeId\": \"542e97c1-1308-4d1f-8f65-343b96598ce5\",\n    \"payout_method\": null\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information, see the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Get fee by ID"]}," operation in the API Reference.  "]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"review-fee-impact-with-payment-object","__idx":6},"children":["Review fee impact with payment object"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To review how the fee impacts the ","RippleNet Payment Object",", request two quote collections. One for a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500"]}," USD sender quote type payment and the other an equivalent ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["385"]}," GBP receiver quote type between the transactional accounts in San Francisco and London. The details in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["quote_elements"]}," of the quotes returned highlight the impact of the sender fee on the sending and receiving amounts."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-quote-collections","__idx":7},"children":["Create quote collections"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["With the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}," USD sending fee set, use the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Create quote collection"]}," operation to retrieve all available quotes for two quote types:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A quote type of ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#sending-fee---sender-amount-quote-request"},"children":["sender amount"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500"]}," USD."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A quote type of ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#sending-fee---receiver-amount-quote-request"},"children":["receiver amount"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500"]}," USD."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"sending-fee---sender-amount-quote-request","__idx":8},"children":["Sending fee - sender amount quote (Request)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"POST /v4/quote_collections/\nHost: sf-bank.ripplenet.com\nContent-Type: application/json\nAuthorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlFUazFNa1V3TkVGQ04wVTNPRFl4TlRCRE0wRTROVVl6UlVJMk9UUXpNalpHUXpJM1JUbEZRZyJ9.ey\n\n{\n\t\"sending_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n\t\"receiving_address\": \"trans_gbp_lon@g.eu.uk.london\",\n\t\"amount\": 500,\n\t\"currency\": \"USD\",\n\t\"quote_type\": \"SENDER_AMOUNT\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"sending-fee---sender-amount-quote-response--200-","__idx":9},"children":["Sending fee - sender amount quote (Response) (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]},")"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"quote_collection_id\": \"4c0c3d28-2696-4ec7-abd1-99c21b59f589\",\n    \"quotes\": [\n        {\n            \"quote_id\": \"6212809e-b9e2-4d00-aa2e-fe8c526e72b3\",\n            \"created_at\": \"2020-01-28T21:07:11.127Z\",\n            \"expires_at\": \"2020-01-28T22:07:11.127Z\",\n            \"type\": \"SENDER_AMOUNT\",\n            \"price_guarantee\": \"FIRM\",\n            \"sender_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n            \"receiver_address\": \"trans_gbp_lon@g.eu.uk.london\",\n            \"amount\": \"500\",\n            \"currency_code\": \"USD\",\n            \"currency_code_filter\": null,\n            \"service_type\": null,\n            \"quote_elements\": [\n                {\n                    \"quote_element_id\": \"33b0dc8c-54ae-4a1d-9250-0c877997df97\",\n                    \"quote_element_type\": \"TRANSFER\",\n                    \"quote_element_order\": \"1\",\n                    \"sender_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n                    \"receiver_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n                    \"sending_amount\": \"495.00\",\n                    \"receiving_amount\": \"495.00\",\n                    \"sending_fee\": \"5.00\",\n                    \"receiving_fee\": \"0.00\",\n                    \"sending_currency_code\": null,\n                    \"receiving_currency_code\": null,\n                    \"fx_rate\": null,\n                    \"transfer_currency_code\": \"USD\"\n                },\n                {\n                    \"quote_element_id\": \"0412d48f-60ae-4511-ac42-4294a23bd067\",\n                    \"quote_element_type\": \"EXCHANGE\",\n                    \"quote_element_order\": \"2\",\n                    \"sender_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n                    \"receiver_address\": \"alias_gbp_sf@g.us.ca.san_francisco\",\n                    \"sending_amount\": \"495.00\",\n                    \"receiving_amount\": \"381.15\",\n                    \"sending_fee\": \"0\",\n                    \"receiving_fee\": \"0\",\n                    \"sending_currency_code\": \"USD\",\n                    \"receiving_currency_code\": \"GBP\",\n                    \"fx_rate\": {\n                        \"rate\": \"0.770000000\",\n                        \"base_currency_code\": \"USD\",\n                        \"counter_currency_code\": \"GBP\",\n                        \"type\": \"buy\"\n                    },\n                    \"transfer_currency_code\": null\n                },\n                {\n                    \"quote_element_id\": \"2b93af42-45fc-4232-a941-9b0767f0c724\",\n                    \"quote_element_type\": \"TRANSFER\",\n                    \"quote_element_order\": \"3\",\n                    \"sender_address\": \"conct_gbp_sf@g.eu.uk.london\",\n                    \"receiver_address\": \"trans_gbp_lon@g.eu.uk.london\",\n                    \"sending_amount\": \"381.15\",\n                    \"receiving_amount\": \"381.15\",\n                    \"sending_fee\": \"0.00\",\n                    \"receiving_fee\": \"0.00\",\n                    \"sending_currency_code\": null,\n                    \"receiving_currency_code\": null,\n                    \"fx_rate\": null,\n                    \"transfer_currency_code\": \"GBP\"\n                }\n            ],\n            \"liquidity_warning\": null,\n            \"payment_method\": null\n        }\n    ],\n    \"quote_errors\": []\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"initial-quote-element","__idx":10},"children":["Initial quote element"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["33b0dc8c-54ae-4a1d-9250-0c877997df97"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The first quote element in the quote describes the payment transfer between the SF transactional account and the SF connector account. This quote element includes the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}," USD sending fee that you set previously:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"quote_element_id\": \"33b0dc8c-54ae-4a1d-9250-0c877997df97\",\n    \"quote_element_type\": \"TRANSFER\",\n    \"quote_element_order\": \"1\",\n    \"sender_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n    \"receiver_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n    \"sending_amount\": \"495.00\",\n    \"receiving_amount\": \"495.00\",\n    \"sending_fee\": \"5.00\",\n    \"receiving_fee\": \"0.00\",\n    \"sending_currency_code\": null,\n    \"receiving_currency_code\": null,\n    \"fx_rate\": null,\n    \"transfer_currency_code\": \"USD\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"fee-calculation","__idx":11},"children":["Fee calculation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Your quote requested a payment for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500"]}," USD, but the first quote element shows a sending amount of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["495.00"]},". This is because RippleNet subtracts the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}," USD sending fee from the payment transfer amount before it calculates the resulting sending amount:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"sending_amount\": \"495.00\",\n    \"receiving_amount\": \"495.00\",\n    \"sending_fee\": \"5.00\",\n    \"receiving_fee\": \"0.00\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sending fees impact transfer amounts before ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sending_amount"]}," values are calculated."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"fx-conversion-quote-element","__idx":12},"children":["FX conversion quote element"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0412d48f-60ae-4511-ac42-4294a23bd067"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The second quote element shows the FX conversion from USD to GBP that takes place on the SF instance. There is no fee in this quoted transfer:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n     \"quote_element_id\": \"0412d48f-60ae-4511-ac42-4294a23bd067\",\n     \"quote_element_type\": \"EXCHANGE\",\n     \"quote_element_order\": \"2\",\n     \"sender_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n     \"receiver_address\": \"alias_gbp_sf@g.us.ca.san_francisco\",\n     \"sending_amount\": \"495.00\",\n     \"receiving_amount\": \"381.15\",\n     \"sending_fee\": \"0\",\n     \"receiving_fee\": \"0\",\n     \"sending_currency_code\": \"USD\",\n     \"receiving_currency_code\": \"GBP\",\n     \"fx_rate\": {\n        \"rate\": \"0.770000000\",\n        \"base_currency_code\": \"USD\",\n        \"counter_currency_code\": \"GBP\",\n        \"type\": \"buy\"\n     },\n     \"transfer_currency_code\": null\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"terminal-quote-element","__idx":13},"children":["Terminal quote element"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2b93af42-45fc-4232-a941-9b0767f0c724"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The last quote element in this quote describes the transfer from the San Francisco connector account on the London instance to the London transactional account:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"quote_element_id\": \"2b93af42-45fc-4232-a941-9b0767f0c724\",\n    \"quote_element_type\": \"TRANSFER\",\n    \"quote_element_order\": \"3\",\n    \"sender_address\": \"conct_gbp_sf@g.eu.uk.london\",\n    \"receiver_address\": \"trans_gbp_lon@g.eu.uk.london\",\n    \"sending_amount\": \"381.15\",\n    \"receiving_amount\": \"381.15\",\n    \"sending_fee\": \"0.00\",\n    \"receiving_fee\": \"0.00\",\n    \"sending_currency_code\": null,\n    \"receiving_currency_code\": null,\n    \"fx_rate\": null,\n    \"transfer_currency_code\": \"GBP\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["There are no fees set for transfers between these accounts. The ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#receiving-fee"},"children":["Receiving fee"]}," tutorial sets a fee for this scenario."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"payout-calculation","__idx":14},"children":["Payout calculation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The last quote element shows a transfer with the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receiving_amount"]}," of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["381.15"]}," GBP, and the element shows no receiving fee. If there were a receiving fee, the payout would be the difference after subtracting the fee."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500"]}," USD sender amount payment pays out ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["381.15 GBP."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"sending-fee---receiver-amount-quote-request","__idx":15},"children":["Sending fee - receiver amount quote (Request)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a quote for receiver amount ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["385"]}," GBP, which is the equivalent of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500"]}," USD with a 0.77 FX conversion rate to GBP."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"POST /v4/quote_collections/\nHost: sf-bank.ripplenet.com\nContent-Type: application/json\nAuthorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlFUazFNa1V3TkVGQ04wVTNPRFl4TlRCRE0wRTROVVl6UlVJMk9UUXpNalpHUXpJM1JUbEZRZyJ9.ey\n\n{\n\t\"sending_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n\t\"receiving_address\": \"trans_gbp_lon@g.eu.uk.london\",\n\t\"amount\": 500,\n\t\"currency\": \"USD\",\n\t\"quote_type\": \"RECEIVER_AMOUNT\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"sending-fee---receiver-amount-quote-response--200-","__idx":16},"children":["Sending fee - receiver amount quote (Response) (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]},")"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"quote_collection_id\": \"2d514ceb-2160-494f-8b25-9c7ad9abf4cb\",\n    \"quotes\": [\n        {\n            \"quote_id\": \"9c5aee52-b11d-483a-b307-9ccde9eedef9\",\n            \"created_at\": \"2020-02-01T05:57:24.462Z\",\n            \"expires_at\": \"2020-02-01T06:57:24.462Z\",\n            \"type\": \"RECEIVER_AMOUNT\",\n            \"price_guarantee\": \"FIRM\",\n            \"sender_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n            \"receiver_address\": \"trans_gbp_lon@g.eu.uk.london\",\n            \"amount\": \"385\",\n            \"currency_code\": \"GBP\",\n            \"currency_code_filter\": null,\n            \"service_type\": null,\n            \"quote_elements\": [\n                {\n                    \"quote_element_id\": \"cf99af2b-13b2-4af0-a439-00ef0b285b24\",\n                    \"quote_element_type\": \"TRANSFER\",\n                    \"quote_element_order\": \"1\",\n                    \"sender_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n                    \"receiver_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n                    \"sending_amount\": \"500.00\",\n                    \"receiving_amount\": \"500.00\",\n                    \"sending_fee\": \"5.00\",\n                    \"receiving_fee\": \"0.00\",\n                    \"sending_currency_code\": null,\n                    \"receiving_currency_code\": null,\n                    \"fx_rate\": null,\n                    \"transfer_currency_code\": \"USD\"\n                },\n                {\n                    \"quote_element_id\": \"5237fed0-036b-4536-ba9b-0ecb6d4c1c53\",\n                    \"quote_element_type\": \"EXCHANGE\",\n                    \"quote_element_order\": \"2\",\n                    \"sender_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n                    \"receiver_address\": \"alias_gbp_sf@g.us.ca.san_francisco\",\n                    \"sending_amount\": \"500.00\",\n                    \"receiving_amount\": \"385.00\",\n                    \"sending_fee\": \"0\",\n                    \"receiving_fee\": \"0\",\n                    \"sending_currency_code\": \"USD\",\n                    \"receiving_currency_code\": \"GBP\",\n                    \"fx_rate\": {\n                        \"rate\": \"0.770000000\",\n                        \"base_currency_code\": \"USD\",\n                        \"counter_currency_code\": \"GBP\",\n                        \"type\": \"buy\"\n                    },\n                    \"transfer_currency_code\": null\n                },\n                {\n                    \"quote_element_id\": \"0e69a31b-7073-4068-a3c1-cca72ba665c2\",\n                    \"quote_element_type\": \"TRANSFER\",\n                    \"quote_element_order\": \"3\",\n                    \"sender_address\": \"conct_gbp_sf@g.eu.uk.london\",\n                    \"receiver_address\": \"trans_gbp_lon@g.eu.uk.london\",\n                    \"sending_amount\": \"385.00\",\n                    \"receiving_amount\": \"385.00\",\n                    \"sending_fee\": \"0.00\",\n                    \"receiving_fee\": \"0.00\",\n                    \"sending_currency_code\": null,\n                    \"receiving_currency_code\": null,\n                    \"fx_rate\": null,\n                    \"transfer_currency_code\": \"GBP\"\n                }\n            ],\n            \"liquidity_warning\": null,\n            \"payment_method\": null\n        }\n    ],\n    \"quote_errors\": []\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"initial-quote-element-1","__idx":17},"children":["Initial quote element"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cf99af2b-13b2-4af0-a439-00ef0b285b24"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The first quote element in the quote describes the payment transfer between the SF transactional account and the SF connector account. This quote element includes the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}," USD sending fee that you set previously:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"quote_element_id\": \"cf99af2b-13b2-4af0-a439-00ef0b285b24\",\n    \"quote_element_type\": \"TRANSFER\",\n    \"quote_element_order\": \"1\",\n    \"sender_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n    \"receiver_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n    \"sending_amount\": \"500.00\",\n    \"receiving_amount\": \"500.00\",\n    \"sending_fee\": \"5.00\",\n    \"receiving_fee\": \"0.00\",\n    \"sending_currency_code\": null,\n    \"receiving_currency_code\": null,\n    \"fx_rate\": null,\n    \"transfer_currency_code\": \"USD\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"fee-calculation-1","__idx":18},"children":["Fee calculation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Your quote requested a payment with a payout ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["385"]}," GBP by using a receiver amount quote type. The first quote element shows a sending amount of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500.00"]},", with a sending fee of  ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5.00"]},". The sender must originate the payment with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["505.00"]}," USD. This is because RippleNet adds the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}," USD sending fee to the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sending_amount"]}," to calculate the amount to originate the payment."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"sending_amount\": \"500.00\",\n    \"receiving_amount\": \"500.00\",\n    \"sending_fee\": \"5.00\",\n    \"receiving_fee\": \"0.00\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["RippleNet subtracts sending fees from origination amounts to produce ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sending_amount"]}," values."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"fx-conversion-quote-element-1","__idx":19},"children":["FX conversion quote element"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5237fed0-036b-4536-ba9b-0ecb6d4c1c53"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The second quote element shows the FX conversion from USD to GBP that takes place on the SF instance. There is no fee in this quoted transfer:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"quote_element_id\": \"5237fed0-036b-4536-ba9b-0ecb6d4c1c53\",\n    \"quote_element_type\": \"EXCHANGE\",\n    \"quote_element_order\": \"2\",\n    \"sender_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n    \"receiver_address\": \"alias_gbp_sf@g.us.ca.san_francisco\",\n    \"sending_amount\": \"500.00\",\n    \"receiving_amount\": \"385.00\",\n    \"sending_fee\": \"0\",\n    \"receiving_fee\": \"0\",\n    \"sending_currency_code\": \"USD\",\n    \"receiving_currency_code\": \"GBP\",\n    \"fx_rate\": {\n        \"rate\": \"0.770000000\",\n        \"base_currency_code\": \"USD\",\n        \"counter_currency_code\": \"GBP\",\n        \"type\": \"buy\"\n    },\n    \"transfer_currency_code\": null\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"terminal-quote-element-1","__idx":20},"children":["Terminal quote element"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0e69a31b-7073-4068-a3c1-cca72ba665c2"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The last quote element in this quote describes the transfer from the San Francisco connector account on the London instance to the London transactional account:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"quote_element_id\": \"0e69a31b-7073-4068-a3c1-cca72ba665c2\",\n    \"quote_element_type\": \"TRANSFER\",\n    \"quote_element_order\": \"3\",\n    \"sender_address\": \"conct_gbp_sf@g.eu.uk.london\",\n    \"receiver_address\": \"trans_gbp_lon@g.eu.uk.london\",\n    \"sending_amount\": \"385.00\",\n    \"receiving_amount\": \"385.00\",\n    \"sending_fee\": \"0.00\",\n    \"receiving_fee\": \"0.00\",\n    \"sending_currency_code\": null,\n    \"receiving_currency_code\": null,\n    \"fx_rate\": null,\n    \"transfer_currency_code\": \"GBP\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["There are no fees set for transfers between these accounts. See the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#receiving-fee"},"children":["Receiving fee"]}," tutorial to set a fee for this scenario."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"fee-calculation-2","__idx":21},"children":["Fee calculation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The last quote element shows a transfer with the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receiving_amount"]}," of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["385.00"]}," GBP, and the element shows no receiving fee, so the payment pays out ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["385.00 GBP."]}," If there were a receiving fee, the payout would be the difference after subtracting the fee."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"receiving-fee","__idx":22},"children":["Receiving fee"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Follow the steps in this tutorial to configure a fee on your RippleNet that collects value from a payment transfer when the account acts as the receiving account from another account on your server's ledger."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"receiving-fee-details","__idx":23},"children":["Receiving fee details"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set a fee that will be collected by an account on your instance with the following configuration details:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The account acts in the receiving role of transfers from other accounts on the instance."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Your RippleNet instance terminates the payment, acting as the final instance in the RippleNet payment."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The currency is in GBP."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The fee applies only to regular (non-return) payments."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The fee collected is flat value (not percentage of payment)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The amount of the fee is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"request-1","__idx":24},"children":["Request"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here is the API request for the receiving fee:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"POST /v4/config/fees\nHost: lon-bank.ripple.com\nContent-Type: application/json\nAuthorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlFUazFNa1V3TkVGQ04wVTNPRFl4TlRCRE0wRTROVVl6UlVJMk9UUXpNalpHUXpJM1JUbEZRZyJ9.ey\n\n{\n  \"currency_code\": \"GBP\",\n  \"fee_type\": \"FLAT_RATE\",\n  \"node_type\": \"TERMINAL\",\n  \"payment_type\": \"REGULAR\",\n  \"role_type\": \"RECEIVING\",\n  \"value\": 5.00\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"response--200--1","__idx":25},"children":["Response (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]},")"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The successful response indicates you set the fee for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}," USD. RippleNet assigns a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["feeId"]}," for this fee for reference."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also review the details of the fee by calling Get fee by ID and passing the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["feeId"]}," as a path parameter."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"value\": \"5.00\",\n    \"currency_code\": \"GBP\",\n    \"role_type\": \"RECEIVING\",\n    \"payment_type\": \"REGULAR\",\n    \"node_type\": \"TERMINAL\",\n    \"fee_type\": \"FLAT_RATE\",\n    \"partner_name\": null,\n    \"account_name\": null,\n    \"upper_limit\": null,\n    \"lower_limit\": null,\n    \"feeId\": \"753407d0-1b59-4f9a-bc0c-213a63646c8d\",\n    \"payout_method\": null\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information, see the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Get fee by ID"]}," operation in the API Reference.  "]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"review-fee-impact-with-payment-object-1","__idx":26},"children":["Review fee impact with payment object"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To review how the fee impacts the ","RippleNet Payment Object",", request two quote collections. One for a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500"]}," USD sender quote type payment and the other an equivalent ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["385"]}," GBP receiver quote type between the transactional accounts in San Francisco and London. The details in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["quote_elements"]}," of the quotes returned highlight the impact of the sender fee on the sending and receiving amounts."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-quote-collections-1","__idx":27},"children":["Create quote collections"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["With the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}," USD sending fee set, use the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Create quote collection"]}," operation to retrieve all available quotes for two quote types:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A quote type of ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#receiving-fee---sender-amount-quote-request"},"children":["sender amount"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500"]}," USD."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A quote type of ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#receiving-fee---receiver-amount-quote-request"},"children":["receiver amount"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500"]}," USD."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SF instance has one sender fee set, which was previously created in the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#sending-fee"},"children":["Sending fee"]}," tutorial."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"receiving-fee---sender-amount-quote-request","__idx":28},"children":["Receiving fee - sender amount quote (Request)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"POST /v4/quote_collections/\nHost: sf-bank.ripplenet.com\nContent-Type: application/json\nAuthorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlFUazFNa1V3TkVGQ04wVTNPRFl4TlRCRE0wRTROVVl6UlVJMk9UUXpNalpHUXpJM1JUbEZRZyJ9.ey\n\n{\n\t\"sending_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n\t\"receiving_address\": \"trans_gbp_lon@g.eu.uk.london\",\n\t\"amount\": 500,\n\t\"currency\": \"USD\",\n\t\"quote_type\": \"SENDER_AMOUNT\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"receiving-fee---sender-amount-quote-response--200-","__idx":29},"children":["Receiving fee - sender amount quote (Response) (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]},")"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"quote_collection_id\": \"a495c71c-56fe-48e1-96ed-90b4bcd19bc0\",\n    \"quotes\": [\n        {\n            \"quote_id\": \"fb071c2f-d19a-4989-9ca4-1df312d39e78\",\n            \"created_at\": \"2020-02-01T06:11:39.021Z\",\n            \"expires_at\": \"2020-02-01T07:11:39.021Z\",\n            \"type\": \"SENDER_AMOUNT\",\n            \"price_guarantee\": \"FIRM\",\n            \"sender_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n            \"receiver_address\": \"trans_gbp_lon@g.eu.uk.london\",\n            \"amount\": \"500\",\n            \"currency_code\": \"USD\",\n            \"currency_code_filter\": null,\n            \"service_type\": null,\n            \"quote_elements\": [\n                {\n                    \"quote_element_id\": \"3063d609-c29a-42de-8850-27e65bf19cb9\",\n                    \"quote_element_type\": \"TRANSFER\",\n                    \"quote_element_order\": \"1\",\n                    \"sender_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n                    \"receiver_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n                    \"sending_amount\": \"495.00\",\n                    \"receiving_amount\": \"495.00\",\n                    \"sending_fee\": \"5.00\",\n                    \"receiving_fee\": \"0.00\",\n                    \"sending_currency_code\": null,\n                    \"receiving_currency_code\": null,\n                    \"fx_rate\": null,\n                    \"transfer_currency_code\": \"USD\"\n                },\n                {\n                    \"quote_element_id\": \"9b318ee2-0321-42fa-9da0-47e3de599d53\",\n                    \"quote_element_type\": \"EXCHANGE\",\n                    \"quote_element_order\": \"2\",\n                    \"sender_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n                    \"receiver_address\": \"alias_gbp_sf@g.us.ca.san_francisco\",\n                    \"sending_amount\": \"495.00\",\n                    \"receiving_amount\": \"381.15\",\n                    \"sending_fee\": \"0\",\n                    \"receiving_fee\": \"0\",\n                    \"sending_currency_code\": \"USD\",\n                    \"receiving_currency_code\": \"GBP\",\n                    \"fx_rate\": {\n                        \"rate\": \"0.770000000\",\n                        \"base_currency_code\": \"USD\",\n                        \"counter_currency_code\": \"GBP\",\n                        \"type\": \"buy\"\n                    },\n                    \"transfer_currency_code\": null\n                },\n                {\n                    \"quote_element_id\": \"0d2fd22d-e93a-47f9-ab5a-b4500c344a1a\",\n                    \"quote_element_type\": \"TRANSFER\",\n                    \"quote_element_order\": \"3\",\n                    \"sender_address\": \"conct_gbp_sf@g.eu.uk.london\",\n                    \"receiver_address\": \"trans_gbp_lon@g.eu.uk.london\",\n                    \"sending_amount\": \"381.15\",\n                    \"receiving_amount\": \"381.15\",\n                    \"sending_fee\": \"0.00\",\n                    \"receiving_fee\": \"5.00\",\n                    \"sending_currency_code\": null,\n                    \"receiving_currency_code\": null,\n                    \"fx_rate\": null,\n                    \"transfer_currency_code\": \"GBP\"\n                }\n            ],\n            \"liquidity_warning\": null,\n            \"payment_method\": null\n        }\n    ],\n    \"quote_errors\": []\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"initial-quote-element-2","__idx":30},"children":["Initial quote element"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["3063d609-c29a-42de-8850-27e65bf19cb9"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The first quote element in the quote describes the payment transfer between the SF transactional account and the SF connector account. This quote element includes the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}," USD sending fee that you set previously:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"quote_element_id\": \"3063d609-c29a-42de-8850-27e65bf19cb9\",\n    \"quote_element_type\": \"TRANSFER\",\n    \"quote_element_order\": \"1\",\n    \"sender_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n    \"receiver_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n    \"sending_amount\": \"495.00\",\n    \"receiving_amount\": \"495.00\",\n    \"sending_fee\": \"5.00\",\n    \"receiving_fee\": \"0.00\",\n    \"sending_currency_code\": null,\n    \"receiving_currency_code\": null,\n    \"fx_rate\": null,\n    \"transfer_currency_code\": \"USD\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"fee-calculation-3","__idx":31},"children":["Fee calculation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Your quote requested a payment for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500"]}," USD, but the first quote element shows a sending amount of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["495.00"]},". This is because RippleNet subtracts the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}," USD sending fee from the payment transfer amount before it calculates the resulting sending amount:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"sending_amount\": \"495.00\",\n    \"receiving_amount\": \"495.00\",\n    \"sending_fee\": \"5.00\",\n    \"receiving_fee\": \"0.00\"\n}    \n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sending fees impact transfer amounts before ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sending_amount"]}," values are caclulated."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"fx-conversion-quote-element-2","__idx":32},"children":["FX conversion quote element"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["9b318ee2-0321-42fa-9da0-47e3de599d53"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The second quote element shows the FX conversion from USD to GBP that takes place on the SF instance. There is no fee in this quoted transfer:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"quote_element_id\": \"9b318ee2-0321-42fa-9da0-47e3de599d53\",\n    \"quote_element_type\": \"EXCHANGE\",\n    \"quote_element_order\": \"2\",\n    \"sender_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n    \"receiver_address\": \"alias_gbp_sf@g.us.ca.san_francisco\",\n    \"sending_amount\": \"495.00\",\n    \"receiving_amount\": \"381.15\",\n    \"sending_fee\": \"0\",\n    \"receiving_fee\": \"0\",\n    \"sending_currency_code\": \"USD\",\n    \"receiving_currency_code\": \"GBP\",\n    \"fx_rate\": {\n        \"rate\": \"0.770000000\",\n        \"base_currency_code\": \"USD\",\n        \"counter_currency_code\": \"GBP\",\n        \"type\": \"buy\"\n    },\n    \"transfer_currency_code\": null\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"terminal-quote-element-2","__idx":33},"children":["Terminal quote element"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0d2fd22d-e93a-47f9-ab5a-b4500c344a1a"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The last quote element in this quote describes the transfer from the San Francisco connector account on the London instance to the London transactional account:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"quote_element_id\": \"0d2fd22d-e93a-47f9-ab5a-b4500c344a1a\",\n    \"quote_element_type\": \"TRANSFER\",\n    \"quote_element_order\": \"3\",\n    \"sender_address\": \"conct_gbp_sf@g.eu.uk.london\",\n    \"receiver_address\": \"trans_gbp_lon@g.eu.uk.london\",\n    \"sending_amount\": \"381.15\",\n    \"receiving_amount\": \"381.15\",\n    \"sending_fee\": \"0.00\",\n    \"receiving_fee\": \"5.00\",\n    \"sending_currency_code\": null,\n    \"receiving_currency_code\": null,\n    \"fx_rate\": null,\n    \"transfer_currency_code\": \"GBP\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["There are no fees set for transfers between these accounts. The ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#receiving-fee"},"children":["Receiving fee"]}," tutorial sets a fee for this scenario."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"payout-calculation-1","__idx":34},"children":["Payout calculation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The last quote element shows a transfer with the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receiving_amount"]}," of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["381.15"]}," GBP, and the element shows the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}," GBP receiving fee. The payout is the difference from the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receiving_amount"]}," value after subtracting the fee."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500"]}," USD sender amount payment pays out ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["376.15"]}," GBP."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"receiving-fee---receiver-amount-quote-request","__idx":35},"children":["Receiving fee - receiver amount quote (Request)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a quote for receiver amount ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["385"]}," GBP, which is the equivalent of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500"]}," USD with a 0.77 FX conversion rate to GBP."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"POST /v4/quote_collections/\nHost: sf-bank.ripplenet.com\nContent-Type: application/json\nAuthorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlFUazFNa1V3TkVGQ04wVTNPRFl4TlRCRE0wRTROVVl6UlVJMk9UUXpNalpHUXpJM1JUbEZRZyJ9.ey\n\n{\n\t\"sending_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n\t\"receiving_address\": \"trans_gbp_lon@g.eu.uk.london\",\n\t\"amount\": 385,\n\t\"currency\": \"GBP\",\n\t\"quote_type\": \"RECEIVER_AMOUNT\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"receiving-fee---receiver-amount-quote-response--200-","__idx":36},"children":["Receiving fee - receiver amount quote (Response) (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]},")"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"quote_collection_id\": \"c6b671b9-1d51-4a76-a16c-13b3208a614e\",\n    \"quotes\": [\n        {\n            \"quote_id\": \"763fc1a6-4a2f-46c7-9b64-0b3244df8a45\",\n            \"created_at\": \"2020-02-01T06:14:01.592Z\",\n            \"expires_at\": \"2020-02-01T07:14:01.592Z\",\n            \"type\": \"RECEIVER_AMOUNT\",\n            \"price_guarantee\": \"FIRM\",\n            \"sender_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n            \"receiver_address\": \"trans_gbp_lon@g.eu.uk.london\",\n            \"amount\": \"385\",\n            \"currency_code\": \"GBP\",\n            \"currency_code_filter\": null,\n            \"service_type\": null,\n            \"quote_elements\": [\n                {\n                    \"quote_element_id\": \"c5c7c0a9-f18d-49c6-9776-cb376c17009c\",\n                    \"quote_element_type\": \"TRANSFER\",\n                    \"quote_element_order\": \"1\",\n                    \"sender_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n                    \"receiver_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n                    \"sending_amount\": \"506.49\",\n                    \"receiving_amount\": \"506.49\",\n                    \"sending_fee\": \"5.00\",\n                    \"receiving_fee\": \"0.00\",\n                    \"sending_currency_code\": null,\n                    \"receiving_currency_code\": null,\n                    \"fx_rate\": null,\n                    \"transfer_currency_code\": \"USD\"\n                },\n                {\n                    \"quote_element_id\": \"8355a8db-ae60-4ebd-abbd-acc75186ebb5\",\n                    \"quote_element_type\": \"EXCHANGE\",\n                    \"quote_element_order\": \"2\",\n                    \"sender_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n                    \"receiver_address\": \"alias_gbp_sf@g.us.ca.san_francisco\",\n                    \"sending_amount\": \"506.49\",\n                    \"receiving_amount\": \"390.00\",\n                    \"sending_fee\": \"0\",\n                    \"receiving_fee\": \"0\",\n                    \"sending_currency_code\": \"USD\",\n                    \"receiving_currency_code\": \"GBP\",\n                    \"fx_rate\": {\n                        \"rate\": \"0.770000000\",\n                        \"base_currency_code\": \"USD\",\n                        \"counter_currency_code\": \"GBP\",\n                        \"type\": \"buy\"\n                    },\n                    \"transfer_currency_code\": null\n                },\n                {\n                    \"quote_element_id\": \"6be73ca9-6fac-498b-828d-6dd852ba72f3\",\n                    \"quote_element_type\": \"TRANSFER\",\n                    \"quote_element_order\": \"3\",\n                    \"sender_address\": \"conct_gbp_sf@g.eu.uk.london\",\n                    \"receiver_address\": \"trans_gbp_lon@g.eu.uk.london\",\n                    \"sending_amount\": \"390.00\",\n                    \"receiving_amount\": \"390.00\",\n                    \"sending_fee\": \"0.00\",\n                    \"receiving_fee\": \"5.00\",\n                    \"sending_currency_code\": null,\n                    \"receiving_currency_code\": null,\n                    \"fx_rate\": null,\n                    \"transfer_currency_code\": \"GBP\"\n                }\n            ],\n            \"liquidity_warning\": null,\n            \"payment_method\": null\n        }\n    ],\n    \"quote_errors\": []\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"initial-quote-element-3","__idx":37},"children":["Initial quote element"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["c5c7c0a9-f18d-49c6-9776-cb376c17009c"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The first quote element in the quote describes the payment transfer between the SF transactional account and the SF connector account. This quote element includes the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}," USD sending fee that was set previously:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"quote_element_id\": \"c5c7c0a9-f18d-49c6-9776-cb376c17009c\",\n    \"quote_element_type\": \"TRANSFER\",\n    \"quote_element_order\": \"1\",\n    \"sender_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n    \"receiver_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n    \"sending_amount\": \"506.49\",\n    \"receiving_amount\": \"506.49\",\n    \"sending_fee\": \"5.00\",\n    \"receiving_fee\": \"0.00\",\n    \"sending_currency_code\": null,\n    \"receiving_currency_code\": null,\n    \"fx_rate\": null,\n    \"transfer_currency_code\": \"USD\"\n},\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"fee-calculation-4","__idx":38},"children":["Fee calculation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Your quote requested a payment with a payout ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["385"]}," GBP by using a receiver amount quote type. The first quote element shows a sending amount of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["506.49"]},", with a sending fee of  ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5.00"]},". The sender must originate the payment with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["511.49"]}," USD. This is because RippleNet adds the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}," USD sending fee to the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sending_amount"]}," to calculate the amount to originate the payment."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"sending_amount\": \"506.49\",\n    \"receiving_amount\": \"506.49\",\n    \"sending_fee\": \"5.00\",\n    \"receiving_fee\": \"0.00\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["RippleNet subtracts sending fees from origination amounts to produce ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sending_amount"]}," values."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"fx-conversion-quote-element-3","__idx":39},"children":["FX conversion quote element"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["8355a8db-ae60-4ebd-abbd-acc75186ebb5"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The second quote element shows the FX conversion from USD to GBP that takes place on the SF instance. There is no fee in this quoted transfer:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"quote_element_id\": \"8355a8db-ae60-4ebd-abbd-acc75186ebb5\",\n    \"quote_element_type\": \"EXCHANGE\",\n    \"quote_element_order\": \"2\",\n    \"sender_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n    \"receiver_address\": \"alias_gbp_sf@g.us.ca.san_francisco\",\n    \"sending_amount\": \"506.49\",\n    \"receiving_amount\": \"390.00\",\n    \"sending_fee\": \"0\",\n    \"receiving_fee\": \"0\",\n    \"sending_currency_code\": \"USD\",\n    \"receiving_currency_code\": \"GBP\",\n    \"fx_rate\": {\n        \"rate\": \"0.770000000\",\n        \"base_currency_code\": \"USD\",\n        \"counter_currency_code\": \"GBP\",\n        \"type\": \"buy\"\n    },\n    \"transfer_currency_code\": null\n},\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"terminal-quote-element-3","__idx":40},"children":["Terminal quote element"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["6be73ca9-6fac-498b-828d-6dd852ba72f3"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The last quote element in this quote describes the transfer from the San Francisco connector account on the London instance to the London transactional account:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"quote_element_id\": \"6be73ca9-6fac-498b-828d-6dd852ba72f3\",\n    \"quote_element_type\": \"TRANSFER\",\n    \"quote_element_order\": \"3\",\n    \"sender_address\": \"conct_gbp_sf@g.eu.uk.london\",\n    \"receiver_address\": \"trans_gbp_lon@g.eu.uk.london\",\n    \"sending_amount\": \"390.00\",\n    \"receiving_amount\": \"390.00\",\n    \"sending_fee\": \"0.00\",\n    \"receiving_fee\": \"5.00\",\n    \"sending_currency_code\": null,\n    \"receiving_currency_code\": null,\n    \"fx_rate\": null,\n    \"transfer_currency_code\": \"GBP\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"fee-calculation-5","__idx":41},"children":["Fee calculation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The last quote element shows a transfer with the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receiving_amount"]}," of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["390.00"]}," GBP, and the element shows a receiving fee of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]}," USD, so the payment pays out ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["385.00 GBP."]}," The payout amount is the difference of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receiving_amount"]}," value and the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receiving_fee"]}," value in GBP."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"partner-fee","__idx":42},"children":["Partner fee"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Follow the steps in this tutorial to configure a fee on your RippleNet that collects value from a payment transfer when the sender or receiver is a specified partner."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"partner-fee-details","__idx":43},"children":["Partner fee details"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set a fee that will be collected by an account on your instance with the following configuration details:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The account collecting the fee acts in the receiving role of transfers to other accounts on the instance."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Your RippleNet instance receives the payment, acting as the terminal instance in the RippleNet payment."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The currency is in GBP."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The fee applies only to regular (non-return) payments."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The fee collected is flat value (not percentage of payment)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The amount of the fee is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1.00"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The partner involved in the payment is San Francisco, specified as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["g.us.ca.san_francisco"]},"."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You set this fee's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["role_type"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receiving"]},". In this partner fee, your account only collects a fee if the specified San Francisco partner does the sending of the transfer. This is because when you configure a fee, you configure it for the account that collects the fee, and the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["role_type"]}," indicates the role that account plays."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Partner fees only appear in the Quote Element Object when the fee's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["partner_name"]}," matches the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["owner"]}," of the account charged with the fee. For example, if you set a fee's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["partner_name"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["g.us.ca.san_francisco"]},", then you must ensure that the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["owner"]}," field of the account charged with the fee is also set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["g.us.ca.san_francisco"]},". Otherwise, the fee will not be applied to the quote."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"request-2","__idx":44},"children":["Request"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Specify the partner's RippleNet address as the value for the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["partner_name"]}," field to set the fee for that partner."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here is the API request for the sending fee:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"POST /v4/config/fees\nHost: sf-bank.ripplenet.com\nContent-Type: application/json\nAuthorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlFUazFNa1V3TkVGQ04wVTNPRFl4TlRCRE0wRTROVVl6UlVJMk9UUXpNalpHUXpJM1JUbEZRZyJ9.ey\n\n{\n  \"currency_code\": \"GBP\",\n  \"fee_type\": \"FLAT_RATE\",\n  \"node_type\": \"TERMINAL\",\n  \"payment_type\": \"REGULAR\",\n  \"role_type\": \"RECEIVING\",\n  \"value\": 1.00,\n  \"partner_name\": \"g.us.ca.san_francisco\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"response--200--2","__idx":45},"children":["Response (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]},")"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The successful response indicates you set the fee for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}," GBP. RippleNet assigns a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["feeId"]}," for this fee for reference."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also review the details of the fee by calling Get fee by ID and passing the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["feeId"]}," as a path parameter."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"value\": \"1.00\",\n    \"currency_code\": \"GBP\",\n    \"role_type\": \"TERMINAL\",\n    \"payment_type\": \"REGULAR\",\n    \"node_type\": \"RECEIVING\",\n    \"fee_type\": \"FLAT_RATE\",\n    \"partner_name\": \"g.us.ca.san_francisco\",\n    \"account_name\": null,\n    \"upper_limit\": null,\n    \"lower_limit\": null,\n    \"feeId\": \"48979ba3-bb06-49a0-8393-6edc820d8b5e\",\n    \"payout_method\": null\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information, see the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Get fee by ID"]}," operation in the API Reference.  "]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"account-fee","__idx":46},"children":["Account fee"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Follow the steps in this tutorial to configure a fee on your RippleNet that collects value from a payment transfer when the account acts as the receiving account to another account on your server's ledger."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The account fee will only apply when transfers that include the specified partner's account are involved in the payment."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"account-fee-details","__idx":47},"children":["Account fee details"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set a fee that will be collected by an account on your instance with the following configuration details:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The account acts in the receiving role of transfers to other accounts on the instance."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Your RippleNet instance receives the payment, acting as the terminal instance in the RippleNet payment."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The currency is in GBP."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The fee applies only to regular (non-return) payments."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The fee collected is flat value (not percentage of payment)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The amount of the fee is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0.5"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The partner involved in the payment is San Francisco, specified as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["g.us.ca.san_francisco"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The account involved in the payment is the transactional account, specified as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["conct_gbp_sf"]},"."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You set this fee's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["role_type"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receiving"]},". In this account fee, your account only collects a fee if the specified San Francisco partner's account does the sending of the transfer. This is because when you configure a fee, you configure it for the account that collects the fee, and the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["role_type"]}," indicates the role that account plays."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"request-3","__idx":48},"children":["Request"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Specify the account and partner RippleNet details to set the fee for an account."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To set a fee for an account you must do the following:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Specify the partner's RippleNet address as the value for the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["partner_name"]}," field"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Specify the account name as the value for the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["account_name"]}," field."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here is the API request for the sending fee:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"POST /v4/config/fees\nHost: sf-bank.ripplenet.com\nContent-Type: application/json\nAuthorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlFUazFNa1V3TkVGQ04wVTNPRFl4TlRCRE0wRTROVVl6UlVJMk9UUXpNalpHUXpJM1JUbEZRZyJ9.ey\n\n{\n  \"currency_code\": \"GBP\",\n  \"fee_type\": \"FLAT_RATE\",\n  \"node_type\": \"TERMINAL\",\n  \"payment_type\": \"REGULAR\",\n  \"role_type\": \"RECEIVING\",\n  \"value\": 0.50,\n  \"partner_name\": \"g.us.ca.san_francisco\",\n  \"account_name\": \"conct_gbp_sf\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"response--200--3","__idx":49},"children":["Response (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]},")"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The successful response indicates you set the fee for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".50"]}," GBP. RippleNet assigns a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["feeId"]}," for this fee for reference."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also review the details of the fee by calling Get fee by ID and passing the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["feeId"]}," as a path parameter."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"value\": \"0.50\",\n    \"currency_code\": \"GBP\",\n    \"role_type\": \"RECEIVING\",\n    \"payment_type\": \"REGULAR\",\n    \"node_type\": \"TERMINAL\",\n    \"fee_type\": \"FLAT_RATE\",\n    \"partner_name\": \"g.us.ca.san_francisco\",\n    \"account_name\": \"conct_gbp_sf\",\n    \"upper_limit\": null,\n    \"lower_limit\": null,\n    \"feeId\": \"7381b7ea-3cc2-4940-91ce-21481b8ada2d\",\n    \"payout_method\": null\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information, see the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Get fee by ID"]}," operation in the API Reference.  "]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"payout-method-fee","__idx":50},"children":["Payout method fee"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payout_method"]}," field in the fee specifies the unique string for the fee. Use this tutorial if you want to set fees for payout method or partner account."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"add-payout-methods","__idx":51},"children":["Add payout methods"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before adding fees for any payout methods, you must create the payout methods for the London instance. One will be for customers who want cash payouts and the other for payout to bank accounts."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"add-a-cash-payout-method","__idx":52},"children":["Add a cash payout method"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the Create payout method to add a payout method to the London instance for customers who want a cash payout."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The string used to assign the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payout_method"]}," value must be unique among payout methods."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"request-4","__idx":53},"children":["Request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"POST /v4/config/payout_methods\nHost: lon-bank.ripple.com\nContent-Type: application/json\nAuthorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlFUazFNa1V3TkVGQ04wVTNPRFl4TlRCRE0wRTROVVl6UlVJMk9UUXpNalpHUXpJM1JUbEZRZyJ9.ey\n\n{\n\t\"payout_method\": \"cash\",\n\t\"description\": \"Cash payout method.\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"response--200--4","__idx":54},"children":["Response (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]},")"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The successful request returns a JSON body with a UUID for the payout method."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"payout_method_id\": \"636538f1-b68d-43bf-9a38-bbc8dc9d77c5\",\n    \"payout_method\": \"cash\",\n    \"description\": \"Cash payout method.\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"add-a-bank-account-payout-method","__idx":55},"children":["Add a bank account payout method"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add a payout method to the London instance for customers who want a bank account payout using the Create payout method."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The string used for the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payout_method"]}," value must be unique among payout methods."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"request-5","__idx":56},"children":["Request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"POST /v4/config/payout_methods\nHost: lon-bank.ripple.com\nContent-Type: application/json\nAuthorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlFUazFNa1V3TkVGQ04wVTNPRFl4TlRCRE0wRTROVVl6UlVJMk9UUXpNalpHUXpJM1JUbEZRZyJ9.ey\n{\n\t\"payout_method\": \"bank_account\",\n\t\"description\": \"Payout method for bank accounts.\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"response--200--5","__idx":57},"children":["Response (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]},")"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The successful request returns a JSON body with a UUID for the payout method."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"payout_method_id\": \"7b3af0b2-dae9-4c87-b1be-c1f2af812427\",\n    \"payout_method\": \"bank_account\",\n    \"description\": \"Payout method for bank accounts.\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"add-payout-method-fees","__idx":58},"children":["Add payout method fees"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Follow the steps in this tutorial to configure a fee on your RippleNet that collects value from a payment transfer when the quote requests specific payout methods:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A fee for the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#fee-details-for-cash-payout-method"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cash"]}]}," payout method."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A fee for the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#fee-details-for-cash-payout-method"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bank_account"]}]}," payout method."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"fee-details-for-cash-payout-method","__idx":59},"children":["Fee details for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cash"]}," payout method"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set a fee that will be collected by an account on your instance with the following configuration details:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The account acts in the receiving role of transfers from other accounts on the instance."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Your RippleNet instance terminates the payment, acting as the final instance in the RippleNet payment."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The currency is in GBP."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The fee applies only to regular (non-return) payments."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The fee collected is flat value (not percentage of payment)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The amount of the fee is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["9.50"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The payout method is cash."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"request-6","__idx":60},"children":["Request"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here is the API request for the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cash"]}," payout method fee:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"POST /v4/config/fees\nHost: lon-bank.ripple.com\nContent-Type: application/json\nAuthorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlFUazFNa1V3TkVGQ04wVTNPRFl4TlRCRE0wRTROVVl6UlVJMk9UUXpNalpHUXpJM1JUbEZRZyJ9.ey\n\n{\n  \"currency_code\": \"GBP\",\n  \"fee_type\": \"FLAT_RATE\",\n  \"node_type\": \"TERMINAL\",\n  \"payment_type\": \"REGULAR\",\n  \"role_type\": \"RECEIVING\",\n  \"value\": 9.50,\n  \"payout_method\": \"cash\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"response--200--6","__idx":61},"children":["Response (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]},")"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The successful response indicates you set the fee for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["9.50"]}," GBP. RippleNet assigns a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["feeId"]}," for this fee for reference."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also review the details of the fee by calling Get fee by ID and passing the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["feeId"]}," as a path parameter."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"value\": \"9.50\",\n    \"currency_code\": \"GBP\",\n    \"role_type\": \"RECEIVING\",\n    \"payment_type\": \"REGULAR\",\n    \"node_type\": \"TERMINAL\",\n    \"fee_type\": \"FLAT_RATE\",\n    \"partner_name\": null,\n    \"account_name\": null,\n    \"upper_limit\": null,\n    \"lower_limit\": null,\n    \"feeId\": \"481d8bae-b806-4662-b3bb-6052206ea1df\",\n    \"payout_method\": \"cash\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information, see the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Get fee by ID"]}," operation in the API Reference.  "]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"fee-details-for-bank_account-payout-method","__idx":62},"children":["Fee details for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bank_account"]}," payout method"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set a fee that will be collected by an account on your instance with the following configuration details:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The account acts in the receiving role of transfers from other accounts on the instance."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Your RippleNet instance terminates the payment, acting as the final instance in the RippleNet payment."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The currency is in GBP."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The fee applies only to regular (non-return) payments."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The fee collected is flat value (not percentage of payment)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The amount of the fee is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5.00"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The payout method is bank account."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"request-7","__idx":63},"children":["Request"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here is the API request for the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bank_account"]}," payout method fee:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"POST /v4/config/fees\nHost: lon-bank.ripple.com\nContent-Type: application/json\nAuthorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlFUazFNa1V3TkVGQ04wVTNPRFl4TlRCRE0wRTROVVl6UlVJMk9UUXpNalpHUXpJM1JUbEZRZyJ9.ey\n\n{\n  \"currency_code\": \"GBP\",\n  \"fee_type\": \"FLAT_RATE\",\n  \"node_type\": \"TERMINAL\",\n  \"payment_type\": \"REGULAR\",\n  \"role_type\": \"RECEIVING\",\n  \"value\": 5.00,\n  \"payout_method\": \"bank_account\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"response--200--7","__idx":64},"children":["Response (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]},")"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The successful response indicates you set the fee for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5.00"]}," GBP. RippleNet assigns a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["feeId"]}," for this fee for reference."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also review the details of the fee by calling Get fee by ID and passing the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["feeId"]}," as a path parameter."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"value\": \"5.00\",\n    \"currency_code\": \"GBP\",\n    \"role_type\": \"RECEIVING\",\n    \"payment_type\": \"REGULAR\",\n    \"node_type\": \"TERMINAL\",\n    \"fee_type\": \"FLAT_RATE\",\n    \"partner_name\": null,\n    \"account_name\": null,\n    \"upper_limit\": null,\n    \"lower_limit\": null,\n    \"feeId\": \"d4a8f8eb-424a-4603-b7ef-2c705f70a220\",\n    \"payout_method\": \"bank_account\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information, see the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Get fee by ID"]}," operation in the API Reference.  "]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"view-payout-method-quotes","__idx":65},"children":["View payout method quotes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["With the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cash"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bank_account"]}," payout method fees set, use the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Create quote collection"]}," operation to retrieve all available quotes for the following quotes:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The quotes for ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#quotes-for-all-payout-methods"},"children":["all payout methods"]}," that are enabled for a sender amount payment ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500"]}," USD."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The quotes for only the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#create-quote-collection-with-cash-payment-method"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cash"]}]}," payout method for a sender amount payment of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500"]}," USD."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"quotes-for-all-payout-methods","__idx":66},"children":["Quotes for all payout methods"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Pass the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["enable_quote_per_payout_method"]}," flag, set to true, with your request to return quotes for all payout methods that apply to the quote."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"request-8","__idx":67},"children":["Request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"POST /v4/quote_collections/\nHost: sf-bank.ripplenet.com\nContent-Type: application/json\nAuthorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlFUazFNa1V3TkVGQ04wVTNPRFl4TlRCRE0wRTROVVl6UlVJMk9UUXpNalpHUXpJM1JUbEZRZyJ9.ey\n\n{\n\t\"sending_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n\t\"receiving_address\": \"trans_gbp_lon@g.eu.uk.london\",\n\t\"amount\": 500,\n\t\"currency\": \"USD\",\n\t\"quote_type\": \"SENDER_AMOUNT\",\n\t\"enable_quote_per_payout_method\": true\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"response--200--8","__idx":68},"children":["Response (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]},")"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The quote collection that RippleNet returns includes quotes for both the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cash"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bank_account"]}," payout methods, and includes the fees for each."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"quote_collection_id\": \"67f96691-4b7a-4b18-b1df-f974b873b082\",\n    \"quotes\": [\n        {\n            \"quote_id\": \"d10fd357-f7b7-4ea3-898d-77159a95242b\",\n            \"created_at\": \"2020-02-01T06:42:06.804Z\",\n            \"expires_at\": \"2020-02-01T07:42:06.804Z\",\n            \"type\": \"SENDER_AMOUNT\",\n            \"price_guarantee\": \"FIRM\",\n            \"sender_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n            \"receiver_address\": \"trans_gbp_lon@g.eu.uk.london\",\n            \"amount\": \"500\",\n            \"currency_code\": \"USD\",\n            \"currency_code_filter\": null,\n            \"service_type\": null,\n            \"quote_elements\": [\n                {\n                    \"quote_element_id\": \"dc525444-55f6-400c-8656-4a12a27da800\",\n                    \"quote_element_type\": \"TRANSFER\",\n                    \"quote_element_order\": \"1\",\n                    \"sender_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n                    \"receiver_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n                    \"sending_amount\": \"495.00\",\n                    \"receiving_amount\": \"495.00\",\n                    \"sending_fee\": \"5.00\",\n                    \"receiving_fee\": \"0.00\",\n                    \"sending_currency_code\": null,\n                    \"receiving_currency_code\": null,\n                    \"fx_rate\": null,\n                    \"transfer_currency_code\": \"USD\"\n                },\n                {\n                    \"quote_element_id\": \"92dbd3ac-1241-4c7b-ad4b-6cc719948d0d\",\n                    \"quote_element_type\": \"EXCHANGE\",\n                    \"quote_element_order\": \"2\",\n                    \"sender_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n                    \"receiver_address\": \"alias_gbp_sf@g.us.ca.san_francisco\",\n                    \"sending_amount\": \"495.00\",\n                    \"receiving_amount\": \"381.15\",\n                    \"sending_fee\": \"0\",\n                    \"receiving_fee\": \"0\",\n                    \"sending_currency_code\": \"USD\",\n                    \"receiving_currency_code\": \"GBP\",\n                    \"fx_rate\": {\n                        \"rate\": \"0.770000000\",\n                        \"base_currency_code\": \"USD\",\n                        \"counter_currency_code\": \"GBP\",\n                        \"type\": \"buy\"\n                    },\n                    \"transfer_currency_code\": null\n                },\n                {\n                    \"quote_element_id\": \"684f6164-524e-4596-a048-7c4acbc48298\",\n                    \"quote_element_type\": \"TRANSFER\",\n                    \"quote_element_order\": \"3\",\n                    \"sender_address\": \"conct_gbp_sf@g.eu.uk.london\",\n                    \"receiver_address\": \"trans_gbp_lon@g.eu.uk.london\",\n                    \"sending_amount\": \"381.15\",\n                    \"receiving_amount\": \"381.15\",\n                    \"sending_fee\": \"0.00\",\n                    \"receiving_fee\": \"9.50\",\n                    \"sending_currency_code\": null,\n                    \"receiving_currency_code\": null,\n                    \"fx_rate\": null,\n                    \"transfer_currency_code\": \"GBP\"\n                }\n            ],\n            \"liquidity_warning\": null,\n            \"payment_method\": \"cash\"\n        },\n        {\n            \"quote_id\": \"d6e195e9-44a1-423a-9399-27d6ff9e732d\",\n            \"created_at\": \"2020-02-01T06:42:06.852Z\",\n            \"expires_at\": \"2020-02-01T07:42:06.852Z\",\n            \"type\": \"SENDER_AMOUNT\",\n            \"price_guarantee\": \"FIRM\",\n            \"sender_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n            \"receiver_address\": \"trans_gbp_lon@g.eu.uk.london\",\n            \"amount\": \"500\",\n            \"currency_code\": \"USD\",\n            \"currency_code_filter\": null,\n            \"service_type\": null,\n            \"quote_elements\": [\n                {\n                    \"quote_element_id\": \"0c01266d-f6f5-4da1-bb80-11be602614d3\",\n                    \"quote_element_type\": \"TRANSFER\",\n                    \"quote_element_order\": \"1\",\n                    \"sender_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n                    \"receiver_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n                    \"sending_amount\": \"495.00\",\n                    \"receiving_amount\": \"495.00\",\n                    \"sending_fee\": \"5.00\",\n                    \"receiving_fee\": \"0.00\",\n                    \"sending_currency_code\": null,\n                    \"receiving_currency_code\": null,\n                    \"fx_rate\": null,\n                    \"transfer_currency_code\": \"USD\"\n                },\n                {\n                    \"quote_element_id\": \"c70a9434-116b-435a-96cf-eee46ae4b187\",\n                    \"quote_element_type\": \"EXCHANGE\",\n                    \"quote_element_order\": \"2\",\n                    \"sender_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n                    \"receiver_address\": \"alias_gbp_sf@g.us.ca.san_francisco\",\n                    \"sending_amount\": \"495.00\",\n                    \"receiving_amount\": \"381.15\",\n                    \"sending_fee\": \"0\",\n                    \"receiving_fee\": \"0\",\n                    \"sending_currency_code\": \"USD\",\n                    \"receiving_currency_code\": \"GBP\",\n                    \"fx_rate\": {\n                        \"rate\": \"0.770000000\",\n                        \"base_currency_code\": \"USD\",\n                        \"counter_currency_code\": \"GBP\",\n                        \"type\": \"buy\"\n                    },\n                    \"transfer_currency_code\": null\n                },\n                {\n                    \"quote_element_id\": \"0b92294a-4dd6-4815-ad90-7044be80256b\",\n                    \"quote_element_type\": \"TRANSFER\",\n                    \"quote_element_order\": \"3\",\n                    \"sender_address\": \"conct_gbp_sf@g.eu.uk.london\",\n                    \"receiver_address\": \"trans_gbp_lon@g.eu.uk.london\",\n                    \"sending_amount\": \"381.15\",\n                    \"receiving_amount\": \"381.15\",\n                    \"sending_fee\": \"0.00\",\n                    \"receiving_fee\": \"5.00\",\n                    \"sending_currency_code\": null,\n                    \"receiving_currency_code\": null,\n                    \"fx_rate\": null,\n                    \"transfer_currency_code\": \"GBP\"\n                }\n            ],\n            \"liquidity_warning\": null,\n            \"payment_method\": \"bank_account\"\n        }\n    ],\n    \"quote_errors\": []\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"create-quote-collection-with-cash-payment-method","__idx":69},"children":["Create quote collection with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cash"]}," payment method"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can now chose to request quotes for only the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cash"]}," payment method."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"success","name":"Tip"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Payout method fees must be set using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payout_method"]}," field in the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Create fee"]}," operation, but when you request a quote collection, ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Create quote collection"]}," accepts values for the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payment_method"]}," field. Notice the difference."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"request-9","__idx":70},"children":["Request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"POST /v4/quote_collections/\nHost: sf-bank.ripplenet.com\nContent-Type: application/json\nAuthorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IlFUazFNa1V3TkVGQ04wVTNPRFl4TlRCRE0wRTROVVl6UlVJMk9UUXpNalpHUXpJM1JUbEZRZyJ9.ey\n\n{\n\t\"sending_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n\t\"receiving_address\": \"trans_gbp_lon@g.eu.uk.london\",\n\t\"amount\": 500,\n\t\"currency\": \"USD\",\n\t\"quote_type\": \"SENDER_AMOUNT\",\n\t\"payment_method\": \"cash\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":5,"id":"response--200--9","__idx":71},"children":["Response (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]},")"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"quote_collection_id\": \"a8a27b47-c44a-4db6-88a4-5b2abb5f8829\",\n    \"quotes\": [\n        {\n            \"quote_id\": \"df86d1f1-708a-4bf2-9503-fe7b1ea9571c\",\n            \"created_at\": \"2020-02-01T07:09:25.279Z\",\n            \"expires_at\": \"2020-02-01T08:09:25.279Z\",\n            \"type\": \"SENDER_AMOUNT\",\n            \"price_guarantee\": \"FIRM\",\n            \"sender_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n            \"receiver_address\": \"trans_gbp_lon@g.eu.uk.london\",\n            \"amount\": \"500\",\n            \"currency_code\": \"USD\",\n            \"currency_code_filter\": null,\n            \"service_type\": null,\n            \"quote_elements\": [\n                {\n                    \"quote_element_id\": \"d83f0b8f-90a4-479b-80e3-ae0110da337d\",\n                    \"quote_element_type\": \"TRANSFER\",\n                    \"quote_element_order\": \"1\",\n                    \"sender_address\": \"trans_usd_sf@g.us.ca.san_francisco\",\n                    \"receiver_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n                    \"sending_amount\": \"495.00\",\n                    \"receiving_amount\": \"495.00\",\n                    \"sending_fee\": \"5.00\",\n                    \"receiving_fee\": \"0.00\",\n                    \"sending_currency_code\": null,\n                    \"receiving_currency_code\": null,\n                    \"fx_rate\": null,\n                    \"transfer_currency_code\": \"USD\"\n                },\n                {\n                    \"quote_element_id\": \"a616a17b-58a1-475f-9df8-068af34c9847\",\n                    \"quote_element_type\": \"EXCHANGE\",\n                    \"quote_element_order\": \"2\",\n                    \"sender_address\": \"conct_usd_sf@g.us.ca.san_francisco\",\n                    \"receiver_address\": \"alias_gbp_sf@g.us.ca.san_francisco\",\n                    \"sending_amount\": \"495.00\",\n                    \"receiving_amount\": \"381.15\",\n                    \"sending_fee\": \"0\",\n                    \"receiving_fee\": \"0\",\n                    \"sending_currency_code\": \"USD\",\n                    \"receiving_currency_code\": \"GBP\",\n                    \"fx_rate\": {\n                        \"rate\": \"0.770000000\",\n                        \"base_currency_code\": \"USD\",\n                        \"counter_currency_code\": \"GBP\",\n                        \"type\": \"buy\"\n                    },\n                    \"transfer_currency_code\": null\n                },\n                {\n                    \"quote_element_id\": \"172133dd-7436-4bf1-8eb2-502c4f7969bb\",\n                    \"quote_element_type\": \"TRANSFER\",\n                    \"quote_element_order\": \"3\",\n                    \"sender_address\": \"conct_gbp_sf@g.eu.uk.london\",\n                    \"receiver_address\": \"trans_gbp_lon@g.eu.uk.london\",\n                    \"sending_amount\": \"381.15\",\n                    \"receiving_amount\": \"381.15\",\n                    \"sending_fee\": \"0.00\",\n                    \"receiving_fee\": \"9.50\",\n                    \"sending_currency_code\": null,\n                    \"receiving_currency_code\": null,\n                    \"fx_rate\": null,\n                    \"transfer_currency_code\": \"GBP\"\n                }\n            ],\n            \"liquidity_warning\": null,\n            \"payment_method\": \"cash\"\n        }\n    ],\n    \"quote_errors\": []\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Notice the payment method is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cash"]},", and the receiving fee is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["9.50"]}," GBP, which is the value you set for the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cash"]}," payout method fee."]}]},"headings":[{"value":"Configure fees","id":"configure-fees","depth":1},{"value":"Scenario","id":"scenario","depth":2},{"value":"Sending fee","id":"sending-fee","depth":2},{"value":"Sending fee details","id":"sending-fee-details","depth":3},{"value":"Request","id":"request","depth":4},{"value":"Response ( 200 )","id":"response--200-","depth":4},{"value":"Review fee impact with payment object","id":"review-fee-impact-with-payment-object","depth":3},{"value":"Create quote collections","id":"create-quote-collections","depth":3},{"value":"Sending fee - sender amount quote (Request)","id":"sending-fee---sender-amount-quote-request","depth":4},{"value":"Sending fee - sender amount quote (Response) ( 200 )","id":"sending-fee---sender-amount-quote-response--200-","depth":4},{"value":"Initial quote element","id":"initial-quote-element","depth":4},{"value":"Fee calculation","id":"fee-calculation","depth":5},{"value":"FX conversion quote element","id":"fx-conversion-quote-element","depth":4},{"value":"Terminal quote element","id":"terminal-quote-element","depth":4},{"value":"Payout calculation","id":"payout-calculation","depth":5},{"value":"Sending fee - receiver amount quote (Request)","id":"sending-fee---receiver-amount-quote-request","depth":4},{"value":"Sending fee - receiver amount quote (Response) ( 200 )","id":"sending-fee---receiver-amount-quote-response--200-","depth":4},{"value":"Initial quote element","id":"initial-quote-element-1","depth":4},{"value":"Fee calculation","id":"fee-calculation-1","depth":5},{"value":"FX conversion quote element","id":"fx-conversion-quote-element-1","depth":4},{"value":"Terminal quote element","id":"terminal-quote-element-1","depth":4},{"value":"Fee calculation","id":"fee-calculation-2","depth":5},{"value":"Receiving fee","id":"receiving-fee","depth":2},{"value":"Receiving fee details","id":"receiving-fee-details","depth":3},{"value":"Request","id":"request-1","depth":4},{"value":"Response ( 200 )","id":"response--200--1","depth":4},{"value":"Review fee impact with payment object","id":"review-fee-impact-with-payment-object-1","depth":3},{"value":"Create quote collections","id":"create-quote-collections-1","depth":3},{"value":"Receiving fee - sender amount quote (Request)","id":"receiving-fee---sender-amount-quote-request","depth":4},{"value":"Receiving fee - sender amount quote (Response) ( 200 )","id":"receiving-fee---sender-amount-quote-response--200-","depth":4},{"value":"Initial quote element","id":"initial-quote-element-2","depth":4},{"value":"Fee calculation","id":"fee-calculation-3","depth":5},{"value":"FX conversion quote element","id":"fx-conversion-quote-element-2","depth":4},{"value":"Terminal quote element","id":"terminal-quote-element-2","depth":4},{"value":"Payout calculation","id":"payout-calculation-1","depth":5},{"value":"Receiving fee - receiver amount quote (Request)","id":"receiving-fee---receiver-amount-quote-request","depth":4},{"value":"Receiving fee - receiver amount quote (Response) ( 200 )","id":"receiving-fee---receiver-amount-quote-response--200-","depth":4},{"value":"Initial quote element","id":"initial-quote-element-3","depth":4},{"value":"Fee calculation","id":"fee-calculation-4","depth":5},{"value":"FX conversion quote element","id":"fx-conversion-quote-element-3","depth":4},{"value":"Terminal quote element","id":"terminal-quote-element-3","depth":4},{"value":"Fee calculation","id":"fee-calculation-5","depth":5},{"value":"Partner fee","id":"partner-fee","depth":2},{"value":"Partner fee details","id":"partner-fee-details","depth":3},{"value":"Request","id":"request-2","depth":4},{"value":"Response ( 200 )","id":"response--200--2","depth":4},{"value":"Account fee","id":"account-fee","depth":2},{"value":"Account fee details","id":"account-fee-details","depth":3},{"value":"Request","id":"request-3","depth":4},{"value":"Response ( 200 )","id":"response--200--3","depth":4},{"value":"Payout method fee","id":"payout-method-fee","depth":2},{"value":"Add payout methods","id":"add-payout-methods","depth":3},{"value":"Add a cash payout method","id":"add-a-cash-payout-method","depth":4},{"value":"Request","id":"request-4","depth":5},{"value":"Response ( 200 )","id":"response--200--4","depth":5},{"value":"Add a bank account payout method","id":"add-a-bank-account-payout-method","depth":4},{"value":"Request","id":"request-5","depth":5},{"value":"Response ( 200 )","id":"response--200--5","depth":5},{"value":"Add payout method fees","id":"add-payout-method-fees","depth":3},{"value":"Fee details for cash payout method","id":"fee-details-for-cash-payout-method","depth":4},{"value":"Request","id":"request-6","depth":5},{"value":"Response ( 200 )","id":"response--200--6","depth":5},{"value":"Fee details for bank_account payout method","id":"fee-details-for-bank_account-payout-method","depth":4},{"value":"Request","id":"request-7","depth":5},{"value":"Response ( 200 )","id":"response--200--7","depth":5},{"value":"View payout method quotes","id":"view-payout-method-quotes","depth":3},{"value":"Quotes for all payout methods","id":"quotes-for-all-payout-methods","depth":4},{"value":"Request","id":"request-8","depth":5},{"value":"Response ( 200 )","id":"response--200--8","depth":5},{"value":"Create quote collection with cash payment method","id":"create-quote-collection-with-cash-payment-method","depth":4},{"value":"Request","id":"request-9","depth":5},{"value":"Response ( 200 )","id":"response--200--9","depth":5}],"frontmatter":{"seo":{"title":"Configure fees"}},"lastModified":"2025-10-03T17:57:05.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/payments-odl/api-docs/ripplenet/tutorials/configure-fees","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}