payment_finished
payment_finished
You receive this webhook when Smart Glocal has completed an operation. The webhook body contains all the details of the operation, including its final status (in the status field). For example, if you are sending a payout and have received the succeeded status in this webhook, it means that the payout has been completed successfully.
warning
If the payment/payout status is failed and the session status is error, do not immediately attempt to retry the transaction, as the error status is not final. Instead contact Smart Glocal support to confirm the final status.
Parameters
| Name | Mandatory | Type | Description |
|---|---|---|---|
type | + | string | Webhook type: payment_finished |
session | + | object | Payment session |
Example
- API v1
- API v2
- Payout
- Payment
curl -X POST \
https://partner.com \
-H 'content-type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "payment_finished",
"session": {
"id": "ps_3230",
"status": "accepted",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"payments": [{
"id": "po_1313",
"status": "succeeded",
"created_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "user123",
"contacts": [{
"email": "user@gmail.com"
}]
},
"payment_method": {
"type": "card",
"card": {
"last4": "4242",
"brand": "visa",
"bin":"444600"
}
},
"amount_details": {
"amount": 10000,
"currency": "usd"
},
"transaction_info": {
"rrn": "425307614918",
"auth_code": "057441"
},
"metadata": "good"
}]
}
}'
curl -X POST \
https://partner.com \
-H 'content-type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "payment_finished",
"session": {
"id": "ps_3230",
"status": "accepted",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"acquiring_payments": [{
"id": "pm_1313",
"status": "succeeded",
"created_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "user123",
"contacts": [{
"email": "user@gmail.com"
}]
},
"payment_details": {
"type": "card",
"card": {
"last4": "4242",
"brand": "visa",
"bin":"444600"
}
},
"amount_details": {
"amount": 10000,
"currency": "usd"
},
"transaction_info": {
"rrn": "425307614918",
"auth_code": "057441"
},
"metadata": "good"
}]
}
}'
- Payout
- Payment
curl -X POST \
https://partner.com \
-H 'content-type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "payment_finished",
"session": {
"id": "ps_3230",
"status": "accepted",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"payout_list": [{
"id": "po_1313",
"status": "succeeded",
"created_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "user123",
"contacts": [{
"email": "user@gmail.com"
}]
},
"payout_details": {
"type": "card",
"card": {
"last4": "4242",
"brand": "visa",
"bin":"444600"
}
},
"amount_details": {
"amount": 10000,
"currency": "usd"
},
"transaction_info": {
"rrn": "425307614918",
"auth_code": "057441"
},
"metadata": "good"
}]
}
}'
curl -X POST \
https://partner.com \
-H 'content-type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "payment_finished",
"session": {
"id": "ps_3230",
"status": "accepted",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"payment_list": [{
"id": "pm_1313",
"status": "succeeded",
"created_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "user123",
"contacts": [{
"email": "user@gmail.com"
}]
},
"payment_details": {
"type": "card",
"card": {
"last4": "4242",
"brand": "visa",
"bin":"444600"
}
},
"amount_details": {
"amount": 10000,
"currency": "usd"
},
"transaction_info": {
"rrn": "425307614918",
"auth_code": "057441"
},
"metadata": "good"
}]
}
}'