Skip to main content

Delayed Payment Notification

Some payment methods return the final payment status immediately when a transaction is attempted, while others can experience a delay. In cases where there’s a delay, such as a network timeout with card networks or banks, the payment status will initially be set to "processing".

When a payment is created and the final status is not immediately available, Dibsy continues to check with the card network or issuing bank. Once the payment status is confirmed, it will transition to either "succeeded" or "failed". You'll receive a webhook notification once the final status is determined.

A "succeeded" status guarantees that the payment has been completed and that funds will be settled. Until you receive this confirmation, it’s recommended to keep any associated orders in a pending state and avoid fulfilling them prematurely.

note

To ensure you are notified when a delayed payment succeeds or fails, use webhooks to listen for payment status updates.

Request

POST /payments HTTP/1.1
Content-Type: application/json

{
"method": "applepay",
"amount": {
"value": "40.00",
"currency": "QAR"
},
"description": "Order #1337",
"applePayToken": "{\"paymentData\": {\"version\": \"EC_v1\", \"data\": \"vK3Bbr...lg==\"}}",
"redirectUrl": "https://webshop.com/redirect?orderId=12345",
"webhookUrl": "https://webshop.com/webhook?orderId=12345",
"metadata": {
"order": 1755
}
}

Response

{
"id": "pt_6CVWLUT7fxhbWZZS88",
"resource": "payment",
"mode": "live",
"amount": {
"value": "40.00",
"currency": "QAR"
},
"amountNet": {
"value": "38.50",
"currency": "QAR"
},
"amountRemaining": {
"value": "40.00",
"currency": "QAR"
},
"description": "Order #1337",
"method": "applepay",
"redirectUrl": "https://webshop.com/redirect?orderId=12345",
"webhookUrl": "https://webshop.com/webhook?orderId=12345",
"status": "processing",
"organizationId": "22858676",
"sequenceType": "oneoff",
"metadata": {
"order": 1755
},
"createdAt": "2022-03-25T21:31:15.843917",
"_links": {
"self": {
"href": "https://api.dibsy.one/v2/payments/pt_6CVWLUT7fxhbWZZS88",
"type": "application/hal+json"
},
"dashboard": {
"href": "http://dashboard.dibsy.one/payments/pt_6CVWLUT7fxhbWZZS88",
"type": "text/html"
},
"documentation": {
"href": "http://api.dibsy.dev/#operation/Create%20Payment",
"type": "text/html"
}
}
}