Payment for shipment created in the offer mode
|integer||ID of the offer, which is available for paid shipment.|
Attribute is required
In response, the server returns 200 status with the object of the shipment.
After choosing the offer, other not selected offers are removed.
Caution! Asynchronous operation.
Since the purchase of shipment is asynchronous, the server will return details of the shipment, not taking into account the changes caused by the purchase (status change, assigning transport number), as this information will only be available after a certain time.
To obtain information about the successful purchase of the shipment, define in the organization settings the url address for sending information on
shipment_confirmed. This makes ShipX application to send the following information to the provided address:
List of errors that may occur when paying for shipment:
resource_not_found- may occur when a specific shipment does not exist or when the user has no access to
offer_unavailable- occurs when an attempt is made to pay for the offer with status other than
transaction_failed- may occur when attempt to pay for shipment failed,
offer_expired- the offer cannot be purchased because it has expired (offers are valid for 5 minutes after their preparation)