Skip to content

Payment Reference

Payment Reference

WARNING

This feature is only available starting with Shopware 6.4.1.0.

These two requests are executed against your API, the up to two endpoints you define per payment method. All bodies are JSON encoded.

Pay

POST https://payment.app/pay

This request gets called, when the users hits Confirm Order in Shopware.

Parameters

ParameterTypeDescription
Header
shopware-shop-signature*stringThe hmac-signature of the JSON encoded body content, signed with the shop secret returned from the registration request
Body
order*OrderEntityThe order entity from Shopware including all necessary associations (like currency, shipping address, billing address, line items). See Shopware for detailed and current structure.
orderTransaction*OrderTransactionEntityThe order transaction entity from Shopware representing the payment you are supposed to process. See Shopware for detailed and current structure.
orderTransaction.id*stringThis should be used to identify the order transaction on a second finalize request.
returnUrlstringThis URL is the URL your app or your payment provider is supposed to redirect back to, once the user has been redirected to the payment provider with the URL you provide in your response. Only supplied on asynchronous payments.
source*objectData to identify the shop that sent this request
source.url*stringThe Shop URL sending this request
source.shopId*stringThe shop id you can use to identify the sho that has been registered before with your app.
source.appVersion*stringThe version of the app that is installed in the shop.

Responses

200

json5
/* Successful redirect */
{
  "redirectUrl": "https://payment.app/user/go/here/068b1ec4d7ff431b95d3b7431cc725aa/"
}
json5
/* Failure due to missing credentials */
{
  "status": "fail",
  "message": "The shop has not provided all credentials for the payment provider."
}

Finalize

POST https://payment.app/finalize

This request gets called once the user returns to the returnUrl Shopware provided in the first request.

Parameters

ParameterTypeDescription
Header
shopware-shop-signature*stringThe hmac-signature of the JSON encoded body content, signed with the shop secret returned from the registration request
Body
orderTransaction*OrderTransactionEntityThe order transaction entity from Shopware representing the payment you are supposed to process. See Shopware for detailed and current structure.
orderTransaction.id*stringThis should be used to identify the order transaction on a second finalize request.
source*objectData to identify the shop that sent this request
source.url*stringThe Shop URL sending this request
source.shopId*stringThe shop id you can use to identify the sho that has been registered before with your app.
source.appVersion*stringThe version of the app that is installed in the shop.

Responses

200

json5
/* Successful redirect */
{
  "status": "paid"
}
json5
/* Failure due to missing funds */
{
  "status": "fail",
  "message": "The user did not have adequate funds."
}
json5
/* Failure if the user has not finished the payment process. */
{
  "status": "cancel",
  "message": "The user did not finish payment."
}