Skip to content

Withdraw purchase

/me/withdraw_purchase

Target audience: Developers

Withdraw purchase

Introduction

This endpoint is used to withdraw a purchase on behalf of the authenticated account. It will publish a helpdesk message for the purchase withdrawal, which can then be handled by the back-office.

Exactly one of user_product_id or order_id must be provided to identify the purchase to withdraw.

URI

Environment URI
Stage https://payway-api.stage.adeprimo.se/external/api/v1/me/withdraw_purchase
Production https://backend.worldoftulo.com/external/api/v1/me/withdraw_purchase

Requirements

Identity Scope
Yes /external/me/w

Parameters

Field Required Type Description
user_product_id Optional String The id of the user product to withdraw. Exactly one of user_product_id or order_id must be provided.
Size range: ..24
Allowed values: "/^[a-f\d]{24}$/i"
order_id Optional String The id of the order to withdraw. Exactly one of user_product_id or order_id must be provided.
Size range: ..128

Curl Example

curl --request POST \
--url https://payway-api.stage.adeprimo.se/external/api/v1/me/withdraw_purchase \
--header 'accept: application/json' \
--header 'authorization: Bearer <access_token_with_identity>' \
--header 'content-type: application/json' \
--data '{
         "user_product_id": "50f3ac249f6aef294d000007"
       }'

Response

Example Response: Successfully created withdrawal request

HTTP 201
{
  "id": "5dd783066e95521db3365944"
}

Errors

This API uses the common error conventions of the Payway API

See common error responses