[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.
Confirm shipmentMake 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"
}
}
Property | Type | Description |
---|---|---|
id | String | The shipment’s unique ID. |
isSuccess | Boolean | Set to true if the transaction was successful. |
isPending | Boolean | Set to true if the transaction is pending (for example, if a redirect to an external system is required). |
isError | Boolean | Set to true if an error occurs. |
message | String | An error message describing the error in more detail. |
code | String | A unique ID of the message. For details, go to Error code structure. |
customer | String | Message displayed to the customer. |
amount | Number | The shipment amount. |
currency | String | The shipment currency, in the ISO 4217 alpha-3 format. |
date | String | Date and time of the shipment. |
customerId | String | The ID of the customers resource. |
paymentId | String | The ID of the related payment resource. |
basketId | String | The ID of the related baskets resource. |
metadataId | String | The ID of the related metadata resource. |
typeId | String | The ID of the related payment type resource. |
uniqueId | String | The ID of the transaction process. |
shortId | String | The short ID of the transaction process. |
Cancel after shipment
Cancel after shipmentIf 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:
reasonCode | Description |
---|---|
CANCEL | You can use CANCEL if you like to cancel a remaining amount, for instance if you are not going to ship certain goods. |
RETURN | RETURN is used if you want to refund a certain amount for goods the customer returned to you. |
CREDIT | CREDIT 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"
}
}