Filling SAPI uses configuration to send additional headers to Mobile Payment Processing Applications (MPPA). In order to standardize communication and facilitate customization between public APIs and 3rd-party MPPAs, we extended Filling SAPI with an ADDITIONAL_HEADERS configuration parameter. This parameter is optional and can be defined as needed.
Current implementation
Additional headers are under the ADDITIONAL_HEADERS configuration parameter.
Example of an additional header environment variable:
ADDITIONAL_HEADERS={"basePath":"NL/prepay","country":"NL","tenantId":"TENANT","client-id":"123456789","client-secret":"987456321"}Properties defined in the ADDITIONAL_HEADERS configuration parameter will pass to the backend as headers when calling the MPPA endpoint, for instance:
"headers": "[Country: [NL] Testheader: [testValue] Content-Type: [application/json] X-Root-Correlation-Id: [fe913859-6538-4cb7-a57a-6b8dd7a1c09d] Tenantid: [Tenant.rnd-sharedqanew-rtl-eu-role1] Traceparent: [00-00309f49aa25b00cdec7bf235f81f948-c488eee0601aa593-01] Accept-Encoding: [identity] ]"Exception: basePath header will be passed in a base path to the backend, instead of passing as a header. It will be appended to the backend URL:
| ADDITIONAL_HEADERS config parameter: | Example of Backend URL |
|---|---|
| basePath header not defined | POST /api/mppa/login |
| basePath header defined as "basePath":"NL/prepay" | POST /api/mppa/NL/prepay/login |