Checking the Status of a Mandate is important to know when the user has gone through the process. We suggest that you check this status by an API call after the bg-mandate form has redirected you back to your application through either success_url
, error_url
or cancel_url
.
Endpoint
To check the status of a mandate, make a GET request to the following endpoint:
GET https://bgmandate.pingpayments.com/mandate/{mandate_id}
Response
The response will indicate the current status of the mandate:
{
"status": "<current-status>"
}
Possible statuses
These are the possible statuses of an autogiro mandate:
Status Value | Description |
---|---|
UNSIGNED | The mandate has been created but not yet signed by the customer. |
SIGNED | The mandate has been signed by the customer, typically using BankID. |
SENT | The mandate has been sent to Bankgirot for processing after being signed. |
APPROVED | The mandate has been approved by Bankgirot. |
REJECTED | The mandate has been rejected by Bankgirot or the customer. |
CANCELLED | The mandate has been cancelled after being approved by the customer or by Ping Payments. |
Using the mandate-id for Creating a Payment
When creating an Autogiro-payment with Ping Payments, use the mandate_id
obtained from the Bgmandate creation process. The payment should be made through the existing payment orders API with autogiro
as the method and bankgiro
as the provider.
Endpoint
Use the initiate payment endpoint:
POST https://sandbox.pingpayments.com/payments/api/v1/payment_orders/{payment_order_id}/payments
Request body details
Include the mandate_id in the provider_method_parameters object:
{
"method": "autogiro",
"provider": "bankgiro",
"provider_method_parameters": {
"mandate_id": "<mandate-id-from-bgmandate-link>"
}
}
Callbacks
The payment is being sent to Bankgirot in the next payment file window, which is the next 19:00 in Swedish Time on a banking day. The payment will have the status PENDING
until the next clearing window on the next banking day, usually 13:00 the day after the payment file has been processed.
Callbacks are done the same way as any other payment method.