Broker Application Flow Denmark
Basic API flow
Authentication
Every request requires an authorization header with a Bearer-token. A token lasts for 3600 seconds (1 hour). To get a token you may use your test-credentials received from Resurs Bank.
URL to get token: https://merchant-api.integration.resurs.com/oauth2/token
- Client ID
- Client Secret
- Scope= mock-merchant-api
Link to the call in swagger documentation: Get Token
Curl to get token
curl –location –request POST ‘https://merchant-api.integration.resurs.com/oauth2/token’–header ‘accept: application/json’ \-header ‘Content-Type: application/x-www-form-urlencoded’ \-data-urlencode ‘client_id=fill out client_id’ \-data-urlencode ‘client_secret=fill out client_secret’ \-data-urlencode ‘scope=mock-merchant-api’ \-data-urlencode ‘grant_type=client_credentials’
Get Store ID
Get available stores
A client may have access to multiple stores, therefore we need to know which store to make the application or payment for.
This can be done by getting the available stores. Each store has a store-id. This id will be used in the next step to specify for which store we would like to get the payment methods.
URL to get available stores: https://merchant-api.integration.resurs.com/v2/stores
Link to the call in swagger documentation: Get Stores
Curl to get available stores
curl –location –request GET ‘https://merchant-api.integration.resurs.com/v2/stores’–header ‘Authorization: Bearer <TOKEN>’
Get available payment methods
A store may have multiple payment methods available. The list of available payment methods will show what payment methods there are to apply from at the chosen store.
Each payment method has a paymentmethod id, wich will be used in the next step, when the application is created.
When presenting the payment methods to the customer, please note that by law you are required to display our terms/link to our terms regarding the credit payment methods. The link is found in this same request with “type: PRICE_INFO”
URL to get available payment methods: https://merchant-api.integration.resurs.com/v2/stores/{store_id}/payment_methods
Link to the call in swagger documentation: Get Payment Methods
Curl to get available payment methods
curl –location –request POST ‘https://merchant-api.integration.resurs.com/v2/stores/{store_id}/payment_methods’–header ‘Content-Type: application/json’ \-header ‘Authorization: Bearer <TOKEN>’
Get payment specification
To get an overview of what the API