# List payment routes Retrieve a list of all routes created for a specific payment. > 🔑 Access with > > [API key](/reference/authentication) > > [Organization access token with **payments.read**](/reference/authentication) > > [OAuth access with **payments.read**](/reference/authentication) # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Accepting payments", "version": "1.0.0", "license": { "name": "Attribution-NonCommercial-ShareAlike 4.0 International", "identifier": "CC-BY-NC-SA-4.0" } }, "servers": [ { "url": "https://api.mollie.com/v2" } ], "security": [ { "apiKey": [] }, { "organizationAccessToken": [] }, { "oAuth": [] } ], "paths": { "/payments/{paymentId}/routes": { "parameters": [ { "name": "paymentId", "description": "Provide the ID of the related payment.", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^tr_.+$", "example": "tr_5B8cwPMGnU" } } ], "get": { "operationId": "payment-list-routes", "summary": "List payment routes", "x-speakeasy-name-override": "list", "tags": [ "Delayed Routing API" ], "security": [ { "apiKey": [] }, { "organizationAccessToken": [ "payments.read" ] }, { "oAuth": [ "payments.read" ] } ], "description": "Retrieve a list of all routes created for a specific payment.\n\n> 🔑 Access with\n>\n> [API key](/reference/authentication)\n>\n> [Organization access token with **payments.read**](/reference/authentication)\n>\n> [OAuth access with **payments.read**](/reference/authentication)", "parameters": [ { "name": "testmode", "description": "Most API credentials are specifically created for either live mode or test mode. In those cases the `testmode` query parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting the `testmode` query parameter to `true`.\n\nTest entities cannot be retrieved when the endpoint is set to live mode, and vice versa.", "in": "query", "schema": { "type": "boolean", "example": false } } ], "responses": { "200": { "description": "A list of route objects.", "content": { "application/hal+json": { "schema": { "type": "object", "required": [ "count", "_embedded", "_links" ], "properties": { "count": { "type": "integer", "description": "The number of items in this result set. If more items are available, a `_links.next` URL will be present in the result as well.\n\nThe maximum number of items per result set is controlled by the `limit` property provided in the request. The default limit is 50 items.", "minimum": 1, "maximum": 250, "example": 5 }, "_embedded": { "type": "object", "required": [ "routes" ], "properties": { "routes": { "description": "An array of route objects.", "type": "array", "items": { "allOf": [ { "type": "object", "properties": { "resource": { "type": "string", "description": "Indicates the response contains a route object. Will always contain the string `route` for this endpoint.", "readOnly": true, "default": "route" }, "id": { "allOf": [ { "type": "string", "pattern": "^crt_.+$", "example": "crt_dyARQ3JzCgtPDhU2Pbq3J" } ], "description": "The identifier uniquely referring to this route. Mollie assigns this identifier at route creation time. Mollie will always refer to the route by this ID. Example: `crt_dyARQ3JzCgtPDhU2Pbq3J`.", "readOnly": true }, "paymentId": { "allOf": [ { "type": "string", "pattern": "^tr_.+$", "example": "tr_5B8cwPMGnU" } ], "description": "The unique identifier of the payment. For example: `tr_5B8cwPMGnU6qLbRvo7qEZo`. The full payment object can be retrieved via the payment URL in the `_links` object.", "readOnly": true }, "amount": { "description": "The amount of the route. That amount that will be routed to the specified destination.", "type": "object", "required": [ "currency", "value" ], "properties": { "currency": { "type": "string", "description": "A three-character ISO 4217 currency code.", "example": "EUR" }, "value": { "type": "string", "description": "A string containing an exact monetary amount in the given currency.", "example": "10.00" } } }, "description": { "type": "string", "description": "The description of the route. This description is shown in the reports.", "maxLength": 255, "example": "Payment for Order #12345" }, "destination": { "type": "object", "description": "The destination of the route.", "required": [ "type", "organizationId" ], "properties": { "type": { "type": "string", "description": "The type of destination. Currently only the destination type `organization` is supported.\n\nPossible values: `organization`", "example": "organization" }, "organizationId": { "description": "Required for destination type `organization`. The ID of the connected organization the funds should be routed to.", "type": "string", "pattern": "^org_.+$", "example": "org_1234567" } } }, "testmode": { "type": [ "boolean", "null" ], "description": "Whether to create the entity in test mode or live mode.\n\nMost API credentials are specifically created for either live mode or test mode, in which case this parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting `testmode` to `true`.", "writeOnly": true, "example": false }, "createdAt": { "type": "string", "description": "The entity's date and time of creation, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.", "readOnly": true, "example": "2024-03-20T09:13:37+00:00" }, "_links": { "type": "object", "description": "An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.", "required": [ "self", "payment" ], "properties": { "self": { "type": "object", "description": "In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "description": "The actual URL string.", "example": "https://..." }, "type": { "type": "string", "description": "The content type of the page or endpoint the URL points to.", "example": "application/hal+json" } } }, "payment": { "type": "object", "description": "In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "description": "The actual URL string.", "example": "https://..." }, "type": { "type": "string", "description": "The content type of the page or endpoint the URL points to.", "example": "application/hal+json" } } } }, "readOnly": true } } }, { "type": "object", "required": [ "resource", "id", "paymentId", "amount", "description", "destination", "createdAt", "_links" ] } ] } } } }, "_links": { "type": "object", "description": "Links to help navigate through the lists of items. Every URL object will contain an `href` and a `type` field.", "properties": { "self": { "description": "The URL to the current set of items.", "type": "object", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "description": "The actual URL string.", "example": "https://..." }, "type": { "type": "string", "description": "The content type of the page or endpoint the URL points to.", "example": "application/hal+json" } } }, "documentation": { "type": "object", "description": "In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "description": "The actual URL string.", "example": "https://..." }, "type": { "type": "string", "description": "The content type of the page or endpoint the URL points to.", "example": "application/hal+json" } } } } } } }, "examples": { "list-routes-200-1": { "summary": "A list of route objects", "value": { "count": 3, "_embedded": { "routes": [ { "resource": "route", "id": "crt_kSq9CDTa6FzW7c6gpYq3J", "paymentId": "tr_sva3o24VKn", "createdAt": "2024-05-22T15:11:19+02:00", "description": "Payment for Order #12345", "amount": { "value": "1.00", "currency": "EUR" }, "destination": { "type": "organization", "organizationId": "org_123" }, "_links": { "self": { "href": "...", "type": "application/hal+json" }, "documentation": { "href": "...", "type": "text/html" }, "payment": { "href": "...", "type": "application/hal+json" } } }, { "resource": "route", "id": "crt_dyARQ3JzCgtPDhU2Pbq3J", "paymentId": "tr_sva3o24VKn", "createdAt": "2024-05-22T15:11:19+02:00", "description": "Payment for Order #12346", "amount": { "value": "2.00", "currency": "EUR" }, "destination": { "type": "organization", "organizationId": "org_456" }, "_links": { "self": { "href": "...", "type": "application/hal+json" }, "documentation": { "href": "...", "type": "text/html" }, "payment": { "href": "...", "type": "application/hal+json" } } }, { "resource": "route", "id": "crt_tntKsr6tffuVdqnEvhq3J", "paymentId": "tr_sva3o24VKn", "createdAt": "2024-05-22T15:11:19+02:00", "description": "Payment for Order #12347", "amount": { "value": "3.00", "currency": "EUR" }, "destination": { "type": "organization", "organizationId": "org_789" }, "_links": { "self": { "href": "...", "type": "application/hal+json" }, "documentation": { "href": "...", "type": "text/html" }, "payment": { "href": "...", "type": "application/hal+json" } } } ] }, "_links": { "self": { "href": "...", "type": "application/hal+json" }, "documentation": { "href": "...", "type": "text/html" } } } } } } } }, "404": { "description": "No entity with this ID exists.", "content": { "application/hal+json": { "schema": { "type": "object", "description": "An error response object.", "required": [ "status", "title", "detail", "_links" ], "properties": { "status": { "type": "integer", "description": "The status code of the error message. This is always the same code as the status code of the HTTP message itself.", "minimum": 400, "maximum": 599, "example": 404 }, "title": { "type": "string", "description": "The HTTP reason phrase of the error. For example, for a `404` error, the `title` will be `Not Found`.", "example": "Not Found" }, "detail": { "type": "string", "description": "A detailed human-readable description of the error that occurred.", "example": "The resource does not exist" }, "field": { "type": "string", "description": "If the error was caused by a value provided by you in a specific field, the `field` property will contain the name of the field that caused the issue.", "example": "description" }, "_links": { "type": "object", "required": [ "documentation" ], "properties": { "documentation": { "type": "object", "description": "The URL to the generic Mollie API error handling guide.", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "example": "https://docs.mollie.com/errors" }, "type": { "type": "string", "example": "text/html" } } } } } } }, "example": { "status": 404, "title": "Not Found", "detail": "No entity exists with token 'uct_abcDEFghij123456789'", "_links": { "documentation": { "href": "...", "type": "text/html" } } } } } } }, "x-readme": { "code-samples": [ { "language": "shell", "code": "curl -X GET https://api.mollie.com/v2/payments/tr_5B8cwPMGnU6qLbRvo7qEZo/routes \\\n -H \"Authorization: Bearer live_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM\"" }, { "language": "php", "code": "setApiKey('live_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM');\n\n$routes = $mollie->send(\n new ListPaymentRoutesRequest(\n paymentId: 'tr_5B8cwPMGnU6qLbRvo7qEZo'\n )\n);", "install": "composer require mollie/mollie-api-php" }, { "language": "node", "code": "/*\nWe don't have a Node.js code example for this\nAPI call yet.\n\nIf you have some time to spare, feel free to\nshare suggestions on our Discord:\nhttps://discord.gg/VaTVkXB4aQ\n*/", "install": "npm install @mollie/api-client" }, { "language": "python", "code": "'''\nWe don't have a Python code example for this\nAPI call yet.\n\nIf you have some time to spare, feel free to\nshare suggestions on our Discord:\nhttps://discord.gg/VaTVkXB4aQ\n'''", "install": "pip install mollie-api-python" }, { "language": "ruby", "code": "# We don't have a Ruby code example for this\n# API call yet.\n#\n# If you have some time to spare, feel free to\n# share suggestions on our Discord:\n# https://discord.gg/VaTVkXB4aQ", "install": "gem install mollie-api-ruby" } ] } } } }, "components": { "securitySchemes": { "apiKey": { "type": "http", "scheme": "bearer", "x-default": "live_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" }, "organizationAccessToken": { "type": "http", "scheme": "bearer", "x-default": "access_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" }, "oAuth": { "type": "oauth2", "flows": { "authorizationCode": { "authorizationUrl": "https://my.mollie.com/oauth2/authorize", "tokenUrl": "https://api.mollie.com/oauth2/tokens", "scopes": {} } } } } }, "x-readme": { "explorer-enabled": false, "samples-languages": [ "shell", "php", "node", "python", "ruby" ] } } ```