The current /public/checkout resource is a little devoid of meaning. It returns an object of type PaymentRedirection which has little metadata to convey how it should be interpreted.
Suggested approach
Following the lead on (closed) issue #56, regarding third-party APIs. Some fields should be added to the PaymentRedirection data type:
requestMethod - Accepted method for forwarding a payment request to the target URL (probably POST)
requestPayloadType - Accepted body format to be forwarded to URL (form data, JSON, others?)
tokenInclusion - Place where the token must be included (request body, header)
tokenName - Name/key for the secret needed to use the target URL
tokenValue - Value of the secret needed to use the URL
The current
/public/checkout
resource is a little devoid of meaning. It returns an object of typePaymentRedirection
which has little metadata to convey how it should be interpreted.Suggested approach Following the lead on (closed) issue #56, regarding third-party APIs. Some fields should be added to the
PaymentRedirection
data type:requestMethod
- Accepted method for forwarding a payment request to the target URL (probably POST)requestPayloadType
- Accepted body format to be forwarded to URL (form data, JSON, others?)tokenInclusion
- Place where the token must be included (request body, header)tokenName
- Name/key for the secret needed to use the target URLtokenValue
- Value of the secret needed to use the URL