How to sign up a customer to autogiro and do payments through Ping Payments
Payments through Autogiro is done through the method autogiro by the provider bankgiro, and all you need is a mandate-id for your customer. A mandate-id is created through the customer bg-mandate form through user-sessions created through our Ping Payments bgmandate API.
Endpoint
To create a Bgmandate link, make a POST request to the following endpoint:
POST https://bgmandate.pingpayments.com/mandate
Request body
Include the following parameters in the request body:
{
"tenant_id": "your-tenant-id",
"success_url": "your-success-redirect-url",
"error_url": "your-error-redirect-url",
"cancel_url": "your-cancel-redirect-url",
"mandate_description": "description-of-mandate",
"tenant_logo_url": "your-tenant-logo-url",
"beneficiary_logo_url": "your-beneficiary-logo-url",
"beneficiary_logo_label": "Mottagare"
}
Key | Value | Description |
---|---|---|
tenant_id | your-tenant-id | Your unique identifier for the tenant initiating the mandate. |
success_url | your-success-redirect-url | URL to redirect the user upon successful mandate creation. Should be a successful page on your end! |
error_url | your-error-redirect-url | URL to redirect the user if an error occurs during mandate creation. Should be a error page on your end! |
cancel_url | your-cancel-redirect-url | URL to redirect the user if they cancel the mandate creation process. Should be a cancel page on your end! |
mandate_description | description-of-mandate | A brief description of the mandate for the user's understanding. This is important for logging purposes on how the service is being used. A bad mandate_description could lead to a decline by Ping Payments compliance team. |
tenant_logo_url | your-tenant-logo-url | URL of the tenant's logo to display during the mandate creation process. This is optional. |
beneficiary_logo_url | your-beneficiary-logo-url | URL of the beneficiary's logo to display during the mandate creation process. This is optional. |
beneficiary_logo_label | Mottagare | Label for the beneficiary logo, typically a word or a sentence that builds trust in the user's language. This is optional. |
Response body
The response will contain a mandate_id
and a sign_url
:
{
"mandate_id": "<generated-mandate-id>",
"sign_url": "<url-for-signing-mandate>"
}
Redirect the user to sign_url or iframe the sign_url in your application. We recommend redirect, because iframing in the current solution can be cumbersome in some web-browsers. Therefore try to build trust by adding logos for tenant and beneficiaries.
Save the mandate-id!
Ensure to save the mandate-id in your database, because you need it later when doing payments for that customer!