alt

Important information

Please be advised that there will be a scheduled downtime across our API network on November 05 and November 07, 2024. For more information, visit our platform status portal.:
- Scheduled maintenance on November 5, 2024
- Scheduled maintenance on November 7, 2024

Unzer

[Deprecated] Confirm shipment

Confirm shipping your goods to the customer and activate the insurance.

Overview

Shipment is the process of sending the goods to the customer. Once you have sent the goods, you must confirm the shipment to activate the insurance requested in the previous /charge request. The customer now has 40 days after this date to make the payment. You receive the money regardless of whether the customer pays or not.

Shipment is available for Unzer Invoice and Unzer Installment.

icon
Your invoice payments are only paid out if you send a shipping transaction.

Make an empty-body POST call to payments/{paymentId}/shipments:

POST https://api.unzer.com/v1/payments/s-pay-762/shipments 

{
}
{
    "id": "s-shp-1",
    "isSuccess": true,
    "isPending": false,
    "isError": false,
    "message": {
        "code": "COR.000.100.112",
        "customer": "Request successfully processed in 'Merchant in Connector Test Mode'"
    },
    "amount": "100.0000",
    "currency": "EUR",
    "date": "2021-07-24 21:28:57",
    "resources": {
        "customerId": "s-cst-138b70861e6c",
        "paymentId": "s-pay-6985",
        "basketId": "",
        "metadataId": "",
        "typeId": "s-ivg-lghxo7dplglq"
    },
    "processing": {
        "uniqueId": "31HA07BC81AB33BC5F442A07D32F2DE4",
        "shortId": "4017.5093.7276"
    }
}
PropertyTypeDescription
idStringThe shipment’s unique ID.
isSuccessBooleanSet to true if the transaction was successful.
isPendingBooleanSet to true if the transaction is pending (for example, if a redirect to an external system is required).
isErrorBooleanSet to true if an error occurs.
messageStringAn error message describing the error in more detail.
codeStringA unique ID of the message. For details, go to Error code structure.
customerStringMessage displayed to the customer.
amountNumberThe shipment amount.
currencyStringThe shipment currency, in the ISO 4217 alpha-3 format.
dateStringDate and time of the shipment.
customerIdStringThe ID of the customers resource.
paymentIdStringThe ID of the related payment resource.
basketIdStringThe ID of the related baskets resource.
metadataIdStringThe ID of the related metadata resource.
typeIdStringThe ID of the related payment type resource.
uniqueIdStringThe ID of the transaction process.
shortIdStringThe short ID of the transaction process.

Cancel after shipment

If the customer requests a refund or cancels the order, you can execute a cancel on a charge and this amount is deducted from the transaction amount. You must always specify the reason code for a cancel.

Possible reason codes are:

reasonCodeDescription
CANCELYou can use CANCEL if you like to cancel a remaining amount, for instance if you are not going to ship certain goods.
RETURNRETURN is used if you want to refund a certain amount for goods the customer returned to you.
CREDITCREDIT can be used if you want to reduce the order amount after goods are shipped for example, to grant a discount for defect goods.
POST https://api.unzer.com)/payments/{{order_id}}/charges/{{charge_id}}/cancels
{
  "amount" : "15",
  "reasonCode": "RETURN"
}
POST https://api.unzer.com)/payments/{{order_id}}/charges/{{charge_id}}/cancels
{
    "id": "s-cnl-1",
    "isSuccess": true,
    "isPending": false,
    "isError": false,
    "message": {
        "code": "COR.000.100.112",
        "merchant": "Request successfully processed in 'Merchant in Connector Test Mode'",
        "customer": "Your payments have been successfully processed in sandbox mode."
    },
    "amount": "15.0000",
    "currency": "EUR",
    "date": "2021-08-13 09:19:35",
    "resources": {
        "customerId": "s-cst-138b70861e6c",
        "paymentId": "s-pay-6985",
        "basketId": "s-bsk-4",
        "metadataId": "",
        "payPageId": "",
        "traceId": "3ced3c97f67f1b23042804547344e5f5",
        "typeId": "s-ivs-lghxo7dplglq"
    },
    "invoiceId": "INV-123456",
    "paymentReference": "your reference",
    "processing": {
        "uniqueId": "31HA07BC8109A3046EBC4A560FE00ACE",
        "shortId": "4927.7277.3621",
        "traceId": "3ced3c97f67f1b23042804547344e5f5"
    }
}