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
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//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>â