zimpler-developers

Refunds

This part of the documentation describes the refund process.

# Refund process

Refund process

# POST /v4/refunds

The POST endpoint can be called multiple times. There are two possible limitations on how many times a refund can be created:

# REQUEST

{
  // required
  "deposit_id":"12dsads81237ad821",
  "country_code": "SE",
  "site_display_name": "Best Website.com",
  "ref": "merchant-transaction-ref",
  "amount": "100.00",
  "currency": "SEK",
  "site": "example.com",
  "user_ip":"123.456.78.90",
  // optional
  "notification_url": "https://example.com/return_path/transaction_identifier",
  "account_ref": "CustomerRefOnMerchantSide",
  "email": "bobben@example.com",
  "mobile_phone": "+46700000000",
  // one of user_id or national_identification_number is required for the countries SE or FI
  "user_id": "f65191e4-3064-cc45-df68-8130e4a11197",
  "national_identification_number": "19810101-0000"
}

# RESPONSES

# Successful

{
	...
	"id": "6a734480-a051-4a05-8405-ac2d8f49102f",
	"state": "authorized",
	"user_id": "9b9047da-175f-d29a-dae8-85b428488c2e",
	"kyc_info": {
		"country_code": "SE",
		"user_id": "9b9047da-175f-d29a-dae8-85b428488c2e",
		"national_identification_number": "19810101-0000",
		"first_name": "Henrik Testperson",
		"last_name": "Testson",
		"date_of_birth": "1981-01-01",
		"pep": false,
		"address": {
			"line_1": "Box 1529 / Prod Utv",
			"line_2": null,
			"postcode": "17229",
			"city": "Sundbyberg",
			"country": "Sweden"
		}
	},
	 //will be provided or partial provided depending on the information we recive. 
	"account_information": [
		{
			"type": "iban",
			"account_number": "XXX",
		},
		{
			"type": "national-SE",
			"clearing_number": "XXX",
			"account_number": "XXX",
		},
		{
			"type": "bic",
			"bic": "ELLFSESS"
		}
	],
}

# POST /v4/refunds/:id/approve

Note: Amount has to be the same as provided in the POST /v4/refunds.

# REQUEST

{
  //required
  "amount":"100.00"
}

# RESPONSES

# Successful

{
	...
  	"state": "approved"
}

# POST /v4/refunds/:id/reject

# RESPONSES

# Successful

{
	...
  	"state": "rejected"
}

# GET /v4/refunds/:id

Will return the full refund object with the current state.