{"items":[{"type":"link","label":"DCC rate service API","link":"/apis/dcc","routeSlug":"/apis/dcc","content":{"contentType":"overview","meta":{"name":"DCC rate service API"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"dcc.json","url":"/_bundle/apis/dcc.json?download"},{"kind":"download","label":"dcc.yaml","url":"/_bundle/apis/dcc.yaml?download"}]},{"title":"Overview","titleTranslationKey":"info.title","children":[]},{"title":"Languages","titleTranslationKey":"languages.title","children":[{"kind":"languages","options":[{"key":"curl","title":"curl","lang":"curl"},{"key":"javascript","title":"JavaScript","lang":"JavaScript"},{"key":"node","title":"Node.js","lang":"Node.js"},{"key":"python","title":"Python","lang":"Python"},{"key":"java","title":"Java","lang":"Java"},{"key":"csharp","title":"C#","lang":"C#"},{"key":"php","title":"PHP","lang":"PHP"},{"key":"go","title":"Go","lang":"Go"},{"key":"ruby","title":"Ruby","lang":"Ruby"},{"key":"r","title":"R","lang":"R"},{"key":"payload","title":"Payload","lang":"Payload"}]}]},{"title":"Servers","titleTranslationKey":"servers.title","children":[{"kind":"servers","servers":[{"url":"https://api-services.pxp.io/api/v1","description":"Production environment"},{"url":"https://api-services.test.pxp.io/api/v1","description":"Sandbox environment"}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"DCC rate service API (1.0.0)","showPageActions":true},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":"This is an API reference for the DCC (Dynamic Currency Conversion) rate service."}],"sectionId":"/apis/dcc"}],"sectionId":"/apis/dcc"}]}]}},{"label":"Get DCC rate","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/apis/dcc/other/get-dcc-rate","routeSlug":"/apis/dcc/other/get-dcc-rate","metadata":{"seo":{"title":"Get DCC rate","description":"Retrieve the Dynamic Currency Conversion (DCC) rate for a transaction from various providers."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"get-dcc-rate","name":"Get DCC rate","isWebhook":false,"pointer":"/paths/~1dcc~1rate/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get DCC rate","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Retrieve the Dynamic Currency Conversion (DCC) rate for a transaction from various providers."},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/DccRateRequest","exampleIds":["paths/~1dcc~1rate/post/requestBody/content/application~1json/examples/elavon-example","paths/~1dcc~1rate/post/requestBody/content/application~1json/examples/fexco-example"]}},"schemaId":"components/schemas/DccRateRequest","exampleIds":["paths/~1dcc~1rate/post/requestBody/content/application~1json/examples/elavon-example","paths/~1dcc~1rate/post/requestBody/content/application~1json/examples/fexco-example"],"pointer":"/paths/~1dcc~1rate/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/dcc/rate","servers":[{"url":"https://api-services.pxp.io/api/v1","description":"Production environment"},{"url":"https://api-services.test.pxp.io/api/v1","description":"Sandbox environment"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[],"requestBody":{"application/json":{"schemaId":"components/schemas/DccRateRequest","exampleIds":["paths/~1dcc~1rate/post/requestBody/content/application~1json/examples/elavon-example","paths/~1dcc~1rate/post/requestBody/content/application~1json/examples/fexco-example"]}},"responseCodes":["200","400","401","500"],"pointer":"/dcc/rate","href":"other/get-dcc-rate","openApiOperationId":"get-dcc-rate","summary":"Get DCC rate"},"isWebhook":false,"hideReplay":true,"servers":[{"url":"https://api-services.pxp.io/api/v1","description":"Production environment"},{"url":"https://api-services.test.pxp.io/api/v1","description":"Sandbox environment"}],"schemaId":"components/schemas/DccRateRequest","exampleIds":["paths/~1dcc~1rate/post/requestBody/content/application~1json/examples/elavon-example","paths/~1dcc~1rate/post/requestBody/content/application~1json/examples/fexco-example"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/DccRateRequest","exampleIds":["paths/~1dcc~1rate/post/requestBody/content/application~1json/examples/elavon-example","paths/~1dcc~1rate/post/requestBody/content/application~1json/examples/fexco-example"]}},"examples":[{},{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Success","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/DccRateResponse","exampleIds":["paths/~1dcc~1rate/post/responses/200/content/application~1json/examples/elavon-response","paths/~1dcc~1rate/post/responses/200/content/application~1json/examples/fexco-response","paths/~1dcc~1rate/post/responses/200/content/application~1json/examples/dcc-not-available"]}},"schemaId":"components/schemas/DccRateResponse","exampleIds":["paths/~1dcc~1rate/post/responses/200/content/application~1json/examples/elavon-response","paths/~1dcc~1rate/post/responses/200/content/application~1json/examples/fexco-response","paths/~1dcc~1rate/post/responses/200/content/application~1json/examples/dcc-not-available"]},{"code":"400","description":"Bad request","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse"}},"schemaId":"components/schemas/ErrorResponse"},{"code":"401","description":"Unauthorised","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse"}},"schemaId":"components/schemas/ErrorResponse"},{"code":"500","description":"Internal server error","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse"}},"schemaId":"components/schemas/ErrorResponse"}],"pointer":"/paths/~1dcc~1rate/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"components/schemas/DccRateResponse","exampleIds":["paths/~1dcc~1rate/post/responses/200/content/application~1json/examples/elavon-response","paths/~1dcc~1rate/post/responses/200/content/application~1json/examples/fexco-response","paths/~1dcc~1rate/post/responses/200/content/application~1json/examples/dcc-not-available"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/DccRateResponse","exampleIds":["paths/~1dcc~1rate/post/responses/200/content/application~1json/examples/elavon-response","paths/~1dcc~1rate/post/responses/200/content/application~1json/examples/fexco-response","paths/~1dcc~1rate/post/responses/200/content/application~1json/examples/dcc-not-available"]}}},{"code":"400","schemaId":"components/schemas/ErrorResponse","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse"}}},{"code":"401","schemaId":"components/schemas/ErrorResponse","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse"}}},{"code":"500","schemaId":"components/schemas/ErrorResponse","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/ErrorResponse"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/other/get-dcc-rate"}],"panels":[]}]},"httpPath":"/dcc/rate"}],"store":{"schemaStore":{"components/schemas/CurrencyCode":{"id":"components/schemas/CurrencyCode","kind":"json-schema","title":"CurrencyCode","data":{"type":"string","description":"Currency code in ISO 4217 format.","example":"USD","minLength":3,"maxLength":3,"pattern":"^[A-Z]{3}$"}},"components/schemas/BaseAmount":{"id":"components/schemas/BaseAmount","kind":"json-schema","title":"BaseAmount","data":{"type":"object","required":["localTransaction","localCurrencyCode"],"properties":{"localCurrencyCode":{"$ref":"#/components/schemas/CurrencyCode"},"localTransaction":{"type":"number","description":"The transaction amount in the local currency.","example":100,"minimum":0.01}}}},"components/schemas/BaseProviderResponse":{"id":"components/schemas/BaseProviderResponse","kind":"json-schema","title":"BaseProviderResponse","data":{"type":"object","description":"Base structure for provider responses.","required":["provider"],"properties":{"provider":{"type":"string","description":"The name of the provider."}}}},"components/schemas/RequestAmounts":{"id":"components/schemas/RequestAmounts","kind":"json-schema","title":"RequestAmounts","data":{"allOf":[{"$ref":"#/components/schemas/BaseAmount"},{"type":"object","properties":{"cardHolderCurrencyCode":{"$ref":"#/components/schemas/CurrencyCode","description":"The cardholder's currency, in ISO 4217 format."}}}]}},"components/schemas/ResponseAmounts":{"id":"components/schemas/ResponseAmounts","kind":"json-schema","title":"ResponseAmounts","data":{"type":"object","description":"Details about the amounts.","required":["local","cardholder"],"properties":{"local":{"type":"object","required":["transaction","currencyCode"],"properties":{"transaction":{"type":"number","description":"The transaction amount in the local currency.","example":100},"currencyCode":{"$ref":"#/components/schemas/CurrencyCode"}}},"cardholder":{"type":"object","required":["transaction","currencyCode"],"properties":{"transaction":{"type":"number","description":"The transaction amount in the cardholder's currency.","example":85.5},"currencyCode":{"$ref":"#/components/schemas/CurrencyCode"}}}}}},"components/schemas/DccRateRequest":{"id":"components/schemas/DccRateRequest","kind":"json-schema","title":"DccRateRequest","data":{"type":"object","required":["merchant","site","exchangeRateProvider","securityLevel","transactionMethod","amounts"],"properties":{"merchant":{"type":"string","description":"Your unique merchant identifier, as assigned by PXP.","example":"MERCHANT-1","maxLength":20},"site":{"type":"string","description":"Your unique site identifier, as assigned by PXP.","example":"SITE-1","maxLength":20},"exchangeRateProvider":{"type":"string","enum":["Elavon","Fexco"],"description":"The exchange rate provider to use for the DCC rate calculation.","example":"Elavon"},"securityLevel":{"$ref":"#/components/schemas/SecurityLevel"},"transactionMethod":{"$ref":"#/components/schemas/TransactionMethod"},"pointOfInteraction":{"$ref":"#/components/schemas/PointOfInteraction"},"amounts":{"$ref":"#/components/schemas/RequestAmounts"}}}},"components/schemas/PointOfInteraction":{"id":"components/schemas/PointOfInteraction","kind":"json-schema","title":"PointOfInteraction","data":{"type":"object","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Details about the point of interaction. This object is optional for "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Ecom"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" transactions."},"children":[]}]}]}],"properties":{"entryType":{"type":"string","enum":["CardContactless","ChipAndPin"],"description":"The type of entry used to capture the card details.","example":"ChipAndPin","minLength":1},"merchantPointOfSaleId":{"type":"string","description":"The unique identifier for the merchant point of sale.","example":"POS-001","minLength":1}}}},"components/schemas/SecurityLevel":{"id":"components/schemas/SecurityLevel","kind":"json-schema","title":"SecurityLevel","data":{"type":"object","description":"Details about the security level of the transaction.","required":["primaryAccountNumber"],"properties":{"primaryAccountNumber":{"type":"string","description":"The primary account number.","example":"{primaryAccountNumber}","minLength":1}}}},"components/schemas/TransactionMethod":{"id":"components/schemas/TransactionMethod","kind":"json-schema","title":"TransactionMethod","data":{"type":"object","description":"Details about the transaction method.","required":["entryMode","intent"],"properties":{"entryMode":{"type":"string","enum":["Instore","Ecom"],"description":"The entry mode of the transaction."},"intent":{"type":"string","enum":["Purchase","Authorisation","EstimatedAuthorisation","Capture","FinalCapture","Refund","Reversal"],"description":"The intent of the transaction."}}}},"components/schemas/DccRateResponse":{"id":"components/schemas/DccRateResponse","kind":"json-schema","title":"DccRateResponse","data":{"type":"object","description":"The response body containing the DCC rate.","required":["state","amounts","exchangeRate","messaging","providerResponse"],"properties":{"state":{"type":"string","enum":["Available","NotAvailable","CardEligible","CardNotEligible","Error"],"description":"The state of the DCC rate request."},"amounts":{"$ref":"#/components/schemas/ResponseAmounts"},"exchangeRate":{"$ref":"#/components/schemas/ExchangeRate"},"messaging":{"$ref":"#/components/schemas/Messaging"},"providerResponse":{"oneOf":[{"$ref":"#/components/schemas/ElavonProviderResponse"},{"$ref":"#/components/schemas/FexcoProviderResponse"}]}}}},"components/schemas/Messaging":{"id":"components/schemas/Messaging","kind":"json-schema","title":"Messaging","data":{"type":"object","description":"Details about the messaging of the DCC rate request.","required":["markUpMessage","disclaimer"],"properties":{"markUpMessage":{"type":"string","description":"Message about the markup.","example":"Competitive exchange rate with 3.5% markup"},"disclaimer":{"type":"string","description":"Disclaimer text about the rate.","example":"Exchange rate includes markup and may vary."}}}},"components/schemas/ExchangeRate":{"id":"components/schemas/ExchangeRate","kind":"json-schema","title":"ExchangeRate","data":{"type":"object","description":"Details about the exchange rate.","required":["rate","exponent","markUpPercentage","commissionRate","margin"],"properties":{"rate":{"type":"number","description":"The foreign exchange rate.","example":0.855},"exponent":{"type":"integer","description":"The exponent of the foreign exchange rate.","example":3},"markUpPercentage":{"type":"number","description":"The markup percentage.","example":3},"commissionRate":{"type":"number","description":"The commission rate applied.","example":0.025},"margin":{"type":"number","description":"The margin applied.","example":2.1}}}},"components/schemas/ElavonProviderResponse":{"id":"components/schemas/ElavonProviderResponse","kind":"json-schema","title":"ElavonProviderResponse","data":{"type":"object","description":"Details about the Elavon provider response.","allOf":[{"$ref":"#/components/schemas/BaseProviderResponse"},{"type":"object","required":["referenceId","terminalId"],"properties":{"provider":{"type":"string","description":"The name of the provider.","example":"Elavon"},"referenceId":{"type":"string","description":"The Elavon reference ID.","example":"REF123456789"},"terminalId":{"type":"string","description":"The terminal ID provided by Elavon.","example":"TERM001"}}}]}},"components/schemas/FexcoProviderResponse":{"id":"components/schemas/FexcoProviderResponse","kind":"json-schema","title":"FexcoProviderResponse","data":{"type":"object","description":"Details about the Fexco provider response.","allOf":[{"$ref":"#/components/schemas/BaseProviderResponse"},{"type":"object","required":["referenceId","terminalId"],"properties":{"provider":{"type":"string","description":"The name of the provider.","example":"Fexco"},"referenceId":{"type":"string","description":"The reference ID provided by Fexco.","example":"FX987654321"},"terminalId":{"type":"string","description":"The terminal ID provided by Fexco.","example":"TERM001"}}}]}},"components/schemas/ErrorResponse":{"id":"components/schemas/ErrorResponse","kind":"json-schema","title":"ErrorResponse","data":{"type":"object","description":"Details about the error response.","required":["error","message"],"properties":{"error":{"type":"string","description":"The error code.","example":"VALIDATION_ERROR"},"message":{"type":"string","description":"The error message.","example":"Either encryptedPayload or primaryAccountNumber must be provided in securityLevel"},"details":{"type":"string","description":"Additional details about the error.","example":"List [ \"Field 'merchant' is required\", \"Field 'localTransaction' must be greater than 0\" ]"}}}}},"exampleStore":{"paths/~1dcc~1rate/post/requestBody/content/application~1json/examples/elavon-example":{"value":{"merchant":"MERCHANT-001","site":"SITE-001","exchangeRateProvider":"Elavon","securityLevel":{"primaryAccountNumber":"{primaryAccountNumber}"},"transactionMethod":{"entryMode":"Instore","intent":"Authorisation"},"pointOfInteraction":{"entryType":"ChipAndPin","merchantPointOfSaleId":"POS-001"},"amounts":{"localTransaction":100,"localCurrencyCode":"USD","cardHolderCurrencyCode":"EUR"}},"key":"elavon-example","summary":"Elavon","description":"Example request for Elavon provider.","id":"paths/~1dcc~1rate/post/requestBody/content/application~1json/examples/elavon-example"},"paths/~1dcc~1rate/post/requestBody/content/application~1json/examples/fexco-example":{"value":{"merchant":"MERCHANT-001","site":"SITE-001","exchangeRateProvider":"Fexco","securityLevel":{"primaryAccountNumber":"{primaryAccountNumber}"},"transactionMethod":{"entryMode":"Instore","intent":"Authorisation"},"pointOfInteraction":{"entryType":"ChipAndPin","merchantPointOfSaleId":"POS-001"},"amounts":{"localTransaction":100,"localCurrencyCode":"USD","cardHolderCurrencyCode":"EUR"}},"key":"fexco-example","summary":"Fexco","description":"Example request for Fexco provider.","id":"paths/~1dcc~1rate/post/requestBody/content/application~1json/examples/fexco-example"},"paths/~1dcc~1rate/post/responses/200/content/application~1json/examples/elavon-response":{"value":{"state":"Available","amounts":{"local":{"transaction":100,"currencyCode":"USD"},"cardholder":{"transaction":85.5,"currencyCode":"EUR"}},"exchangeRate":{"rate":0.855,"exponent":3,"markUpPercentage":3.5,"commissionRate":0.025,"margin":2.1},"messaging":{"markUpMessage":"Competitive exchange rate with 3.5% markup","disclaimer":"Exchange rate includes markup and may vary"},"providerResponse":{"provider":"Elavon","referenceId":"REF123456789","terminalId":"TERM001"}},"key":"elavon-response","summary":"Elavon","description":"Example response from Elavon provider","id":"paths/~1dcc~1rate/post/responses/200/content/application~1json/examples/elavon-response"},"paths/~1dcc~1rate/post/responses/200/content/application~1json/examples/fexco-response":{"value":{"state":"Available","amounts":{"local":{"transaction":100,"currencyCode":"USD"},"cardholder":{"transaction":86.2,"currencyCode":"EUR"}},"exchangeRate":{"rate":0.862,"exponent":3,"markUpPercentage":3.2,"commissionRate":0.022,"margin":1.8},"messaging":{"markUpMessage":"Fexco competitive rate with 3.2% markup","disclaimer":"Fexco rate subject to market conditions"},"providerResponse":{"provider":"Fexco","referenceId":"FX987654321","terminalId":"TERM001"}},"key":"fexco-response","summary":"Fexco","description":"Example response from Fexco provider","id":"paths/~1dcc~1rate/post/responses/200/content/application~1json/examples/fexco-response"},"paths/~1dcc~1rate/post/responses/200/content/application~1json/examples/dcc-not-available":{"value":{"state":"NotAvailable","amounts":{"local":{"transaction":100,"currencyCode":"USD"},"cardholder":{"transaction":0,"currencyCode":"EUR"}},"exchangeRate":{"rate":0,"exponent":0,"markUpPercentage":0,"commissionRate":0,"margin":0},"messaging":{"markUpMessage":"","disclaimer":"DCC service not available for this transaction"},"providerResponse":{"provider":"Elavon","referenceId":"","terminalId":""}},"key":"dcc-not-available","summary":"Not available","description":"Example response when DCC service is not available","id":"paths/~1dcc~1rate/post/responses/200/content/application~1json/examples/dcc-not-available"}},"securitySchemeStore":{},"servers":[{"url":"https://api-services.pxp.io/api/v1","description":"Production environment"},{"url":"https://api-services.test.pxp.io/api/v1","description":"Sandbox environment"}]},"options":{"hideSidebar":true,"mockServer":{"url":"/_mock/apis/dcc","position":"off","description":"Mock server"},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/apis/dcc.json?download"},{"url":"/_bundle/apis/dcc.yaml?download"}],"excludeFromSearch":false,"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"DCC rate service API","description":"This is an API reference for the DCC (Dynamic Currency Conversion) rate service."}},"baseSlug":"/apis/dcc","routesMapping":{}}